[Rt-commit] r18058 - in rt/3.999/branches/merge_to_3.8.2: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 29 09:46:33 EST 2009


Author: sunnavy
Date: Thu Jan 29 09:46:32 2009
New Revision: 18058

Modified:
   rt/3.999/branches/merge_to_3.8.2/   (props changed)
   rt/3.999/branches/merge_to_3.8.2/share/html/REST/1.0/Forms/queue/default

Log:
 r19284 at sunnavys-mb:  sunnavy | 2009-01-29 22:32:01 +0800
 merged share/html/REST/1.0/Forms/queue/default


Modified: rt/3.999/branches/merge_to_3.8.2/share/html/REST/1.0/Forms/queue/default
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/REST/1.0/Forms/queue/default	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/REST/1.0/Forms/queue/default	Thu Jan 29 09:46:32 2009
@@ -50,6 +50,7 @@
 <%ARGS>
 $id
 $format => 's'
+$fields => undef # these are the fields passed to the rt "-f" flag.
 $changes => {}
 </%ARGS>
 <%perl>
@@ -124,6 +125,21 @@
         push @data, [ $key => $queue->$key ];
     }
 
+    # Custom fields
+    my $CustomFields = $queue->custom_fields;
+    while ( my $CustomField = $CustomFields->next() ) {
+        next
+            unless ( !%$fields
+            || exists $fields->{ lc "CF-" . $CustomField->name } );
+        next unless $CustomField->current_user_has_right('SeeCustomField');
+        my $CFvalues = $queue->custom_field_values( $CustomField->id );
+        my @CFvalues;
+        while ( my $CFvalue = $CFvalues->next() ) {
+            push @CFvalues, $CFvalue->content;
+        }
+        push @data, [ "CF-" . $CustomField->name => \@CFvalues ];
+    }
+
     my %k = map {@$_} @data;
     $o = [ map {$_->[0]} @data ];
     $k = \%k;


More information about the Rt-commit mailing list