[Rt-commit] r7652 - in rtir/branches/2.3-EXPERIMENTAL: . html/RTIR/Elements

ruz at bestpractical.com ruz at bestpractical.com
Tue Apr 24 00:17:58 EDT 2007


Author: ruz
Date: Tue Apr 24 00:17:54 2007
New Revision: 7652

Modified:
   rtir/branches/2.3-EXPERIMENTAL/   (props changed)
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs

Log:
 r1904 at cubic-pc:  cubic | 2007-04-24 08:11:20 +0400
 * return back TakeOrStealFirst functionality


Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html	Tue Apr 24 00:17:54 2007
@@ -248,6 +248,14 @@
     }
 
 
+    if ( $ARGS{'TakeOrStealFirst'} and $Ticket->Owner != $Ticket->CurrentUser->Id) {
+        my ($status, $msg) = $Ticket->SetOwner($Ticket->CurrentUser->Id, 'Force');
+        push @results, $msg if $msg;
+
+        # If they succeeded in taking the ticket, they should also get a lock
+        if ($status) { $ARGS{'Lock'} = 'add'; }
+    }
+
     if ( $ARGS{'Lock'} ) {
 
         if ( $ARGS{'Lock'} eq 'add' ) {

Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs	Tue Apr 24 00:17:54 2007
@@ -260,12 +260,12 @@
     {
         if ( $Type eq 'Report' ) {
             $actions->{'B'} = {
-                path => "RTIR/Update.html?Action=Comment&DefaultStatus=rejected&id=$id",
+                path => "RTIR/Update.html?Action=Comment&TakeOrStealFirst=1&DefaultStatus=rejected&id=$id",
                  title => loc('Reject'),
             };
 
             $actions->{'Bb'} = {
-                path  => "RTIR/Display.html?Status=rejected&Action=Take&id=$id",
+                path  => "RTIR/Display.html?Status=rejected&TakeOrStealFirst=1&id=$id",
                 title => loc('Quick Reject'),
             };
         }


More information about the Rt-commit mailing list