[Rt-commit] r8653 - in rtir/branches/2.3-EXPERIMENTAL: .

sartak at bestpractical.com sartak at bestpractical.com
Mon Aug 20 17:39:30 EDT 2007


Author: sartak
Date: Mon Aug 20 17:39:30 2007
New Revision: 8653

Modified:
   rtir/branches/2.3-EXPERIMENTAL/   (props changed)
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Report/BulkReject.html

Log:
 r37771 at gorgoroth:  sartak | 2007-08-20 17:39:01 -0400
 Add a post-reject warning if you reject an IR that has an incident 
 Next step is making it a pre-reject JS confirmation, if I can find any ok/cancel JS confirmations in RT >_>


Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Report/BulkReject.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Report/BulkReject.html	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Report/BulkReject.html	Mon Aug 20 17:39:30 2007
@@ -104,6 +104,14 @@
             next;
         }
 
+        # warn if this IR has any incidents
+        my $query = "Queue = 'Incidents' AND HasMember = " . $t->Id . " AND CF.{_RTIR_State} != 'rejected'";
+        my $incidents = new RT::Tickets($session{'CurrentUser'});
+        $incidents->FromSQL($query);
+        if ($incidents->Count > 0) {
+            push( @tempresults, [ $id, loc("Warning: already has incident") ] );
+        }
+
         my $oldstate = RT::IR::Ticket::FirstCustomFieldValue( $t, '_RTIR_State' ) ||'';
         
         if ( $t->Owner != $session{'CurrentUser'}->id &&


More information about the Rt-commit mailing list