Closed Bug 150105 Opened 23 years ago Closed 20 years ago

$debug flag in buglist.cgi not working (cgi param works fine)

Categories

(Bugzilla :: Query/Bug List, enhancement)

2.17
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.22

People

(Reporter: justdave, Assigned: wicked)

References

Details

Attachments

(1 file)

Cloned from bug 148993, see that bug for full description (it had a checkin for 2.16 which didn't make it to the trunk, and we still need to get a fix for it on the trunk.
Keywords: regression
Target Milestone: --- → Bugzilla 2.18
*** Bug 158496 has been marked as a duplicate of this bug. ***
Assignee: endico → nobody
nobody@bugzilla.org cares about these poor bugs and they haven't been touched in nearly 2 months. No way they'll hit 2.18 unless something changes. --> 2.20 If someone adopts them, they can pull them back in.
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
Severity: normal → minor
Summary: debug flag in buglist not working → $debug flag in buglist.cgi not working (cgi param works fine)
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
First of all, this debug code has been moved to Bugzilla/Search.pm when that module was created. Secondly, this seems quite easy to fix. I can see following options: 1) Fix this quickly by changing Bugzilla/Search.pm to output minimal header when $debug is enabled. 2) Fix this by removing the $debug flag and combine debug code with &debug=1 parameter. If it's passed, in addition to SQL query, Bugzilla/Search.pm generates debug data and buglist.cgi passes it to template that'll display it along with the existing SQL query. 3) Just remove this broken code. We already can see the SQL query. If we want this data to be seen, I would go with option 2. If not, option 3 is best. I think this debug data might sometime come handy, especially when searching is as complicated as it is now. Thoughts?
Assignee: nobody → wicked
I give review- to the first option. Bugzilla/Search.pm should be UI-independent. It should be callable from console, web-based scripts, you name it. There should be no mark-up generation in it. So 1) is a no-no.
This patch implements choice #2. Now, when debug=1 CGI param is passed, Search.pm gathers and stores boolean chart debug data. Buglist.cgi retrieves this data from the search object and passes it to template. Data is then displayed before query itself. Perhaps this will help understand Search.pm problems in the future.. Tested briefly.
Attachment #193726 - Flags: review?(justdave)
Comment on attachment 193726 [details] [diff] [review] Add more debug output to Search.pm, V1 works fine. r=LpSolit
Attachment #193726 - Flags: review?(justdave) → review+
Status: NEW → ASSIGNED
Flags: approval?
the patch works on 2.20+ too.
Flags: approval2.20?
Target Milestone: Bugzilla 2.22 → Bugzilla 2.20
We've been living with this too long for it to be anything but an enhancement at this point, and as such it should land only in 2.22, not also in 2.20.
Severity: minor → enhancement
Flags: approval?
Flags: approval2.20?
Flags: approval2.20-
Flags: approval+
Keywords: regression
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.316; previous revision: 1.315 done Checking in Bugzilla/Search.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v <-- Search.pm new revision: 1.115; previous revision: 1.114 done Checking in template/en/default/list/list.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl,v <-- list.html.tmpl new revision: 1.41; previous revision: 1.40 done Checking in template/en/default/list/server-push.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/server-push.html.tmpl,v <-- server-push.html.tmpl new revision: 1.6; previous revision: 1.5 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
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: