[Rt-commit] rt branch, admin_ui, updated. 31a08b8183b1c9e8186a26bee2512e5964c6593c
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Dec 30 05:46:17 EST 2009
The branch, admin_ui has been updated
via 31a08b8183b1c9e8186a26bee2512e5964c6593c (commit)
from 949e4cb1dfb85f51e8e0f10237ceb3c3265f6f98 (commit)
Summary of changes:
lib/RT/Action/CreateQueue.pm | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 31a08b8183b1c9e8186a26bee2512e5964c6593c
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Dec 30 18:44:46 2009 +0800
we can create queues with cf values
diff --git a/lib/RT/Action/CreateQueue.pm b/lib/RT/Action/CreateQueue.pm
index 312e78f..ea7ef84 100644
--- a/lib/RT/Action/CreateQueue.pm
+++ b/lib/RT/Action/CreateQueue.pm
@@ -2,7 +2,7 @@ package RT::Action::CreateQueue;
use strict;
use warnings;
-use base qw/Jifty::Action::Record::Create /;
+use base qw/Jifty::Action::Record::Create RT::Action::WithCustomFields/;
sub record_class { 'RT::Model::Queue' }
@@ -16,4 +16,22 @@ use Jifty::Action schema {
render as 'Checkbox',
};
+sub arguments {
+ my $self = shift;
+ if ( !$self->{_cached_arguments} ) {
+
+ # The blank slate is the parameters provided using Jifty::Param::Schema
+ $self->{_cached_arguments} = \%{ $self->PARAMS };
+ my $queue = RT::Model::Queue->new;
+ my @args = $self->_setup_custom_fields( cfs => $queue->custom_fields );
+ for my $args (@args) {
+ my $name = delete $args->{name};
+ $self->{_cached_arguments}{$name} = $args;
+
+ }
+ }
+
+ return $self->{_cached_arguments};
+}
+
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list