[Rt-commit] r5798 - in RT-Extension-CommandByEmail: .
kevinr at bestpractical.com
kevinr at bestpractical.com
Tue Aug 22 16:21:05 EDT 2006
Author: kevinr
Date: Tue Aug 22 16:21:04 2006
New Revision: 5798
Modified:
RT-Extension-CommandByEmail/ (props changed)
RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter/TakeAction.pm
Log:
r25638 at sad-girl-in-snow: kevinr | 2006-08-22 16:17:34 -0400
* Allow multiple TimeWorked entries
Modified: RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter/TakeAction.pm
==============================================================================
--- RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter/TakeAction.pm (original)
+++ RT-Extension-CommandByEmail/lib/RT/Interface/Email/Filter/TakeAction.pm Tue Aug 22 16:21:04 2006
@@ -295,8 +295,15 @@
{
my $time_taken = 0;
- $time_taken = $cmds{'timeworked'} || 0
- if grep $_ eq 'TimeWorked', @TIME_ATTRIBUTES;
+ if (grep $_ eq 'TimeWorked', @TIME_ATTRIBUTES) {
+ if (ref $cmds{'timeworked'}) {
+ map { $time_taken += ($_ || 0) } @{ $cmds{'timeworked'} };
+ $RT::Logger->debug("Time taken: $time_taken");
+ }
+ else {
+ $time_taken = $cmds{'timeworked'} || 0;
+ }
+ }
my $method = ucfirst $args{'Action'};
my ($status, $msg) = $ticket_as_user->$method(
More information about the Rt-commit
mailing list