[Rt-commit] [rtir] 08/10: Replace a call-through to another component with a redirect
Jesse Vincent
jesse at bestpractical.com
Thu Feb 26 19:25:49 EST 2015
This is an automated email from the git hooks/post-receive script.
jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.
commit 70470704bec959220d3594b2cc9c48de4f2c3624
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Thu Feb 26 16:06:42 2015 -0800
Replace a call-through to another component with a redirect
---
html/RTIR/Edit.html | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index 962044d..6d315a9 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -156,18 +156,21 @@ $id = $ARGS{'id'} = $Ticket->Id;
$m->callback(CallbackName => 'Initial', %ARGS, Ticket => $Ticket);
+my $Type = RT::IR::TicketType( Lifecycle => $Ticket->QueueObj->Lifecycle );
+# If it's not an RTIR ticket type, just show the regular RT ticket display page
+RT::Interface::Web::Redirect(RT->Config->Get('WebURL').'Ticket/Display.html?'.
+ $m->comp('/Elements/QueryString', %ARGS )) unless $Type;
-return $m->comp( '/Ticket/Display.html', %ARGS ) unless RT::IR->OurQueue($Ticket->QueueObj);
-
-if( $Ticket->QueueObj->Lifecycle eq RT::IR->lifecycle_countermeasure
+if ($Ticket->QueueObj->Lifecycle eq RT::IR->lifecycle_countermeasure
&& RT->Config->Get('RTIR_DisableBlocksQueue') ) {
Abort(loc("Blocks queue is disabled via config file"));
}
-my $Type = RT::IR::TicketType( Ticket => $Ticket );
-
+# If there's an RTIR specific display page for this kind of ticket, show that
if ( $m->comp_exists("/RTIR/$Type/Edit.html") ) {
- return $m->comp("/RTIR/$Type/Edit.html", %ARGS);
+ RT::Interface::Web::Redirect(RT->Config->Get('WebURL')
+ . "RTIR/$Type/Edit.html?"
+ . $m->comp('/Elements/QueryString', %ARGS ));
}
my @results;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list