diff options
author | Mark Wells <mark@freeside.biz> | 2014-04-07 16:18:56 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2014-04-07 16:18:56 -0700 |
commit | 35f1450398aec28d59643ca4e0b99dd638e8838c (patch) | |
tree | 4ff33a653a3248ada9d831081360053284e4d8fd /rt/lib | |
parent | c8d94e67465c81cbdef6e85f6fe303cc3a403e63 (diff) |
avoid creating Set TimeWorked transactions where new value is empty, #28459
Diffstat (limited to 'rt/lib')
-rw-r--r-- | rt/lib/RT/Interface/Web_Vendor.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rt/lib/RT/Interface/Web_Vendor.pm b/rt/lib/RT/Interface/Web_Vendor.pm index e9c634661..245df1259 100644 --- a/rt/lib/RT/Interface/Web_Vendor.pm +++ b/rt/lib/RT/Interface/Web_Vendor.pm @@ -284,6 +284,14 @@ sub ProcessTicketBasics { } } + # RT core _will_ allow Set transactions that change these + # fields to empty strings, but internally change the values + # to zero. This is sloppy and causes some problems. + foreach my $field (qw(TimeWorked TimeEstimated TimeLeft)) { + $ARGSRef->{$field} =~ s/\s//g; + $ARGSRef->{$field} ||= 0; + } + my @results = UpdateRecordObject( AttributesRef => \@attribs, Object => $TicketObj, |