Hi,
Where and what should be modified in order to create a special SLA with dynamic time?
I mean all the tickets created today with SLA "Next Business Day" should have the same end date tomorrow at the end of office hours defined in Calendar.
I tried to tweak the Ticket.pm as I saw in here viewtopic.php?f=17&t=1897&p=8314&hilit= ... +day#p8314 but without success.
Any help is appreciated.
Best regards,
Andrei
[Solved] how to create an SLA for Next Business Day
Moderator: crythias
-
- Znuny newbie
- Posts: 15
- Joined: 30 Jan 2013, 11:26
- Znuny Version: OTRS::ITSM 3.2.1
- Real Name: Andrei Miron
- Company: Euroanswer
[Solved] how to create an SLA for Next Business Day
Last edited by andrei on 06 Feb 2013, 15:01, edited 1 time in total.
-
- Znuny newbie
- Posts: 15
- Joined: 30 Jan 2013, 11:26
- Znuny Version: OTRS::ITSM 3.2.1
- Real Name: Andrei Miron
- Company: Euroanswer
Re: how to create an SLA for Next Business Day
Hi,
I managed to solve this problem. I'll post here how I did it.
I use the file NLTime.pm create by BIG_jan (you can see in the previous message the forum discussion).
I modified the Ticket.pm like this:
- added use Kernel::System::NLTime;
- added $Self->{NLITimeObject} = Kernel::System::NLTime->new( %Param ); in the constructor (function "new")
- I change the function TicketEscalationPreferences adding in clause "if ( $Self->{ConfigObject}->Get('Ticket::Service') && $Ticket{SLAID} ) {" the following code:
if ($Escalation{Name} =~ m/^Next Business Day/) {
my $sol;
my $start = $Ticket{CreateTimeUnix};
#if the name of the SLA starts with Next Business Day then I have days not minutes so I replace the $Escalation times with appropiate values
if (!($Escalation{Name} =~ m/^Next Business Day Solution/)) {
#if I have Next Business Day Solution then I have days only in the Solution time the rest are defined in minutes
$sol = $Self->{NLITimeObject}->GetWorktimeUntilNextBusinessDay(
StartTime => $start,
Calendar => $Escalation{Calendar},
NumDays => $Escalation{FirstResponseTime}
);
$Escalation{FirstResponseTime} = $sol;
$sol = $Self->{NLITimeObject}->GetWorktimeUntilNextBusinessDay(
StartTime => $start,
Calendar => $Escalation{Calendar},
NumDays => $Escalation{UpdateTime}
);
$Escalation{UpdateTime} = $sol;
}
$sol = $Self->{NLITimeObject}->GetWorktimeUntilNextBusinessDay(
StartTime => $start,
Calendar => $Escalation{Calendar},
NumDays => $Escalation{SolutionTime}
);
$Escalation{SolutionTime} = $sol;
}
In this way when I declare an SLA with the name starting with "Next Business Day" then all the notiications will be calculated as working days. If the SLA is starting with "Next Business Day Solution" only the solution notifications is in days the rest are calculated and should be defined in minutes.
Best regards,
Andrei Miron
I managed to solve this problem. I'll post here how I did it.
I use the file NLTime.pm create by BIG_jan (you can see in the previous message the forum discussion).
I modified the Ticket.pm like this:
- added use Kernel::System::NLTime;
- added $Self->{NLITimeObject} = Kernel::System::NLTime->new( %Param ); in the constructor (function "new")
- I change the function TicketEscalationPreferences adding in clause "if ( $Self->{ConfigObject}->Get('Ticket::Service') && $Ticket{SLAID} ) {" the following code:
if ($Escalation{Name} =~ m/^Next Business Day/) {
my $sol;
my $start = $Ticket{CreateTimeUnix};
#if the name of the SLA starts with Next Business Day then I have days not minutes so I replace the $Escalation times with appropiate values
if (!($Escalation{Name} =~ m/^Next Business Day Solution/)) {
#if I have Next Business Day Solution then I have days only in the Solution time the rest are defined in minutes
$sol = $Self->{NLITimeObject}->GetWorktimeUntilNextBusinessDay(
StartTime => $start,
Calendar => $Escalation{Calendar},
NumDays => $Escalation{FirstResponseTime}
);
$Escalation{FirstResponseTime} = $sol;
$sol = $Self->{NLITimeObject}->GetWorktimeUntilNextBusinessDay(
StartTime => $start,
Calendar => $Escalation{Calendar},
NumDays => $Escalation{UpdateTime}
);
$Escalation{UpdateTime} = $sol;
}
$sol = $Self->{NLITimeObject}->GetWorktimeUntilNextBusinessDay(
StartTime => $start,
Calendar => $Escalation{Calendar},
NumDays => $Escalation{SolutionTime}
);
$Escalation{SolutionTime} = $sol;
}
In this way when I declare an SLA with the name starting with "Next Business Day" then all the notiications will be calculated as working days. If the SLA is starting with "Next Business Day Solution" only the solution notifications is in days the rest are calculated and should be defined in minutes.
Best regards,
Andrei Miron
You do not have the required permissions to view the files attached to this post.