summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Comment.pm
diff options
context:
space:
mode:
authorChristian Legnitto <clegnitto@mozilla.com>2010-11-03 16:33:30 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2010-11-03 16:33:30 +0100
commit476aa64420a21efc15d50857c2ebbad3fb5de6db (patch)
tree883248089fa751f7234e537227575d9735d5c1d9 /Bugzilla/Comment.pm
parenta8a6e226052b940268bd0dd8e0767d3ad516d773 (diff)
downloadbugzilla-476aa64420a21efc15d50857c2ebbad3fb5de6db.tar.gz
bugzilla-476aa64420a21efc15d50857c2ebbad3fb5de6db.tar.xz
Bug 607909: Hours worked / work_time is marked as changing when commenting even when you don't enter a value
r/a=LpSolit
Diffstat (limited to 'Bugzilla/Comment.pm')
-rw-r--r--Bugzilla/Comment.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm
index e8bdb4e89..7b9e257df 100644
--- a/Bugzilla/Comment.pm
+++ b/Bugzilla/Comment.pm
@@ -113,7 +113,11 @@ sub body { return $_[0]->{'thetext'}; }
sub bug_id { return $_[0]->{'bug_id'}; }
sub creation_ts { return $_[0]->{'bug_when'}; }
sub is_private { return $_[0]->{'isprivate'}; }
-sub work_time { return $_[0]->{'work_time'}; }
+sub work_time {
+ # Work time is returned as a string (see bug 607909)
+ return 0 if $_[0]->{'work_time'} + 0 == 0;
+ return $_[0]->{'work_time'};
+}
sub type { return $_[0]->{'type'}; }
sub extra_data { return $_[0]->{'extra_data'} }