boolean chart addition doesn't keep query template format

RESOLVED FIXED in Bugzilla 2.18

Status

()

Bugzilla
Query/Bug List
--
minor
RESOLVED FIXED
16 years ago
6 years ago

People

(Reporter: bbaetz, Assigned: gerv)

Tracking

2.17
Bugzilla 2.18
x86
Linux

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
Go to http://bugzilla.mozilla.org/query.cgi?format=modern, then click on 'add'
in the boolean chart section.

Expected:

Load the modern format page with an extra element

Actual:

Load the default format page with an extra element

$::FORM{'format'} needs to be passed into the template
This is a symptom of a wider problem.

You have a CGI, a.cgi, which submits to b.cgi. You load up a.cgi?format=foo . It
gives you a form. In order for a.cgi to submit to itself, or perhaps for b.cgi
to know which format is being used, the form on a.cgi has to have a format
parameter. 

But then, how does b.cgi know whether the format is the one a.cgi used or one it
must use?

Say a.cgi?format=foo has to submit to b.cgi?format=bar but also can be reloaded
(like boolean charts) and so has to submit to a.cgi?format=foo. We have a clash
here.

Myk: any ideas on the best solution for this?

Gerv
(Reporter)

Comment 2

16 years ago
In this particular case, we're submitting to the same page
(query.cgi->query.cgi),  so its not that complicated.
But we are submitting both to query.cgi and buglist.cgi - so if you set <input
type="hidden" name="format" value="modern"> on the form, you also get
buglist.cgi being called with format="modern". And you might not want the modern
form of a buglist.

Gerv
(Reporter)

Comment 4

16 years ago
Oh, thats right, we don't have the separate buttons any more. We couldsent a
uqery_format var through, and have query.cgi deal with that. Maybe thats the way
to go - scriptname_format
Ok, how about this:

When transitioning from one page to another,
"format" denotes the format of the new page, if any
"submitter_format" denotes the format of the submitting page, if any.

Would this cover all the bases?

Gerv
Seems like the right thing to do.
Created attachment 99719 [details] [diff] [review]
Patch v.1

This should do the trick. 

Gerv
-> me.

Gerv
Assignee: endico → gerv
The discussion in this bug talks about "submitter_format", but the patch uses
"query_format".  Is this because you think it doesn't make sense to use a
generic name for this field or because "query_format" is a better generic name?
I used query_format because I was thinking about chains of CGIs. Better for each
CGI to say:
"Is there a format that someone's set specifically for me? If not, use the
generic one."

I don't really know how this'll pan out, and the query_format scheme suggested
by bbaetz seemed to be less likely to break than my submitter_format one.

Gerv
Comment on attachment 99719 [details] [diff] [review]
Patch v.1

Hunh, I missed bbaetz' suggestion somehow while reading through the comments. 
Ok, looks good and works, r=myk
Attachment #99719 - Flags: review+
Fixed. Myk may want to apply this to b.m.o.

Checking in query.cgi;
/cvsroot/mozilla/webtools/bugzilla/query.cgi,v  <--  query.cgi
new revision: 1.105; previous revision: 1.104
done
Checking in template/en/default/search/search.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/search/search.html.tmpl,v
 <--  search.html.tmpl
new revision: 1.10; previous revision: 1.9
done

Gerv
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.18
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.