From 6241f76459ef2608faa2a6baf28fd7a4b6c66929 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Mon, 22 Mar 2004 08:25:48 +0000 Subject: Bug 233246 - improve documentation on enter_bug comment formatting templates. --- docs/xml/customization.xml | 55 +++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 23 deletions(-) (limited to 'docs') diff --git a/docs/xml/customization.xml b/docs/xml/customization.xml index dd27b63fe..f1daee3f7 100644 --- a/docs/xml/customization.xml +++ b/docs/xml/customization.xml @@ -240,46 +240,55 @@ bug/create/create.html.tmpl and bug/create/comment.txt.tmpl: - You may wish to get bug submitters to give certain bits of structured - information, each in a separate input widget, for which there is not a - field in the database. The bug entry system has been designed in an - extensible fashion to enable you to define arbitrary fields and widgets, - and have their values appear formatted in the initial - Description, rather than in database fields. An example of this - is the mozilla.org - guided - bug submission form. + You may not wish to go to the effort of creating custom fields in + Bugzilla, yet you want to make sure that each bug report contains + a number of pieces of important information for which there is not + a special field. The bug entry system has been designed in an + extensible fashion to enable you to add arbitrary HTML widgets, + such as drop-down lists or textboxes, to the bug entry page + and have their values appear formatted in the initial comment. + + + An example of this is the mozilla.org + guided + bug submission form. The code for this comes with the Bugzilla + distribution as an example for you to copy. It can be found in the + files + create-guided.html.tmpl and + comment-guided.html.tmpl. + - To make this work, create a custom template for - enter_bug.cgi (the default template, on which you - could base it, is create.html.tmpl), - and either call it create.html.tmpl or use a format and - call it create-<formatname>.html.tmpl. - Put it in the custom/bug/create - directory. In it, add widgets for each piece of information you'd like + So to use this feature, create a custom template for + enter_bug.cgi. The default template, on which you + could base it, is + custom/bug/create/create.html.tmpl. + Call it create-<formatname>.html.tmpl, and + in it, add widgets for each piece of information you'd like collected - such as a build number, or set of steps to reproduce. Then, create a template like - custom/bug/create/comment.txt.tmpl, also named - after your format if you are using one, which - references the form fields you have created. When a bug report is + custom/bug/create/comment.txt.tmpl, and call it + comment-<formatname>.txt.tmpl. This + template should reference the form fields you have created using + the syntax [% form.<fieldname> %]. When a + bug report is submitted, the initial comment attached to the bug report will be formatted according to the layout of this template. - For example, if your enter_bug template had a field + For example, if your custom enter_bug template had a field <input type="text" name="buildid" size="30"> and then your comment.txt.tmpl had BuildID: [% form.buildid %] - then + then something like BuildID: 20020303 - would appear in the initial checkin comment. - + would appear in the initial comment. + -- cgit v1.2.3-24-g4f1b