The default bug view has changed. See this FAQ.

There is no field named 'actual_time' when generating reports

RESOLVED FIXED in Bugzilla 4.2

Status

()

Bugzilla
Reporting/Charting
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ahmed Ossama, Assigned: Frédéric Buclin)

Tracking

({regression})

4.2.3
Bugzilla 4.2
regression
Bug Flags:
approval +
approval4.4 +
blocking4.4 +
approval4.2 +
blocking4.2.4 +

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build ID: 20120707093031

Steps to reproduce:

User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:13.0) Gecko/20100101 Firefox/13.0.1
Perl: v5.10.1

I did a "Tabular reports" with Vertical axis set to "Actual Hours" and Horizontal axis set to "Assignee" and selected all Products, Components, Statuses and Resolutions. But the report always come out with "There is no field named 'actual_time'."

I am testing with an "admin" user and I have the parameter "timetrackinggroup" set to "timetracking" group; I have also tested the issue when "timetrackinggroup" is set to "editbugs" group in an attempt to test if this parameter is causing the issue, but the same issue still occurs.

I have also tried generating reports on Bugzilla 4.2.1 and the issue still takes place. And I installed a plain 4.3.3 to test this issue, and it still happens.

Steps to reproduce:
1. Reports > Tabular reports (and also Graphical reports)
2. Vertical Axis: Actual Hours
3. Horizontal Axis: Assignee
4. Select all Products, all Components, all Statuses and all Resolutions (and also tried selecting none)
5. Hit "Generate Report"


Actual results:

There is no field named 'actual_time'.


Expected results:

Display a tabular report with the "Actual Hours" against "Assignees"
(Assignee)

Comment 1

5 years ago
actual_time is the old name for work_time. Search.pm is supposed to take care of this, but this is clearly not the case.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Target Milestone: --- → Bugzilla 4.2
(Assignee)

Comment 2

5 years ago
Ah, the problem is that Bugzilla::Search::COLUMNS states that:

    # Backward-compatibility for old field names. Goes new_name => old_name.
    # These are here and not in _translate_old_column because the rest of the
    # code actually still uses the old names, while the fielddefs table uses
    # the new names (which is not the case for the fields handled by
    # _translate_old_column).
    my %old_names = (
        creation_ts => 'opendate',
        delta_ts    => 'changeddate',
        work_time   => 'actual_time',
    );

So we have a mix of old and new field names within the codebase, which is responsible for this mess.
(Assignee)

Comment 3

5 years ago
I will have to hack report.cgi to take care of this. Moreover, all links are broken in tabular reports due to this actual_time/work_time mismatch. This seems to be the single field to suffer from this problem.
Assignee: charting → LpSolit
Status: NEW → ASSIGNED
Flags: blocking4.4+
Flags: blocking4.2.4+
(Assignee)

Comment 4

5 years ago
Created attachment 666202 [details] [diff] [review]
patch, v1

This patch fixes both the "invalid name" problem thrown by Bugzilla::Field->check but also links in tabular reports.
Attachment #666202 - Flags: review?(glob)
Comment on attachment 666202 [details] [diff] [review]
patch, v1

r=glob
Attachment #666202 - Flags: review?(glob) → review+
(Assignee)

Updated

5 years ago
Flags: approval4.4+
Flags: approval4.2+
Flags: approval+
(Assignee)

Comment 6

5 years ago
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified report.cgi
Committed revision 8410.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
modified report.cgi
Committed revision 8405.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified report.cgi
Committed revision 8143.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.