[Rt-commit] r4913 - rtir/branches/1.9-EXPERIMENTAL/html/RTIR

glasser at bestpractical.com glasser at bestpractical.com
Thu Mar 30 15:45:24 EST 2006


Author: glasser
Date: Thu Mar 30 15:45:20 2006
New Revision: 4913

Modified:
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Display.html
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Merge.html

Log:
Don't use TakeOrSteal

Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Display.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Display.html	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Display.html	Thu Mar 30 15:45:20 2006
@@ -243,8 +243,8 @@
         push @results, $msg;
     }
 
-    if ( $ARGS{'TakeOrStealFirst'} ) {
-        my ($status, $msg) = $Ticket->TakeOrSteal;
+    if ( $ARGS{'TakeOrStealFirst'} and $Ticket->Owner != $Ticket->CurrentUser->Id) {
+        my ($status, $msg) = $Ticket->SetOwner($Ticket->CurrentUser->Id, 'Force');
 	push @results, $msg if $msg;
     }
 

Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Merge.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Merge.html	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Merge.html	Thu Mar 30 15:45:20 2006
@@ -69,9 +69,11 @@
         
         $ARGS{ $Ticket->id .'-MergeInto' } = $MergeTicket->id;            
 
-        foreach ( $Ticket, $MergeTicket ) {
-            my ($status, $msg) = $_->TakeOrSteal;
-            push @results, $msg if $msg;
+        for my $t ( $Ticket, $MergeTicket ) {
+            if ($t->Owner != $t->CurrentUser->Id) {
+                my ($status, $msg) = $t->SetOwner($t->CurrentUser->Id, 'Force');
+                push @results, $msg if $msg;
+            }
         }
         push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
 


More information about the Rt-commit mailing list