Closed
Bug 121247
Opened 23 years ago
Closed 22 years ago
enter_bug comment templates
Categories
(Bugzilla :: Creating/Changing Bugs, enhancement, P2)
Bugzilla
Creating/Changing Bugs
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: paul.thomas, Assigned: gerv)
References
Details
Attachments
(1 file)
2.18 KB,
patch
|
myk
:
review+
myk
:
review+
|
Details | Diff | Splinter Review |
following on from a post I made to the webtools group and the comments I got back hows about ..... here a suggestion to some functionality that I think is useful .......... I've implemented this on my system my manually changing the enter_bug.cgi so that each link on the "pick a product" page includes text like "&comment=TEMPLATE%20FOR%20EACH%20PRODUCT" at the end of the query string. This way I can end up with say the following automatically appearing in the comment field... ---------------------- Database : Test-up : webserver on machine.myorg.com Some Other1 : Some Other2 : Bug Details : ---------------------- It would be nice to have another field in the product table to store the template for each product and then a little cgi to edit the templates...... the default template for each product would of course be blank. myk@mozilla.org agreed that "Still, these templates could be useful for, among other things, imposing the kind of structure on bug submissions that is called for in b.m.o.'s bug writing guidelines or created by the Bugzilla helper."
Comment 1•22 years ago
|
||
Yes, if I understand this correctly, it's the sort of thing we would need to make Bugzilla Helper work without JS.
Assignee | ||
Comment 2•22 years ago
|
||
Bugzilla Helper as-is will never work without JS. There will be a new enter_bug.cgi template, which requires JS, which is laid out like the Helper. When I have some time, I'm going to write it. :-) Gerv
Comment 3•22 years ago
|
||
It doesn't matter if I call it Bugzilla Helper or Corny Widgets Incorporated. I believe this feature would allow the functionality currently embodied in the Bugzilla Helper to be implemented without JS.
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.18
Assignee | ||
Comment 4•22 years ago
|
||
The right way to do this for the new helper enter_bug page is (IMHO) as follows: - make a template with a separate text box, and descriptive text, for each of the new, structured fields. Each of those text boxes has an internal name "comment_X", where X is a digit. They can have a default value in the template if necessary. They might be "Description", "Steps to Reproduce", etc. - enter_bug.cgi concatenates all "comment_X" fields it gets in numerical order into the initial bug comment. Gerv
Comment 5•22 years ago
|
||
No that's the wrong way. =) The right way is to call the individual fields field_XXX, field_YYY, etc, and pass them through as XXX, YYY, etc respectively to a TT template whose name is also passed, which returns the resulting comment.
Assignee | ||
Comment 6•22 years ago
|
||
Er... yes. That. :-) Anyway, I don't think this bug should be fixed in the way suggested. An alternative method of doing what he wants would be to change the enter_bug.html.tmpl template: <textfield id="description"> [% IF product == "FooProduct" %] Name: Age: Sex: [% ELSIF product == "BarProduct" %] Computer name: Keyboard key count: [% END %] </textfield> Gerv
Comment 7•22 years ago
|
||
Yes, we could definitely make the post_bug.cgi template conditional, especially on product.
Assignee | ||
Comment 8•22 years ago
|
||
I'm about to attach a small patch which enables part of what we discussed - the format of the initial comment is got from a text template. This can be made conditional on product, or anything else in the enter_bug submission. This patch is required for making Bugzilla Helper an enter_bug template, so I'd like it in for 2.16 if possible. paul.thomas@sse.ie - I've sort of hijacked your bug :-) The way you'd do what _you_ want is that your enter_bug template would have (line 172): <textarea wrap="hard" name="comment" rows="10" cols="80"> [% IF product = "FooProduct" %] Some template here [% ELSIF product = "BarProduct" %] Some more template [% END %] </textarea> If your enter_bug has custom fields which don't depend on the product, you can have a separate text box for each, and format them into the initial comment using the mechanism this patch creates. Gerv
Assignee: myk → gerv
Target Milestone: Bugzilla 2.18 → Bugzilla 2.16
Assignee | ||
Comment 9•22 years ago
|
||
Here it is. Gerv
Updated•22 years ago
|
Attachment #79194 -
Flags: review+
Comment 10•22 years ago
|
||
Comment on attachment 79194 [details] [diff] [review] Patch v.1 Works, trivial. 2xr=myk.
Assignee | ||
Comment 11•22 years ago
|
||
Fixed. Checking in post_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v <-- post_bug.cgi new revision: 1.46; previous revision: 1.45 done RCS file: /cvsroot/mozilla/webtools/bugzilla/template/default/entry/comment.txt.tmpl,v done Checking in template/default/entry/comment.txt.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/default/entry/comment.txt.tmpl,v <-- comment.txt.tmpl initial revision: 1.1 done Gerv
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 12•22 years ago
|
||
*** Bug 95972 has been marked as a duplicate of this bug. ***
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
•