[Rt-commit] rt branch, update-action, updated. 4d356e404cbd007691e66661a889941661962157

sartak at bestpractical.com sartak at bestpractical.com
Wed Jan 20 01:28:37 EST 2010


The branch, update-action has been updated
       via  4d356e404cbd007691e66661a889941661962157 (commit)
      from  abbf18c9f62e088f0d3b2e13c5fb7b3eeb2a0818 (commit)

Summary of changes:
 lib/RT/Action/WithCustomFields.pm |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 4d356e404cbd007691e66661a889941661962157
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jan 20 00:52:13 2010 -0500

    Set the default value of CF params

diff --git a/lib/RT/Action/WithCustomFields.pm b/lib/RT/Action/WithCustomFields.pm
index a0b8083..87fd575 100644
--- a/lib/RT/Action/WithCustomFields.pm
+++ b/lib/RT/Action/WithCustomFields.pm
@@ -14,9 +14,10 @@ sub _add_custom_fields {
         my $name = 'cf_' . $cf->id;
 
         my %args = (
-            name      => $name,
-            label     => $cf->name,
-            render_as => $render_as,
+            name          => $name,
+            label         => $cf->name,
+            render_as     => $render_as,
+            default_value => $self->record->first_custom_field_value($cf->name),
         );
 
         if ($render_as =~ /Select/i) {

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


More information about the Rt-commit mailing list