[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.1-331-geff4ee7

Shawn Moore shawn at bestpractical.com
Mon Apr 10 10:23:54 EDT 2017


The branch, 4.4-trunk has been updated
       via  eff4ee7519b004e778464ba2a1410ead6a31cae4 (commit)
       via  3f1c18679299f63a650dd264cbb3e9e888ba9599 (commit)
      from  1ac0a6e50b466dae110faf0dcf5e386c36ec7e83 (commit)

Summary of changes:
 share/html/Search/Bulk.html | 12 ++++++++++++
 1 file changed, 12 insertions(+)

- Log -----------------------------------------------------------------
commit 3f1c18679299f63a650dd264cbb3e9e888ba9599
Author: Dave Goehrig <dave at bestpractical.com>
Date:   Thu Mar 30 13:24:44 2017 -0400

    Bulk update for SLA
    
    Adds bulk update for SLA. It only adds the field
    if there are queues seen in the query results that
    have an SLA enabled.  If the SLA update applies to
    a ticket in a queue whose SLA is disabled, the SLA
    will be updated on the ticket, but will be disabled
    at the queue level.  As such the silent success
    should be ok.  This means that merely checking the
    value of the SLA field itself is insufficient
    on the ticket level.

diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index a8ddde8..bb06b24 100644
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -131,6 +131,10 @@
 <td class="value"> <& /Elements/SelectQueue, Name => "Queue", Default => $ARGS{Queue} &> </td></tr>
 <tr><td class="label"> <&|/l&>Make Status</&>: </td>
 <td class="value"> <& /Ticket/Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}, Queues => $seen_queues &> </td></tr>
+% if ($hasSLA) {
+<tr><td class="label"> <&|/l&>Make SLA</&>: </td>
+<td class="value"> <& /Elements/SelectSLA, Name => "SLA", Default => $ARGS{SLA} &> </td></tr>
+% }
 <tr><td class="label"> <&|/l&>Make date Starts</&>: </td>
 <td class="value"> <& /Elements/SelectDate, Name => "Starts_Date", Default => $ARGS{Starts_Date} || '' &> </td></tr>
 <tr><td class="label"> <&|/l&>Make date Started</&>: </td>
@@ -279,6 +283,14 @@ while ( my $ticket = $Tickets->Next ) {
     }
 }
 
+# determine if any of the queues seen has a SLA active
+my $queue = RT::Queue->new($session{CurrentUser});
+my $hasSLA = 0;
+for (keys %$seen_queues) {
+    $queue->Load($_);
+    $hasSLA ||= ! $queue->SLADisabled();
+}
+
 #Iterate through each ticket we've been handed
 my @linkresults;
 

commit eff4ee7519b004e778464ba2a1410ead6a31cae4
Merge: 1ac0a6e 3f1c186
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Apr 10 14:23:39 2017 +0000

    Merge branch '4.4/sla-bulk-update' into 4.4-trunk


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


More information about the rt-commit mailing list