tabular reports are broken if a row/col/tbl header begins with an underscore

RESOLVED FIXED in Bugzilla 2.18

Status

()

Bugzilla
Reporting/Charting
RESOLVED FIXED
14 years ago
6 years ago

People

(Reporter: robzilla, Assigned: robzilla)

Tracking

2.18
Bugzilla 2.18
Bug Flags:
approval +
blocking2.20 -
approval2.18 +
blocking2.18 -

Details

Attachments

(1 attachment)

(Assignee)

Description

14 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Build Identifier: 

Since the template toolkit hides values of hash keys beginning with a '.' or 
a '_', the tabular reports get broken if a table, column, or row header name 
begins with a [._].  For instance, I have a component name called 
_Unspecified.  If I run a tabular report on this field, I get a bunch of errors 
in the apache log, and all the entries in the table for _Unspecified are blank.

I fixed this problem by adding a space to the front of the names if they start 
with [._].

In report.cgi near line 170:
...
    $row = "" if ($row eq $columns{''});
    $col = "" if ($col eq $columns{''});
    $tbl = "" if ($tbl eq $columns{''});

    # account for the fact that names may start with '_' or '.'.  Change this 
    # so the template doesn't hide hash elements with those keys
    $row =~ s/^([._])/ $1/;
    $col =~ s/^([._])/ $1/;
    $tbl =~ s/^([._])/ $1/;
    
    $data{$tbl}{$col}{$row}++;
    $names{"col"}{$col}++;
    $names{"row"}{$row}++;
    $names{"tbl"}{$tbl}++;
...


Reproducible: Always
Steps to Reproduce:
Assignee: justdave → gerv
Component: Bugzilla-General → Reporting/Charting
(Assignee)

Updated

14 years ago
Version: unspecified → 2.18
(Assignee)

Comment 1

14 years ago
Created attachment 161058 [details] [diff] [review]
Patch v1
(Assignee)

Updated

14 years ago
Attachment #161058 - Flags: review?(rsiklos)
(Assignee)

Updated

14 years ago
Attachment #161058 - Flags: review?(rsiklos) → review?
(Assignee)

Updated

14 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

14 years ago
Flags: blocking2.20?
Flags: blocking2.18?
Flags: blocking2.16.7?
(Assignee)

Updated

14 years ago
Assignee: gerv → rsiklos
OS: Linux → All
Hardware: PC → All
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
tabular reports did not yet exist in 2.16, so this can't block 2.16 :)

I seem to recall something to do with underscores being fixed already in charts,
but since this is reported against 2.18 (pretty recent) maybe it was something
else...

Gerv?
Flags: blocking2.16.7?
Flags: blocking2.20?
Flags: blocking2.20-
Flags: blocking2.18?
Flags: blocking2.18-
Whiteboard: will accept for 2.18 branch, not blocking release though.
Target Milestone: --- → Bugzilla 2.18
Attachment #161058 - Flags: review? → review?(gerv)
Comment on attachment 161058 [details] [diff] [review]
Patch v1

r=gerv. Indeed, this does fix a problem.

Gerv
Attachment #161058 - Flags: review?(gerv) → review+
Flags: approval2.18?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+

Comment 4

14 years ago
Checking in report.cgi;
/cvsroot/mozilla/webtools/bugzilla/report.cgi,v  <--  report.cgi
new revision: 1.26; previous revision: 1.25
done

Checking in report.cgi;
/cvsroot/mozilla/webtools/bugzilla/report.cgi,v  <--  report.cgi
new revision: 1.24.2.1; previous revision: 1.24
done
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Whiteboard: will accept for 2.18 branch, not blocking release though.
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.