[Rt-commit] rt branch, create-action, updated. def4174dc3450c55df2fa6f01f3ad6004e4c263d

sartak at bestpractical.com sartak at bestpractical.com
Wed Sep 2 10:42:37 EDT 2009


The branch, create-action has been updated
       via  def4174dc3450c55df2fa6f01f3ad6004e4c263d (commit)
      from  f5e2faa4c9573483191f4f7d1d01fbd588c0a3e8 (commit)

Summary of changes:
 lib/RT/View/Ticket/Create.pm |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit def4174dc3450c55df2fa6f01f3ad6004e4c263d
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Sep 2 10:42:20 2009 -0400

    Try to pull the queue out of the action for the Create page

diff --git a/lib/RT/View/Ticket/Create.pm b/lib/RT/View/Ticket/Create.pm
index 4e5b3f4..07d7dac 100644
--- a/lib/RT/View/Ticket/Create.pm
+++ b/lib/RT/View/Ticket/Create.pm
@@ -54,7 +54,11 @@ use Jifty::View::Declare -base;
 __PACKAGE__->use_mason_wrapper;
 
 template 'create' => page {
-    my $queue = get('queue') or die "Queue not specified";
+    # If we have a create_ticket action, pluck the queue out, otherwise,
+    # check the regular queue query parameter
+    my $action = Jifty->web->request->action('create_ticket');
+    my $queue = $action ? $action->argument('queue') : get('queue');
+    $queue or die "Queue not specified";
 
     my $create = new_action(
         class   => 'CreateTicket',

-----------------------------------------------------------------------


More information about the Rt-commit mailing list