[Rt-commit] rt branch, 4.4/sla-bulk-update, created. rt-4.4.1-327-ge81c1f5
Dave Goehrig
dave at bestpractical.com
Mon Apr 3 09:33:24 EDT 2017
The branch, 4.4/sla-bulk-update has been created
at e81c1f5a346f3dbb4b6522f7d3d0311ce4f1a8fc (commit)
- Log -----------------------------------------------------------------
commit e81c1f5a346f3dbb4b6522f7d3d0311ce4f1a8fc
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..398079b 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" &> </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;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list