[Rt-commit] r6035 - in rtir/branches/2.1-EXPERIMENTAL: html/RTIR
ruz at bestpractical.com
ruz at bestpractical.com
Mon Sep 25 23:45:34 EDT 2006
Author: ruz
Date: Mon Sep 25 23:45:33 2006
New Revision: 6035
Modified:
rtir/branches/2.1-EXPERIMENTAL/ (props changed)
rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Merge.html
Log:
Merge operation
* jump to the ticket's view after action
Modified: rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Merge.html
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Merge.html (original)
+++ rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Merge.html Mon Sep 25 23:45:33 2006
@@ -71,23 +71,23 @@
my @queues = sort map {$_->Name} $Ticket->QueueObj, $MergeTicket->QueueObj;
if ( $queues[0] eq $queues[1] or ($queues[0] eq "Incident Reports" and $queues[1] eq "Investigations")) {
- if ($MergeTicket->QueueObj->Name eq "Incident Reports") {
+ if ( $MergeTicket->QueueObj->Name eq "Incident Reports" ) {
# We always want to merge into the Investigation
($Ticket, $MergeTicket) = ($MergeTicket, $Ticket);
}
-
- $ARGS{ $Ticket->id .'-MergeInto' } = $MergeTicket->id;
+
+ $ARGS{ $Ticket->id .'-MergeInto' } = $MergeTicket->id;
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;
- }
+ next 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);
$Ticket = LoadTicket($id);
- $id = $ARGS{'id'} = $Ticket->id;
+ return $m->comp('/RTIR/Display.html', id => $Ticket->id, results => \@results );
} else {
push @results, loc("Merge failed: Ticket #[_1] is not the right type", $MergeTicket->Id );
}
More information about the Rt-commit
mailing list