Not sure if this is how you'd want to solve this but here's a thought on what you could do.<div><br></div><div>1) Hide the SLA field from view (or only show the content, basically the goal is to not give users the ability to edit the field themselves)</div>
<div><br></div><div>2) Create a queue specific scrip which sets the SLA value based on either simply the queue name (which can be done with the SLA plugin) or based on the priority field or other CF fields.</div><div><br>
</div><div>For the latter we have the following setup:</div><div><br></div><div>- A CF called "Ticket Priority", dropdown (to prevent error input, could be done with the priority to string plugin as well)</div><div>
- A CF called "Ticket Type" (incident, problem, change as possible values)</div><div>- And the SLA field with possible values named "4, 8, 24, 48" respectively related to the amount of hours.</div><div>
<br></div><div>Then with the following scrip we set the SLA value based on the combination Ticket Priority and Ticket Type, this scrip could be simplified to only match priority or even match other CF's:</div><div><br>
</div><div>* Condition: On Transaction</div><div>* Action: User Defined</div><div>* Template: Blank</div><div>* Stage: Transaction Batch</div><div>* Custom condition: <empty></div><div>* Custom action prep: return 1;</div>
<div>* Custom action cleanup:</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">my $my_type = $self->TicketObj->FirstCustomFieldValue('Ticket Type');</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">my $my_prio = $self->TicketObj->FirstCustomFieldValue('Ticket Prioriteit');</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br>
</font></div><div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^I/ && $my_prio == '1') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '4'); $self->TicketObj->SetPriority ('1'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^I/ && $my_prio == '2') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '8'); $self->TicketObj->SetPriority ('2'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^I/ && $my_prio == '3') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '24'); $self->TicketObj->SetPriority ('3'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^I/ && $my_prio == '4') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '48'); $self->TicketObj->SetPriority ('4'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^UC_I/ && $my_prio == '1') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '4'); $self->TicketObj->SetPriority ('1'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^UC_I/ && $my_prio == '2') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '8'); $self->TicketObj->SetPriority ('2'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^UC_I/ && $my_prio == '3') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '24'); $self->TicketObj->SetPriority ('3'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^UC_I/ && $my_prio == '4') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '48'); $self->TicketObj->SetPriority ('4'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^P/ && $my_prio == '1') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '48'); $self->TicketObj->SetPriority ('1'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^P/ && $my_prio == '2') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '48'); $self->TicketObj->SetPriority ('2'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^P/ && $my_prio == '3') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '48'); $self->TicketObj->SetPriority ('3'); }</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">if($my_type =~ /^P/ && $my_prio == '4') { $self->TicketObj->AddCustomFieldValue(Field => 'SLA', Value => '480'); $self->TicketObj->SetPriority ('4'); }</font></div>
</div><div><br></div><div>In addition this scrip makes sure that the CF Priority is leading, when the SLA is set it changes the priority field (the default one) to the value of the CF.</div><div><br></div><div>We chose the CF solution for the priority because this field is also visible during ticket creation (easy input for users).</div>
<div><br></div><div>Modifying this scrip to match your flows should be quite easy + this can be queue specific.</div><div><br></div><div>Because it's queue specific we chose to name the SLA fields values (sla's) based on the amount of hours, this makes it easier to reuse those values in different queue's.</div>
<div><br></div><div>Hopefully this gives you some ideas.</div><div><br></div><div><br clear="all">-- Bart<br>
<br><br><div class="gmail_quote">Op 24 november 2011 10:46 schreef Soula, Christophe <span dir="ltr"><<a href="mailto:csoula@hach-lange.com">csoula@hach-lange.com</a>></span> het volgende:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="FR-CH" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US">I have setup the SLA extension 0.05 (Business::Hours 0.09) and works pretty well if I focus it on one single timezone but my problem is still that I have IT team in Europe (Timezone Europe/Berlin) and IT team in US (Timezone : America/Denver).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">At this step and moving from Mod_perl to fastcgi I’m able to set per user timezone and display the right time for EU and US associates.<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US">Please find here the SLA part of my RT_SiteConfig.pm (RT 4.02):<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">%RT::ServiceAgreements = (<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        Default => 'Priority 1',<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">        QueueDefault => {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                'US_IT_Service_Center' => 'HachIT',<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                Europe_IT_Service_Center' => 'Priority 1',<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">        Levels => {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                'HachIT' => {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                        BusinessHours => 'US1',<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                        Response => { BusinessMinutes => 15 },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                        Resolve  => { BusinessMinutes => 60*4 },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                },<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US">                'Priority 1' => {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                        BusinessHours => 'Europe1',<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US">                        Response => { BusinessMinutes => 15 },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                        Resolve  => { BusinessMinutes => 60*4 },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                'Priority 2' => {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                        BusinessHours => 'Europe1',<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                        Response => { BusinessMinutes => 30 },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                        Resolve  => { BusinessMinutes => 60*8*4 },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                'Priority 3' => {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                        BusinessHours => 'Europe1',<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                        Response => { BusinessMinutes => 45 },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                        Resolve  => { BusinessMinutes => 60*8*20 },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">        },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">%RT::ServiceBusinessHours = (<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">        'US1' => {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                0 => { Name => 'Sunday', Start => undef, End => undef },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                1 => { Name => 'Monday', Start => '15:00', End => '23:59' },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                2 => { Name => 'Tuesday', Start => '15:00', End => '23:59' },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                3 => { Name => 'Wednesday', Start => '15:00', End => '23:59' },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                4 => { Name => 'Thursday', Start => '15:00', End => '23:59' },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                5 => { Name => 'Friday', Start => '15:00', End => '23:59' },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                6 => { Name => 'Saturday', Start => undef, End => undef },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">        'Europe1' => {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                0 => { Name => 'Sunday', Start => undef, End => undef },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                1 => { Name => 'Monday', Start => '07:00', End => '17:00' },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                2 => { Name => 'Tuesday', Start => '07:00', End => '17:00' },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                3 => { Name => 'Wednesday', Start => '07:00', End => '17:00' },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                4 => { Name => 'Thursday', Start => '07:00', End => '17:00' },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                5 => { Name => 'Friday', Start => '07:00', End => '17:00' },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">                6 => { Name => 'Saturday', Start => undef, End => undef },<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        },<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal">
<span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">I have some issue at this step that I will try to explain here:<u></u><u></u></span></p><p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">SLA is a global CF create during the make initdb once installing the SLA extension that means that the same CF is used for my two queue ('US_IT_Service_Center' and ‘Europe_IT_Service_Center')<u></u><u></u></span></p>
<p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">SLA CF  is configured as “select one value” and get at this step three value (Priority 1 – Priority 2 and priority 3)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">First issue : How to setup priority 1 2 and 3 based on the two different Set of Business Hours (not covered in my example of SLA setup)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Second issue : What are the best practice to use efficiently this SAL extension in my environment<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:18.0pt"><span lang="EN-US">In my example <u></u><u></u></span></p><p><u></u><span lang="EN-US"><span>-<span style="font:7.0pt "Times New Roman"">          </span></span></span><u></u><span lang="EN-US">US team is working from 07:00 to 17:00 (Denver time)<u></u><u></u></span></p>
<p><u></u><span lang="EN-US"><span>-<span style="font:7.0pt "Times New Roman"">          </span></span></span><u></u><span lang="EN-US">EU team is working from 07:00 to 17:00 (Berlin time)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">The only “solution” find to realize this is to fake the system for the US business hour but this is not possible if I keep the actual server timezone like this :<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">We should cover on each side 10 hours of business hour but if you look at the example below you will see that my fake for the US1 business hours can only cover 9 hours (15:00 -> 23:59) <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thanks,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal">
<b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Christophe</span></b><span lang="EN-US"><u></u><u></u></span></p></div><br clear="all"> Please be advised that this email may contain confidential 
information.  If you are not the intended recipient, please notify us 
by email by replying to the sender and delete this message.  The 
sender disclaims that the content of this email constitutes an offer 
to enter into, or the acceptance of, any agreement; provided that the 
foregoing does not invalidate the binding effect of any digital or 
other electronic reproduction of a manual signature that is included 
in any attachment.
</div>

<br>--------<br>
RT Training Sessions (<a href="http://bestpractical.com/services/training.html" target="_blank">http://bestpractical.com/services/training.html</a>)<br>
*  Barcelona, Spain — November 28 & 29, 2011<br></blockquote></div><br></div>