Closed
Bug 138284
Opened 22 years ago
Closed 22 years ago
Tweak Bugzilla to prepare for simple enter bug template
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: gerv, Assigned: gerv)
Details
Attachments
(1 file, 2 obsolete files)
4.50 KB,
patch
|
myk
:
review+
bbaetz
:
review+
|
Details | Diff | Splinter Review |
Over in bug 133559, I'm developing a second template for enter_bug.cgi - the Bugzilla Helper is becoming a template. Bugzilla needs a tweak or two to support the extra stuff. It is likely that b.m.o will update to 2.16, and stay there. Therefore, to get this on b.m.o, they'll have to apply the patch by hand. So, it would be ideal if these tweaks were part of Bugzilla 2.16, even if the new template isn't. The tweaks are: - setting the variable user_agent to the user-agent string when we initialise $vars. This is generally useful. - choose-product.tmpl passing the format parameter through to its target. - the simple buglist format saying "Zarro Boogs", instead of nothing, if no bugs are found. I have simple patches for all of these, but want to discuss whether any of them are controversial first :-) Gerv
Assignee | ||
Comment 1•22 years ago
|
||
Accepting; targetting at 2.16. Gerv
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.16
Version: 2.10 → 2.15
Assignee | ||
Comment 2•22 years ago
|
||
Another change would be to make duplicates.cgi take a "simple" parameter as well, and split the template up into components. I don't know if we'll get that for 2.16, though. Gerv
Assignee | ||
Comment 3•22 years ago
|
||
Here's v.1 - it patches the wrong templates, but it gives an idea of what I'm trying to do. Gerv
Assignee | ||
Updated•22 years ago
|
Assignee | ||
Comment 4•22 years ago
|
||
This patch patches the correct templates. Ready for review. Gerv
Attachment #80311 -
Attachment is obsolete: true
Comment 5•22 years ago
|
||
Comment on attachment 80682 [details] [diff] [review] Patch v.2 >Index: enter_bug.cgi >-$vars->{'component_'} = $::components{$product}; >+$vars->{'component_'} = \@components; Why fetch them from the database instead of the version cache? >+my $template_name = "bug/create/create"; >+$template_name .= $::FORM{'format'} ? "-$::FORM{'format'}" : ""; This should use ValidateOutputFormat. >Index: globals.pl >+ # User Agent >+ 'user_agent' => $ENV{'HTTP_USER_AGENT'} , I'm not sure this is so generally useful that it warrants being in globals.pl instead of enter_bug.cgi. On the other hand, I'm not sure it isn't either, so although I have misgivings, I guess this is ok.
Attachment #80682 -
Flags: review-
Assignee | ||
Comment 6•22 years ago
|
||
> >-$vars->{'component_'} = $::components{$product}; > >+$vars->{'component_'} = \@components; > > Why fetch them from the database instead of the version cache? The version cache doesn't have the descriptions in it. the @components array is an array of hashes, with members 'name' and 'description', generated further up the patch. > >+my $template_name = "bug/create/create"; > >+$template_name .= $::FORM{'format'} ? "-$::FORM{'format'}" : ""; > > This should use ValidateOutputFormat. OK. > >+ # User Agent > >+ 'user_agent' => $ENV{'HTTP_USER_AGENT'} , > I'm not sure this is so generally useful that it warrants being in > globals.pl instead of enter_bug.cgi. On the other hand, I'm not sure > it isn't either, so although I have misgivings, I guess this is ok. I think it's a good utility one; who knows what sort of templates localisers might want to produce? And, like it or not, the user agent is still the standard way to tell browsers apart. Gerv
Attachment #80682 -
Attachment is obsolete: true
Comment 7•22 years ago
|
||
>The version cache doesn't have the descriptions in it. the @components array is
>an array of hashes, with members 'name' and 'description', generated further up
>the patch.
Where c.description used? I don't see it anywhere in this patch.
Assignee | ||
Comment 8•22 years ago
|
||
> Where c.description used? I don't see it anywhere in this patch.
It's not, in this patch :-)
I have a nifty feature on the Bugzilla Helper replacement where (if you have JS
enabled) when you select a component, its description appears next to the select
widget. Hence the need to have the descriptions on the interface, and so the
need to switch from a list to a 2-member hash.
Gerv
Comment 9•22 years ago
|
||
Comment on attachment 80865 [details] [diff] [review] Patch v.2 Aah, I see. Ok, then, r=myk
Attachment #80865 -
Flags: review+
Comment 10•22 years ago
|
||
Comment on attachment 80865 [details] [diff] [review] Patch v.2 >diff -u -r1.4 choose-product.html.tmpl >--- template/en/default/global/choose-product.html.tmpl 24 Apr 2002 18:27:38 -0000 1.4 >+++ template/en/default/global/choose-product.html.tmpl 24 Apr 2002 22:41:17 -0000 >@@ -27,8 +27,9 @@ > [% FOREACH p = proddesc.keys.sort %] > <tr> > <th align="right" valign="top"> >- <a href="[% target %]?product=[% p FILTER url_quote %]"> >- [% p FILTER html %]</a>: >+ <a href="[% target %]?product=[% p FILTER url_quote %] >+ [%- "&format=$format" IF format %]"> [%- "&format=$format" IF format %]">, rather >RCS file: /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list-simple.html.tmpl,v >retrieving revision 1.2 >diff -u -r1.2 list-simple.html.tmpl >--- template/en/default/list/list-simple.html.tmpl 19 Apr 2002 22:37:54 -0000 1.2 >+++ template/en/default/list/list-simple.html.tmpl 24 Apr 2002 22:41:17 -0000 >@@ -39,7 +39,11 @@ > </head> > > <body> >- [% PROCESS list/table.html.tmpl %] >+ [% IF bugs.size == 0 %] >+ <h3>Zarro Boogs found.</h3> >+ [% ELSE %] >+ [% PROCESS list/table.html.tmpl %] >+ [% END %] > </body> > > </html> Its probably a good idea, though. r=bbaetz with the above change
Attachment #80865 -
Flags: review+
Assignee | ||
Comment 11•22 years ago
|
||
Fixed. Checking in enter_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v <-- enter_bug.cgi new revision: 1.66; previous revision: 1.65 done Checking in globals.pl; /cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl new revision: 1.163; previous revision: 1.162 done Checking in template/en/default/bug/create/create.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl,v <-- create.html.tmpl new revision: 1.5; previous revision: 1.4 done Checking in template/en/default/global/choose-product.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/choose-product.html.tmpl,v <-- choose-product.html.tmpl new revision: 1.5; previous revision: 1.4 done Checking in template/en/default/list/list-simple.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list-simple.html.tmpl,v <-- list-simple.html.tmpl new revision: 1.3; previous revision: 1.2 done Gerv
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•