[Rt-commit] [rtir] 09/10: Switch RTIR ticket creation from calling a component to redirecting

Jesse Vincent jesse at bestpractical.com
Thu Feb 26 19:25:50 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 243f5233d2fc97d77435bffb519bf3a61e831efa
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu Feb 26 16:24:40 2015 -0800

    Switch RTIR ticket creation from calling a component to redirecting
---
 html/RTIR/Create.html | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 1d5d178..befe0e0 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -345,15 +345,18 @@ $QueueObj->Load( $Queue ) || Abort( loc("Queue could not be loaded.") );
 my $ticket = RT::Ticket->new($session{'CurrentUser'}); # empty ticket object
 
 my $Type = RT::IR::TicketType( Lifecycle => $QueueObj->Lifecycle);
-if ($QueueObj->Lifecycle eq RT::IR->lifecycle_countermeasure && RT->Config->Get('RTIR_DisableBlocksQueue') ) {
+if ($QueueObj->Lifecycle eq RT::IR->lifecycle_countermeasure 
+    && RT->Config->Get('RTIR_DisableBlocksQueue') ) {
     Abort(loc("Blocks queue is disabled via config file"));
     }
 
-# If we have a custom create page for this kind of item, serve
-# that instead.
+
 # As of RTIR 3.8, that's only true for Incidents
+# If there's an RTIR specific create page for this kind of ticket, show that
 if ( $m->comp_exists("/RTIR/$Type/Create.html") ) {
-    return $m->comp( "/RTIR/$Type/Create.html", %ARGS );
+    RT::Interface::Web::Redirect(RT->Config->Get('WebURL')
+    . "RTIR/$Type/Create.html?"
+    . $m->comp('/Elements/QueryString', %ARGS ));
 }
 
 my (@results, $checks_failure, $skip_create);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list