[Bps-public-commit] r17352 - RTx-WorkflowBuilder/lib/RTx

clkao at bestpractical.com clkao at bestpractical.com
Thu Dec 25 02:18:24 EST 2008


Author: clkao
Date: Thu Dec 25 02:18:24 2008
New Revision: 17352

Modified:
   RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm

Log:
Filter Owner from Cc, and setup squelch mail.

Modified: RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm
==============================================================================
--- RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm	(original)
+++ RTx-WorkflowBuilder/lib/RTx/WorkflowBuilder.pm	Thu Dec 25 02:18:24 2008
@@ -61,6 +61,15 @@
                        ) : (),
                    };
 
+    if (ref $attributes->{Cc} eq 'ARRAY') {
+        # filter out owner.  Note that at this stage the value can
+        # still be template, so we can not filter the owner if the
+        # template is different but yields same value.
+        $attributes->{Cc} =
+            join(',', grep { $_ ne $self->owner } @{$attributes->{Cc}});
+    }
+    $attributes->{SquelchMailTo} = $attributes->{Cc};
+
     for (values %$attributes) {
         s/\$Approving/\$Tickets{TOP}/g;
     }



More information about the Bps-public-commit mailing list