[Rt-commit] r4540 - in rtir/branches/1.9-EXPERIMENTAL:
html/RTIR/Incident
ruz at bestpractical.com
ruz at bestpractical.com
Wed Feb 15 18:05:37 EST 2006
Author: ruz
Date: Wed Feb 15 18:05:35 2006
New Revision: 4540
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/Display.html
Log:
r723 at cubic-pc: cubic | 2006-02-16 02:10:53 +0300
* we should take(steal) tickets in order to make complex actions like
linking or something that requires ModifyTicket right
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/Display.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/Display.html (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/Display.html Wed Feb 15 18:05:35 2006
@@ -224,13 +224,8 @@
my @results;
# If we own one end than take or steal other end of the link
- if ( $TicketObj->Owner != $Target->Owner && (
- $TicketObj->Owner == $session{'CurrentUser'}->id ||
- $Target->Owner == $session{'CurrentUser'}->id ) )
- {
- my $obj;
- $obj = $TicketObj unless $TicketObj->Owner == $session{'CurrentUser'}->id;
- $obj = $Target unless $Target->Owner == $session{'CurrentUser'}->id;
+ for my $obj( $Target, $TicketObj ) {
+ next if $obj->Owner == $session{'CurrentUser'}->id;
my $action = 'Steal';
$action = 'Take' if $obj->Owner == $RT::Nobody->id;
my ($res, $msg) = $obj->$action();
@@ -283,7 +278,7 @@
push @link, $Child if $Child;
foreach my $id ( grep $_, @link ) {
my $child = RT::Ticket->new( $session{'CurrentUser'} );
- $child->Load($id);
+ $child->Load( $id );
unless( $child->id ) {
push @results, loc("Couldn't load ticket #[_1] for linking.", $id);
next;
More information about the Rt-commit
mailing list