Permalink
Browse files

handle setting TxnCFs to 0 (zero)

  • Loading branch information...
ruz committed Feb 12, 2013
1 parent c4d5de4 commit 2865df92e3ed4c9ea40db36c336e70d8fe83eefa
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/RT/Interface/Email/Filter/TakeAction.pm
@@ -568,9 +568,10 @@ sub GetCurrentUser {
while ( my $cf = $custom_fields->Next ) {
my $cmd = 'TransactionCustomField{'. $cf->Name .'}';
my @values = ($cmds{ lc $cmd });
- next unless @values && $values[0];
-
@values = @{ $values[0] } if ref $values[0] eq 'ARRAY';
+ @values = grep defined && length, @values;
+ next unless @values;
+
foreach my $value ( @values ) {
my ($status, $msg) = $transaction->AddCustomFieldValue(
Field => $cf->Name, Value => $value,

0 comments on commit 2865df9

Please sign in to comment.