Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
best-practical
rt-extension-sla
Commits
1721793c
Commit
1721793c
authored
Apr 19, 2012
by
Ruslan Zakirov
Browse files
provide way to set Timezone in the config
for a level and for a queue
parent
b62a1c0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
lib/RT/Extension/SLA.pm
lib/RT/Extension/SLA.pm
+18
-3
No files found.
lib/RT/Extension/SLA.pm
View file @
1721793c
...
...
@@ -336,7 +336,14 @@ sub CalcBusinessHours {
sub
Agreement
{
my
$self
=
shift
;
my
%args
=
(
Level
=>
undef
,
Type
=>
'
Response
',
Time
=>
undef
,
@
_
);
my
%args
=
(
Level
=>
undef
,
Type
=>
'
Response
',
Time
=>
undef
,
Ticket
=>
undef
,
Queue
=>
undef
,
@
_
);
my
$meta
=
$
RT::
ServiceAgreements
{'
Levels
'}{
$args
{'
Level
'}
};
return
undef
unless
$meta
;
...
...
@@ -366,6 +373,12 @@ sub Agreement {
}
}
$args
{'
Queue
'}
||=
$args
{'
Ticket
'}
->
QueueObj
if
$args
{'
Ticket
'};
if
(
$args
{'
Queue
'}
&&
ref
$
RT::
ServiceAgreements
{'
QueueDefault
'}{
$args
{'
Queue
'}
->
Name
}
)
{
$res
{'
Timezone
'}
=
$
RT::
ServiceAgreements
{'
QueueDefault
'}{
$args
{'
Queue
'}
->
Name
}{'
Timezone
'};
}
$res
{'
Timezone
'}
||=
$meta
->
{'
Timezone
'}
||
$
RT::
Timezone
;
$res
{'
BusinessHours
'}
=
$meta
->
{'
BusinessHours
'};
return
\
%res
;
...
...
@@ -437,8 +450,10 @@ sub GetDefaultServiceLevel {
else
{
return
$args
{'
Queue
'}
->
SLA
if
$args
{'
Queue
'}
->
SLA
;
}
if
(
$
RT::
ServiceAgreements
{'
QueueDefault
'}
&&
$
RT::
ServiceAgreements
{'
QueueDefault
'}{
$args
{'
Queue
'}
->
Name
}
)
{
return
$
RT::
ServiceAgreements
{'
QueueDefault
'}{
$args
{'
Queue
'}
->
Name
};
if
(
my
$info
=
$
RT::
ServiceAgreements
{'
QueueDefault
'}{
$args
{'
Queue
'}
->
Name
}
)
{
return
$info
unless
ref
$info
;
return
$info
->
{'
Level
'};
}
}
return
$
RT::
ServiceAgreements
{'
Default
'};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment