--- templates/bugzilla/trunk/bug/create/create-guided.html.tmpl 2011/01/06 11:48:33 144 +++ templates/bugzilla/trunk/bug/create/create-guided.html.tmpl 2011/01/07 21:07:48 145 @@ -34,22 +34,11 @@ style = "#somebugs { width: 100%; height: 500px }" %] -

- - This is a template used on mozilla.org. This template, and the - comment-guided.txt.tmpl template that formats the data submitted via - the form in this template, are included as a demo of what it's - possible to do with custom templates in general, and custom [% terms.bug %] - entry templates in particular. As much of the text will not apply, - you should alter it - if you want to use this form on your [% terms.Bugzilla %] installation. - -

- -[% tablecolour = "#FFFFCC" %] +[% tablecolour = "#efefef" %] [%# This script displays the descriptions for selected components. %] - -

Step 1 of 3 - has your [% terms.bug %] already been reported?

- -

- Please don't skip this step - half of all - [% terms.bugs %] filed are - reported already. - Check the two lists of frequently-reported [% terms.bugs %]: -

+var initialowners = new Array([% product.components.size %]); +var last_initialowner; +var initialccs = new Array([% product.components.size %]); +var components = new Array([% product.components.size %]); +var flags = new Array([% product.components.size %]); +[% IF Param("useqacontact") %] + var initialqacontacts = new Array([% product.components.size %]); + var last_initialqacontact; +[% END %] +[% count = 0 %] +[%- FOREACH c = product.components %] + components[[% count %]] = "[% c.name FILTER js %]"; + initialowners[[% count %]] = "[% c.default_assignee.login FILTER js %]"; + [% flag_list = [] %] + [% FOREACH f = c.flag_types.bug %] + [% NEXT UNLESS f.is_active %] + [% flag_list.push(f.id) %] + [% END %] + [% FOREACH f = c.flag_types.attachment %] + [% NEXT UNLESS f.is_active %] + [% flag_list.push(f.id) %] + [% END %] + flags[[% count %]] = [[% flag_list.join(",") FILTER js %]]; + [% IF Param("useqacontact") %] + initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]"; + [% END %] + + [% SET initial_cc_list = [] %] + [% FOREACH cc_user = c.initial_cc %] + [% initial_cc_list.push(cc_user.login) %] + [% END %] + initialccs[[% count %]] = "[% initial_cc_list.join(', ') FILTER js %]"; + + [% count = count + 1 %] +[%- END %] + +function set_assign_to() { + // Based on the selected component, fill the "Assign To:" field + // with the default component owner, and the "QA Contact:" field + // with the default QA Contact. It also selectively enables flags. + var form = document.Create; + var assigned_to = form.assigned_to.value; -[%# Include other products if sensible %] -[% IF product.name == "Firefox" %] - [% productstring = "product=Mozilla%20Application%20Suite&product=Firefox" %] -[% ELSIF product.name == "Thunderbird" %] - [% productstring = "product=Mozilla%20Application%20Suite&product=Thunderbird" %] -[% ELSE %] - [% productstring = BLOCK %]product=[% product.name FILTER url_quote %][% END %] +[% IF Param("useqacontact") %] + var qa_contact = form.qa_contact.value; [% END %] -

- All-time Top 100 (loaded initially) | - Hot in the last two weeks -

