[Rt-commit] rtir branch, 4.0/show-sla, created. 4.0.0rc2-1-g82a0c73

Jim Brandt jbrandt at bestpractical.com
Fri Jul 8 16:33:14 EDT 2016


The branch, 4.0/show-sla has been created
        at  82a0c7350a9b8ec81f7abdfeb6029e3540cca31c (commit)

- Log -----------------------------------------------------------------
commit 82a0c7350a9b8ec81f7abdfeb6029e3540cca31c
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jul 8 14:56:27 2016 -0400

    Allow users to set SLA on create, view the value, and update
    
    Update create, update, and diplay pages to handle SLA as
    an attribute of a ticket rather than a custom field in RT.
    
    Fixes: I#32167

diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 21e6000..dfd4ee3 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -128,6 +128,18 @@
             },
         },
         { special => 'roles' },
+
+        $QueueObj->SLADisabled ? () : (
+        {   name => 'SLA',
+            comp => '/Elements/SelectSLA',
+            args => {
+                Name => 'SLA',
+                Default => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
+                DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
+                QueueObj => $QueueObj,
+            },
+        }),
+
     ],
   &>
 
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index f3f8d83..481cb7d 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -82,6 +82,12 @@
       <% $Ticket->Status %>
     </td>
   </tr>
+% if ( !$Ticket->QueueObj->SLADisabled ) {
+  <tr class="sla">
+    <td class="label"><&|/l&>SLA</&>:</td>
+    <td class="value"><% loc($Ticket->SLA) %></td>
+  </tr>
+% }
   <tr>
     <td class="label"><% loc("Incident") %>:</td>
     <td class="value">
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index c75d0b1..9347c53 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -102,10 +102,15 @@
         Constituency => RT::IR->ConstituencyFor($Ticket)
     &></td>
   </tr>
-
-
-
-
+% if ( !$Ticket->QueueObj->SLADisabled ) {
+  <tr class="sla">
+    <td class="label"><&|/l&>SLA</&>:</td>
+    <td class="value"><& /Elements/SelectSLA,
+        Name => 'SLA',
+        Default => loc($Ticket->SLA)
+    &></td>
+  </tr>
+% }
 % if (!RT::IR->IsIncidentQueue($Ticket->QueueObj) ) {
   <tr class="incidents">
     <td class="label"><%loc("Incident")%>:</td>
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 91d2306..c8e69e8 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -139,6 +139,17 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
         Default  => $ARGS{'Owner'} || $session{'CurrentUser'}->Id
     &></td>
 % }
+% if ( !$ticket->QueueObj->SLADisabled ) {
+  <tr class="sla">
+    <td class="label"><&|/l&>SLA</&>:</td>
+    <td class="value"><& /Elements/SelectSLA,
+        Name         => 'SLA',
+        Default      => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
+        DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
+        QueueObj     => $QueueObj,
+    &></td>
+  </tr>
+% }
 </tr>
 
 <& /RTIR/Elements/EditCustomFields, 
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 9c823fd..51dbbe4 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -87,6 +87,12 @@
       <% $TicketObj->Status %>
     </td>
   </tr>
+% if ( !$TicketObj->QueueObj->SLADisabled ) {
+  <tr class="sla">
+    <td class="label"><&|/l&>SLA</&>:</td>
+    <td class="value"><% loc($TicketObj->SLA) %></td>
+  </tr>
+% }
   <tr>
     <td class="label"><&|/l&>Owner</&>:</td>
     <td class="value"><& /Elements/ShowUser, User => $TicketObj->OwnerObj &></td>

-----------------------------------------------------------------------


More information about the rt-commit mailing list