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

thayes at bestpractical.com thayes at bestpractical.com
Wed Jul 25 13:43:25 EDT 2007


Author: thayes
Date: Wed Jul 25 13:43:25 2007
New Revision: 8286

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

Log:
 r8430 at toth:  toth | 2007-07-25 13:43:11 -0400
 * Added locking to RTIR's Edit feature
 


Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Edit.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Edit.html	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Edit.html	Wed Jul 25 13:43:25 2007
@@ -29,7 +29,7 @@
     current_subtab => "RTIR/Edit.html?id=".$Ticket->Id, 
     Title => $Title &>
 
-<& /RTIR/Elements/ShowLock, Ticket => $Ticket &>
+<& /Elements/ShowLock, Ticket => $Ticket, noUnlock => 1 &>          
 <& /Elements/ListActions, actions => \@results &>
 
 % if (!$Ticket->CurrentUserHasRight('ModifyTicket')) {
@@ -224,9 +224,12 @@
 
 <%INIT>
 my $Ticket = LoadTicket($id);
+$Ticket->Lock() unless $Ticket->Locked();
 $id = $ARGS{'id'} = $Ticket->Id;
 
+
 my $Type = RT::IR::TicketType( Ticket => $Ticket );
+
 return $m->comp( '/Ticket/Display.html', %ARGS ) unless $Type;
 if( $Type eq 'Block' && RT->Config->Get('RTIR_DisableBlocksQueue') ) {
     Abort(loc("Blocks queue is disabled via config file"));
@@ -235,6 +238,8 @@
     return $m->comp("/RTIR/$Type/Edit.html", %ARGS);
 }
 
+my @results;
+
 my $name;
 if ($Type eq 'Report') {
     $name = "Incident Report";
@@ -249,7 +254,7 @@
 $CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or
                      $Ticket->CurrentUserHasRight('ModifyTicket') );
 
-my @results;
+
 if ( $SaveChanges && !$OnlySearchForPeople ) {
     my $checks_failure = 0;
     my $oldstate = RT::IR::Ticket::FirstCustomFieldValue( $Ticket, '_RTIR_State' );
@@ -280,7 +285,7 @@
         push (@results, loc("State changed from [_1] to [_2]", $oldstate, $newstate));
     }
     if ( !$checks_failure && RT->Config->Get('DisplayAfterEdit', $session{'CurrentUser'}) ) {
-        return $m->comp("/RTIR/Display.html", results => [@results], id => $id);
+        return $m->comp("/RTIR/Display.html", results => [@results], id => $id, Lock => 'remove');
     }
 }
  


More information about the Rt-commit mailing list