[Rt-commit] rt branch, admin_ui, updated. 549b8cf6a6baf5bce77616e09eae58f373136d1b
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Jan 1 02:05:54 EST 2010
The branch, admin_ui has been updated
via 549b8cf6a6baf5bce77616e09eae58f373136d1b (commit)
from 5b1759830a85701df6cbf716e01238259d6d7126 (commit)
Summary of changes:
lib/RT/Action/UpdateQueue.pm | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 549b8cf6a6baf5bce77616e09eae58f373136d1b
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Jan 1 15:05:41 2010 +0800
UpdateQueue action with cfs
diff --git a/lib/RT/Action/UpdateQueue.pm b/lib/RT/Action/UpdateQueue.pm
index 65ce770..75dac4d 100644
--- a/lib/RT/Action/UpdateQueue.pm
+++ b/lib/RT/Action/UpdateQueue.pm
@@ -2,7 +2,7 @@ package RT::Action::UpdateQueue;
use strict;
use warnings;
-use base qw/Jifty::Action::Record::Update/;
+use base qw/Jifty::Action::Record::Update RT::Action::WithCustomFields/;
sub record_class { 'RT::Model::Queue' }
@@ -16,8 +16,32 @@ 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->SUPER::arguments;
+ 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};
+}
+
=head2 take_action
=cut
+sub take_action {
+ my $self = shift;
+ $self->SUPER::take_action;
+ $self->_add_custom_field_values;
+ return 1;
+}
+
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list