[bugzilla-gnome-org-customizations] Configure the guided bug entry form
- From: Andre Klapper <aklapper src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-customizations] Configure the guided bug entry form
- Date: Thu, 15 Jan 2015 01:28:52 +0000 (UTC)
commit a8e6145bf867b850815d0825c4acbaa807840c20
Author: Andre Klapper <a9016009 gmx de>
Date: Thu Jan 8 15:24:33 2015 +0100
Configure the guided bug entry form
Work in progress - CSS is in the file which is not too clean.
Some of the changes are based on Fabiana's talk at GUADEC 2013.
Bug 742340
.../en/default/bug/create/comment-guided.txt.tmpl | 54 +++
.../en/default/bug/create/create-guided.html.tmpl | 451 ++++++++++++++++++++
2 files changed, 505 insertions(+), 0 deletions(-)
---
diff --git a/extensions/TemplateOverrides/template/en/default/bug/create/comment-guided.txt.tmpl
b/extensions/TemplateOverrides/template/en/default/bug/create/comment-guided.txt.tmpl
new file mode 100644
index 0000000..9116d02
--- /dev/null
+++ b/extensions/TemplateOverrides/template/en/default/bug/create/comment-guided.txt.tmpl
@@ -0,0 +1,54 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+[%# The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv gerv net>
+ #%]
+[%# INTERFACE:
+ # This template has no interface.
+ #
+ # Form variables from a bug submission (i.e. the fields on a template from
+ # enter_bug.cgi) can be access via Bugzilla.cgi.param. It can be used to
+ # pull out various custom fields and format an initial Description entry
+ # from them.
+ #%]
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[%+ cgi.param("comment") IF cgi.param("comment") %]
+
+[% IF cgi.param("intention") %]
+Intention:
+[%+ cgi.param("intention") %]
+[% END %]
+
+[% IF !(cgi.param("reproduce_steps").match('^1\.\s*2\.\s*3\.\s*$') ||
cgi.param("reproduce_steps").match('^\s*$')) %]
+Steps to Reproduce:
+[%+ cgi.param("reproduce_steps") %]
+[% END %]
+
+[% IF cgi.param("actual_results") %]
+Actual Results:
+[%+ cgi.param("actual_results") %]
+[% END %]
+
+[% IF cgi.param("expected_results") %]
+Expected Results:
+[%+ cgi.param("expected_results") %]
+[% END %]
+
+[% IF cgi.param("reproducible") != "Choose one..." %]
+Reproducible: [%+ cgi.param("reproducible") %]
+[% END %]
+
+[%+ cgi.param("additional_info") %]
diff --git a/extensions/TemplateOverrides/template/en/default/bug/create/create-guided.html.tmpl
b/extensions/TemplateOverrides/template/en/default/bug/create/create-guided.html.tmpl
new file mode 100644
index 0000000..fe35483
--- /dev/null
+++ b/extensions/TemplateOverrides/template/en/default/bug/create/create-guided.html.tmpl
@@ -0,0 +1,451 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+[%# The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv gerv net>
+ # Christine Begle <cbegle mozilla org>
+ #%]
+
+[%# INTERFACE:
+ # This template has the same interface as create.html.tmpl
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% PROCESS global/header.html.tmpl
+ title = "Report $terms.abug or request a new feature"
+ onload = "PutDescription()"
+ style = "
+#somebugs {
+ border: 1px grey solid;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ padding: 5px;
+ width: 100%;
+ height: 200px;
+}
+.field_description {
+ text-align: right;
+ vertical-align: top;
+ padding-top: 12px;
+}
+.field_description > span {
+ font-weight: bold;
+}
+.field_content {
+ vertical-align: top;
+}
+.search_terms {
+ font-family: monospace;
+ font-size: 1em;
+ font-style: italic;
+}
+.keyboard-key {
+ border: 1px solid #aaa;
+ border-radius: 2px;
+ box-shadow: 1px 2px 2px #ddd;
+ background-color: #f9f9f9;
+ background-image: linear-gradient(top, #eee, #f9f9f9, #eee);
+ padding: 1px 3px;
+ font-family: inherit;
+ font-size: 0.85em;
+}
+h2 {
+ font-size: 1.6em;
+ font-family: sans-serif;
+ padding: 2px;
+ line-height: 1.2em;
+ border-bottom: 1px solid rgb(170, 170, 170);
+}
+h3 {
+ font-size: 150%;
+ font-family: sans-serif;
+ padding: 2px;
+ line-height: 1.5em;
+ border-bottom: 1px solid rgb(170, 170, 170);
+}
+ "
+ %]
+
+[% tablecolor = "#a6c2e1" %]
+
+[%# This script displays the descriptions for selected components. %]
+<script type="text/javascript">
+var descriptions = [
+[% FOREACH c = product.components %]
+ [% NEXT IF NOT c.is_active %]
+ '[% c.description FILTER js %]',
+[% END %]
+];
+
+function PutDescription() {
+ if ((document.getElementById) && (document.body.innerHTML)) {
+ var componentIndex = document.getElementById('component').selectedIndex;
+ if (componentIndex != -1) {
+ var description = document.getElementById('description');
+ description.innerHTML = descriptions[componentIndex];
+ }
+ }
+}
+</script>
+
+[%# Inserted to collapse optional parts by default -- aklapper %]
+<script type="text/javascript">
+<!--
+ function toggle(id) {
+ var z = document.getElementById(id);
+ if (z.style.display == '')
+ z.style.display = 'none';
+ else
+ z.style.display = '';
+ }
+//-->
+</script>
+
+<h2 id="header">Report a software bug or request a new feature</h3>
+
+<p>
+Welcome! Here you can report a bug or a request a new feature in GNOME. We ask you to answer a few short
questions. This will help you to provide good information for the developers. If you have not used Bugzilla
before, you are encouraged to read <a target="_blank"
href="https://bugzilla.gnome.org/page.cgi?id=bug-writing.html">these guidelines</a> before creating a new [%
terms.bug %] report here. Thanks for your help!
+</p>
+
+<h3 id="step1">Step 1 of 3: Find out if your issue has already been reported</h3>
+
+<p>
+ Please search to see if your [% terms.bug %] or feature request has been already reported.
+ The results will appear in the box below.
+ </p>
+
+ <form action="buglist.cgi" method="get" target="somebugs">
+ <input type="hidden" name="format" value="simple">
+ <input type="hidden" name="order" value="relevance desc">
+ <input type="hidden" name="bug_status" value="__all__">
+ <input type="hidden" name="product" value="[% product.name FILTER html %]">
+ <input type="hidden" name="chfieldfrom" value="-36m">
+ <input type="hidden" name="chfieldto" value="Now">
+ <input type="hidden" name="chfield" value="[Bug creation]">
+ <input type="text" name="content" size="50">
+ <input type="submit" id="search" value="Search">
+ </form>
+
+<iframe name="somebugs" id="somebugs" src="">
+</iframe>
+
+<p>
+ You may try different words (e.g. <span class="search_terms">remove</span> instead of <span
class="search_terms">delete</span>).
+ If you find [% terms.abug %] report in the search results which looks the same as your problem, please add
+ any useful extra information to it instead of creating a new report.
+</p>
+
+
+<h3 id="step2">Step 2 of 3: Describe the problem</h3>
+
+<p>
+ If you could not find an already existing report,
+ tell us more about your issue.
+</p>
+
+<form method="post" action="post_bug.cgi">
+ <input type="hidden" name="format" value="guided">
+ <input type="hidden" name="assigned_to" value="">
+ <input type="hidden" name="priority"
+ value="[% default.priority FILTER html %]">
+ <input type="hidden" name="version"
+ value="[% default.version FILTER html %]">
+ <input type="hidden" name="token" value="[% token FILTER html %]">
+
+<table style="vertical-align:top; padding:5px; border-spacing:5px; border:0px; margin-right:0px">
+
+ <tr>
+ <td class="field_description">
+ <span>Product</span>
+ </td>
+ <td class="field_content">
+ <input type="hidden" name="product" value="[% product.name FILTER html %]">
+ [% product.name FILTER html %]
+ </td>
+ </tr>
+
+ <tr>
+ <tr style="background-color:[% tablecolor %];">
+ <td class="field_description">
+ <span>Summary</span>
+ </td>
+ <td class="field_content">
+ <p>
+ How would you summarize the issue in one sentence?
+ </p>
+ <p>
+ <span>Good example:</span>
+ <span class="search_terms">
+ Clicking Cancel does not close the Preferences dialog</span>;
+ <span>Bad example:</span>
+ <span class="search_terms">
+ Problem with application; crashes
+ </span>
+ </p>
+ <input type="text" size="80" name="short_desc" id="short_desc"
+ maxlength="255" spellcheck="true">
+ </td>
+ </tr>
+ <td class="field_description">
+ <span>Component</span>
+ </td>
+ <td class="field_content">
+ <p>
+ In which area does the issue occur? If you are unsure, just use "General".
+ You could also use the same component as
+ similar [% terms.bugs %] you found when searching above, or you could read the list of
+ <a target="_blank" href="describecomponents.cgi?product=
+ [% product.name FILTER uri %]">component
+ descriptions</a>.
+ </p>
+ <table style="border:0px; padding:0px; border-spacing:0px; margin-right:0px">
+ <tr>
+ <td class="field_content">
+ <select name="component" id="component"
+ size="5" onchange="PutDescription()">
+ [% IF NOT default.component_ %]
+ [%# Various b.m.o. products have a "General" component,
+ which is a useful default. %]
+ [% default.component_ = "General" %]
+ [% END %]
+ [% FOREACH c = product.components %]
+ [% NEXT IF NOT c.is_active %]
+ <option value="[% c.name FILTER html %]"
+ [% " selected=\"selected\"" IF c.name == default.component_ %]>
+ [% c.name FILTER html %]
+ </option>
+ [% END %]
+ </select>
+ </td>
+ <td style="vertical-align:top;">
+ <div id="description" style="color: #24569b; margin-left: 10px;
+ height: 5em; overflow: auto;">
+ <script type="text/javascript">
+ if ((document.getElementById) && (document.body.innerHTML)) {
+ document.write("\
+ Select a component to see its description here.");
+ }
+ </script>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr style="background-color:[% tablecolor %];">
+ <td class="field_description">
+ <span>Intention</span>
+ </td>
+ <td class="field_content">
+ <p>
+ What were you trying to do (and why)?
+ </p>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'intention'
+ minrows = 3
+ cols = constants.COMMENT_COLS
+ %]
+ </td>
+ </tr>
+
+ <tr>
+ <td class="field_description">
+ <span>Steps to Reproduce</span>
+ </td>
+ <td class="field_content">
+ <p>
+ What did you do? Describe the steps how to reproduce the
+ issue, so another person could easily follow your steps.
+ </p>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'reproduce_steps'
+ minrows = 4
+ cols = constants.COMMENT_COLS
+ defaultcontent = "1. \n2. \n3. "
+ %]
+ <p>
+ Does it happen more than once (if you have time to test)?
+ </p>
+ <select name="reproducible">
+ <option name="DidntTry" value="Didn't try">
+ I have not tried to reproduce it.
+ </option>
+ <option name="AlwaysReproducible" value="Always">
+ I have tried more than once and it happens every time.
+ </option>
+ <option name="Sometimes" value="Sometimes">
+ Problem happens sometimes, but not always.
+ </option>
+ <option name="NotReproducible" value="Couldn't Reproduce">
+ I have tried, but I could not reproduce it.
+ </option>
+ </select>
+ </td>
+ </tr>
+
+ <tr style="background-color:[% tablecolor %];">
+ <td class="field_description">
+ <span>Results</span>
+ </td>
+ <td class="field_content">
+ <p>
+ What happened?
+ </p>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'actual_results'
+ minrows = 3
+ cols = constants.COMMENT_COLS
+ %]
+ </td>
+ </tr>
+
+ <tr>
+ <td class="field_description">
+ <span>Expectations</span>
+ </td>
+ <td class="field_content">
+ <p>
+ What were your expectations instead?
+ </p>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'expected_results'
+ minrows = 3
+ cols = constants.COMMENT_COLS
+ %]
+ </td>
+ </tr>
+
+ <tr style="background-color:[% tablecolor %];">
+ <td class="field_description">
+ <span>Severity</span>
+ </td>
+ <td class="field_content">
+ <p>
+ How serious is the problem?
+ </p>
+ <select name="bug_severity">
+ <option name="blocker" value="blocker">
+ Blocker: This completely blocks software development or testing work.
+ </option>
+ <option name="critical" value="critical">
+ Critical: It crashes, hangs, or makes you irrevertibly lose data.
+ </option>
+ <option name="major" value="major">
+ Major: A major feature is broken that is used by many people.
+ </option>
+ <option name="normal" value="normal">
+ Normal: An average [% terms.bug %] that should be fixed.
+ </option>
+ <option name="minor" value="minor">
+ Minor: Minor loss of function, and there is an easy workaround.
+ </option>
+ <option name="trivial" value="trivial">
+ Trivial: A cosmetic problem, such as a misspelled word or
+ misaligned text.
+ </option>
+ <option name="enhancement" value="enhancement" selected="selected">
+ Enhancement: Request for new functionality or enhancement.
+ </option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="field_description">
+ <span>Any Additional Information</span><span> (optional)</span>
+ </td>
+ <td class="field_content">
+ <p>
+ Do you have any additional information? Anything which may be
+ relevant, or anything special about <span style="font-weight:bold;">your
+ computer's configuration</span>. If you report a crash, please paste a
+ <a href="https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces">stack
trace</a></span>
+ A <a href="https://en.wikipedia.org/wiki/Screenshot"><span
style="font-weight:bold;">screenshot</span></a>
+ which shows the problem, or any information longer than a few lines, such as a
+ <span style="font-weight:bold;">testcase or a debug log file,
+ should be added using the <span class="keyboard-key">Add an Attachment</span> link on
+ the [% terms.bug %] report, after it is filed.
+ </p>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'additional_info'
+ minrows = 3
+ cols = constants.COMMENT_COLS
+ %]
+ </td>
+ </tr>
+
+ <select style="visibility: hidden;" id="op_sys" name="op_sys">
+ <option value="All" selected="selected" id="v1_op_sys">All</option>
+ </select>
+ <select style="visibility: hidden;" id="rep_platform" name="rep_platform">
+ <option value="All" selected="selected" id="v1_rep_platform">All</option>
+ </select>
+
+ [% Hook.process('form') %]
+</table>
+
+
+<h3 id="step3">Step 3 of 3: Submit the report</h3>
+
+<p>
+ <input type="submit" id="report" value=" Submit Report "
+ onclick="if (this.form.comment.value == '')
+ { alert('Please enter some details about this [% terms.bug %] or feature request first.');
+ this.form.comment.focus();
+ return false; } return true;">
+</p>
+
+<p>
+ Submit your report by pressing the <span class="keyboard-key">Submit Report</span> button.
+ That's it! Thank you very much! You will be notified by email about any
+ progress that is made on fixing your [% terms.bug %] or feature request.
+
+<p>
+ Please be warned
+ that a lot of [% terms.bug %] reports get filed and that some projects only
+ have a single volunteer developer. You can help the process by making sure
+ your [%+ terms.bug %] report is complete and easy to understand, and by
+ quickly replying to any questions which may arrive by email.
+</p>
+<p>
+ If you feel like trying to write a software
+ patch to fix the problem yourself, read the information on
+ <a target="_blank" href="https://wiki.gnome.org/Git/Developers">using GNOME's Git code repository</a>.
+</p>
+
+ </form>
+
+[% PROCESS global/footer.html.tmpl %]
+
+[%############################################################################%]
+[%# Block for SELECT fields #%]
+[%############################################################################%]
+
+[% BLOCK select %]
+ <select name="[% sel %]">
+ [%- IF default.$sel %]
+ <option value="[% default.$sel FILTER html %]" selected="selected">
+ [% default.$sel FILTER html -%]
+ </option>
+ [% END %]
+ [%- FOREACH x = $sel %]
+ [% NEXT IF x == default.$sel %]
+ <option value="[% x FILTER html %]">
+ [% x FILTER html -%]
+ </option>
+ [%- END %]
+ </select>
+[% END %]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]