]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 794389: There is no field named 'actual_time' when generating reports
authorFrédéric Buclin <LpSolit@gmail.com>
Thu, 4 Oct 2012 11:30:23 +0000 (13:30 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 4 Oct 2012 11:30:23 +0000 (13:30 +0200)
r=glob a=LpSolit

report.cgi

index 4230ade368d4f72fb8997267af7d6b434d810eff..cc43e66e43dd3db2410bbd036b536218c27695c4 100755 (executable)
@@ -304,6 +304,10 @@ $template->process("$format->{'template'}", $vars)
 sub get_names {
     my ($names, $isnumeric, $field_name) = @_;
     my ($field, @sorted);
+    # XXX - This is a hack to handle the actual_time/work_time field,
+    # because it's named 'actual_time' in Search.pm but 'work_time' in Field.pm.
+    $_[2] = $field_name = 'work_time' if $field_name eq 'actual_time';
+
     # _realname fields aren't real Bugzilla::Field objects, but they are a
     # valid axis, so we don't vailidate them as Bugzilla::Field objects.
     $field = Bugzilla::Field->check($field_name)