+ var index = -1; + if (form.component.type == 'select-one') { + index = form.component.selectedIndex; + } else if (form.component.type == 'hidden') { + // Assume there is only one component in the list + index = 0; + } + if (index != -1) { + var owner = initialowners[index]; + var component = components[index]; + if (assigned_to == last_initialowner + || assigned_to == owner + || assigned_to == '') { + form.assigned_to.value = owner; + last_initialowner = owner; + } - + document.getElementById('initial_cc').innerHTML = initialccs[index]; -

- If your [% terms.bug %] isn't there, search [% terms.Bugzilla %] by entering - a few key words having to do with your [% terms.bug %] in this box. - For example: pop3 mail or copy paste. - The results will appear above. -

- -[%# All bugs opened inside the past six months %] -
- - - - - [% IF product.name == "Firefox" OR - product.name == "Thunderbird" OR - product.name == "Mozilla Application Suite" OR - product.name == "Camino" %] - - - - - - [% END %] - - - - - -
+ [% IF Param("useqacontact") %] + var contact = initialqacontacts[index]; + if (qa_contact == last_initialqacontact + || qa_contact == contact + || qa_contact == '') { + form.qa_contact.value = contact; + last_initialqacontact = contact; + } + [% END %] + + // First, we disable all flags. Then we re-enable those + // which are available for the selected component. + var inputElements = document.getElementsByTagName("select"); + var inputElement, flagField; + for ( var i=0 ; i 1) { + flagField.disabled = false; + // Re-enabling the requestee field depends on the status + // of the flag. + toggleRequesteeField(flagField, 1); + } + } + } + PutDescription(); +} -

- Look through the search results. If you get the - [% terms.zeroSearchResults %] message, [% terms.Bugzilla %] - found no [% terms.bugs %] that - match. Check for typing mistakes, or try fewer or different keywords. - If you find [% terms.abug %] that looks the same as yours, please add - any useful extra information you have to it, rather than opening a new one. -

+function handleWantsAttachment(wants_attachment) { + if (wants_attachment) { + document.getElementById('attachment_false').style.display = 'none'; + document.getElementById('attachment_true').style.display = 'block'; + } + else { + document.getElementById('attachment_false').style.display = 'block'; + document.getElementById('attachment_true').style.display = 'none'; + clearAttachmentFields(); + } +} +// this is courtesy of John Keller - -

Step 2 of 3 - give information

+var LOOKUP_ADDR = "/lookup.php?pkg="; +var ASSIGNEE_OBJ_NAME = "assigned_to"; +var NOT_FOUND = "NOT_FOUND"; + +var http_connection = null; + +// init XMLHttpRequest object, based on browser type +function initHttpConnection() { + http_connection = null; + + try { + // Firefox, Opera 8.0+, Safari + http_connection = new XMLHttpRequest(); + } catch (e) { + // Internet Explorer + try { + http_connection = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + http_connection = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (e) { + // browser does not support AJAX + } + } + } + + if (http_connection != null) { + http_connection.onreadystatechange = onLoadMaintainer; + } +} + +// handler for data received +// text field to set should be similar to +// +function onLoadMaintainer() { + var field_obj; + + if ((http_connection.readyState == 4) && (http_connection.status == 200)) { + if ((http_connection.responseText != null) && (http_connection.responseText != NOT_FOUND)) { + if ((field_obj = document.getElementById(ASSIGNEE_OBJ_NAME)) != null) { + field_obj.value = http_connection.responseText; + } + } + } else { + // by default, we'll leave form value alone and don't do anything else + // this is a good place to set a default or show an error, though + } +} + +// handler for when user enters a package +// text field to set should be similar to +// +function onChangePackage(input_obj) { + initHttpConnection(); + + if ((http_connection != null) && (input_obj.value != "")) { + http_connection.open("GET", LOOKUP_ADDR + encodeURIComponent(input_obj.value)); + http_connection.send(null); + } +}; + + +--> + + +

   Submit a bug using the expert bug form.

-

- If you've tried a few searches and your [% terms.bug %] really isn't in - there, tell us all about it. -

- + - - + - - [%# We override rep_platform and op_sys for simplicity. The values chosen - are based on which are most common in the b.m.o database %] - [% rep_platform = [ "PC", "Macintosh", "All", "Other" ] %] - - - + - [% op_sys = [ "Windows 2000", "Windows XP", "Windows Vista", "Windows 7", - "Mac OS X", "Linux", "All", "Other" ] %] + [%# We override rep_platform and op_sys for simplicity. The values chosen + are based on which are most common in the b.m.o database %] + [% rep_platform = [ "All", "i586", "x86_64" ] %] - - + - [% IF product.name.match("Firefox|Camino|Mozilla Application Suite") %] - [% matches = cgi.user_agent('Gecko/(\d+)') %] - [% buildid = cgi.user_agent() IF matches %] - [% END %] - - [%# Accept URL parameter build ID for non-browser products %] - [% IF cgi.param("buildid") %] - [% buildid = cgi.param("buildid") %] - [% END %] - - - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
- Product +
+ Product: - [% product.name FILTER html %] + [% product.name FILTER html %]
- Component + + Component:
+

Core packages are those packages found in the main and contrib repositories, and Other + packages are those found in non-free and commercial repositories; if you're unsure, choose Core.

The area where the problem occurs. @@ -213,82 +312,74 @@

- Hardware Platform +
+ Version: - [% PROCESS select sel = 'rep_platform' %] +
- Operating System +
+ Hardware Platform: - [% PROCESS select sel = 'op_sys' %] + [% PROCESS select sel = 'rep_platform' %]
- Build Identifier +
+ Source RPM: - -

- This should identify the exact version of the product you were using. - If the above field is blank or you know it is incorrect, copy the - version text from the product's Help | - About menu (for browsers this will begin with "Mozilla/5.0..."). - If the product won't start, instead paste the complete URL you downloaded - it from. + +

+ This is where you can identify exactly which RPM package is involved in this bug report. For instance, + if you know the problem you are having is with the program mysqld, then execute + rpm -qif /usr/sbin/mysqld. This will tell you the name and version of the RPM + package (i.e. MySQL-5.0.27-1mga1) as well as other information. In particular, you are looking for + the "Source RPM" field (i.e. MySQL-5.0.27-1mga1.src.rpm) -- this is the information you should + provide here. Alternatively, you may use rpm -qf /usr/sbin/mysqld --qf '%{SOURCERPM}\n' to + obtain the information. If you do not know the location of the program in question, use rpm -qf `which mysqld` + to obtain it. Please enter that information above.

- URL + + URL:

- URL that demonstrates the problem you are seeing (optional).
- IMPORTANT: if the problem is with a broken web page, you need - to report it - a different way. + URL that demonstrates the problem you are submitting (optional).

- Summary +
+ Summary:

- A sentence which summarises the problem. + A sentence that summarizes the problem. Please be descriptive and use lots of keywords.

@@ -298,149 +389,64 @@
Good example: - crash if I close the mail window while checking for new POP mail + crash in Evolution while checking for new POP mail

- Details + + Details: [% INCLUDE global/textarea.html.tmpl name = 'comment' - minrows = 6 + minrows = 10 + maxrows = 25 cols = constants.COMMENT_COLS + defaultcontent = "Description of problem:\n\n\nVersion-Release number of selected component (if applicable):\n\n\nHow reproducible:\n\n\nSteps to Reproduce:\n1.\n2.\n3.\n" %] + [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] +
   + + + [% END %] +

Expand on the Summary. Please be as specific as possible about what is wrong.

- Bad example: Mozilla crashed. - You suck! + Bad example: I can't seem to login to the system. Please help!
- Good example: After a crash which - happened when I was sorting in the Bookmark Manager,
all of my - top-level bookmark folders beginning with the letters Q to Z are - no longer present. + Good example:

+ Description of problem:

+ I'm unable to login to the system via ssh. The /var/log/messages + log indicates there is a problem with the pam module pam_ldap, but the /etc/pam.d/system-auth file doesn't + contain that module and I'm not using LDAP. I looked at /etc/pam.d/sshd and it does contain that module but I'm + not sure how it got there, unless it was due to the super-spiffy super-ldap-mojo package I installed yesterday.

+ Version-Release number of selected component (if applicable):

+ openldap-2.3.34-5mga1, pam-0.99.7.1-2mga1

+ How reproducible:

+ Every time I attempt to login.

+ Steps to Reproduce:
+ 1. ssh user@host
+ 2. see the rejection

- Reproducibility - - -
- Steps to Reproduce - - [% INCLUDE global/textarea.html.tmpl - name = 'reproduce_steps' - minrows = 4 - cols = constants.COMMENT_COLS - defaultcontent = "1.\n2.\n3." - %] -

- Describe how to reproduce the problem, step by - step. Include any special setup steps. -

-
- Actual Results - - [% INCLUDE global/textarea.html.tmpl - name = 'actual_results' - minrows = 4 - cols = constants.COMMENT_COLS - %] -

- What happened after you performed the steps above? -

-
- Expected Results - - [% INCLUDE global/textarea.html.tmpl - name = 'expected_results' - minrows = 4 - cols = constants.COMMENT_COLS - %] -

- What should the software have done instead? -

-
- Additional Information - - [% INCLUDE global/textarea.html.tmpl - name = 'additional_info' - minrows = 8 - cols = constants.COMMENT_COLS - %] -

- Add any additional information you feel may be - relevant to this [% terms.bug %], such as the theme you were - using (does the [% terms.bug %] still occur - with the default theme?), a - Talkback crash ID, or special - information about your computer's configuration. Any information - longer than a few lines, such as a stack trace or HTML - testcase, should be added - using the "Add an Attachment" link on the [% terms.bug %], after - it is filed. If you believe that it's relevant, please also include - your build configuration, obtained by typing about:buildconfig - into your URL bar. -
-
- If you are reporting a crash, note the module in - which the software crashed (e.g., Application Violation in - gkhtml.dll). -

-
- Severity + + Severity:

- Say how serious the problem is, or if your [% terms.bug %] is a + Indicate how serious the problem is, or if your [% terms.bug %] is a request for a new feature.

+ Assign To: + + [% safe_assigned_to = FILTER js; bug.assigned_to.login; END %] + [% INCLUDE global/userselect.html.tmpl + id => "assigned_to" + name => "assigned_to" + value => bug.assigned_to.login + size => 32 + %] +

Leave the above blank to assign to the default component owner.

+
- - -

Step 3 of 3 - submit the [% terms.bug %] report

-

@@ -487,17 +504,9 @@

That's it! Thanks very much. You'll be notified by email about any - progress that is made on fixing your [% terms.bug %]. - -

- Please be warned - that we get a lot of [% terms.bug %] reports filed - it may take quite a - while to get around to yours. You can help the process by making sure your - [%+ terms.bug %] is - complete and easy to understand, and by quickly replying to any questions - which may arrive by email. + progress that is made on fixing your [% terms.bug %]. + Thank you for choosing Mageia!

-
[% PROCESS global/footer.html.tmpl %]