[Rt-commit] r14190 - in rtir/branches/2.3-TESTING/html/RTIR: . Incident
ruz at bestpractical.com
ruz at bestpractical.com
Wed Jul 16 19:52:39 EDT 2008
Author: ruz
Date: Wed Jul 16 19:52:39 2008
New Revision: 14190
Modified:
rtir/branches/2.3-TESTING/html/RTIR/Advanced.html
rtir/branches/2.3-TESTING/html/RTIR/Display.html
rtir/branches/2.3-TESTING/html/RTIR/Incident/Create.html
rtir/branches/2.3-TESTING/html/RTIR/Merge.html
rtir/branches/2.3-TESTING/html/RTIR/Report/BulkReject.html
Log:
* use new API of html/Elements/ListActions
Modified: rtir/branches/2.3-TESTING/html/RTIR/Advanced.html
==============================================================================
--- rtir/branches/2.3-TESTING/html/RTIR/Advanced.html (original)
+++ rtir/branches/2.3-TESTING/html/RTIR/Advanced.html Wed Jul 16 19:52:39 2008
@@ -75,8 +75,8 @@
push @results, ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS);
push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
- if ( RT->Config->Get('DisplayAfterEdit', $session{'CurrentUser'}) ) {
- push @{ $session{"Actions"} ||= [] }, @results;
+ if ( RT->Config->Get('DisplayAfterEdit', $session{'CurrentUser'}) ) {
+ push @{ $session{"Actions"}{''} ||= [] }, @results;
$session{'i'}++;
$m->comp("/RTIR/Display.html", %ARGS);
Modified: rtir/branches/2.3-TESTING/html/RTIR/Display.html
==============================================================================
--- rtir/branches/2.3-TESTING/html/RTIR/Display.html (original)
+++ rtir/branches/2.3-TESTING/html/RTIR/Display.html Wed Jul 16 19:52:39 2008
@@ -233,6 +233,7 @@
return $m->comp("/RTIR/$Type/Display.html", %ARGS);
}
+my @results;
if ( $id eq 'new' ) {
unless ($QueueObj->CurrentUserHasRight('CreateTicket')) {
Abort('You have no permission to create tickets in that queue.');
@@ -312,9 +313,10 @@
# We've done something, so we need to clear the decks to avoid
# resubmission on refresh. But we need to store Actions somewhere
# too, so we don't lose them.
- push @{ $session{"Actions"} ||= [] }, @results;
+ my $key = Digest::MD5::md5_hex( rand(1024) );
+ push @{ $session{"Actions"}{ $key } ||= [] }, @results;
$session{'i'}++;
- RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."RTIR/Display.html?id=". $id );
+ RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."RTIR/Display.html?id=". $id ."&results=" . $key );
}
if ( $Type eq 'Report' ) {
@@ -337,6 +339,5 @@
<%ARGS>
$id => 0
$Queue => undef
- at results => ()
@SelectedTickets => ()
</%ARGS>
Modified: rtir/branches/2.3-TESTING/html/RTIR/Incident/Create.html
==============================================================================
--- rtir/branches/2.3-TESTING/html/RTIR/Incident/Create.html (original)
+++ rtir/branches/2.3-TESTING/html/RTIR/Incident/Create.html Wed Jul 16 19:52:39 2008
@@ -294,9 +294,14 @@
if( $inc_obj ) {
$m->callback(CallbackName => 'BeforeDisplay', ARGSRef => \%ARGS, Child => $ChildObj);
- push @{ $session{"Actions"} ||= [] }, @results;
+ my $key = Digest::MD5::md5_hex( rand(1024) );
+ push @{ $session{"Actions"}{ $key } ||= [] }, @results;
$session{'i'}++;
- RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."RTIR/Incident/Display.html?id=". $inc_obj->id );
+ RT::Interface::Web::Redirect(
+ RT->Config->Get('WebURL')
+ ."RTIR/Incident/Display.html?id=". $inc_obj->id
+ ."&results=$key"
+ );
}
}
Modified: rtir/branches/2.3-TESTING/html/RTIR/Merge.html
==============================================================================
--- rtir/branches/2.3-TESTING/html/RTIR/Merge.html (original)
+++ rtir/branches/2.3-TESTING/html/RTIR/Merge.html Wed Jul 16 19:52:39 2008
@@ -114,9 +114,13 @@
$Ticket = LoadTicket($id);
- push @{ $session{"Actions"} ||= [] }, @results;
+ my $key = Digest::MD5::md5_hex( rand(1024) );
+ push @{ $session{"Actions"}{ $key } ||= [] }, @results;
$session{'i'}++;
- RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."RTIR/Display.html?id=". $Ticket->id );
+ RT::Interface::Web::Redirect(
+ RT->Config->Get('WebURL') ."RTIR/Display.html?id=". $Ticket->id
+ ."&results=$key"
+ );
}
my $Type = RT::IR::TicketType( Ticket => $Ticket );
Modified: rtir/branches/2.3-TESTING/html/RTIR/Report/BulkReject.html
==============================================================================
--- rtir/branches/2.3-TESTING/html/RTIR/Report/BulkReject.html (original)
+++ rtir/branches/2.3-TESTING/html/RTIR/Report/BulkReject.html Wed Jul 16 19:52:39 2008
@@ -139,10 +139,11 @@
$session{'tickets'}->RedoSearch;
if ( $BulkRejectAndReturn ) {
- push @{ $session{"Actions"} ||= [] }, @results;
+ my $key = Digest::MD5::md5_hex( rand(1024) );
+ push @{ $session{"Actions"}{ $key } ||= [] }, @results;
$session{'i'}++;
return RT::Interface::Web::Redirect(
- RT->Config->Get('WebURL') ."/RTIR/index.html"
+ RT->Config->Get('WebURL') ."/RTIR/index.html?results=".$key
);
}
}
More information about the Rt-commit
mailing list