Closed Bug 252137 Opened 20 years ago Closed 20 years ago

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

Categories

(Bugzilla :: Reporting/Charting, defect)

2.18
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: robzilla, Assigned: robzilla)

Details

Attachments

(1 file)

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
Version: unspecified → 2.18
Attached patch Patch v1Splinter Review
Attachment #161058 - Flags: review?(rsiklos)
Attachment #161058 - Flags: review?(rsiklos) → review?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking2.20?
Flags: blocking2.18?
Flags: blocking2.16.7?
Assignee: gerv → rsiklos
OS: Linux → All
Hardware: PC → All
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+
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
Closed: 20 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.

Attachment

General

Created:
Updated:
Size: