[Rt-commit] r8377 - in rtir/branches/2.3-EXPERIMENTAL: . html/RTIR
thayes at bestpractical.com
thayes at bestpractical.com
Thu Aug 2 10:34:33 EDT 2007
Author: thayes
Date: Thu Aug 2 10:34:31 2007
New Revision: 8377
Modified:
rtir/branches/2.3-EXPERIMENTAL/ (props changed)
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html
Log:
r8546 at toth: toth | 2007-08-02 10:33:45 -0400
* Made manual locks and unlocks use string argument instead of boolean (to accomodate new locking methods)
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 Thu Aug 2 10:34:31 2007
@@ -246,7 +246,12 @@
my ($status, $msg) = $Ticket->$action();
push @results, $msg;
# If they succeeded in taking the ticket, they should also get a lock
- if ($status && $action =~ /^(?:Take|Steal)$/) { $ARGS{'Lock'} = 'add'; }
+ if ($status && $action =~ /^(?:Take|Steal)$/) {
+ if($Type eq 'Report') {
+ $Ticket->Lock('IR');
+ push @results, 'You have a lock on this report until you link it to an incident';
+ }
+ }
}
@@ -261,7 +266,7 @@
if ( $ARGS{'Lock'} ) {
if ( $ARGS{'Lock'} eq 'add' ) {
- if ( $Ticket->Lock(1) ) {
+ if ( $Ticket->Lock('Hard') ) {
push @results, loc('You now have a lock on this ticket');
} else {
push @results, loc('Your attempt to lock this ticket failed');
@@ -273,7 +278,7 @@
push @results, loc('This ticket was not locked');
} elsif ( $lock->Content->{'User'} == $session{'CurrentUser'}->id ) {
$Duration = time() - $lock->Content->{'Timestamp'};
- $Ticket->Unlock(1);
+ $Ticket->Unlock('Hard');
push @results, loc('You have unlocked this ticket');
} else {
push @results,
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 10:34:31 2007
@@ -330,7 +330,7 @@
if ( $ARGS{'Lock'} ) {
if ( $ARGS{'Lock'} eq 'add' ) {
- if ( $TicketObj->Lock(1) ) {
+ if ( $TicketObj->Lock('Hard') ) {
push @results, loc('You now have a lock on this ticket');
} else {
push @results, loc('Your attempt to lock this ticket failed');
@@ -342,7 +342,7 @@
push @results, loc('This ticket was not locked');
} elsif ( $lock->Content->{'User'} == $session{'CurrentUser'}->id ) {
$Duration = time() - $lock->Content->{'Timestamp'};
- $TicketObj->Unlock(1);
+ $TicketObj->Unlock('Hard');
push @results, loc('You have unlocked this ticket');
} else {
push @results,
More information about the Rt-commit
mailing list