[Rt-commit] rtir branch, 4.0.0-releng, updated. 4.0.0rc2-10-g8485c55

Shawn Moore shawn at bestpractical.com
Tue Jul 19 11:18:17 EDT 2016


The branch, 4.0.0-releng has been updated
       via  8485c559227c1b16bdb2fc5a213abd1161fa161f (commit)
       via  4269509eec8f14ccf8e32169ea2b5c47448f4a71 (commit)
      from  0b6e6c212df0cd83f91fe37004a4c5cc4cacc0da (commit)

Summary of changes:
 html/RTIR/Create.html           | 12 ++++++++++++
 html/RTIR/Display.html          |  6 ++++++
 html/RTIR/Edit.html             | 13 +++++++++----
 html/RTIR/Incident/Create.html  | 11 +++++++++++
 html/RTIR/Incident/Display.html |  6 ++++++
 5 files changed, 44 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 4269509eec8f14ccf8e32169ea2b5c47448f4a71
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..330dcbb 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 ( !$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>

commit 8485c559227c1b16bdb2fc5a213abd1161fa161f
Merge: 0b6e6c2 4269509
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Jul 19 15:17:48 2016 +0000

    Merge branch '4.0/show-sla' into 4.0.0-releng


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


More information about the rt-commit mailing list