[Rt-commit] r8385 - in rtir/branches/2.3-EXPERIMENTAL: . html/RTIR
thayes at bestpractical.com
thayes at bestpractical.com
Thu Aug 2 15:57:33 EDT 2007
Author: thayes
Date: Thu Aug 2 15:57:33 2007
New Revision: 8385
Modified:
rtir/branches/2.3-EXPERIMENTAL/ (props changed)
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Create.html
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/LinkToIncident.html
Log:
r8572 at toth: toth | 2007-08-02 15:57:17 -0400
* Modified to account for special case of locking when an IR is Taken until the IR is linked to a new or existing Incident
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Create.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Create.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Create.html Thu Aug 2 15:57:33 2007
@@ -331,6 +331,17 @@
my $QueueObj = new RT::Queue( $session{'CurrentUser'} );
$QueueObj->Load( $Queue ) || Abort( loc("Queue could not be loaded.") );
+if($ARGS{'Child'}) {
+ my $ChildObj = LoadTicket($ARGS{'Child'});
+ if($ARGS{'CreateIncident'} || $ARGS{'CreateWithInvestigation'}) {
+ $ChildObj->Unlock('Take');
+ }
+ else
+ {
+ $ChildObj->Lock('Take');
+ }
+}
+
my $Type = RT::IR::TicketType( Queue => $Queue );
if ($Type eq 'Block' && RT->Config->Get('RTIR_DisableBlocksQueue') ) {
Abort(loc("Blocks queue is disabled via config file"));
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html Thu Aug 2 15:57:33 2007
@@ -250,6 +250,14 @@
}
Abort('No incident specified') unless $id;
+if($Child) {
+ my $ChildObj = RT::Ticket->new( $session{'CurrentUser'} );
+ $ChildObj->Load($Child);
+ $ChildObj->Unlock('Take');
+}
+
+
+
my $take_or_steal = sub {
my $owner = $_[0]->Owner;
return () if $owner == $session{'CurrentUser'}->id;
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/LinkToIncident.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/LinkToIncident.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/LinkToIncident.html Thu Aug 2 15:57:33 2007
@@ -38,6 +38,8 @@
current_subtab => "RTIR/Search/Refine.html",
&>
+<& /Elements/ShowLock, Ticket => $ChildObj, Unlock => 0 &>
+
<form action="<% RT->Config->Get('WebPath') %>/RTIR/Incident/Display.html" method="post">
<input type="hidden" name="Child" value="<% $id %>" />
@@ -65,6 +67,7 @@
<%INIT>
my $ChildObj = LoadTicket($id);
+$ChildObj->Lock('Take');
$ARGS{'id'} = $id = $ChildObj->id;
my $Type = RT::IR::TicketType( Ticket => $ChildObj );
More information about the Rt-commit
mailing list