[Bps-public-commit] RT-Extension-CommandByMail branch, master, updated. 0.10-19-g2865df9

Ruslan Zakirov ruz at bestpractical.com
Tue Feb 12 15:08:04 EST 2013


The branch, master has been updated
       via  2865df92e3ed4c9ea40db36c336e70d8fe83eefa (commit)
      from  c4d5de4440e5456bc23ff3fd800a4e4703fe8fcd (commit)

Summary of changes:
 lib/RT/Interface/Email/Filter/TakeAction.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 2865df92e3ed4c9ea40db36c336e70d8fe83eefa
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed Feb 13 00:06:26 2013 +0400

    handle setting TxnCFs to 0 (zero)

diff --git a/lib/RT/Interface/Email/Filter/TakeAction.pm b/lib/RT/Interface/Email/Filter/TakeAction.pm
index 4d71aab..4f6a3ce 100644
--- a/lib/RT/Interface/Email/Filter/TakeAction.pm
+++ b/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,

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



More information about the Bps-public-commit mailing list