[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-commit
Subject: [Rt-commit] rt branch, admin_ui,
From: sunnavy () bestpractical ! com
Date: 2009-12-30 10:46:17
Message-ID: 20091230105007.7D59519B817B () diesel ! bestpractical ! com
[Download RAW message or body]
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@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;
-----------------------------------------------------------------------
_______________________________________________
Rt-commit mailing list
Rt-commit@lists.bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic