diff options
Diffstat (limited to 'template/en')
119 files changed, 4651 insertions, 885 deletions
diff --git a/template/en/default/account/auth/login.html.tmpl b/template/en/default/account/auth/login.html.tmpl index 32ab14c9e..68be1045a 100644 --- a/template/en/default/account/auth/login.html.tmpl +++ b/template/en/default/account/auth/login.html.tmpl @@ -14,12 +14,18 @@ [% target = "index.cgi" %] [% END %] +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% login_target = cgi.url("-relative" => 1, "-query" => 1) %] +[% IF !login_target OR login_target.match("^token.cgi") %] + [% login_target = "index.cgi" %] +[% END %] + [% PROCESS global/header.html.tmpl title = "Log in to $terms.Bugzilla" %] -[% USE Bugzilla %] - <p> [% terms.Bugzilla %] needs a legitimate login and password to continue. </p> diff --git a/template/en/default/account/create.html.tmpl b/template/en/default/account/create.html.tmpl index 5711a726f..8d419f107 100644 --- a/template/en/default/account/create.html.tmpl +++ b/template/en/default/account/create.html.tmpl @@ -18,7 +18,7 @@ %] <p> - To create a [% terms.Bugzilla %] account, all you need to do is to enter + To create a *FREE* [% terms.Bugzilla %] account, all you need to do is to enter [% IF Param('emailsuffix') == '' %] a legitimate email address. [% ELSE %] diff --git a/template/en/default/account/prefs/apikey.html.tmpl b/template/en/default/account/prefs/apikey.html.tmpl index 71d4ac854..d7d21f894 100644 --- a/template/en/default/account/prefs/apikey.html.tmpl +++ b/template/en/default/account/prefs/apikey.html.tmpl @@ -23,18 +23,24 @@ <p>You can update the description, and revoke or unrevoke existing API keys here.</p> - +<p> + A key that has been banned has been <strong>permanently</strong> disabled by an admin, please + contact the site admins to enquire about why this has happened. +</p> <table id="email_prefs"> + <thead> <tr class="column_header"> - <th>API key</th> + <th>API key ID</th> <th>Description (optional)</th> <th>Last used</th> <th>Revoked</th> + <th>Banned</th> </tr> - + </thead> + <tbody> [% FOREACH api_key IN api_keys %] <tr[% IF api_key.revoked %] class="apikey_revoked"[% END %]> - <td>[% api_key.api_key FILTER html %]</td> + <td>[% api_key.id FILTER html %]</td> <td> <input name="description_[% api_key.id FILTER html %]" id="description_[% api_key.id FILTER html %]" @@ -43,19 +49,23 @@ here.</p> [% IF api_key.last_used %] <td>[% api_key.last_used FILTER time %]</td> [% ELSE %] - <td class="center"><i>never used</i></td> + <td><i>never used</i></td> [% END %] - <td class="center"> + <td> <input type="checkbox" value="1" name="revoked_[% api_key.id FILTER html %]" id="revoked_[% api_key.id FILTER html %]" [% IF api_key.revoked %] checked="checked" [% END %]> </td> + <td class="[% IF api_key.banned %]confirmation[% END %]"> + [% IF api_key.banned %]Yes[% ELSE %]No[% END %] + </td> </tr> [% END %] [% UNLESS api_keys.size %] <tr><td colspan="4">You don't have any API keys.</td></tr> [% END %] + </tbody> </table> [% IF any_revoked %] @@ -70,6 +80,22 @@ here.</p> </script> [% END %] +<script type="text/javascript"> + +$(document).ready(function() { + $('#email_prefs').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[25, 50, 100, 500, -1], [25, 50, 100, 500, 'All']], + [% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); +}); + +</script> + <h3>New API key</h3> <p>You can generate a new API key by ticking the check box below and optionally diff --git a/template/en/default/account/prefs/email.html.tmpl b/template/en/default/account/prefs/email.html.tmpl index 052484174..ad6129f58 100644 --- a/template/en/default/account/prefs/email.html.tmpl +++ b/template/en/default/account/prefs/email.html.tmpl @@ -123,6 +123,8 @@ function SetCheckboxes(setting) { description = "The $terms.bug is in the UNCONFIRMED state" }, { id = constants.EVT_CHANGED_BY_ME, description = "The change was made by me" }, + { id = constants.EVT_MINOR_UPDATE, + description = "The change was marked as a minor update" }, ] %] [% relationships = [ @@ -138,6 +140,12 @@ function SetCheckboxes(setting) { [% relationships.push({ id = constants.REL_QA, description = "QA Contact" }) %] [% END %] +[%## REDHAT EXTENSION START 876015 %] +[% IF Param('usedocscontact') %] + [% relationships.push({ id = constants.REL_DOCS, + description = "Docs Contact" }) %] +[% END %] +[%## REDHAT EXTENSION END 876015 %] [%# This is up here so that the "relationships" hook can modify it. %] diff --git a/template/en/default/account/prefs/permissions.html.tmpl b/template/en/default/account/prefs/permissions.html.tmpl index 53583f35b..41755f080 100644 --- a/template/en/default/account/prefs/permissions.html.tmpl +++ b/template/en/default/account/prefs/permissions.html.tmpl @@ -19,6 +19,16 @@ <div id="permissions"> [% IF has_bits.size %] + <p>You have direct membership in the following groups:</p> + <dl> + [% FOREACH bit_description = has_bits %] + [% IF bit_description.direct %] + <dt>[% bit_description.name FILTER html %]</dt> + <dd>[% bit_description.desc FILTER html_light %]</dd> + [% END %] + [% END %] + </dl> + <p>You have the following permission bits set on your account:</p> <table> diff --git a/template/en/default/account/prefs/prefs.html.tmpl b/template/en/default/account/prefs/prefs.html.tmpl index 5de0bf422..a8df2b4b7 100644 --- a/template/en/default/account/prefs/prefs.html.tmpl +++ b/template/en/default/account/prefs/prefs.html.tmpl @@ -24,24 +24,57 @@ [% filtered_login = user.login FILTER html %] -[% tabs = [{ name => "settings", label => "General Preferences", - link => "userprefs.cgi?tab=settings", saveable => "1", - doc_section => "using/preferences.html#general-preferences" }, - { name => "email", label => "Email Preferences", - link => "userprefs.cgi?tab=email", saveable => "1", - doc_section => "using/preferences.html#email-preferences" }, - { name => "saved-searches", label => "Saved Searches", - link => "userprefs.cgi?tab=saved-searches", saveable => "1", - doc_section => "using/preferences.html#saved-searches" }, - { name => "account", label => "Account Information", - link => "userprefs.cgi?tab=account", saveable => "1", - doc_section => "using/preferences.html#account-information" }, - { name => "apikey", label => "API Keys", - link => "userprefs.cgi?tab=apikey", saveable => "1", - doc_section => "using/preferences.html#api-keys" }, - { name => "permissions", label => "Permissions", - link => "userprefs.cgi?tab=permissions", saveable => "0", - doc_section => "using/preferences.html#permissions" } ] %] +[% tabs = [ + { + name => "account", + label => "Account Information", + link => "userprefs.cgi?tab=account", + saveable => "1", + doc_section => "using/preferences.html#account-information" + }, + { + name => "settings", + label => "General Preferences", + link => "userprefs.cgi?tab=settings", + saveable => "1", + doc_section => "using/preferences.html#general-preferences" + }, + { + name => "email", + label => "Email Preferences", + link => "userprefs.cgi?tab=email", + saveable => "1", + doc_section => "using/preferences.html#email-preferences" + }, + { + name => "saved-searches", + label => "Saved Searches", + link => "userprefs.cgi?tab=saved-searches", + saveable => "1", + doc_section => "using/preferences.html#saved-searches" + }, + { + name => "apikey", + label => "API Keys", + link => "userprefs.cgi?tab=apikey", + saveable => "1", + doc_section => "using/preferences.html#api-keys" + }, + { + name => "sessions", + label => "Sessions", + link => "userprefs.cgi?tab=sessions", + saveable => "1", + }, + { + name => "permissions", + label => "Permissions", + link => "userprefs.cgi?tab=permissions", + saveable => "0", + doc_section => "using/preferences.html#permissions" + }, +] + %] [% Hook.process('tabs') %] @@ -82,6 +115,24 @@ if you mistyped the new email address). </p> [% END %] + [%## REDHAT EXTENSION START 1354237 %] + [% IF partner_email_changes_blocked %] + <p> + The changes to your email address where blocked because you are + a member of a protected partner group. + See <a href="page.cgi?id=faq.html#email-change-policies">Policies on Email address changes</a> for more details. + </p> + [% END %] + [%## REDHAT EXTENSION END 1354237 %] + [% IF api_key_created %] + <div class="confirmation"> + Your new key has been created, please note it down and store it securely. If + you forget this key you will not be able to retrieve it and will need to + create a new one. + <p> + Key: [% new_key.key FILTER html %] + </div> + [% END %] </div> [% END %] diff --git a/template/en/default/account/prefs/saved-searches.html.tmpl b/template/en/default/account/prefs/saved-searches.html.tmpl index 9b0447a83..757670ad3 100644 --- a/template/en/default/account/prefs/saved-searches.html.tmpl +++ b/template/en/default/account/prefs/saved-searches.html.tmpl @@ -106,14 +106,6 @@ [% q.name FILTER uri %]&sharer_id= [% user.id FILTER uri %]">Link</a>) [% END %] - [% IF user.can_bless %] - <span [% IF !bless_group_ids.grep("^$q.shared_with_group.id\$").0 - %]class="bz_default_hidden"[% END %]> - <input type="checkbox" id="force_[% q.id FILTER html %]" - name="force_[% q.id FILTER html %]" value="1"> - <label for="force_[% q.id FILTER html %]">Add to footer</label> - </span> - [% END %] [% IF q.shared_with_users %] (shared with [% q.shared_with_users FILTER html %] [%+ q.shared_with_users > 1 ? "users" : "user" %]) @@ -130,6 +122,13 @@ link to the shared search is added to the footer of every user that is a direct member of the group at the time you click Submit Changes.</p> [% END %] +</blockquote> + +[%## REDHAT EXTENSION START 523825 %] +[% IF current_tab.saveable AND NOT dont_show_button %] + <input type="submit" id="update" value="Submit Changes"> +[% END %] +[%## REDHAT EXTENSION END 523825 %] [% IF user.queries_available.size %] <p>You may use these searches saved and shared by others:</p> diff --git a/template/en/default/account/prefs/sessions.html.tmpl b/template/en/default/account/prefs/sessions.html.tmpl new file mode 100644 index 000000000..8c70bb05a --- /dev/null +++ b/template/en/default/account/prefs/sessions.html.tmpl @@ -0,0 +1,56 @@ +[%# 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. + #%] + +[%# INTERFACE: + # sessions: array. Array of sessions this user has. + # session_max: int. Number of sessions that can be displayed at once. + # session_count: int. Total of number of sessions for the user. + # too_many_sessions: boolean. True if there are more than 20 sessions. + #%] + +<p>Here you can see your active [% terms.Bugzilla %] sessions. + You can logout these sessions, which means when you use [% terms.Bugzilla %] + from that location again you will have to log back in.</p> + +<p>Note that you may not logout your current session from this page. + You can use the "Logout" link from the top right menu for that.</p> + +<h3>Active Sessions</h3> + +[% IF too_many_sessions %] + <p>You have [% session_count FILTER html %] sessions. Display limited to most + recent [% session_max FILTER html %].</p> +[% END %] + +<p> + <input type="submit" name="session_logout_all" value="Log out all other sessions"> +</p> + +<table id="email_prefs"> + <tr class="column_header"> + <th>Last used</th> + <th>IP Address</th> + <th>IP Restriction</th> + <th>Logout</th> + </tr> + + [% FOREACH session IN sessions %] + <tr> + <td>[% session.lastused FILTER time %]</td> + <td>[% session.ipaddr OR "Unknown" FILTER html %]</td> + <td>[% session.ipaddr ? "Restricted" : "Unrestricted" FILTER html %] + <td> + [% IF session.current %] + <b>(current)</b> + [% ELSE %] + <input type="checkbox" name="session_logout_id" + value="[% session.id FILTER html %]"></td> + [% END %] + </tr> + [% END %] +</table>
\ No newline at end of file diff --git a/template/en/default/account/prefs/settings.html.tmpl b/template/en/default/account/prefs/settings.html.tmpl index a7055c67f..2d8ee0bf9 100644 --- a/template/en/default/account/prefs/settings.html.tmpl +++ b/template/en/default/account/prefs/settings.html.tmpl @@ -31,6 +31,9 @@ <table id="user_prefs"> [% FOREACH name = setting_names %] +[%## REDHAT EXTENSION BEGIN 653915 %] + [% NEXT UNLESS settings.${name}.visible %] +[%## REDHAT EXTENSION END 653915 %] [% default_name = name _ '-isdefault' %] [% default_val = settings.${name}.default_value %] <tr> diff --git a/template/en/default/account/profile-activity.html.tmpl b/template/en/default/account/profile-activity.html.tmpl index ff989c6a5..8bc100ac3 100644 --- a/template/en/default/account/profile-activity.html.tmpl +++ b/template/en/default/account/profile-activity.html.tmpl @@ -41,6 +41,7 @@ } {name => 'activity_when' heading => 'When' + datetime_field => 1, } {name => 'what' heading => 'What' diff --git a/template/en/default/admin/admin.html.tmpl b/template/en/default/admin/admin.html.tmpl index ed41d7309..fc2e0aae3 100644 --- a/template/en/default/admin/admin.html.tmpl +++ b/template/en/default/admin/admin.html.tmpl @@ -64,8 +64,8 @@ <dd class="[% class %]">Edit all aspects of products, including group restrictions which let you define who can access [% terms.bugs %] being in these products. You can also edit some specific attributes of products such as - <a href="editcomponents.cgi">components</a>, <a href="editversions.cgi">versions</a> - and <a href="editmilestones.cgi">milestones</a> directly.</dd> + <a href="editcomponents.cgi">components</a>, <a href="editversions.cgi">versions</a>, + <a href="editmilestones.cgi">milestones</a>, and <a href="editreleases.cgi">releases</a> directly.</dd> [% class = (user.in_group('editcomponents') || user.get_products_by_permission('editcomponents').size) ? "" : "forbidden" %] @@ -81,7 +81,7 @@ <td class="admin_links"> <dl> - [% class = user.in_group('admin') ? "" : "forbidden" %] + [% class = user.can_admin_any_cf() ? "" : "forbidden" %] <dt id="custom_fields" class="[% class %]"><a href="editfields.cgi">Custom Fields</a></dt> <dd class="[% class %]">Bugzilla lets you define fields which are not implemented by default, based on your local and specific requirements. @@ -91,6 +91,7 @@ interface more complex and harder to use. Be sure you have investigated other ways to satisfy your needs before doing this.</dd> + [% class = user.in_group('admin') ? "" : "forbidden" %] <dt id="field_values" class="[% class %]"><a href="editvalues.cgi">Field Values</a></dt> <dd class="[% class %]">Define legal values for fields whose values must belong to some given list. This is also the place where you define legal values for some @@ -107,12 +108,12 @@ They can either be used to define new user privileges or to restrict the access to some [% terms.bugs %].</dd> - [% class = user.in_group('editkeywords') ? "" : "forbidden" %] + [% class = user.can_edit_keywords() ? "" : "forbidden" %] <dt id="keywords" class="[% class %]"><a href="editkeywords.cgi">Keywords</a></dt> <dd class="[% class %]">Set keywords to be used with [% terms.bugs %]. Keywords are an easy way to "tag" [% terms.bugs %] to let you find them more easily later.</dd> - [% class = user.in_group('bz_canusewhines') ? "" : "forbidden" %] + [% class = user.can_whine() ? "" : "forbidden" %] <dt id="whining" class="[% class %]"><a href="editwhines.cgi">Whining</a></dt> <dd class="[% class %]">Set queries which will be run at some specified date and time, and get the result of these queries directly per email. This is a @@ -128,4 +129,6 @@ </tr> </table> +[% Hook.process('admin_links') %] + [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/components/confirm-delete.html.tmpl b/template/en/default/admin/components/confirm-delete.html.tmpl index 9018dcda2..86e9dcd84 100644 --- a/template/en/default/admin/components/confirm-delete.html.tmpl +++ b/template/en/default/admin/components/confirm-delete.html.tmpl @@ -47,6 +47,16 @@ from '[% product.name FILTER html %]' product </tr> [% END %] + +[%## REDHAT EXTENSION START 876015 %] + [% IF Param('usedocscontact') %] + <tr> + <td valign="top">Default Docs contact:</td> + <td valign="top">[% comp.default_docs_contact.login FILTER html %]</td> + </tr> + [% END %] +[%## REDHAT EXTENSION END 876015 %] + <tr> <td>Component of Product</td> <td>[% product.name FILTER html %]</td> diff --git a/template/en/default/admin/components/create.html.tmpl b/template/en/default/admin/components/create.html.tmpl index 96c9ce384..99eb5d9fb 100644 --- a/template/en/default/admin/components/create.html.tmpl +++ b/template/en/default/admin/components/create.html.tmpl @@ -33,6 +33,8 @@ <input type="hidden" name="token" value="[% token FILTER html %]"> </form> -[% PROCESS admin/components/footer.html.tmpl %] +[% PROCESS admin/components/footer.html.tmpl + no_edit_component_link = 1 +%] [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/components/edit-common.html.tmpl b/template/en/default/admin/components/edit-common.html.tmpl index 72300af79..7d3e1043c 100644 --- a/template/en/default/admin/components/edit-common.html.tmpl +++ b/template/en/default/admin/components/edit-common.html.tmpl @@ -15,12 +15,12 @@ [% DEFAULT desc_name = "description" %] <tr> - <th><label for="component">Component:</label></th> + <th class="field_label"><label for="component">Component:</label></th> <td><input size="64" maxlength="64" name="component" id="component" value="[%- comp.name FILTER html %]" required></td> </tr> <tr> - <th><label for="[% desc_name FILTER html %]">Component Description:</label></th> + <th class="field_label"><label for="[% desc_name FILTER html %]">Component Description:</label></th> <td> [% INCLUDE global/textarea.html.tmpl name = desc_name @@ -34,7 +34,7 @@ </td> </tr> <tr> - <th><label for="initialowner">Default Assignee:</label></th> + <th class="field_label"><label for="initialowner">Default Assignee:</label></th> <td> [% INCLUDE global/userselect.html.tmpl name => "initialowner" @@ -47,7 +47,7 @@ </tr> [% IF Param('useqacontact') %] <tr> - <th><label for="initialqacontact">Default QA contact:</label></th> + <th class="field_label"><label for="initialqacontact">Default QA contact:</label></th> <td> [% INCLUDE global/userselect.html.tmpl name => "initialqacontact" @@ -59,8 +59,24 @@ </td> </tr> [% END %] +[%## REDHAT EXTENSION START 876015 %] +[% IF Param('usedocscontact') %] + <tr> + <th class="field_label"><label for="initialdocscontact">Default Docs contact:</label></th> + <td> + [% INCLUDE global/userselect.html.tmpl + name => "initialdocscontact" + id => "initialdocscontact" + value => comp.default_docs_contact.login + size => 64 + emptyok => 1 + %] + </td> + </tr> +[% END %] +[%## REDHAT EXTENSION END 876015 %] <tr> - <th><label for="initialcc">Default CC List:</label></th> + <th class="field_label"><label for="initialcc">Default CC List:</label></th> <td> [% INCLUDE global/userselect.html.tmpl name => "initialcc" diff --git a/template/en/default/admin/components/edit.html.tmpl b/template/en/default/admin/components/edit.html.tmpl index c4da1181b..d53b8bd87 100644 --- a/template/en/default/admin/components/edit.html.tmpl +++ b/template/en/default/admin/components/edit.html.tmpl @@ -30,12 +30,12 @@ [% PROCESS "admin/components/edit-common.html.tmpl" %] <tr> - <th><label for="isactive">Enabled For [% terms.Bugs %]:</label></th> + <th class="field_label"><label for="isactive">Enabled For [% terms.Bugs %]:</label></th> <td><input id="isactive" name="isactive" type="checkbox" value="1" [% 'checked="checked"' IF comp.isactive %]></td> </tr> <tr> - <th>[% terms.Bugs %]:</th> + <th class="field_label">[% terms.Bugs %]:</th> <td> [% IF comp.bug_count > 0 %] <a title="[% terms.Bugs %] in component '[% comp.name FILTER html %]'" diff --git a/template/en/default/admin/components/footer.html.tmpl b/template/en/default/admin/components/footer.html.tmpl index 86d0afb0a..fd3605c81 100644 --- a/template/en/default/admin/components/footer.html.tmpl +++ b/template/en/default/admin/components/footer.html.tmpl @@ -23,6 +23,11 @@ Edit href="editcomponents.cgi?action=edit&product= [%- product.name FILTER uri %]&component=[% comp.name FILTER uri %]"> '[% comp.name FILTER html %]'</a> + + [% IF Param('usesubcomponents') %] + or its <a href="page.cgi?id=subcomponents/list.html&action=list&product= + [%- product.name FILTER uri %]&component=[% comp.name FILTER uri %]">sub components</a>, + [% END %] or edit [% END %] diff --git a/template/en/default/admin/components/list.html.tmpl b/template/en/default/admin/components/list.html.tmpl index 91808fbae..08be29f18 100644 --- a/template/en/default/admin/components/list.html.tmpl +++ b/template/en/default/admin/components/list.html.tmpl @@ -19,18 +19,15 @@ style_urls = ['skins/standard/admin.css'] %] -[% edit_contentlink = BLOCK %]editcomponents.cgi?action=edit&product= - [%- product.name FILTER uri %]&component=%%name%%[% END %] -[% delete_contentlink = BLOCK %]editcomponents.cgi?action=del&product= - [%- product.name FILTER uri %]&component=%%name%%[% END %] -[% bug_count_contentlink = BLOCK %]buglist.cgi?component=%%name%%&product= - [%- product.name FILTER uri %][% END %] +[% edit_contentlink = BLOCK %]editcomponents.cgi?action=edit&product=[% product.name FILTER uri %]&component=%%name%%[% END %] +[% delete_contentlink = BLOCK %]editcomponents.cgi?action=del&product=[% product.name FILTER uri %]&component=%%name%%[% END %] +[% bug_count_contentlink = BLOCK %]buglist.cgi?component=%%name%%&product=[% product.name FILTER uri %][% END %] [% columns = [ { name => "name" - heading => "Edit component..." + heading => "Edit component" contentlink => edit_contentlink }, { @@ -54,6 +51,17 @@ [% END %] +[%## REDHAT EXTENSION START 876015 %] +[% IF Param('usedocscontact') %] + + [% columns.push({ + name => 'default_docs_contact' + heading => 'Default Docs Contact' + }) %] + +[% END %] +[%## REDHAT EXTENSION END 876015 %] + [% columns.push({ name => "initial_cc_names" heading => "Default CC list" @@ -90,12 +98,12 @@ [% FOREACH my_component = product.components %] [% overrides.initialowner.name.${my_component.name} = { override_content => 1 - content => my_component.default_assignee.login + content => my_component.default_assignee } %] [% overrides.initialqacontact.name.${my_component.name} = { override_content => 1 - content => my_component.default_qa_contact.login + content => my_component.default_qa_contact } %] [% SET initial_cc_list = [] %] @@ -130,5 +138,21 @@ [% PROCESS admin/components/footer.html.tmpl no_edit_other_components_link = 1 %] +[% IF product.components.size < 5000 %] +<script> +$(document).ready(function() { + $('#admin_table').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'All']], + fixedHeader: true, +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); +}); +</script> +[% END %] [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/custom_fields/cf-js-rh.js.tmpl b/template/en/default/admin/custom_fields/cf-js-rh.js.tmpl new file mode 100644 index 000000000..7091dd0c2 --- /dev/null +++ b/template/en/default/admin/custom_fields/cf-js-rh.js.tmpl @@ -0,0 +1,37 @@ +[%# 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/. + #%] + +// Disable a checkbox based on the state of another one. +function toggleCheckbox(this_checkbox, other_checkbox_id) { + var other_checkbox = document.getElementById(other_checkbox_id); + other_checkbox.disabled = !this_checkbox.checked; +} + +function onChangeType(type_field) { + var value_field = document.getElementById('value_field_id'); + if (type_field.value == [% constants.FIELD_TYPE_SINGLE_SELECT FILTER js %] + || type_field.value == [% constants.FIELD_TYPE_MULTI_SELECT FILTER js %]) + { + value_field.disabled = false; + } + else { + value_field.disabled = true; + } + + var reverse_desc = document.getElementById('reverse_desc'); + if (type_field.value == [% constants.FIELD_TYPE_BUG_ID FILTER js %]) + { + reverse_desc.disabled = false; + } + else { + reverse_desc.disabled = true; + reverse_desc.value = ''; + } +} + +function onChangeVisibilityField() { + $('#visibility_values').reset_select('visibility_field_id', 'Field', 'legal_values'); +} + diff --git a/template/en/default/admin/custom_fields/cf-js.js.tmpl b/template/en/default/admin/custom_fields/cf-js.js.tmpl index bfdacb864..d97133079 100644 --- a/template/en/default/admin/custom_fields/cf-js.js.tmpl +++ b/template/en/default/admin/custom_fields/cf-js.js.tmpl @@ -33,7 +33,8 @@ var select_values = new Array(); function onChangeType(type_field) { var value_field = document.getElementById('value_field_id'); if (type_field.value == [% constants.FIELD_TYPE_SINGLE_SELECT %] - || type_field.value == [% constants.FIELD_TYPE_MULTI_SELECT %]) + || type_field.value == [% constants.FIELD_TYPE_MULTI_SELECT %] + || type_field.value == [% constants.FIELD_TYPE_ONE_SELECT %]) { value_field.disabled = false; } diff --git a/template/en/default/admin/custom_fields/create.html.tmpl b/template/en/default/admin/custom_fields/create.html.tmpl index 71ba08f46..0e26c417d 100644 --- a/template/en/default/admin/custom_fields/create.html.tmpl +++ b/template/en/default/admin/custom_fields/create.html.tmpl @@ -11,7 +11,7 @@ #%] [% javascript = BLOCK %] - [% INCLUDE "admin/custom_fields/cf-js.js.tmpl" %] + [% INCLUDE "admin/custom_fields/cf-js-rh.js.tmpl" %] [% END %] [% PROCESS global/header.html.tmpl @@ -26,7 +26,13 @@ <script type="text/javascript"> YAHOO.util.Event.onDOMReady(function() {onChangeType(document.getElementById('type'))}); </script> - +<div class="criticalmessages alert" style="background-color: #f2dede; color: #9e292b; font-size: 14px;"> + <i class="fa fa-exclamation-circle" style="font-size:20px;" aria-hidden="true"></i> + <strong>NOTE:</strong> Creating or removing a custom field that modify the bugs table schema will have to be + done during an outage as it will block all [% terms.bug %] updates for approximately 5 minutes. + <p>For this reason Custom Fields types that do this can only be created by developers and are added + during an outage by running the <i>checksetup.pl</i> script. +</div> <p> Adding custom fields can make the interface of Bugzilla very complicated. Many admins who are new to Bugzilla start off diff --git a/template/en/default/admin/custom_fields/edit-common.html.tmpl b/template/en/default/admin/custom_fields/edit-common.html.tmpl index 6c22bb81f..ae0b4f6e2 100644 --- a/template/en/default/admin/custom_fields/edit-common.html.tmpl +++ b/template/en/default/admin/custom_fields/edit-common.html.tmpl @@ -58,7 +58,16 @@ <select id="type" name="type" onchange="onChangeType(this)"> [% FOREACH type = field_types.keys %] [% NEXT IF type == constants.FIELD_TYPE_UNKNOWN %] - <option value="[% type FILTER html %]">[% field_types.$type FILTER html %]</option> + <option value="[% type FILTER html %]" + [% UNLESS type == constants.FIELD_TYPE_MULTI_SELECT + || type == constants.FIELD_TYPE_ONE_SELECT + || type == constants.FIELD_TYPE_DATETIME + || type == constants.FIELD_TYPE_DATE + || type == constants.FIELD_TYPE_BUG_ID + %] + disabled="disabled" + [% END %] + >[% field_types.$type FILTER html %]</option> [% END %] </select> [% END %] @@ -190,4 +199,87 @@ [% END %] </tr> [% END %] + + <tr> + <th> + <label for="view_groups"> + View Groups: + </label> + </th> + <td> + [% prev = "" %] + [% cur_gps = field.view_groups() %] + <select id="view_groups" name="view_groups" multiple> + [%# Sort the groups array, by the category field, in the order given by group_categories %] + [% FOREACH gr = groups.sort_by_field_order('category', Bugzilla.params.group_categories.split(',')) %] + [% IF gr.category != prev %] + [% IF prev != "" %]</optgroup>[% END %][% prev = gr.category %] + <optgroup label="[% gr.category FILTER html %]"> + [% END %] + <option + id="group_[% gr.bit FILTER html %]" + value="[% gr.name FILTER html %]" + [% IF cur_gps.${gr.id} %] selected="selected" [% END %] + title="[% gr.name FILTER html %] - [% gr.description FILTER html %]">[% gr.name FILTER html %] + </option> + [% END %] + </optgroup> + </select> + </td> + </tr> + <tr> + <th> + <label for="edit_groups"> + Edit Groups: + </label> + </th> + <td> + [% prev = "" %] + [% cur_gps = field.edit_groups() %] + <select id="edit_groups" name="edit_groups" multiple> + [%# Sort the groups array, by the category field, in the order given by group_categories %] + [% FOREACH gr = groups.sort_by_field_order('category', Bugzilla.params.group_categories.split(',')) %] + [% IF gr.category != prev %] + [% IF prev != "" %]</optgroup>[% END %][% prev = gr.category %] + <optgroup label="[% gr.category FILTER html %]"> + [% END %] + <option + id="group_[% gr.bit FILTER html %]" + value="[% gr.name FILTER html %]" + [% IF cur_gps.${gr.id} %] selected="selected" [% END %] + title="[% gr.name FILTER html %] - [% gr.description FILTER html %]">[% gr.name FILTER html %] + </option> + [% END %] + </optgroup> + </select> + </td> + </tr> + <tr> + <th> + <label for="admin_groups"> + Admin Groups: + </label> + </th> + <td> + [% prev = "" %] + [% cur_gps = field.admin_groups() %] + <select id="admin_groups" name="admin_groups" multiple> + [%# Sort the groups array, by the category field, in the order given by group_categories %] + [% FOREACH gr = groups.sort_by_field_order('category', Bugzilla.params.group_categories.split(',')) %] + [% IF gr.category != prev %] + [% IF prev != "" %]</optgroup>[% END %][% prev = gr.category %] + <optgroup label="[% gr.category FILTER html %]"> + [% END %] + <option + id="group_[% gr.bit FILTER html %]" + value="[% gr.name FILTER html %]" + [% IF cur_gps.${gr.id} %] selected="selected" [% END %] + title="[% gr.name FILTER html %] - [% gr.description FILTER html %]">[% gr.name FILTER html %] + </option> + [% END %] + </optgroup> + </select> + <td> + </td> + </tr> </table> diff --git a/template/en/default/admin/custom_fields/edit.html.tmpl b/template/en/default/admin/custom_fields/edit.html.tmpl index 6f7389d05..1c12a033b 100644 --- a/template/en/default/admin/custom_fields/edit.html.tmpl +++ b/template/en/default/admin/custom_fields/edit.html.tmpl @@ -15,7 +15,7 @@ [% END %] [% javascript = BLOCK %] - [% INCLUDE "admin/custom_fields/cf-js.js.tmpl" %] + [% INCLUDE "admin/custom_fields/cf-js-rh.js.tmpl" %] [% END %] [% PROCESS global/header.html.tmpl diff --git a/template/en/default/admin/custom_fields/list.html.tmpl b/template/en/default/admin/custom_fields/list.html.tmpl index 5e9183e56..c0cbe86c5 100644 --- a/template/en/default/admin/custom_fields/list.html.tmpl +++ b/template/en/default/admin/custom_fields/list.html.tmpl @@ -55,6 +55,18 @@ heading => "Is Mandatory" }, { + name => "view_groups" + heading => "View Groups" + }, + { + name => "edit_groups" + heading => "Edit Groups" + }, + { + name => "admin_groups" + heading => "Admin Groups" + }, + { name => "action" heading => "Action" content => "" @@ -63,7 +75,7 @@ %] [% USE Bugzilla %] -[% custom_fields = Bugzilla.fields({ custom => 1 }) %] +[% custom_fields = Bugzilla.fields({ custom => 1, user_can_admin => 1 }) %] [%# We want to display the type name of fields, not their type ID. %] [% overrides.type = {} %] @@ -87,6 +99,24 @@ } %] +[%# RED HAT EXTENSION %] +[% overrides.view_groups = {} %] +[% overrides.edit_groups = {} %] +[% overrides.admin_groups = {} %] +[% FOREACH cf = custom_fields %] +[% FOREACH fld IN ['view_groups', 'edit_groups', 'admin_groups'] %] +[% str = '' %] +[% FOREACH grp = cf.${fld}.list('values').sort('name') %] +[% str = str _ grp.name _ ' ' %] +[% END %] +[% overrides.${fld}.name.${cf.name} = { + override_content => 1 + content => str + } +%] +[% END %] +[% END %] + [% PROCESS admin/table.html.tmpl columns = columns overrides = overrides @@ -97,4 +127,19 @@ <a href="editfields.cgi?action=add">Add a new custom field</a> </p> +<script type="text/javascript"> + $(document).ready(function() { + $('#admin_table').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + order: [[ 3, 'desc' ]], + columnDefs: [{ className: 'dt-body-right', targets: [ 2,4,5,6,7 ] }], + aLengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'All']], +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); + }); +</script> [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/flag-type/confirm-delete.html.tmpl b/template/en/default/admin/flag-type/confirm-delete.html.tmpl index a05e857d2..fe636a5af 100644 --- a/template/en/default/admin/flag-type/confirm-delete.html.tmpl +++ b/template/en/default/admin/flag-type/confirm-delete.html.tmpl @@ -27,6 +27,13 @@ in the database but will not appear in the Bugzilla UI. </p> +[%## REDHAT EXTENSION START 847166 896304 %] +<p>Please also note that <b>deleting a flag will make it's change history +in [% terms.bugs %] visible to all users</b> (including non logged in users). +The [% terms.Bugzilla %] team strongly advise that you should disable this +flag instead.</p> +[%## REDHAT EXTENSION END 847166 896304 %] + <p class="confirmation"> Do you really want to delete this type? </p> diff --git a/template/en/default/admin/flag-type/edit.html.tmpl b/template/en/default/admin/flag-type/edit.html.tmpl index 7505ebd8c..a44eedd09 100644 --- a/template/en/default/admin/flag-type/edit.html.tmpl +++ b/template/en/default/admin/flag-type/edit.html.tmpl @@ -84,18 +84,22 @@ means you are only allowed to add and remove this flagtype to/from products you can edit, but not to edit other properties of the flagtype.</p> [% END %] - <table> + <table id="clusions"> <tr> - <th class="top left"> - Product/Component:<br> + <th class="top left">Product/Component:</th> + <th class="top left">Inclusions:</th> + <th class="top left">Exclusions:</th> + </tr> + <tr> + <td class="top left"> [% INCLUDE "global/product-select.html.tmpl" id => "product" name => "product" add => "__Any__" - onchange => "selectProduct(this, this.form.component, '__Any__');" products => products + onchange => "\$('#component').clearComponentSearch('product');\$('#component').fetch_all(1, true);" %]<br> - <select name="component"> + <select id="component" name="component"> <option value="">__Any__</option> [% FOREACH comp = components %] <option value="[% comp FILTER html %]">[% comp FILTER html %]</option> @@ -105,19 +109,17 @@ name="categoryAction-include" value="Include"> <input type="submit" id="categoryAction-exclude" name="categoryAction-exclude" value="Exclude"> - </th> - <th class="top left"> - Inclusions:<br> + </td> + <td class="top left"> [% PROCESS category_select name="inclusion_to_remove" categories = inclusions %]<br> <input type="submit" id="categoryAction-removeInclusion" name="categoryAction-removeInclusion" value="Remove Inclusion"> - </th> - <th class="top left"> - Exclusions:<br> + </td> + <td class="top left"> [% PROCESS category_select name="exclusion_to_remove" categories = exclusions %]<br> <input type="submit" id="categoryAction-removeExclusion" name="categoryAction-removeExclusion" value="Remove Exclusion"> - </th> + </td> </tr> </table> </td> @@ -194,6 +196,15 @@ </tr> <tr> + <th>View Group:</th> + <td> + the group allowed to see flags of this type + (to allow all users to see these flags, select no group)<br> + [% PROCESS group_select selname = "view_group" %] + </td> + </tr> + + <tr> <th>Grant Group:</th> <td> the group allowed to grant/deny flags of this type @@ -211,6 +222,20 @@ [% PROCESS group_select selname = "request_group" %] </td> </tr> +[% categories = Param('flag_type_categories') %] +[% IF categories %] + <tr> + <th>Flag Type Category:</th> + <td> + This is used for reporting purposes only. If you don't know, leave it blank.<br> + <select name="category" id="category"> +[% FOREACH category IN categories.split('[\s,]+') %] + <option value="[% category FILTER html %]"[% IF category == type.category %] selected="selected"[% END %]>[% category FILTER html %]</option> +[% END %] + </select> + </td> + </tr> +[% END %] <tr> <th> </th> @@ -223,6 +248,13 @@ </form> +<script type="text/javascript"> + $(document).ready(function () { + init_products({classification: 0, disabled: 0}); + init_components({disabled: 0, descrs: 0, placehold_text: "__Any__"}); + }); +</script> + [% PROCESS global/footer.html.tmpl %] @@ -251,8 +283,11 @@ </select> [% END %] +[% BLOCK category_select_new %] +<input id="[% name FILTER html %]" name="[% name FILTER html %]" type="text" value="[% categories.keys.sort.join(',') FILTER html %]"> +[% END %] [% BLOCK category_select %] - <select name="[% name FILTER html %]" multiple="multiple" size="7"> + <select id="[% name FILTER html %]" name="[% name FILTER html %]" multiple="multiple" size="7"> [% FOREACH option = categories.keys.sort %] <option value="[% categories.$option FILTER html %]"> [% option FILTER html %] diff --git a/template/en/default/admin/flag-type/list.html.tmpl b/template/en/default/admin/flag-type/list.html.tmpl index b1665c3b0..7d293740c 100644 --- a/template/en/default/admin/flag-type/list.html.tmpl +++ b/template/en/default/admin/flag-type/list.html.tmpl @@ -6,12 +6,12 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% PROCESS "global/js-products.html.tmpl" %] +[%# PROCESS "global/js-products.html.tmpl" %] [% PROCESS global/header.html.tmpl title = 'Administer Flag Types' style_urls = ['skins/standard/admin.css'] - onload="var f = document.flagtype_form; selectProduct(f.product, f.component, '__All__');" + onload="var f = document.flagtype_form;" javascript_urls=["js/productform.js"] doc_section = "administering/flags.html" %] @@ -43,15 +43,15 @@ id => "product" name => "product" add => "__Any__" - onchange => "selectProduct(this, this.form.component, '__Any__');" + onchange => "\$('#component').clearComponentSearch('product');\$('#component').fetch_all(0, true);" products => products %] </div> <div class="inline"> <label for="component">Component:</label> - <select name="component"> - <option value="">__Any__</option> + <select id="component" name="component"> + <option value=""></option> [% FOREACH comp = components %] <option value="[% comp FILTER html %]" [%+ 'selected="selected"' IF selected_component == comp %]> @@ -85,6 +85,14 @@ <a href="editflagtypes.cgi?action=enter&target_type=attachment">Create Flag Type For Attachments</a> </p> + +<script type="text/javascript"> + $(document).ready(function () { + init_products({placehold_text: "__Any__", classification: 1, disabled: 0}); + init_components({placehold_text: "__Any__"}); + }); +</script> + [% PROCESS global/footer.html.tmpl %] @@ -96,6 +104,7 @@ <th>Description</th> <th>Sortkey</th> <th>Properties</th> + <th>View Group</th> <th>Grant group</th> <th>Request group</th> [% IF show_flag_counts %] @@ -125,6 +134,7 @@ <span class="multiplicable">multiplicable</span> [% END %] </td> + <td>[% IF type.view_group %][% type.view_group.name FILTER html %][% END %]</td> <td>[% IF type.grant_group %][% type.grant_group.name FILTER html %][% END %]</td> <td>[% IF type.request_group %][% type.request_group.name FILTER html %][% END %]</td> [% IF show_flag_counts %] diff --git a/template/en/default/admin/groups/edit.html.tmpl b/template/en/default/admin/groups/edit.html.tmpl index 3e64fa7c4..4d4d648fd 100644 --- a/template/en/default/admin/groups/edit.html.tmpl +++ b/template/en/default/admin/groups/edit.html.tmpl @@ -80,10 +80,25 @@ value="1" [% 'checked="checked"' IF group.is_active %]> </td> </tr> + <tr> + <th>Number of [% terms.bugs %]:</th> + <td> + [% group.bugs.size %] + <a href="buglist.cgi?field0-0-0=bug_group&type0-0-0=equals&value0-0-0=[% group.name FILTER uri %]">Show me which [% terms.bugs %]</a> + </td> + </tr> [% END %] + <tr> + <th>Number of users:</th> + <td> + <a href="editusers.cgi?action=list&groupid=[% group.id FILTER uri %]&grouprestrict=2">[% group.members_non_inherited.size %] direct.</a> + <a href="editusers.cgi?action=list&groupid=[% group.id FILTER uri %]&grouprestrict=1">Show me all users</a> + </td> + </tr> [% Hook.process('field') %] </table> + <h4>Group Permissions</h4> <table id="grant_table"> @@ -99,11 +114,11 @@ </tr> <tr> - [% PROCESS select_pair name = "members" size = 10 + [% PROCESS rh_select_pair name = "members" size = 10 items_available = members_available items_current = members_current %] - [% PROCESS select_pair name = "member_of" size = 10 + [% PROCESS rh_select_pair name = "member_of" size = 10 items_available = member_of_available items_current = member_of_current %] </tr> @@ -120,11 +135,11 @@ </tr> <tr> - [% PROCESS select_pair name = "bless_from" size = 10 + [% PROCESS rh_select_pair name = "bless_from" size = 10 items_available = bless_from_available items_current = bless_from_current %] - [% PROCESS select_pair name = "bless_to" size = 10 + [% PROCESS rh_select_pair name = "bless_to" size = 10 items_available = bless_to_available items_current = bless_to_current %] </tr> @@ -142,11 +157,11 @@ </tr> <tr> - [% PROCESS select_pair name = "visible_from" size = 10 + [% PROCESS rh_select_pair name = "visible_from" size = 10 items_available = visible_from_available items_current = visible_from_current %] - [% PROCESS select_pair name = "visible_to_me" size = 10 + [% PROCESS rh_select_pair name = "visible_to_me" size = 10 items_available = visible_to_me_available items_current = visible_to_me_current %] </tr> @@ -180,8 +195,27 @@ <p>Back to the <a href="editgroups.cgi">group list</a>.</p> + [% PROCESS global/footer.html.tmpl %] +[% BLOCK rh_select_pair %] + <td colspan="2"> + <label for="[% "${name}" FILTER html %]">Add<br>(select to add)</label> + <br> + + <select multiple="multiple" + name="[% "${name}" FILTER html %]" + id="[% "${name}" FILTER html %]" + > + [% FOREACH item = items_available %] + <option value="[% item.id FILTER html %]">[% item.name FILTER html %]</option> + [% END %] + [% FOREACH item = items_current %] + <option value="[% item.id FILTER html %]" selected="selected">[% item.name FILTER html %]</option> + [% END %] + </select> + </td> +[% END %] [% BLOCK select_pair %] <td> <label for="[% "${name}_add" FILTER html %]">Add<br>(select to add)</label> diff --git a/template/en/default/admin/groups/list.html.tmpl b/template/en/default/admin/groups/list.html.tmpl index 796872e1d..65b15b4b4 100644 --- a/template/en/default/admin/groups/list.html.tmpl +++ b/template/en/default/admin/groups/list.html.tmpl @@ -46,6 +46,12 @@ heading => 'Type' class => 'center' } +## REDHAT EXTENSION BEGIN 751352 + {name => 'category' + heading => 'Category' + align => 'center' + } +## REDHAT EXTENSION END 751352 {name => 'action' heading => 'Action' } @@ -76,7 +82,8 @@ %] [% FOREACH group IN ["chartgroup", "comment_taggers_group", "debug_group", - "insidergroup", "querysharegroup", "timetrackinggroup"] %] + "insidergroup", "minor_update_group", "querysharegroup", + "timetrackinggroup"] %] [% special_group = Param(group) %] [% IF special_group %] @@ -152,4 +159,17 @@ for [% terms.bug %] restrictions. The <b>Type</b> field identifies system groups. </p> +<script> +$(document).ready(function() { + $('#admin_table').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'All']], +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); +}); +</script> [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/keywords/list.html.tmpl b/template/en/default/admin/keywords/list.html.tmpl index c3f4a5292..839f26756 100644 --- a/template/en/default/admin/keywords/list.html.tmpl +++ b/template/en/default/admin/keywords/list.html.tmpl @@ -52,4 +52,18 @@ <p><a href="editkeywords.cgi?action=add">Add a new keyword</a></p> +<script> +$(document).ready(function() { + $('#admin_table').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'All']], +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); +}); +</script> + [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/params/editparams.html.tmpl b/template/en/default/admin/params/editparams.html.tmpl index 4e1946dd8..bee47c760 100644 --- a/template/en/default/admin/params/editparams.html.tmpl +++ b/template/en/default/admin/params/editparams.html.tmpl @@ -50,6 +50,7 @@ </td> </tr> [% FOREACH panel = panels %] + [% Hook.process("current_panel") %] <tr> [% IF panel.current %] [% Hook.process("current_panel") %] @@ -88,11 +89,13 @@ [%# CONTENT PANEL %] <form id="edit_params" method="post" action="editparams.cgi"> + <fieldset disabled> [% PROCESS admin/params/common.html.tmpl panel = current_panel %] <input type="hidden" name="section" value="[% current_panel.name FILTER html %]"> <input type="hidden" name="action" value="save"> <input type="hidden" name="token" value="[% token FILTER html %]"> <input type="submit" id="save-params" value="Save Changes"> + </fieldset> </form> [% END %] </div> diff --git a/template/en/default/admin/params/groupsecurity.html.tmpl b/template/en/default/admin/params/groupsecurity.html.tmpl index 590f4da02..19d78de5a 100644 --- a/template/en/default/admin/params/groupsecurity.html.tmpl +++ b/template/en/default/admin/params/groupsecurity.html.tmpl @@ -51,6 +51,11 @@ "view it. If it is off, a user needs to be a member of all " _ "the $terms.bug's groups. Note that in either case, if the " _ "user has a role on the $terms.bug (e.g. reporter) that may " _ - "also affect their permissions." + "also affect their permissions.", + + minor_update_group => "The name of the group of users who are allowed to " _ + "use the 'minor update'-option on $terms.bug changes " _ + "to limit mail sending. " _ + "Setting this to empty disables the feature.", } %] diff --git a/template/en/default/admin/products/create.html.tmpl b/template/en/default/admin/products/create.html.tmpl index 0dcfd7283..9622cff72 100644 --- a/template/en/default/admin/products/create.html.tmpl +++ b/template/en/default/admin/products/create.html.tmpl @@ -28,6 +28,7 @@ version = "unspecified", product.defaultmilestone = constants.DEFAULT_MILESTONE product.allows_unconfirmed = 1 + product.defaultrelease = constants.DEFAULT_RELEASE %] <form method="post" action="editproducts.cgi"> diff --git a/template/en/default/admin/products/edit.html.tmpl b/template/en/default/admin/products/edit.html.tmpl index 8e1f5d87b..a814704d0 100644 --- a/template/en/default/admin/products/edit.html.tmpl +++ b/template/en/default/admin/products/edit.html.tmpl @@ -20,7 +20,8 @@ [% PROCESS global/header.html.tmpl title = title style_urls = ['skins/standard/admin.css'] - javascript_urls = ['js/util.js'] + javascript_urls = ['js/util.js', 'js/field.js'] + yui = [ 'autocomplete' ] %] [% group_control = {${constants.CONTROLMAPNA} => 'NA', @@ -35,23 +36,10 @@ [% PROCESS "admin/products/edit-common.html.tmpl" %] <tr> - <th> - <a href="editcomponents.cgi?product=[% product.name FILTER uri %]"> - Edit components: - </a> - </th> + <th>[% terms.Bugs %]:</th> <td> - [% IF product.components.size -%] - [% FOREACH comp = product.components %] - <a href="editcomponents.cgi?action=edit&product= - [%- product.name FILTER uri %]&component= - [%- comp.name FILTER uri %]">[% comp.name FILTER html %]</a>: - [% comp.description FILTER html_light %] - <br> - [% END %] - [% ELSE %] - <span class="warning">missing</span> - [% END %] + <a href="buglist.cgi?product=[% product.name FILTER uri %]"> + [% product.bug_count FILTER html %]</a> </td> </tr> <tr> @@ -89,6 +77,24 @@ </td> </tr> [% END %] + [% IF Param('usetargetrelease') %] + <tr> + <th align="right" valign="top"> + <a href="editreleases.cgi?product=[% product.name FILTER uri %]"> + Edit releases:</a> + </th> + <td> + [%- IF product.releases.size -%] + [%- FOREACH t = product.releases -%] + [% t.name FILTER html %] + <br> + [% END %] + [% ELSE %] + <font color="red">missing</font> + [% END %] + </td> + </tr> + [% END %] <tr> <th> <a href="editproducts.cgi?action=editgroupcontrols&product= @@ -119,10 +125,23 @@ </td> </tr> <tr> - <th>[% terms.Bugs %]:</th> + <th> + <a href="editcomponents.cgi?product=[% product.name FILTER uri %]"> + Edit components: + </a> + </th> <td> - <a href="buglist.cgi?product=[% product.name FILTER uri %]"> - [% product.bug_count FILTER html %]</a> + [% IF product.components.size -%] + [% FOREACH comp = product.components %] + <a href="editcomponents.cgi?action=edit&product= + [%- product.name FILTER uri %]&component= + [%- comp.name FILTER uri %]">[% comp.name FILTER html %]</a>: + [% comp.description FILTER html_light %] + <br> + [% END %] + [% ELSE %] + <span class="warning">missing</span> + [% END %] </td> </tr> </table> diff --git a/template/en/default/admin/products/groupcontrol/edit.html.tmpl b/template/en/default/admin/products/groupcontrol/edit.html.tmpl index 876d95f92..b960d9624 100644 --- a/template/en/default/admin/products/groupcontrol/edit.html.tmpl +++ b/template/en/default/admin/products/groupcontrol/edit.html.tmpl @@ -19,12 +19,13 @@ [% NEXT UNLESS group.group.isactive OR group.bug_count %] [% IF display_headers %] [% display_headers = 0 %] - <form method="post" action="editproducts.cgi"> + <form id="admin_form" method="post" action="editproducts.cgi"> <input type="hidden" name="action" value="updategroupcontrols"> <input type="hidden" name="product" value="[% product.name FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> <table id="admin_table"> + <thead> <tr class="column_header"> <th>Group</th> <th>Entry</th> @@ -36,6 +37,8 @@ <th>editbugs</th> <th>[% terms.Bugs %]</th> </tr> + </thead> + <tbody> [% END %] [% IF !group.group.isactive %] <tr class="disabled"> @@ -110,7 +113,8 @@ </tr> [% END %] [% END %] - + </tbody> + </table> [% IF display_headers %] <p>No groups are available for products. [% IF user.in_group('creategroups') %] @@ -303,4 +307,22 @@ for the <b>MemberControl</b> and <b>OtherControl</b> field settings. Attempting to submit a combination not listed there (e.g. Mandatory/NA, Default/Shown, etc.) will produce an error message. </p> + +<script> +$(document).ready(function() { + $('#admin_table').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[25, 50, 100, 500, -1], [25, 50, 100, 500, 'All']], + fixedHeader: true, +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); + +}); +</script> + + [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/products/list.html.tmpl b/template/en/default/admin/products/list.html.tmpl index 58edaa7bd..91f3e8a7c 100644 --- a/template/en/default/admin/products/list.html.tmpl +++ b/template/en/default/admin/products/list.html.tmpl @@ -90,4 +90,19 @@ no_edit_other_products_link = 1 %] +<script> +$(document).ready(function() { + $('#admin_table').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'All']], + fixedHeader: true, +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); +}); +</script> + [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/releases/confirm-delete.html.tmpl b/template/en/default/admin/releases/confirm-delete.html.tmpl new file mode 100644 index 000000000..2032f29da --- /dev/null +++ b/template/en/default/admin/releases/confirm-delete.html.tmpl @@ -0,0 +1,82 @@ +[%# 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/. + #%] + +[%# INTERFACE: + # product: object; Bugzilla::Product object representing the product to + # which the release belongs. + # release: object; Bugzilla::Release object representing the + # release the user wants to delete. + #%] + +[% title = BLOCK %]Delete Release of Product '[% product.name FILTER html %]' + [% END %] + +[% PROCESS global/header.html.tmpl + title = title +%] + +<table border="1" cellpadding="4" cellspacing="0"> +<tr bgcolor="#6666FF"> + <th valign="top" align="left">Field</th> + <th valign="top" align="left">Value</th> +</tr> +<tr> + <td valign="top">Release:</td> + <td valign="top">[% release.name FILTER html %]</td> +</tr> +<tr> + <td valign="top">Release of Product:</td> + <td valign="top">[% product.name FILTER html %]</td> +</tr> +<tr> + <td valign="top">[% terms.Bugs %]:</td> + <td valign="top"> +[% IF release.bug_count %] + <a title="List of [% terms.bugs %] targetted at release ' + [% release.name FILTER html %]'" + href="buglist.cgi?target_release=[% release.name FILTER uri %]&product= + [%- product.name FILTER uri %]"> + [% release.bug_count FILTER none %]</a> +[% ELSE %] + None +[% END %] + </td> +</tr> +</table> + +<h2>Confirmation</h2> + +[% IF release.bug_count %] + + <table border="0" cellpadding="20" width="70%" bgcolor="red"> + <tr><td> + There + [% IF release.bug_count > 1 %] + are [% release.bug_count FILTER none %] [%+ terms.bugs %] + [% ELSE %] + is 1 [% terms.bug %] + [% END %] + entered for this release! When you delete this release, + <b><blink>ALL</blink></b> of these [% terms.bugs %] will be retargeted + to [% product.default_release FILTER html %], the default release for + the [% product.name FILTER html %] product. + </td></tr> + </table> + +[% END %] + +<p>Do you really want to delete this release?<p> + +<form method="post" action="editreleases.cgi"> + <input type="submit" id="delete" value="Yes, delete"> + <input type="hidden" name="action" value="delete"> + <input type="hidden" name="product" value="[% product.name FILTER html %]"> + <input type="hidden" name="release" value="[% release.name FILTER html %]"> + <input type="hidden" name="token" value="[% token FILTER html %]"> +</form> + +[% PROCESS admin/releases/footer.html.tmpl %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/releases/create.html.tmpl b/template/en/default/admin/releases/create.html.tmpl new file mode 100644 index 000000000..63869b004 --- /dev/null +++ b/template/en/default/admin/releases/create.html.tmpl @@ -0,0 +1,43 @@ +[%# 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/. + #%] + +[%# INTERFACE: + # product: object; Bugzilla::Product object representing the product to + # which the release belongs. + #%] + +[% title = BLOCK %]Add Release to Product '[% product.name FILTER html %]'[% END %] +[% subheader = BLOCK %]This page allows you to add a new release to product + '[% product.name FILTER html %]'.[% END %] +[% PROCESS global/header.html.tmpl + title = title + subheader = subheader + onload = "document.forms['f'].release.focus()" +%] + +<form name="f" method="post" action="editreleases.cgi"> + <table border="0" cellpadding="4" cellspacing="0"> + <tr> + <th align="right"><label for="release">Release:</label></th> + <td><input id="release" size="64" maxlength="64" name="release" + value=""></td> + </tr> + <tr> + <th align="right"><label for="sortkey">Sortkey:</label></th> + <td><input id="sortkey" size="20" maxlength="20" name="sortkey" + value=""></td> + </tr> + </table> + <input type="submit" id="create" value="Add"> + <input type="hidden" name="action" value="new"> + <input type="hidden" name='product' value="[% product.name FILTER html %]"> + <input type="hidden" name="token" value="[% token FILTER html %]"> +</form> + +[% PROCESS admin/releases/footer.html.tmpl + no_add_release_link = 1 + %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/releases/edit.html.tmpl b/template/en/default/admin/releases/edit.html.tmpl new file mode 100644 index 000000000..22581a730 --- /dev/null +++ b/template/en/default/admin/releases/edit.html.tmpl @@ -0,0 +1,52 @@ +[%# 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/. + #%] + +[%# INTERFACE: + # product: object; Bugzilla::Product object representing the product to + # which the release belongs. + # release: object; Bugzilla::Release object representing the + # release the user wants to edit. + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% title = BLOCK %]Edit Release '[% release.name FILTER html %]' of product ' + [%- product.name FILTER html %]'[% END %] +[% PROCESS global/header.html.tmpl + title = title + onload = "document.forms['f'].release.select()" +%] + +<form name="f" method="post" action="editreleases.cgi"> + <table border="0" cellpadding="4" cellspacing="0"> + + <tr> + <th valign="top"><label for="release">Release:</label></th> + <td><input id="release" size="64" maxlength="64" name="release" value=" + [%- release.name FILTER html %]"></td> + </tr> + <tr> + <th align="right"><label for="sortkey">Sortkey:</label></th> + <td><input id="sortkey" size="20" maxlength="20" name="sortkey" value=" + [%- release.sortkey FILTER html %]"></td> + </tr> + <tr> + <th><label for="isactive">Enabled For [% terms.Bugs %]:</label></th> + <td><input id="isactive" name="isactive" type="checkbox" value="1" + [% 'checked="checked"' IF release.isactive %]></td> + </tr> + </table> + + <input type="hidden" name="releaseold" value="[% release.name FILTER html %]"> + <input type="hidden" name="action" value="update"> + <input type="hidden" name="product" value="[% product.name FILTER html %]"> + <input type="submit" id="update" value="Save Changes"> + <input type="hidden" name="token" value="[% token FILTER html %]"> +</form> + +[% PROCESS admin/releases/footer.html.tmpl + no_edit_release_link = 1 %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/releases/footer.html.tmpl b/template/en/default/admin/releases/footer.html.tmpl new file mode 100644 index 000000000..f98fdd3c4 --- /dev/null +++ b/template/en/default/admin/releases/footer.html.tmpl @@ -0,0 +1,52 @@ +[%# 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/. + #%] + +[%# INTERFACE: + # product: object; Bugzilla::Product object representing the product to + # which the release belongs. + # + # release: object; Bugzilla::Release object representing the + # release. + # + # no_XXX_link: boolean; if defined, then don't show the corresponding + # link. Supported parameters are: + # + # no_edit_release_link + # no_edit_other_releases_link + # no_add_release_link + #%] + +<hr> + +<p> + +[% UNLESS no_add_release_link %] + <a title="Add a release to product '[% product.name FILTER html %]'" + href="editreleases.cgi?action=add&product= + [%- product.name FILTER uri %]">Add</a> a release. +[% END %] + +[% IF release.name && !no_edit_release_link %] + Edit release <a + title="Edit Release '[% release.name FILTER html %]' of product ' + [%- product.name FILTER html %]'" + href="editreleases.cgi?action=edit&product= + [%- product.name FILTER uri %]&release= + [%- release.name FILTER uri %]"> + '[% release.name FILTER html %]'</a>. +[% END %] + +[% UNLESS no_edit_other_releases_link %] + Edit other releases of product <a + href="editreleases.cgi?product= + [%- product.name FILTER uri %]">'[% product.name FILTER html %]'</a>. + +[% END %] + + Edit product <a + href="editproducts.cgi?action=edit&product= + [%- product.name FILTER uri %]">'[% product.name FILTER html %]'</a>. + +</p> diff --git a/template/en/default/admin/releases/list.html.tmpl b/template/en/default/admin/releases/list.html.tmpl new file mode 100644 index 000000000..a16d66365 --- /dev/null +++ b/template/en/default/admin/releases/list.html.tmpl @@ -0,0 +1,97 @@ +[%# 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/. + #%] + +[%# INTERFACE: + # product: object; Bugzilla::Product object representing the product to + # which the releases belongs. + # showbugcounts: if defined, then bug counts should be included in the table + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS global/variables.none.tmpl %] + +[% title = BLOCK %]Select release of product + '[% product.name FILTER html %]'[% END %] +[% PROCESS global/header.html.tmpl + title = title +%] + +[% edit_contentlink = BLOCK %]editreleases.cgi?action=edit&product= + [%- product.name FILTER uri %]&release=%%name%%[% END %] +[% delete_contentlink = BLOCK %]editreleases.cgi?action=del&product= + [%- product.name FILTER uri %]&release=%%name%%[% END %] +[% bug_count_contentlink = BLOCK %]buglist.cgi?target_release=%%name%%&product= + [%- product.name FILTER uri %][% END %] + + +[% columns = [ + { + name => "name" + heading => "Edit release..." + contentlink => edit_contentlink + }, + { + name => "sortkey" + heading => "Sortkey" + }, + { + name => "isactive" + heading => "Active" + yesno_field => 1 + } + ] +%] + +[% IF showbugcounts %] + + [% columns.push({ + name => "bug_count" + heading => "$terms.Bugs" + align => "right" + contentlink => bug_count_contentlink + }) + %] + +[% END %] + +[% columns.push({ + name => "action" + heading => "Action" + content => "Delete" + contentlink => delete_contentlink + }) +%] + +[%# We want to override the usual 'Delete' link for the default release %] +[% overrides.action.name.${product.default_release} = { + override_content => 1 + content => "(Default release)" + override_contentlink => 1 + contentlink => undef + } +%] + +[% Hook.process('before_table') %] + +[% PROCESS admin/table.html.tmpl + columns = columns + data = product.releases + overrides = overrides +%] + +[% IF ! showbugcounts %] + + <p><a href="editreleases.cgi?product=[% product.name FILTER uri %]&showbugcounts=1"> + Redisplay table with [% terms.bug %] counts (slower)</a></p> + +[% END %] + +[% PROCESS admin/releases/footer.html.tmpl + no_edit_other_releases_link = 1 +%] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/releases/select-product.html.tmpl b/template/en/default/admin/releases/select-product.html.tmpl new file mode 100644 index 000000000..80530bff1 --- /dev/null +++ b/template/en/default/admin/releases/select-product.html.tmpl @@ -0,0 +1,53 @@ +[%# 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/. + #%] + +[%# INTERFACE: + # products: array of product objects + # showbugcounts: if defined, then bug counts should be included in the table + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% PROCESS global/header.html.tmpl + title = "Edit releases for which product?" +%] + +[% columns = [ + { + name => "name" + heading => "Edit releases of..." + contentlink => "editreleases.cgi?product=%%name%%" + }, + { + name => "description" + heading => "Description" + allow_html_content => 1 + } + ] +%] + +[% IF showbugcounts %] + + [% columns.push({ + name => 'bug_count' + heading => "$terms.Bugs" + align => "right" + contentlink => "buglist.cgi?product=%%name%%" + }) + %] + +[% END %] + +[% PROCESS admin/table.html.tmpl + columns = columns + data = products +%] + +[% IF !showbugcounts %] + <p><a href="editreleases.cgi?showbugcounts=1"> + Redisplay table with [% terms.bug %] counts (slower)</a></p> +[% END %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/table.html.tmpl b/template/en/default/admin/table.html.tmpl index 2c8eb5fe0..df78542b4 100644 --- a/template/en/default/admin/table.html.tmpl +++ b/template/en/default/admin/table.html.tmpl @@ -66,6 +66,7 @@ [%################### TABLE HEADER ######################%] <table id="admin_table"> + <thead> <tr class="column_header"> [% FOREACH c = columns %] [%# Default to align left for headers %] @@ -74,10 +75,10 @@ </th> [% END %] </tr> - + </thead> [%################### TABLE CONTENT ######################%] - +<tbody> [% FOREACH row = data %] <tr> @@ -90,8 +91,14 @@ class = c.class allow_html_content = c.allow_html_content yesno_field = c.yesno_field + datetime_field = c.datetime_field %] + [%## REDHAT EXTENSION START 653316 %] + [%# We need to reset this value for each column %] + [% nbsp = 0 %] + [%## REDHAT EXTENSION END 653316 %] + [%# Get any specific "important" overrides for this c.name and row.name ? %] [% SET important = overrides.${c.name}.name.${row.name} %] @@ -120,6 +127,10 @@ <td [% IF class %] class="[% class FILTER html %]"[% END %]> + [%## REDHAT EXTENSION START 653316: Allow columns to be indented %] + [% IF nbsp > 0 %][% str=' '; str.repeat(nbsp) FILTER none %][% END %] + [%## REDHAT EXTENSION END 653316 %] + [% IF contentlink %] [% FOREACH m = contentlink.match('%%(.+?)%%', 1) %] [% replacement_value = FILTER uri; row.$m; END %] @@ -137,6 +148,8 @@ [% row.${c.name} ? "Yes" : "No" %] [% ELSIF allow_html_content %] [% row.${c.name} FILTER html_light %] + [% ELSIF datetime_field || (row.what == 'creation_ts' && c.name == 'added') %] + [% row.${c.name} FILTER time %] [% ELSE %] [% row.${c.name} FILTER html %] [% END %] @@ -153,7 +166,7 @@ [% IF data.size == 0 %] <tr><td colspan="[% columns.size %]" class="center"><i><none></i></td></tr> [% END %] - +</tbody> [%################### TABLE FOOTER ######################%] diff --git a/template/en/default/admin/users/confirm-delete.html.tmpl b/template/en/default/admin/users/confirm-delete.html.tmpl index 4dab8b471..f2b83835e 100644 --- a/template/en/default/admin/users/confirm-delete.html.tmpl +++ b/template/en/default/admin/users/confirm-delete.html.tmpl @@ -234,14 +234,14 @@ [% otheruser.login FILTER html %] <a href="buglist.cgi?emailassigned_to1=1&emailqa_contact1=1&emailtype1=exact&email1= [%- otheruser.login FILTER uri %]">is - the assignee or the QA contact of + the assignee or the QA contact or the Docs contact of [% IF assignee_or_qa == 1 %] one [% terms.bug %] [% ELSE %] [%+ assignee_or_qa %] [%+ terms.bugs %] [% END %]</a>. If you delete the user account, these roles will fall back to - the default assignee or default QA contact. + the default assignee or default QA contact or default Docs contact. </li> [% END %] [% IF cc %] diff --git a/template/en/default/admin/users/edit.html.tmpl b/template/en/default/admin/users/edit.html.tmpl index 2b28aa2d3..2ed05e604 100644 --- a/template/en/default/admin/users/edit.html.tmpl +++ b/template/en/default/admin/users/edit.html.tmpl @@ -27,11 +27,38 @@ javascript_urls = [ 'js/field.js' ] %] +<ul class="related_actions"> + <li> + <a href="editusers.cgi?action=activity&userid=[% otheruser.id %]" + title="View Account History for '[%- otheruser.login FILTER html %]'"> + <i class="fas fa-history"></i> + </a> + </li> + <li> + <a href="page.cgi?id=user_activity.html&action=run&who=[% otheruser.login FILTER uri %]" + title="View Bug Activity for '[%- otheruser.login FILTER html %]'"> + <i class="fas fa-bug"></i> + </a> + </li> + <li> + <a href="page.cgi?id=user_admin_activity.html&action=run&who=[% otheruser.login FILTER uri %]" + title="View Admin Activity for '[%- otheruser.login FILTER html %]'"> + <i class="fas fa-user-cog"></i> + </a> + </li> + <li> + <a href="page.cgi?id=redhat/admin_user_sessions.html&who=[% otheruser.login FILTER uri %]" + title="Admin sessions '[%- otheruser.login FILTER html %]'"> + <i class="fas fa-tools"></i> + </a> + </li> +</ul> + [% PROCESS admin/users/listselectvars.html.tmpl listselectionvalues = listselectionvalues %] -<form method="post" action="editusers.cgi"> +<form id="edituser" method="post" action="editusers.cgi"> <table id="admin_table_edit"> [% PROCESS admin/users/userdata.html.tmpl editform = 1 @@ -42,7 +69,8 @@ <tr> <th>Group access:</th> <td> - <table id="group_membership"> + <table id="membership_table"> + <thead> <tr> [% IF editusers %] <th colspan="3"> @@ -56,6 +84,15 @@ [% END %] <th colspan="2">User is a member of these groups</th> </tr> + <tr> + [% IF editusers %] + <th></th> <!-- column 2 --> + [% END %] + <th></th> <!-- column 4 --> + <th></th> <!-- column 5 --> + </tr> +</thead> +<tbody> [% FOREACH group = groups %] [% perms = permissions.${group.id} %] <tr class="[% 'in' IF perms.regexpmember || perms.derivedmember %]direct"> @@ -86,6 +123,7 @@ </td> </tr> [% END %] +</tbody> </table> </td> </tr> @@ -170,4 +208,29 @@ <a href="editusers.cgi">find other users</a>. </p> +<script> +$(document).ready(function() { + $('#membership_table').DataTable({ + ordering: false, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'All']], +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); + + $('#user_responsibilities').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'All']], + fixedHeader: true, +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); +}); +</script> + [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/users/responsibilities.html.tmpl b/template/en/default/admin/users/responsibilities.html.tmpl index defe47173..e6324505a 100644 --- a/template/en/default/admin/users/responsibilities.html.tmpl +++ b/template/en/default/admin/users/responsibilities.html.tmpl @@ -7,24 +7,28 @@ #%] [% hidden_products = 0 %] +<div></div> <table id="user_responsibilities"> - [% FOREACH item = otheruser.product_responsibilities %] - [% IF !user.can_see_product(item.product.name) %] - [% hidden_products = 1 %] - [% NEXT %] - [% END %] - <tbody> - <tr> - <th colspan="4" class="product">Product: [% item.product.name FILTER html %]</th> - </tr> + <thead> <tr> + <th>Product</th> <th>Component</th> <th>Default Assignee</th> <th>Default QA Contact</th> + <th>Default Docs Contact</th> <th>Default CC</th> </tr> + </thead> + <tbody> + [% last_prod = "" %] + [% FOREACH item = otheruser.product_responsibilities %] + [% IF !user.can_see_product(item.product.name) %] + [% hidden_products = 1 %] + [% NEXT %] + [% END %] [% FOREACH comp = item.components %] <tr> + <td class="product">[% item.product.name FILTER html %]</td> <td> [% IF user.in_group("editcomponents", comp.product_id) %] <a href="editcomponents.cgi?action=edit&product= @@ -36,7 +40,7 @@ </a> [% END %] </td> - [% FOREACH responsibility = ['default_assignee', 'default_qa_contact'] %] + [% FOREACH responsibility = ['default_assignee', 'default_qa_contact', 'default_docs_contact'] %] <td class="center"> [% comp.$responsibility.id == otheruser.id ? "X" : " " %] </td> @@ -46,10 +50,13 @@ </td> </tr> [% END %] - </tbody> [% END %] + </tbody> </table> +[%## REDHAT EXTENSION 1114632 %] +[% Hook.process('sub_component_responsibilites') %] + [% IF hidden_products %] <p class="criticalmessages">The user is involved in at least one product which you cannot see (and so is not listed above). You have to ask an administrator with enough diff --git a/template/en/default/admin/users/userdata.html.tmpl b/template/en/default/admin/users/userdata.html.tmpl index c08cd0018..7f8043542 100644 --- a/template/en/default/admin/users/userdata.html.tmpl +++ b/template/en/default/admin/users/userdata.html.tmpl @@ -54,7 +54,7 @@ <td> [% IF editusers %] <input size="64" maxlength="255" id="name" name="name" - autocomplete="off" value="[% otheruser.name FILTER html %]"> + autocomplete="off" value="[% otheruser.name(1) FILTER html %]"> [% ELSE %] [% otheruser.name FILTER html %] [% END %] @@ -72,7 +72,7 @@ <th><label for="password">Password:</label></th> <td> <input type="password" size="16" name="password" id="password" - value="" autocomplete="off" [% 'required' IF !editform %]> + value="" autocomplete="new-password" [% 'required' IF !editform %]> [% IF password_complexity == "mixed_letters" %] (Password must contain at least one UPPER and one lowercase letter.) [% ELSIF password_complexity == "letters_numbers" %] diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl index e566b428e..02d6a22ee 100644 --- a/template/en/default/attachment/create.html.tmpl +++ b/template/en/default/attachment/create.html.tmpl @@ -90,6 +90,7 @@ TUI_hide_default('attachment_text_field'); maxrows = 15 cols = constants.COMMENT_COLS wrap = 'soft' + classes = (user.settings.private_comment_default.value == 'on' ? 'bz_private' : '') %] [% IF NOT bug.cc.contains(user.login) %] <br> @@ -107,7 +108,9 @@ TUI_hide_default('attachment_text_field'); <th>Privacy:</th> <td> <input type="checkbox" name="isprivate" id="isprivate" - value="1" onClick="updateCommentPrivacy(this)"> + value="1" onClick="updateCommentPrivacy(this)" + [%## REDHAT EXTENSION 465941 %] + [% "checked" IF user.settings.private_comment_default.value == 'on' %]> <label for="isprivate"> Make attachment and comment private (visible only to members of the <strong>[% Param('insidergroup') FILTER html %]</strong> @@ -119,6 +122,17 @@ TUI_hide_default('attachment_text_field'); [% Hook.process('form_before_submit') %] + [% IF Param('minor_update_group') && user.can_minor_update() %] + <tr> + <th> </th> + <td> + <input type="checkbox" name="minor_update" value="1"> + <label class="" for="minor_update"> + This is a minor update (do not send email) + </label> + </td> + </tr> + [% END %] <tr> <th> </th> <td><input type="submit" id="create" value="Submit"></td> diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl index 48e4f4af0..9c25438e0 100644 --- a/template/en/default/attachment/createformcontents.html.tmpl +++ b/template/en/default/attachment/createformcontents.html.tmpl @@ -13,10 +13,10 @@ <td> <em>Enter the path to the file on your computer</em> (or <a id="attachment_data_controller" href="javascript:TUI_toggle_class('attachment_text_field'); - javascript:TUI_toggle_class('attachment_data')" - >paste text as attachment</a>).<br> - <input type="file" id="data" name="data" size="50" onchange="DataFieldHandler()"> - <br><em>(File size limit: [% max_limit FILTER html %] KB)</em> + javascript:TUI_toggle_class('attachment_data')"> + paste text as attachment</a>).<br> + <input type="file" id="data" name="data" size="50" aria-errormessage="data-error" aria-invalid="false"> + <div id="data-error" class="warning" aria-live="assertive"><div> </td> </tr> <tr class="attachment_text_field"> @@ -46,9 +46,20 @@ onchange="setContentTypeDisabledState(this.form);"> <label for="ispatch">patch</label><br><br> [%# Reset this whenever the page loads so that the JS state is up to date %] - <script type="text/javascript"> - YAHOO.util.Event.onDOMReady(function() { - bz_fireEvent(document.getElementById('ispatch'), 'change'); + <script [% script_nonce FILTER none %]> + $(function() { + $("#data").on("change", function() { + DataFieldHandler(); + // Fire event to keep take-bug in sync. + $("#ispatch").change(); + }); + $("#ispatch").on("change", function() { + setContentTypeDisabledState(this.form); + var takebug = $("#takebug"); + if (takebug.is(":visible") && takebug.data("take-if-patch") && $("#ispatch").prop("checked")) { + $("#takebug").prop("checked", true); + } + }).change(); }); </script> diff --git a/template/en/default/attachment/diff2html.html.tmpl b/template/en/default/attachment/diff2html.html.tmpl new file mode 100644 index 000000000..0b7b0c3a4 --- /dev/null +++ b/template/en/default/attachment/diff2html.html.tmpl @@ -0,0 +1,85 @@ +[%# 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. + #%] + +[%# Define strings that will serve as the title and header of this page %] +[% title = BLOCK %] + Attachment [% attachment.id FILTER html %] Details for [% terms.Bug %] [%+ attachment.bug_id FILTER html%] + – [% attachment.description FILTER html %] +[% END %] +[% header = BLOCK %] + Attachment [% attachment.id FILTER html %] Details for + [%+ "$terms.Bug ${attachment.bug_id}" FILTER bug_link(attachment.bug_id) FILTER none %] +[% END %] +[% subheader = BLOCK %][% attachment.bug.short_desc FILTER html %][% END %] + +[% PROCESS global/header.html.tmpl + title = title + header = header + subheader = subheader + javascript_urls = [ 'js/diff2html/diff2html.min.js', 'js/diff2html/highlight.pack.js', 'js/diff2html/diff2html-ui.min.js'] + style_urls = ['skins/standard/bug.css', 'skins/standard/diff2html/github.css', 'skins/standard/diff2html/diff2html.min.css'] + bodyclasses = "no_javascript" + onload = 'showDiff();' +%] + +[% BLOCK viewurl %]attachment.cgi?id=[% id FILTER none %][% END %] + +<script> +[% IF oldid %] +var diffString = '[% difftext FILTER js %]'; +[% ELSE %] +var diffString = '[% attachment.data FILTER js %]'; +[% END %] +var outputFormat = 'side-by-side' + +function showDiff() { + var diff2htmlUi = new Diff2HtmlUI({diff: diffString}); + diff2htmlUi.draw('#diffsplay', {inputFormat: 'diff', showFiles: true, matching: 'lines', outputFormat: outputFormat}); + diff2htmlUi.fileListCloseable('#diffsplay', false); + diff2htmlUi.highlightCode('#diffsplay'); + if(outputFormat === 'side-by-side') { + outputFormat = 'line-by-line' + } else { + outputFormat = 'side-by-side' + } + $('#toggleview').html("Change view to " + outputFormat); +} +</script> +<div> +<a href="[% PROCESS viewurl id=attachment.id %]">View</a> | +Return to [% "$terms.bug $attachment.bug_id" FILTER bug_link(attachment.bug_id) FILTER none %] | +<button id="toggleview" onclick='showDiff();'>line-by-line</button> + [% IF all_patches.size > 1 %] + | Differences between + <form class="inline" action="attachment.cgi"> + <select name="oldid"> + <option value="---">Base</option> + [% FOREACH patch = all_patches %] + <option value="[% patch.id FILTER html %]" + [% IF patch.id == oldid %] selected="selected"[% END %] + >[% patch.desc FILTER html %]</option> + [% END %] + </select> + and + <select name="newid"> + [% FOREACH patch = all_patches %] + <option value="[% patch.id FILTER html %]" + [% IF (newid && patch.id == newid) ||(!newid && patch.id == attachment.id) %] selected="selected"[% END %] + >[% patch.desc FILTER html %]</option> + [% END %] + </select> + <input type="submit" id="diff" value="Diff"> + <input type="hidden" name="action" value="interdiff"> + </form> + [% END %] +</div> +<p id="diffsplay"> +</p> +[% Hook.process('end') %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index 184cdde05..83bc485ad 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -283,6 +283,12 @@ [% IF user.id %] <div id="update_container"> + [% IF Param('minor_update_group') && user.can_minor_update() %] + <input type="checkbox" name="minor_update" value="1"> + <label class="" for="minor_update"> + This is a minor update (do not send email) + </label><br> + [% END %] <input type="submit" value="Submit" id="update"> </div> [% END %] diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 9676dd67b..ccbd435e2 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -44,9 +44,14 @@ function toggle_display(link) { <br> <table id="attachment_table"> <tr id="a0"> - <th colspan="[% show_attachment_flags ? 3 : 2 %]" class="left"> + [%## REDHAT EXTENSION BEGIN RT81197 %] + <th align="left"> Attachments </th> + <th colspan="[% show_attachment_flags ? 2 : 1 %]" align="right"> + <a href="page.cgi?id=terms-conditions.html">(Terms of Use)</a> + </th> + [%## REDHAT EXTENSION END RT81197 %] </tr> [% count = 0 %] diff --git a/template/en/default/bug/activity/comments.html.tmpl b/template/en/default/bug/activity/comments.html.tmpl new file mode 100644 index 000000000..e706b1a22 --- /dev/null +++ b/template/en/default/bug/activity/comments.html.tmpl @@ -0,0 +1,135 @@ +[%# 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/. + #%] + +[%# INTERFACE: + # bug: object. The bug whose activity is being displayed. + # operations: array of hashes, see activity/table.html.tmpl. + # + # This template also needs to be called with the interface to the + # activity/table.html.tmpl template fulfilled. + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% PROCESS global/header.html.tmpl + title = "Comment changes made to $terms.bug $bug.id, comment $comment.id" + header = "Activity log for $terms.bug $bug.id, comment $comment.id" + %] + +<script type="text/javascript"> +<!-- +/* The functions below expand and collapse comments */ +function toggle_comment_display(link, comment_id) { + var comment = document.getElementById('comment_text_' + comment_id); + var re = new RegExp(/\bcollapsed\b/); + if (comment.className.match(re)) + expand_comment(link, comment); + else + collapse_comment(link, comment); +} + +function toggle_all_comments(action) { + var num_comments = [% comment.activity.size FILTER html %]; + + // If for some given ID the comment doesn't exist, this doesn't mean + // there are no more comments, but that the comment is private and + // the user is not allowed to view it. + + for (var id = 0; id < num_comments; id++) { + var comment = document.getElementById('comment_text_' + id); + if (!comment) + continue; + + var link = document.getElementById('comment_link_' + id); + if (action == 'collapse') + collapse_comment(link, comment); + else + expand_comment(link, comment); + } +} + +function collapse_comment(link, comment) { + link.innerHTML = "(+)"; + link.title = "Expand the comment."; + comment.className = "collapsed"; +} + +function expand_comment(link, comment) { + link.innerHTML = "(-)"; + link.title = "Collapse the comment"; + comment.className = ""; +} + +/* This way, we are sure that browsers which do not support JS + * won't display this link */ + +function addCollapseLink(count) { + document.write(' <a href="#" id="comment_link_' + count + + '" onclick="toggle_comment_display(this, ' + count + + '); return false;" title="Collapse the comment.">(-)</a> '); +} +//--> +</script> + +<p> + [% "Back to $terms.bug $bug.id" FILTER bug_link(bug.id) FILTER none %] +</p> + +<p> + <strong>Note</strong>: The actual edited comment in the [% terms.bug %] view page will always show the original commentor's name and original timestamp. +</p> + +<p> + <a href="#" onclick="toggle_all_comments('collapse'); return false;">Collapse All Changes</a> - + <a href="#" onclick="toggle_all_comments('expand'); return false;">Expand All Changes</a> +</p> + +[% count = 0 %] +[% FOREACH a = comment.activity %] + <div class="bz_comment"> + <span class="bz_comment_head"> + <i> + [% IF a.original %] + Original comment by [% (a.author.name || "Need Real Name") FILTER html %] + <span class="vcard"> + (<a class="fn email" href="mailto:[% a.author.email FILTER html %]"> + [%- a.author.email FILTER html -%]</a>) + </span> + on [%+ a.time FILTER time %] + [% ELSE %] + Revision by [% (a.author.name || "Need Real Name") FILTER html %] + <span class="vcard"> + (<a class="fn email" href="mailto:[% a.author.email FILTER html %]"> + [%- a.author.email FILTER html -%]</a>) + </span> + on [%+ a.time FILTER time %] + [% END %] + </i> + <script type="text/javascript"><!-- + addCollapseLink([% count %]); + </script> + </span> + [%# Don't indent the <pre> block, since then the spaces are displayed in the + # generated HTML %] + [% IF a.original %] + [% wrapped_comment = a.body FILTER wrap_comment %] + [% ELSE %] + [% wrapped_comment = a.new FILTER wrap_comment %] + [% END %] + <pre class="bz_comment_text" id="comment_text_[% count %]"> + [%- wrapped_comment FILTER quoteUrls(bug) -%] + </pre> + </div> + [% count = count + 1 %] +[% END %] + +[% IF comment.activity.size > 0 %] + <p> + [% "Back to $terms.bug $bug.id" FILTER bug_link(bug.id) FILTER none %] + </p> +[% END %] + +[% PROCESS global/footer.html.tmpl %] + diff --git a/template/en/default/bug/activity/table.html.tmpl b/template/en/default/bug/activity/table.html.tmpl index 8b371f0b5..51afa5384 100644 --- a/template/en/default/bug/activity/table.html.tmpl +++ b/template/en/default/bug/activity/table.html.tmpl @@ -33,6 +33,11 @@ [% END %] [% IF operations.size > 0 %] + [%## REDHAT EXTENSION START 871226 %] + [% UNLESS field_descs.cf_verified.defined %] + [% field_descs.cf_verified = 'Verified' %] + [% END %] + [%## REDHAT EXTENSION END 871226 %] <table id="bug_activity"> <tr class="column_header"> <th>Who</th> @@ -87,12 +92,26 @@ [% ELSIF change.fieldname == 'blocked' || change.fieldname == 'dependson' %] [% change_type FILTER bug_list_link FILTER none %] + [%## REDHAT EXTENSION 876015: Add docs_contact %] [% ELSIF change.fieldname == 'assigned_to' || change.fieldname == 'reporter' || change.fieldname == 'qa_contact' || + change.fieldname == 'docs_contact' || change.fieldname == 'cc' || change.fieldname == 'flagtypes.name' %] [% display_value(change.fieldname, change_type) FILTER email FILTER html %] + [%## REDHAT EXTENSION START 1017534 %] + [% ELSIF change.fieldname == 'rh_rule' + && user.can_see_rule(change_type) + %] + <a href="page.cgi?id=ruleengine/details/index.html&rule_name=[% change_type FILTER uri %]"> + [% change_type FILTER html %] + </a> + [%## REDHAT EXTENSION END 1017534 %] + [%## REDHAT EXTENSION 1182014 START %] + [% ELSIF change.fieldname == 'cf_last_closed' %] + [% display_value(change.fieldname, change_type) FILTER time %] + [%## REDHAT EXTENSION 1182014 END %] [% ELSE %] [% display_value(change.fieldname, change_type) FILTER html FILTER html_line_break %] [% END %] diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 931716f76..8007d8448 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -8,9 +8,6 @@ [% PROCESS bug/time.html.tmpl %] -<script src="[% 'js/comments.js' FILTER mtime %]" type="text/javascript"> -</script> - <script type="text/javascript"> <!-- /* Adds the reply text to the 'comment' textarea */ @@ -48,6 +45,12 @@ [% user_cache = template_cache.users %] [% can_edit_comments = bug.check_can_change_field('longdesc', 0, 1) %] [% can_tag_comments = feature_enabled('jsonrpc') AND user.can_tag_comments %] +[%## REDHAT EXTENSION 420461 BEGIN %] +[% caneditcomment = user.can_edit_comments() %] +[%## REDHAT EXTENSION 420461 END %] +[%## REDHAT EXTENSION 420461 BEGIN %] +[% caneditdescr = bug.can_edit_desc(user) %] +[%## REDHAT EXTENSION 420461 END %] <!-- This auto-sizes the comments and positions the collapse/expand links to the right. --> @@ -120,16 +123,30 @@ [% IF comment.collapsed %] <span class="bz_collapsed_actions"> [% END %] + [%## REDHAT EXTENSION 420461 BEGIN %] + [% IF (caneditdescr && comment.count == 0) || caneditcomment %] + <a href="#c0" title="edit comment" onclick="edit_comment([% comment.id %], [% comment.count %], [% caneditcomment FILTER js %]);return false"><i class="fas fa-edit"></i></a> + [% END %] + [% IF user.id %] + <a href="show_comment_activity.cgi?id=[% bug.id FILTER uri %]&comment_id=[% comment.id FILTER uri %]" + title="history" + id="comment_history_[% comment.count FILTER none %]" + class="[% 'bz_default_hidden' UNLESS comment.activity.size > 0 %]" + > + <i class="fas fa-history"></i> (<span id="comment_activity_count_[% comment.count FILTER none %]">[% comment.activity.size - 1 FILTER html %]</span>) + </a> + [% END %] + [%## REDHAT EXTENSION 420461 END %] [% IF can_edit_comments %] [% IF can_tag_comments %] - [<a href="#" - onclick="YAHOO.bugzilla.commentTagging.toggle([% comment.id %], [% comment.count %]);return false">tag</a>] + <a href="#" + onclick="YAHOO.bugzilla.commentTagging.toggle([% comment.id %], [% comment.count %]);return false" title="tag comment"><i class="fas fa-tag"></i></a> [% END %] - [<a class="bz_reply_link" href="#add_comment" + <a class="bz_reply_link" href="#add_comment" [% IF user.settings.quote_replies.value != 'off' %] onclick="replyToComment('[% comment.count %]', '[% comment.id %]', '[% comment.author.name || comment.author.nick FILTER html FILTER js %]'); return false;" [% END %] - >reply</a>] + title="reply"><i class="fas fa-reply"></i></a> [% END %] [% IF comment.collapsed %] </span> @@ -176,11 +193,11 @@ [% user_cache.$commenter_id FILTER none %] </span> + [%# Instead of URLs use FontAwesome classes %] <span class="bz_comment_user_images"> [% FOREACH group = comment.author.groups_with_icon %] - <img src="[% group.icon_url FILTER html %]" - alt="[% group.name FILTER html %]" - title="[% group.name FILTER html %] - [% group.description FILTER html %]"> + <i class="[% group.icon_url FILTER html %]" + title="[% group.name FILTER html %] - [% group.description FILTER html %]"></i> [% END %] </span> @@ -197,6 +214,11 @@ [% END %] </div> + [%## REDHAT EXTENSION 1102859: Add Confidential to private comments %] + [% IF comment.is_private %] + <span class="small_text"><b>RED HAT CONFIDENTIAL</b></span><br> + [% END %] + [% IF user.is_timetracker && (comment.work_time > 0 || comment.work_time < 0) %] <br> @@ -222,6 +244,20 @@ </span> </div> [% END %] + [%## REDHAT EXTENSION START 420461 %] + [% IF caneditcomment && mode == "edit" && editcomment == comment.id %] + <br> + [% INCLUDE global/textarea.html.tmpl + name = 'edit_comment_' _ comment.id + id = 'edit_comment_' _ comment.id + minrows = 10 + maxrows = 25 + cols = constants.COMMENT_COLS + defaultcontent = comment.body + %] + [% ELSE %] + [%## REDHAT EXTENSION END 420461 %] + [%# Don't indent the <pre> block, since then the spaces are displayed in the # generated HTML @@ -231,6 +267,9 @@ id="comment_text_[% comment.count FILTER none %]" [% END %]> [%- comment_text FILTER quoteUrls(bug, comment) -%] +[%## REDHAT EXTENSION START 420461 %] +[% END %] +[%## REDHAT EXTENSION END 420461 %] </pre> [% Hook.process('a_comment-end', 'bug/comments.html.tmpl') %] </div> diff --git a/template/en/default/bug/create/create-guided.html.tmpl b/template/en/default/bug/create/create-guided.html.tmpl index 1adae4588..a24c0ad44 100644 --- a/template/en/default/bug/create/create-guided.html.tmpl +++ b/template/en/default/bug/create/create-guided.html.tmpl @@ -15,53 +15,85 @@ [% PROCESS global/header.html.tmpl title = "Enter $terms.ABug" - onload = "PutDescription()" - style_urls = ['skins/standard/bug.css'] - %] + style = "code {font-weight: bold;}" +%] + +[% + has_sub_components = 0; + IF (Param('usesubcomponents') && product.has_sub_components); + has_sub_components = 1; + END; +%] + +<h2>What is a [% terms.bug %]?</h2> + +<p> +A [% terms.bug %] can be quickly identified as a problem with existing +software. However, it is much more complicated than that. It can be +a behavioural problem in an application or program that does not work at +all. It even applies to documentation that is incorrect. +</p> + +<h2>Why should you use this form?</h2> + +<p> +Entering a [% terms.bug %] in this application prompts you for information that is essential to the +developers. The information you provide will allow the developers to understand the +behaviour you are seeing, reproduce the behaviour, and assist in getting the problem +solved. Being able to understand and reproduce [% terms.bugs %] are the first steps +towards getting the [% terms.bug %] fixed. +</p> +<p> +Please do <u>not</u> report [% terms.bugs %] in +other places, such as in newsgroups or on IRC. [% terms.Bugzilla %] is the only +reliable tracking system for Red Hat products. Red Hat cannot guarantee +your [% terms.bug %] will be fixed unless it is reported correctly. +</p> [%# 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() { - var description = document.getElementById('description'); - var componentIndex = document.getElementById('component').selectedIndex; - YAHOO.util.Dom.removeClass("description", "bz_default_hidden"); - if (componentIndex != -1) { - description.innerHTML = descriptions[componentIndex]; - } + var $sel = $("#component").selectize()[0].selectize; + if($sel && $sel.getValue()) { + $("#description").html($sel.options[$sel.getValue()]['title']); + } +} + +function resizeIframe(obj) { + obj.style.height = (obj.contentWindow.document.body.scrollHeight + 16) + 'px'; } + +$(document).ready(function () { + $("#version").selectize(); + $("#rep_platform").selectize(); + $("#reproducible").selectize(); + $("#bug_severity").selectize(); +}); + </script> -<h3 id="step1">Step 1 of 3 - has your [% terms.bug %] already been reported?</h3> +<h2 id="step1">Step 1 of 3 - Has your [% terms.bug %] already been reported?</h2> -<p class="warning"> - Please don't skip this step - half of all [% terms.bugs %] filed are - reported already. +<p> + <font color="red">Please don't skip this step - half of all [% terms.bugs %] filed are reported already.</font> + Check the two lists of frequently-reported [% terms.bugs %]: </p> -<p>Check the two lists of frequently-reported [% terms.bugs %]:</p> +[% productstring = BLOCK %]product=[% product.name FILTER uri %][% END %] <p> - <a href="duplicates.cgi?product=[% product.name FILTER uri %]&format=simple" - target="somebugs">All-time Top 100</a> (loaded initially) | - <a href="duplicates.cgi?product=[% product.name FILTER uri %]&format=simple&sortby=delta&reverse=1&maxrows=100&changedsince=14" - target="somebugs">Hot in the last two weeks</a> + <a href="duplicates.cgi?[% productstring FILTER html %]&format=simple" target="somebugs">All-time Top 100</a> (loaded initially) | + <a href="duplicates.cgi?[% productstring FILTER html %]&format=simple&sortby=delta&reverse=1&maxrows=100&changedsince=14" target="somebugs">Hot in the last two weeks</a> </p> - <iframe name="somebugs" id="somebugs" - src="duplicates.cgi?product=[% product.name FILTER uri %]&format=simple"> + style="border: 2px black solid; height: 4em; width: 100%; max-height: 100em;" onload='resizeIframe(this);' + src="duplicates.cgi?[% productstring FILTER html %]&format=simple"> </iframe> <p> 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: <kbd><b>pop3 mail</b></kbd> or <kbd><b>copy paste</b></kbd>. + For example: <tt><b>pop3 mail</b></tt> or <tt><b>copy paste</b></tt>. The results will appear above. </p> @@ -80,7 +112,7 @@ function PutDescription() { <p> Look through the search results. If you get the - <kbd><b>[% terms.zeroSearchResults %]</b></kbd> message, [% terms.Bugzilla %] + <tt><b>[% terms.zeroSearchResults %]</b></tt> 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 @@ -88,105 +120,184 @@ function PutDescription() { </p> -<h3 id="step2">Step 2 of 3 - give information</h3> +<h2 id="step2">Step 2 of 3 - Give detailed information</h2> <p> - If you've tried a few searches and your [% terms.bug %] really isn't in - there, tell us all about it. + If you've tried a few searches and your [% terms.bug %] really isn't in there, tell us all about it. </p> -<form id="guided_form" method="post" action="post_bug.cgi"> +<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="op_sys" value="Linux"> <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> - <tr class="guided_form_field"> - <th>Product</th> - <td> +<table valign="top" cellpadding="5" cellspacing="5" border="0"> + + <tr> + <td align="right" valign="top"> + <b>Product</b> + </td> + <td valign="top"> <input type="hidden" name="product" value="[% product.name FILTER html %]"> [% product.name FILTER html %] </td> </tr> <tr> - <th>Component</th> - <td> - <select name="component" id="component" size="5" onchange="PutDescription()"> - [% IF NOT default.component_ %] - [% 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> - - <div id="description" class="comment bz_default_hidden"> - Select a component to see its description here. - </div> - + <td align="right" valign="top"> + <b>Component</b> + </td> + <td valign="top"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td valign="top"> + <select name="component" id="component" onchange="PutDescription();[% IF has_sub_components %] show_sub_components();[% END %]"> + [% IF product.component_count > 50 %] + [% ELSE %] + <option/> + [% FOREACH c = sorted_components %] + [% NEXT UNLESS c.is_active %] + <option data-data="{"title": "[% c.description FILTER json FILTER html %]"}", value="[% c.name FILTER html %]" [% " selected='selected'" IF c.name == default.component_ %]>[% c.name FILTER html %]</option> + [% END %] + [% END %] + </select> + [% IF product.component_count > 50 %]<div class="fetch_all" onclick="$('#component').fetch_all()"><i class="fa fa-download"></i><span title="Click to list all components">Click to list all components</span></div>[% END %] + <script type="text/javascript"> + $(document).ready(function () { + [% IF product.component_count > 50 %] + init_components({descrs: 1, product: "v[% product.id FILTER js %]_product"}); + [% ELSE %] + init_components({noajax: 1}); + [% END %] + PutDescription(); + }); + </script> + </td> + <td valign="top" width="100%"> + <div id="description" style="color: green; margin-left: 10px; height: 5em; overflow: auto;"> + Select a component to see its description here. + </div> + </td> + </tr> + </table> + <p> + This is the hard part due to the large number of components available to select. Here are + some tips on picking the right component. + </p> +[% IF product.component_count > 50 %] + <p> + This product has [% product.component_count FILTER html %] components so loading them has been delayed to reduce the impact + on loading this page. If you have an idea of the component name then you can start typing in + the select box and components matching the entered text will be displayed. If you do not have + an idea of the component name then you will need to load all the components before selecting one. + </p> +[% END %] + <p> + If you are reporting a [% terms.bug %] against the <b>Red Hat Enterprise Linux</b> + or <b>Fedora</b> line of products you can normally determine the component by running + <code>rpm -qif <i>binary name</i></code> on the binary that you need to report the [% terms.bug %] + against. The component name will be the line noted as Source RPM: but leaving the version + number information off. + </p> + <p> + The Red Hat Install process is a special case from the normal selection of components + so if the [% terms.bug %] is related to the install process, then choose <b>Anaconda</b> from + the component selection box. + </p> + <p> + If you still can't decide, select a component from the list below, and the description + of the component will appear in the text box to the right. + </p> <p> The area where the problem occurs. To pick the right component, you could use the same one as similar [% terms.bugs %] you found in your search, or read the full list of - <a href="describecomponents.cgi?product=[% product.name FILTER uri %]" - target="_blank" >component descriptions</a> (opens in new window) if - you need more help. + <a target="_blank" href="describecomponents.cgi?product= + [% product.name FILTER uri %]">component + descriptions</a> (opens in new window) if you need more help. </p> </td> </tr> - - [%# We override rep_platform and op_sys for simplicity. %] - [% rep_platform = [ "PC", "Macintosh", "All", "Other" ] %] - - <tr class="guided_form_field"> - <th>[% field_descs.rep_platform FILTER html %]</th> +[% IF has_sub_components %] + <tr> + <td align="right" valign="top"> + <b>Sub-Component</b> + </td> <td> - [% PROCESS select sel = 'rep_platform' %] + <select name="rh_sub_component" id="rh_sub_component" disabled="disabled"> + <option/> + </select> + <script> + $(document).ready(function () { + init_sub_components({product: "v[% product.id FILTER js %]_product"}); + }); + </script> + <p> + Some components are complex and contain a number of tools or programs in them, where + this is the case the component can contain sub-components to make assigning and + tracking tasks easier. If you select a component that has sub-components then this + select box will become active and allow you to select a sub-component. + </p> </td> </tr> - - [% op_sys = [ "Windows XP", "Windows Vista", "Windows 7", "Windows 8", - "Mac OS X", "Linux", "All", "Other" ] %] - +[% END %] <tr> - <th>Operating System</th> - <td> - [% PROCESS select sel = 'op_sys' %] + <td align="right" valign="top"> + <b>Version</b> + </td> + <td valign="top"> + <select name="version" id="version" size="5"> + [% FOREACH v = product.versions %] + [% NEXT UNLESS v.is_active %] + <option value="[% v.name FILTER html %]" + [% " selected=\"selected\"" IF v.name == default.version %]> + [% v.name FILTER html %] + </option> + [% END %] + </select> + <p> + Before, you selected a product. Now choose the proper version of that product. For example, + if you are reporting a [% terms.bug %] for <b>Red Hat Enterprise Linux 7.1</b> then choose 7.1 as the version. + </p> + <p> + If you are reporting a [% terms.bug %] against a <b>Red Hat Enterprise Linux</b> + product and are unsure of the version of product you are using, you can run <code>cat /etc/redhat-release</code> and choose the version number reported by the output. Beta versions + are usually not numbered this way so would not apply. Then just choose 'beta'. + </p> + <p> + If there is only one choice of version then simply select the single choice. + </p> </td> </tr> - [%# Accept URL parameter build ID for non-browser products %] - [% IF cgi.param("buildid") %] - [% buildid = cgi.param("buildid") %] - [% END %] - - <tr class="guided_form_field"> - <th>Build Identifier</th> - <td> - <input type="text" size="80" name="buildid" value="[% buildid FILTER html %]"> + <tr> + <td align="right" valign="top"> + <b>[% field_descs.rep_platform FILTER html %]</b> + </td> + <td valign="top"> + [% PROCESS select sel = 'rep_platform' %] <p> - 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. + If you are unsure of the architecture choice, then you can run <code>uname -m</code> and choose the best matching one from the selection box. + </p> + <p> + For Intel compatible systems such as for AMD and Cyrix processors please + choose i386 as the architecture. + </p> + <p> + If the product you chose is not relevant to any particular architecture such as + Red Hat Web Site, etc. then just choose All. </p> </td> </tr> <tr> - <th>URL</th> - <td> + <td align="right" valign="top"> + <b>URL</b> + </td> + <td valign="top"> <input type="text" size="80" name="bug_file_loc" value="http://"> <p> URL that demonstrates the problem you are seeing (optional). @@ -194,9 +305,11 @@ function PutDescription() { </td> </tr> - <tr class="guided_form_field"> - <th>Summary</th> - <td> + <tr> + <td align="right" valign="top"> + <b>Summary</b> + </td> + <td valign="top"> <input type="text" size="80" name="short_desc" id="short_desc" maxlength="255" spellcheck="true"> <p> @@ -204,51 +317,56 @@ function PutDescription() { Please be descriptive and use lots of keywords. </p> <p> - <kbd> - <span class="bad">Bad example</span>: mail crashed - </kbd> - <br> - <kbd> - <span class="good">Good example</span>: - crash if I close the mail window while checking for new POP mail - </kbd> + <tt> + <font color="#990000">Bad example</font>: Installer crashed + </tt> + <tt> + <font color="#009900">Good example</font>: Installer hangs when loading aic7xxx module + </tt> </p> </td> </tr> <tr> - <th>Details</th> - <td> + <td align="right" valign="top"> + <b>Details</b> + </td> + <td valign="top"> [% INCLUDE global/textarea.html.tmpl - name = 'comment' - minrows = 6 - cols = constants.COMMENT_COLS - mandatory = 1 + name = 'comment' + minrows = 6 + cols = constants.COMMENT_COLS %] <p> Expand on the Summary. Please be as specific as possible about what is wrong. </p> <p> - <kbd> - <span class="bad">Bad example</span>: Mozilla crashed. - You suck! - </kbd> + Examples: + <tt> + <font color="#990000">Bad example</font>: The program simply will not work. + </tt> <br> - <kbd> - <span class="good">Good example</span>: After a crash which - happened when I was sorting in the Bookmark Manager,<br> all of my - top-level bookmark folders beginning with the letters Q to Z are - no longer present. - </kbd> + <tt> + <font color="#009900">Good example</font>: When I use a particular option to the<code>ls</code> + command, I do not get the proper output as expected. The option I was trying + was trying was <i>blah</i> and the exact output was <i>blah</i>. + </tt> + </p> + <p> + <b>Note:</b> If you need to enter large amounts of text such as logfiles, sample code, patches, etc. + then please submit them as an attachment to the [% terms.bug %] instead of placing them in the description + field. You will be given the opportunity to make attachments after submitting the [% terms.bug %] report. </p> </td> </tr> - <tr class="guided_form_field"> - <th>Reproducibility</th> - <td> - <select name="reproducible"> + <tr> + <td align="right" valign="top"> + <b>Reproducibility</b> + </td> + <td valign="top"> + <select name="reproducible" id="reproducible"> <option name="AlwaysReproducible" value="Always"> Happens every time. </option> @@ -266,8 +384,10 @@ function PutDescription() { </tr> <tr> - <th>Steps to Reproduce</th> - <td> + <td align="right" valign="top"> + <b>Steps to Reproduce</b> + </td> + <td valign="top"> [% INCLUDE global/textarea.html.tmpl name = 'reproduce_steps' minrows = 4 @@ -275,15 +395,16 @@ function PutDescription() { defaultcontent = "1.\n2.\n3." %] <p> - Describe how to reproduce the problem, step by - step. Include any special setup steps. + Describe how to reproduce the problem, step by step. Include any special setup steps. </p> </td> </tr> - <tr class="guided_form_field"> - <th>Actual Results</th> - <td> + <tr> + <td valign="top" align="right"> + <b>Actual Results</b> + </td> + <td valign="top"> [% INCLUDE global/textarea.html.tmpl name = 'actual_results' minrows = 4 @@ -296,8 +417,10 @@ function PutDescription() { </tr> <tr> - <th>Expected Results</th> - <td> + <td valign="top" align="right"> + <b>Expected Results</b> + </td> + <td valign="top"> [% INCLUDE global/textarea.html.tmpl name = 'expected_results' minrows = 4 @@ -309,58 +432,46 @@ function PutDescription() { </td> </tr> - <tr class="guided_form_field"> - <th>Additional Information</th> - <td> + <tr> + <td valign="top" align="right"> + <b>Additional Information</b> + </td> + <td valign="top"> [% INCLUDE global/textarea.html.tmpl name = 'additional_info' minrows = 8 cols = constants.COMMENT_COLS %] <p> - Add any additional information you feel may be - relevant to this [% terms.bug %], such as the <b>theme</b> you were - using (does the [% terms.bug %] still occur - with the default theme?), or special - information about <b>your computer's configuration</b>. Any information - longer than a few lines, such as a <b>stack trace</b> or <b>HTML - testcase</b>, 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 <kbd>about:buildconfig</kbd> - into your URL bar. - <br> - <br> - If you are reporting a crash, note the module in - which the software crashed (e.g., <kbd>Application Violation in - gkhtml.dll</kbd>). + Add any additional information you feel may be relevant to this [% terms.bug %], such + as a few lines of output showing the error message, binary's version number, + or special information about your computer's configuration. + </p> + <p> + Any information longer than a few lines, such as a <b>stack trace</b> or + <b>patch</b>, should be added using the "Add an Attachment" link on + the [% terms.bug %], after it is filed. </p> </td> </tr> <tr> - <th>[% field_descs.bug_severity FILTER html %]</th> - <td> - <select name="bug_severity"> - <option name="critical" value="critical"> - Critical: The software crashes, hangs, or causes you to - lose data. - </option> - <option name="major" value="major"> - Major: A major feature is broken. - </option> - <option name="normal" value="normal" selected="selected"> - Normal: It's [% terms.abug %] that should be fixed. + <td valign="top" align="right"> + <b>[% field_descs.bug_severity FILTER html %]</b> + </td> + <td valign="top"> + <select name="bug_severity" id="bug_severity"> + <option name="urgent" value="urgent"> + Urgent: The software crashes, hangs, or causes you to lose data. </option> - <option name="minor" value="minor"> - Minor: Minor loss of function, and there's an easy workaround. + <option name="high" value="high"> + High: A major feature is broken. </option> - <option name="trivial" value="trivial"> - Trivial: A cosmetic problem, such as a misspelled word or - misaligned text. + <option name="medium" value="medium" selected="selected"> + Medium: It's [% terms.abug %] that should be fixed. </option> - <option name="enhancement" value="enhancement"> - Enhancement: Request for new feature or enhancement. + <option name="low" value="low"> + Low: Minor loss of function or cosmetic problem. There's an easy workaround. </option> </select> <p> @@ -370,19 +481,61 @@ function PutDescription() { </td> </tr> + [% FOREACH group IN product.groups_available %] + [% IF group.name == "security" %] + <tr> + <td valign="top" align="right"> + <b>Security</b> + </td> + <td valign="top"> + <input type="checkbox" id="group_[% group.id FILTER html %]" name="groups" value="[% group.name FILTER html %]"> This report is security sensitive. + <p> + Red Hat takes security very seriously and we aim to take immediate action to address + any security related problems that involve our products or services. + You should check this if: + <ul> + <li>If you have found a security vulnerability with a Red Hat product or service</li> + <li>If you are unsure about how a known vulnerability affects a Red Hat product or service</li> + </ul> + Alternatively, you may email the information to <a href="mailto:secalert@redhat.com">secalert@redhat.com</a>. + You can communicate with us securely using <a href="http://www.redhat.com/security/team/key/">our GPG key</a>. + </p> + </td> + </tr> + [% ELSIF group.name == Param("insidergroup") %] + <tr> + <td valign="top" align="right"> + <b>Private</b> + </td> + <td valign="top"> + <input type="checkbox" id="group_[% group.id FILTER html %]" name="groups" value="[% group.name FILTER html %]"> + This report contains confidential information. + <p> + If this [% terms.bug %] contains information you consider to be personal or confidential then check this box. Checking it will limit access to Red Hat employees. + </p> + </td> + </tr> + [% END %] + [% END %] + [% Hook.process('form') %] </table> -<h3 id="step3">Step 3 of 3 - submit the [% terms.bug %] report</h3> +<h2 id="step3">Step 3 of 3 - Submit the [% terms.bug %] report</h2> <p> - <input type="submit" id="report" value="Submit [% terms.Bug %] Report"> + <input type="submit" id="report" value=" Submit [% terms.Bug %] Report " + onclick="if (this.form.comment.value == '') + { alert('Please enter some details about this [% terms.bug %].'); + this.form.comment.focus(); + return false; } return true;"> </p> <p> That's it! Thanks very much. You'll be notified by email about any progress that is made on fixing your [% terms.bug %]. +</p> <p> Please be warned @@ -402,16 +555,17 @@ function PutDescription() { [%############################################################################%] [% BLOCK select %] - <select name="[% sel %]"> + <select name="[% sel %]" id="[% 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 -%] + [%- FOREACH x = bug_fields.${sel}.legal_values %] + [% NEXT UNLESS x.is_active %] + [% NEXT IF x.name == default.$sel %] + <option value="[% x.name FILTER html %]"> + [% x.name FILTER html -%] </option> [%- END %] </select> diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 61faf1c1a..1440a29d4 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -8,6 +8,13 @@ [% title = BLOCK %]Enter [% terms.Bug %]: [% product.name FILTER html %][% END %] [% use_qa_contact = Param("useqacontact") %] +[%## REDHAT EXTENSION 653316 %] +[% has_sub_components = 0; + IF (Param('usesubcomponents') && product.has_sub_components); + has_sub_components = 1; + extra_onload = ""; + END; +%] [% PROCESS global/header.html.tmpl title = title @@ -17,12 +24,15 @@ javascript_urls = [ "js/attachment.js", "js/util.js", "js/field.js", "js/TUI.js", "js/bug.js" ] onload = "set_assign_to($use_qa_contact); hideElementById('attachment_true'); - showElementById('attachment_false'); showElementById('btn_no_attachment');" + showElementById('attachment_false'); showElementById('btn_no_attachment');" _ extra_onload %] +[%## REDHAT EXTENSION BEGIN 823309 950315 %] <script type="text/javascript"> <!-- +[%## REDHAT EXTENSION 1222360 minimal change here to minimise drift from upstream %] +[% IF 0 %] var initialowners = new Array([% product.components.size %]); var last_initialowner; var initialccs = new Array([% product.components.size %]); @@ -33,8 +43,15 @@ var flags = new Array([% product.components.size %]); var initialqacontacts = new Array([% product.components.size %]); var last_initialqacontact; [% END %] +[%## REDHAT EXTENSION START 876015 %] +[% IF Param("usedocscontact") %] + var initialdocscontacts = new Array([% product.components.size %]); + var last_initialdocscontact; +[% END %] +[%## REDHAT EXTENSION END 876015 %] + [% count = 0 %] -[%- FOREACH c = product.components %] +[%- FOREACH c = sorted_components %] [% NEXT IF NOT c.is_active %] components[[% count %]] = "[% c.name FILTER js %]"; comp_desc[[% count %]] = "[% c.description FILTER html_light FILTER js %]"; @@ -52,6 +69,11 @@ var flags = new Array([% product.components.size %]); [% IF Param("useqacontact") %] initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]"; [% END %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param("usedocscontact") %] + initialdocscontacts[[% count %]] = "[% c.default_docs_contact.login FILTER js %]"; + [% END %] + [%## REDHAT EXTENSION END 876015 %] [% SET initial_cc_list = [] %] [% FOREACH cc_user = c.initial_cc %] @@ -62,6 +84,99 @@ var flags = new Array([% product.components.size %]); [% 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; + +[% IF Param("useqacontact") %] + var qa_contact = form.qa_contact.value; +[% END %] +[%## REDHAT EXTENSION START 876015 %] + [% IF Param("usedocscontact") %] + var docs_contact = form.docs_contact.value; + [% END %] +[%## REDHAT EXTENSION END 876015 %] + + var index = -1; +[%## REDHAT EXTENSION BEGIN 584957 %] + if (form.component.type == 'select-one' || form.component.type == 'select-multiple') { +[%## REDHAT EXTENSION END 584957 %] + 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]; + document.getElementById('comp_desc').innerHTML = comp_desc[index]; + + [% 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 %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param("usedocscontact") %] + var contact = initialdocscontacts[index]; + if (docs_contact == last_initialdocscontact + || docs_contact == contact + || docs_contact == '') { + form.docs_contact.value = contact; + last_initialdocscontact = contact; + } + [% END %] + [%## REDHAT EXTENSION END 876015 %] + + // We show or hide the available flags depending on the selected component. + var flag_rows = YAHOO.util.Dom.getElementsByClassName('bz_flag_type', 'tbody'); + for (var i = 0; i < flag_rows.length; i++) { + // Each flag table row should have one flag form select element + // We get the flag type id from the id attribute of the select. + var flag_select = YAHOO.util.Dom.getElementsByClassName('flag_select', + 'select', + flag_rows[i])[0]; + var type_id = flag_select.id.split('-')[1]; + var can_set = flag_select.options.length > 1 ? 1 : 0; + var show = 0; + // Loop through the allowed flag ids for the selected component + // and if we match, then show the row, otherwise hide the row. + for (var j = 0; j < flags[index].length; j++) { + if (flags[index][j] == type_id) { + show = 1; + break; + } + } + if (show && can_set) { + flag_select.disabled = false; + YAHOO.util.Dom.removeClass(flag_rows[i], 'bz_default_hidden'); + } else { + flag_select.disabled = true; + YAHOO.util.Dom.addClass(flag_rows[i], 'bz_default_hidden'); + } + } + } +} +[% ELSE %] +function set_assign_to() { +} +[%- END %] +[%## REDHAT EXTENSION END 823309 950315 %] var status_comment_required = new Array(); [% FOREACH status = bug_status %] status_comment_required['[% status.name FILTER js %]'] = @@ -130,19 +245,26 @@ TUI_hide_default('attachment_text_field'); desc_url = component_desc_url %] <td id="field_container_component"> - <select name="component" id="component" onchange="set_assign_to([% Param("useqacontact") %]);" - size="7" aria-required="true" class="required"> + [%## REDHAT EXTENSION START 950315 1224860 - Enforce AJAX codepath. %] + [% IF 1 %] + [% INCLUDE "bug/component-input.html.tmpl" product_name = product.name %] + [% ELSE %] + <select name="component" id="component" onchange="set_assign_to();[% IF has_sub_components %] show_sub_components();[% END %] _rh_description_text($(this).val());" + size="7" aria-required="true" class="required"[% IF product.multiple_components %] multiple="multiple"[% END %]> [%# Build the lists of assignees and QA contacts if "usemenuforusers" is enabled. %] [% IF Param("usemenuforusers") %] [% assignees_list = user.get_userlist.clone %] [% qa_contacts_list = user.get_userlist.clone %] + [%## REDHAT EXTENSION START 876015 %] + [% docs_contacts_list = user.get_userlist.clone %] + [%## REDHAT EXTENSION END 876015 %] [% END %] - [%- FOREACH c = product.components %] + [%- FOREACH c = sorted_components %] [% NEXT IF NOT c.is_active %] <option value="[% c.name FILTER html %]" id="v[% c.id FILTER html %]_component" - [% IF c.name.lower == default.component_.lower %] + [% IF default.component_.contains(c.name) %] [%# This is for bug/field.html.tmpl, for visibility-related # controls. %] [% default.component_id = c.id %] @@ -155,19 +277,21 @@ TUI_hide_default('attachment_text_field'); userlist = assignees_list %] [% INCLUDE build_userlist default_user = c.default_qa_contact, userlist = qa_contacts_list %] + [%## REDHAT EXTENSION START 876015 %] + [% INCLUDE build_userlist default_user = c.default_docs_contact, + userlist = docs_contacts_list %] + [%## REDHAT EXTENSION END 876015 %] [% END %] [%- END %] </select> - - <script type="text/javascript"> - <!-- - [%+ INCLUDE "bug/field-events.js.tmpl" - field = bug_fields.component, product = product %] - //--> - </script> + [% END %] + [%## REDHAT EXTENSION END 950315 %] </td> - <td colspan="2" id="comp_desc_container"> + <td colspan="2" id="comp_desc_container" + [%## REDHAT EXTENSION 653316 %] + [% IF has_sub_components %] rowspan="[% has_sub_components + 1 %]"[% END %] + > [%# Enclose the fieldset in a nested table so that its width changes based # on the length on the component description. %] <table> @@ -183,17 +307,22 @@ TUI_hide_default('attachment_text_field'); </td> </tr> + [%## REDHAT EXTENSION 653316 %] + [% INCLUDE bug/sub_component.html.tmpl + my_components = sorted_components + action = "add" + %] <tr> [% INCLUDE "bug/field-label.html.tmpl" field = bug_fields.version editable = 1 rowspan = 4 %] <td rowspan="4"> <select name="version" id="version" size="5" aria-required="true" - class="required"> + class="required"[% IF product.multiple_versions %] multiple="multiple"[% END %]> [%- FOREACH v = version %] [% NEXT IF NOT v.is_active %] <option value="[% v.name FILTER html %]" - [% ' selected="selected"' IF v.name == default.version %]>[% v.name FILTER html -%] + [% ' selected="selected"' IF default.version.contains(v.name) %]>[% v.name FILTER html -%] </option> [%- END %] </select> @@ -205,7 +334,7 @@ TUI_hide_default('attachment_text_field'); </tr> <tr class="expert_fields"> - [% IF Param('letsubmitterchoosepriority') %] + [% IF Param('letsubmitterchoosepriority') || user.in_group('setpriority') %] [% INCLUDE bug/field.html.tmpl bug = default, field = bug_fields.priority, editable = 1, value = default.priority %] @@ -246,7 +375,7 @@ TUI_hide_default('attachment_text_field'); <tbody class="expert_fields"> <tr> - [% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %] + [% IF Param('usetargetmilestone') && (Param('letsubmitterchoosemilestone') || user.in_group('setpriority')) %] [% INCLUDE select field = bug_fields.target_milestone %] [% ELSE %] <td colspan="2"> </td> @@ -254,6 +383,15 @@ TUI_hide_default('attachment_text_field'); <td colspan="2"> </td> </tr> +[% IF Param('usetargetrelease') && product.releases.size > 1 %] + <tr> + [% INCLUDE select + field = bug_fields.target_release + size = (product.multiple_target_releases ? 5 : 1) + multiple = product.multiple_target_releases + %] + </tr> +[% END %] </tbody> <tbody class="expert_fields"> @@ -270,7 +408,9 @@ TUI_hide_default('attachment_text_field'); <td> </td> [%# Calculate the number of rows we can use for flags %] [% num_rows = 6 + (Param("useqacontact") ? 1 : 0) + - (user.is_timetracker ? 3 : 0) + (Param("usedocscontact") ? 1 : 0) + + (user.is_timetracker ? 3 : 0) + + (Param("usestatuswhiteboard") ? 1 : 0) %] <td rowspan="[% num_rows FILTER html %]"> @@ -332,6 +472,28 @@ TUI_hide_default('attachment_text_field'); </tr> [% END %] +[%## REDHAT EXTENSION START 876015 %] +[% IF Param("usedocscontact") %] + <tr> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.docs_contact editable = 1 + %] + <td colspan="2"> + [% INCLUDE global/userselect.html.tmpl + id => "docs_contact" + name => "docs_contact" + value => docs_contact + disabled => docs_contact_disabled + size => 30 + emptyok => 1 + custom_userlist => docs_contacts_list + %] + <noscript>(Leave blank to assign to default docs contact)</noscript> + </td> + </tr> +[% END %] +[%## REDHAT EXTENSION END 876015 %] + <tr> [% INCLUDE "bug/field-label.html.tmpl" field = bug_fields.cc editable = 1 @@ -349,7 +511,7 @@ TUI_hide_default('attachment_text_field'); </tr> <tr> - <th>Default [% field_descs.cc FILTER html %]:</th> + <th class="field_label">Default [% field_descs.cc FILTER html %]:</th> <td colspan="2"> <div id="initial_cc"> </div> @@ -385,7 +547,7 @@ TUI_hide_default('attachment_text_field'); field = bug_fields.alias editable = 1 %] <td colspan="2"> - <input name="alias" size="20" value="[% alias FILTER html %]"> + <input name="alias" size="40" value="[% alias FILTER html %]"> </td> </tr> @@ -393,23 +555,45 @@ TUI_hide_default('attachment_text_field'); [% INCLUDE "bug/field-label.html.tmpl" field = bug_fields.bug_file_loc editable = 1 %] - <td colspan="3" class="field_value"> + <td colspan="2" class="field_value"> <input name="bug_file_loc" id="bug_file_loc" class="text_input" size="40" value="[% bug_file_loc FILTER html %]"> </td> </tr> + +[%## REDHAT EXTENSION START 457668 %] +[% IF Param('usestatuswhiteboard') %] + <tr> + <th class="field_label">Whiteboard:</th> + <td colspan="2"> + <input name="status_whiteboard" accesskey="w" value="[% status_whiteboard FILTER html %]" size="60"> + </td> + </tr> +[% END %] +[%## REDHAT EXTENSION END 457668 %] + </tbody> +[%## REDHAT EXTENSION START 963946 %] +[% PROCESS bug/private_fields.none.tmpl %] +[%## REDHAT EXTENSION END 963946 %] + <tbody> [% USE Bugzilla %] [% FOREACH field = Bugzilla.active_custom_fields %] [% NEXT UNLESS field.enter_bug %] + [% NEXT UNLESS field.user_can_edit(user) || field.name == 'cf_clone_of' %] + [% NEXT IF field.name == 'cf_extra_component' %] + [% NEXT IF field.name == 'cf_extra_version' %] + [%## REDHAT EXTENSION BEGIN 862020 887182 %] + [% NEXT IF field.name == 'cf_pgm_internal' %] + [%## REDHAT EXTENSION END 862020 887182 %] [% SET value = ${field.name}.defined ? ${field.name} : "" %] <tr [% 'class="expert_fields"' IF !field.is_mandatory %]> [% INCLUDE bug/field.html.tmpl bug = default, field = field, value = value, editable = 1, - value_span = 3 %] + value_span = 3, bug_entry = 1 %] </tr> [% END %] </tbody> @@ -464,11 +648,21 @@ TUI_hide_default('attachment_text_field'); [% END %] <tr> - <th>Description:</th> + <th class="field_label">Description:</th> <td colspan="3"> [% defaultcontent = BLOCK %] - [% IF cloned_bug_id %] + [%-## REDHAT EXTENSION START 1277621 %] + [%- IF cloned_bug_id && lite %] +This [% terms.bug %] was initially created as a copy of [% terms.Bug %] #[% cloned_bug_id %] + +I am copying this bug because: + + + + + [%-## REDHAT EXTENSION END 1277621 %] + [% ELSIF cloned_bug_id %] +++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++ @@ -477,23 +671,29 @@ TUI_hide_default('attachment_text_field'); # by global/textarea.html.tmpl. So we must not escape the comment here. %] [% comment FILTER none %] [%- END %] + + [%## REDHAT EXTENSION START 406271 %] + [% Hook.process("defaultcontent") %] + [%## REDHAT EXTENSION END 406271 %] [% INCLUDE bug/comment.html.tmpl minrows = 10 maxrows = 25 cols = constants.COMMENT_COLS defaultcontent = defaultcontent + classes = (comment_is_private || user.settings.private_comment_default.value == 'on' ? 'bz_private' : '') %] <br> </td> </tr> [% IF user.is_insider %] - <tr class="expert_fields"> + <tr> [%## REDHAT EXTENSION 1233010 always show private checkbox %] <th> </th> <td colspan="3"> <input type="checkbox" id="comment_is_private" name="comment_is_private" - [% ' checked="checked"' IF comment_is_private %] + [%## REDHAT EXTENSION 465941 %] + [% ' checked="checked"' IF comment_is_private || user.settings.private_comment_default.value == 'on' %] onClick="updateCommentTagControl(this, 'comment')"> <label for="comment_is_private"> Make description and any new attachment private (visible only to members @@ -508,7 +708,7 @@ TUI_hide_default('attachment_text_field'); [% IF Param("maxattachmentsize") || Param("maxlocalattachment") %] <tr> - <th>Attachment:</th> + <th class="field_label">Attachment:</th> <td colspan="3"> <div id="attachment_false" class="bz_default_hidden"> <input type="button" value="Add an attachment" onClick="handleWantsAttachment(true)"> @@ -574,33 +774,54 @@ TUI_hide_default('attachment_text_field'); [% END %] </tbody> -<tbody class="expert_fields"> +[%## REDHAT EXTENSION 1821098 Always show groups %] +<tbody> [% IF product.groups_available.size %] <tr> - <th> </th> + <th class="field_label">Groups:</th> <td colspan="3"> - <br> <strong> Only users in [%+ IF Param('or_groups') %]at least one[% ELSE %]all[% END %] of the selected groups can view this [%+ terms.bug %]: </strong> <br> <span class="bz_info"> - (Leave all boxes unchecked to make this a public [% terms.bug %].) + (Leave all boxes unchecked to make this a public [% terms.bug %]. Select the Security group to flag a bug as a securty issue.) </span> <br> <br> <!-- Checkboxes --> <input type="hidden" name="defined_groups" value="1"> - [% FOREACH group = product.groups_available %] - <input type="checkbox" id="group_[% group.id FILTER html %]" - name="groups" value="[% group.name FILTER html %]" - [% ' checked="checked"' IF default.groups.contains(group.name) - OR group.is_default %]> - <label for="group_[% group.id FILTER html %]"> - [%- group.description FILTER html_light %]</label><br> - [% END %] + [%## REDHAT EXTENSION 881990: Change sorting %] + <div class="groups"> + <select id="groups" name="groups" multiple> + [% prev = "" %] + [% FOREACH gr = product.groups_available.sort('category') %] + [% SET inallgroups = 0 IF NOT gr.ingroup %] + [% SET inagroup = 1 IF gr.ison %] + + [% IF gr.category != prev %] + [% IF prev != "" %]</optgroup>[% END %][% prev = gr.category %] + <optgroup label="[% gr.category FILTER html %]"> + [% END %] + <option id="group_[% gr.bit FILTER html %]" value="[% gr.name FILTER html %]" + [% IF default.groups.contains(gr.name) OR gr.is_default OR gr.ison %] selected [% END %] + title="[% gr.description FILTER html %]"> + [% gr.name FILTER html %] + </option> + [% END %] + </optgroup> + [% IF product.groups_mandatory.size %] + [% FOREACH gr = product.groups_mandatory.sort('name') %] + <option id="group_[% gr.bit FILTER html %]" value="[% gr.name FILTER html %]" selected="selected" disabled="disabled" + title="[% gr.description FILTER html %]"> + [% gr.name FILTER html %] + </option> + [% END %] + [% END %] + </select> + </div> </td> </tr> [% END %] @@ -625,6 +846,35 @@ TUI_hide_default('attachment_text_field'); <input type="hidden" name="form_name" value="enter_bug"> </form> +<script type="text/javascript"> +$(document).ready(function() { + $('#groups').selectize({ + plugins: ['remove_button', 'minimum_search_length', 'extra_keys_control'], + selectOnTab: true, + minimum_search_length: 2, + render: { + option: function(item, escape) { + var html_str = '<div class="option" title="' + escape(item.title) + + '" id="' + escape(item.id) + '" data-value="' + escape(item.value) + '"'; + + if(item.disabled === true) html_str = html_str + ' data-disabled=""'; + + html_str = html_str + '>' + + '<span>' + escape(item.title) + '</span>' + + '</div>'; + return html_str; + } + }, + }); + var $obj; + [%# BUGBUG this is a dirty hack and should be done as a patch to selectize %] + [% FOREACH gr = product.groups_mandatory %] + $obj = $("[data-value='[% gr.name FILTER html %]']"); + $obj.removeAttr('data-value').html("[% gr.name FILTER html %]"); + [% END %] +}); +</script> + [%# Links or content with more information about the bug being created. %] [% Hook.process("end") %] @@ -641,11 +891,13 @@ TUI_hide_default('attachment_text_field'); %] <td> <select name="[% field.name FILTER html %]" - id="[% field.name FILTER html %]"> + id="[% field.name FILTER html %]" + [% IF size %] size="[% size FILTER html %]"[% END %] + [% IF multiple %]multiple="multiple"[% END %]> [%- FOREACH x = ${field.name} %] [% NEXT IF NOT x.is_active %] <option value="[% x.name FILTER html %]" - [% " selected=\"selected\"" IF x.name == default.${field.name} %]> + [% " selected=\"selected\"" IF default.${field.name}.contains(x.name) %]> [%# has to use contains() as can be an array or a string %] [% display_value(field.name, x.name) FILTER html %] </option> [% END %] diff --git a/template/en/default/bug/create/created.html.tmpl b/template/en/default/bug/create/created.html.tmpl index ea227b32b..9d81679f6 100644 --- a/template/en/default/bug/create/created.html.tmpl +++ b/template/en/default/bug/create/created.html.tmpl @@ -34,6 +34,10 @@ <br> +[%## REDHAT EXTENSION BEGIN 835996 %] +<p>Create another [% terms.bug %] in <a href="enter_bug.cgi?product=[% bug.product FILTER uri %]">[% bug.product FILTER html %]</a></p> +[%## REDHAT EXTENSION END 835996 %] + <hr> [% PROCESS bug/edit.html.tmpl %] diff --git a/template/en/default/bug/create/user-message.html.tmpl b/template/en/default/bug/create/user-message.html.tmpl index 197cf1ad8..272bba6fd 100644 --- a/template/en/default/bug/create/user-message.html.tmpl +++ b/template/en/default/bug/create/user-message.html.tmpl @@ -18,5 +18,14 @@ Before reporting [% terms.abug %], please read the <a href="page.cgi?id=bug-writing.html"> [% terms.bug %] writing guidelines</a>, please look at the list of -<a href="duplicates.cgi">most frequently reported [% terms.bugs %]</a>, and please -<a href="query.cgi">search</a> for the [% terms.bug %]. +[%## REDHAT EXTENSION BEGIN 602563 %] +<a href="duplicates.cgi?classification=[% product.classification.name FILTER uri %]&product=[% product.name FILTER uri %]">most frequently reported [% terms.bugs %]</a>, and please +<a href="query.cgi?classification=[% product.classification.name FILTER uri %]&product=[% product.name FILTER uri %]&format=advanced[% FOREACH state = open_bug_states %]&bug_status=[% state FILTER uri %][% END %]">search</a> for the [% terms.bug %]. +[%## REDHAT EXTENSION END 602563 %] + +[%## REDHAT EXTENSION START 406431 %] +<p> + You may also use the <a href="enter_bug.cgi?format=guided&product=[% product.name FILTER uri %]"> + Guided</a> [% terms.bug %] entry page for an easier step by step method. +</p> +[%## REDHAT EXTENSION END 406431 %] diff --git a/template/en/default/bug/dependency-tree.html.tmpl b/template/en/default/bug/dependency-tree.html.tmpl index 606ab78f7..fadb276c4 100644 --- a/template/en/default/bug/dependency-tree.html.tmpl +++ b/template/en/default/bug/dependency-tree.html.tmpl @@ -47,14 +47,14 @@ [% IF ids.size %] depends on [% ELSE %] - does not depend on any [% 'open ' IF hide_resolved %][% terms.bugs %]. + does not depend on any [% 'open ' IF hide_resolved %][% terms.bugs %], or they are not visible due to [% terms.bug %] privacy. [% END %] [% ELSIF type == 2 %] [% tree_name = "blocked_tree" %] [% IF ids.size %] blocks [% ELSE %] - does not block any [% 'open ' IF hide_resolved %][% terms.bugs %]. + does not block any [% 'open ' IF hide_resolved %][% terms.bugs %], or they are not visible due to [% terms.bug %] privacy. [% END %] [% END %] [% IF ids.size %] @@ -137,12 +137,13 @@ [% BLOCK buglink %] [% isclosed = !bug.isopened %] [% FILTER closed(isclosed) -%] - <a title="[% INCLUDE buginfo bug=bug %]" - href="show_bug.cgi?id=[% bugid %]"> - <b>[%- bugid %]:</b> - <span class="summ_text">[%+ bug.short_desc FILTER html %]</span> - <span class="summ_info">[[% INCLUDE buginfo %]]</span> + [%## REDHAT EXTENSION START 458225 %] + <a href="show_bug.cgi?id=[% bugid %]"> + <b>[%- bugid %]</b> + [[% INCLUDE buginfo bug=bug %]] + [%+ bug.short_desc FILTER html %] </a> + [%## REDHAT EXTENSION END 458225 %] <a href="showdependencytree.cgi?id=[% bugid FILTER uri %]" class="tree_link"> <img src="skins/standard/dependency-tree/tree.png" @@ -152,12 +153,16 @@ [% END %] [% BLOCK buginfo %] + [%## REDHAT EXTENSION START 458225 %] [% display_value("bug_status", bug.bug_status) FILTER html -%] + [%+ bug.bug_severity FILTER html %] - [%- IF bug.resolution %] [%+ display_value("resolution", bug.resolution) FILTER html %][% END %]; - [%-%] assigned to [% bug.assigned_to.login FILTER email FILTER html %] + [%-%] assigned to [% bug.assigned_to.login FILTER email FILTER html %] - [% IF Param("usetargetmilestone") AND bug.target_milestone %] [%-%]; target: [% bug.target_milestone FILTER html %] [% END %] + [%+ bug.keywords FILTER html %] + [%## REDHAT EXTENSION END 458225 %] [% END %] [%###########################################################################%] diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index b8abe6bc5..0e69b693b 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -6,6 +6,16 @@ # defined by the Mozilla Public License, v. 2.0. #%] +[%## REDHAT EXTENSION 653316 %] +[% # We have to do this again (even though we did it in show-header-end.html, + # because it isn't sticky if we called bug/process/results.html or + # bug/create/created first + has_sub_components = 0; + IF (Param('usesubcomponents') && bug.product_obj.has_sub_components); + has_sub_components = 1; + END; +%] + [% PROCESS bug/time.html.tmpl %] [% IF Param('comment_taggers_group') %] @@ -13,7 +23,7 @@ <div id="bz_ctag_div" class="bz_default_hidden"> <a href="javascript:void(0)" onclick="YAHOO.bugzilla.commentTagging.hideInput()">x</a> <div> - <input id="bz_ctag_add" size="10" placeholder="add tag" + <input id="bz_ctag_add" placeholder="add tag and press enter" maxlength="[% constants.MAX_COMMENT_TAG_LENGTH FILTER html %]"> <span id="bz_ctag_autocomp"></span> </div> @@ -47,20 +57,31 @@ [% END %] [% IF user.id %] - /* Index all classifications so we can keep track of the classification - * for the selected product, which could control field visibility. - */ - var all_classifications = new Array([% bug.choices.product.size %]); - [%- FOREACH product = bug.choices.product %] - all_classifications['[% product.name FILTER js %]'] = ' - [%- product.classification.name FILTER js %]'; - [%- END %] + [%## REDHAT EXTENSION 426374 + # We set the product_selected here. %] + var product_selected = '[% bug.product FILTER none %]'; + [% END %] //--> </script> +[%## REDHAT EXTENSION START 1718788 %] +[% Hook.process("before_form") %] +[%## REDHAT EXTENSION END 1718788 %] + <form name="changeform" id="changeform" method="post" action="process_bug.cgi"> +[%## REDHAT EXTENSION START 406451 %] +[%# Displays NEEDINFO tag in bug header %] +[% FOREACH type = bug.flag_types %] + [% FOREACH flag = type.flags %] + [% IF type.name == 'needinfo' %] + [% needinfo_status = flag.status %] + [% END %] + [% END %] +[% END %] +[%## REDHAT EXTENSION END 406451 %] + <input type="hidden" name="delta_ts" value="[% bug.delta_ts %]"> <input type="hidden" name="id" value="[% bug.bug_id %]"> <input type="hidden" name="token" value="[% issue_hash_token([bug.id, bug.delta_ts]) FILTER html %]"> @@ -84,12 +105,14 @@ [% PROCESS section_spacer %] - [%# *** severity, priority, version, milestone, and deadline *** %] + [%# *** severity, priority, version, milestone and release *** %] [% PROCESS section_details2 %] [%# *** assigned to and qa contact *** %] [% PROCESS section_people %] - + [%## REDHAT EXTENSION START 1771239 %] + [% Hook.process("after_people") %] + [%## REDHAT EXTENSION END 1771239 %] [% PROCESS section_spacer %] [% PROCESS section_url_keyword_whiteboard %] @@ -100,6 +123,10 @@ [% PROCESS section_duplicates %] [% PROCESS section_dependson_blocks %] + + [%## REDHAT EXTENSION START 1215019 %] + [% Hook.process("after_bug_fields") %] + [%## REDHAT EXTENSION END 1215019 %] </table> </td> @@ -154,12 +181,21 @@ show_attachment_flags = bug.show_attachment_flags %] + [%# *** Additional Table Based Bug Data *** %] + + [%## REDHAT EXTENSION START 406161 %] + [% Hook.process('table-data') %] + [%## REDHAT EXTENSION END 406161 %] + [% IF user.settings.comment_box_position.value == 'before_comments' %] [% PROCESS comment_box %] [% END %] </td> - <td> + + <td class="groups"> + [% IF user.id %] [% PROCESS section_restrict_visibility %] + [% END %] </td> </tr></table> @@ -185,6 +221,12 @@ [% BLOCK section_title %] [%# That's the main table, which contains all editable fields. %] <div class="bz_short_desc_container edit_form"> + [%## REDHAT EXTENSION START 406391 956853 %] + [% IF bug.groups_in.size %] + <img src="[% urlbase FILTER none %]images/padlock.png" alt="[Private]" title="Private [% terms.Bug %]"/> + [% END %] + [%## REDHAT EXTENSION END 406391 956853 %] + [% PROCESS commit_button id="_top"%] <a href="show_bug.cgi?id=[% bug.bug_id %]"> [%-# %]<b>[% terms.Bug %] [% bug.bug_id FILTER html %]</b> @@ -199,6 +241,12 @@ [% END %] </span> + [%## REDHAT EXTENSION START 406451 %] + [% IF needinfo_status == "?" %] + <b>[NEEDINFO]</b> + [% END %] + [%## REDHAT EXTENSION END 406451 %] + <div id="summary_input"> [% INCLUDE "bug/field-label.html.tmpl" field = bug_fields.short_desc @@ -218,6 +266,7 @@ '[% bug.short_desc FILTER js %]' ); </script> [% END %] +[%## REDHAT EXTENSION END 481660 %] [%############################################################################%] [%# Block for the first table in the "Details" section #%] @@ -225,16 +274,29 @@ [% BLOCK section_details1 %] + [% IF Param("timetrackinggroup") && bug.deadline %] + <tr> + <th class="field_label"> + <a href="page.cgi?id=fields.html#deadline">Deadline</a>: + </th> + <td class="deadline">[% bug.deadline FILTER html %]</td> + </tr> + [% END %] + [%#############%] [%# PRODUCT #%] [%#############%] <tr> - [% INCLUDE bug/field.html.tmpl - bug = bug, field = bug_fields.product, value = bug.product - override_legal_values = bug.choices.product - desc_url = "describecomponents.cgi" - editable = bug.check_can_change_field('product', 0, 1) - %] +[%## REDHAT EXTENSION START 1157849 add function call to onchange %] +[%## REDHAT EXTENSION START 1265079 Don't call bz_updateFields if product field is empty. Prevent bz_updateFields to retrieve components. %] + [% INCLUDE bug/field.html.tmpl + bug = bug, field = bug_fields.product, + override_legal_values = bug.product_obj + desc_url = 'describecomponents.cgi', value = bug.product + onchange = ("\$('#component').clearComponentSearch(); if (\$(this).val().length){update_selects(1);}") + editable = bug.check_can_change_field('product', 0, 1) %] +[%## REDHAT EXTENSION END 1265079 %] +[%## REDHAT EXTENSION END 1157849 %] </tr> [%# Classification is here so that it can be used in value controllers @@ -245,7 +307,7 @@ <tr class="bz_default_hidden"> [% INCLUDE bug/field.html.tmpl bug = bug field = bug_fields.classification - override_legal_values = bug.choices.classification + override_legal_values = bug.classification value = bug.classification editable = bug.check_can_change_field('product', 0, 1) %] </tr> @@ -253,19 +315,71 @@ [%# Component #%] [%###############%] <tr> - [% INCLUDE bug/field.html.tmpl + [% INCLUDE "bug/field-label.html.tmpl" bug = bug, field = bug_fields.component, value = bug.component - override_legal_values = bug.choices.component + override_legal_values = bug.component desc_url = "describecomponents.cgi?product=$bug.product" editable = bug.check_can_change_field('component', 0, 1) %] + <td> + [%## REDHAT EXTENSION START 426375 553189 1157849 1224860 - incomplete select + # Display the Chosen based js component selector. Non javascript use is not supported. + %] + + [% IF bug.check_can_change_field("component", 0, 1) %] + <select id="component" name="component" + [% IF bug.product_obj.multiple_components %] size="5" multiple="multiple"[% END %] + onchange="[% IF has_sub_components %] show_sub_components();[% END %] assign_to_default();" + title="Type '..' to see all components" + > + [%## REDHAT EXTENSION START 1276581 %] + [% FOREACH c = bug.all_component_objs %] + <option title="[% c.description FILTER json FILTER html %]" value="[% c.name FILTER html %]" selected>[% c.name FILTER html %]</option> + [% END %] + [%## REDHAT EXTENSION END 1276581 %] + </select> + <span class="fetch_all[% IF ( bug.product_obj.component_count <= 50) %] bz_default_hidden[% END %]" + onclick="$('#component').fetch_all()" + title="Click to list all components"><i class="fa fa-download"></i> + </span> + <script type="text/javascript"> + $(document).ready(function () { + init_products({onclick: 1}); + init_components({ [% IF ( bug.product_obj.component_count <= 50) %]onclick: 1, [% END %] descrs: 1}); + }); + </script> + [%## REDHAT EXTENSION END 1157849 %] + [% ELSE %] + [% FOREACH c = bug.component %] + <input type="hidden" id="component" name="component" value="[% c FILTER html %]"> + [% END %] + [% bug.component.join(", ") FILTER html %] + [% END %] + [%## REDHAT EXTENSION END 426375 553189 %] + [%## REDHAT EXTENSION START 458436 %] + <span class="show_others"> + <a href="buglist.cgi?[% FOREACH c = bug.component %]component=[% c FILTER uri %]&[% END %]product=[% bug.product FILTER uri %]" + title="Show other [% terms.bugs %] for this component"><i class="fas fa-th-list"></i></a> + [%## REDHAT EXTENSION END 458436 %] + [%## REDHAT EXTENSION START 1123823 %] + <a href="enter_bug.cgi?[% FOREACH c = bug.component %]component=[% c FILTER uri %]&[% END %]product=[% bug.product FILTER uri %]&version=[% bug.version FILTER uri %]" + title="Create a new [% terms.bug %] for this component"><i class="fas fa-plus-circle"></i></a> + [%## REDHAT EXTENSION END 1123823 %] + </span> + </td> </tr> + [%## REDHAT EXTENSION 653316 %] + [% PROCESS bug/sub_component.html.tmpl + my_components = bug.component_obj + rh_sub_component_ids = bug.rh_sub_component_ids + action = "update" + %] <tr> [% INCLUDE "bug/field-label.html.tmpl" field = bug_fields.version editable = bug.check_can_change_field('version', 0, 1) %] - [% PROCESS select selname => "version" %] + [% PROCESS select selname => "version", size => (bug.product_obj.multiple_versions ? 5 : 1), multiple => bug.product_obj.multiple_versions, is_array => 1 %] </tr> [%############%] [%# PLATFORM #%] @@ -281,6 +395,14 @@ bug = bug, field = bug_fields.rep_platform, no_tds = 1, value = bug.rep_platform editable = can_edit_rep_platform %] + </td> + </tr> + <tr> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.op_sys, + editable = can_edit_rep_platform, + accesskey = "o" %] + <td class="field_value"> [%+ INCLUDE bug/field.html.tmpl bug = bug, field = bug_fields.op_sys, no_tds = 1, value = bug.op_sys @@ -289,7 +411,6 @@ </tr> - [% END %] [%############################################################################%] @@ -297,6 +418,32 @@ [%############################################################################%] [% BLOCK section_status %] + + [% IF use_keywords %] + <tr> + <th class="field_label"> + <a href="describekeywords.cgi">Keywords</a>: + </th> + <td> + <div class="keywords_select"> + [% IF bug.check_can_change_field("keywords", 0, 1) %] + <input type="hidden" name="defined_keywords"> + [% END %] + <select id="keywords" name="keywords" [% UNLESS bug.check_can_change_field("keywords", 0, 1) %] disabled="disabled"[% END %] multiple="multiple"> + [%- FOREACH kw = bug.keyword_objects %] + <option value="[% kw.name FILTER html %]" + title="[% kw.description FILTER html %]" + selected="selected" + > + [% kw.name FILTER html %] + </option> + [% END %] + </select> + </div> + </td> + </tr> + [% END %] + <tr> <th class="field_label"> <a href="page.cgi?id=fields.html#bug_status">Status</a>: @@ -332,13 +479,21 @@ <th class="field_label"> [% can_edit_priority = bug.check_can_change_field('priority', 0, 1) %] <label [% IF can_edit_priority %]for="priority"[% END %] accesskey="i"> - <a href="page.cgi?id=fields.html#importance"><u>I</u>mportance</a></label>: + <a href="page.cgi?id=fields.html#priority">Priority:</a></label> </th> <td> [% INCLUDE bug/field.html.tmpl bug = bug, field = bug_fields.priority, no_tds = 1, value = bug.priority editable = can_edit_priority %] + </td> + </tr> + <tr> + <th class="field_label"> + <label [% IF can_edit_priority %]for="bug_severity"[% END %]><a href="page.cgi?id=fields.html#bug_severity">Severity:</a> + </label> + </th> + <td> [%+ INCLUDE bug/field.html.tmpl bug = bug, field = bug_fields.bug_severity, no_tds = 1, value = bug.bug_severity @@ -356,13 +511,23 @@ [% PROCESS select selname = "target_milestone" %] </tr> [% END %] - - [% IF Param("timetrackinggroup") && bug.deadline %] + [% IF Param("usetargetrelease") && bug.product_obj.releases.size > 1 %] <tr> - <th class="field_label"> - <a href="page.cgi?id=fields.html#deadline">Deadline</a>: - </th> - <td>[% bug.deadline FILTER html %]</td> + <td class="field_label"> + <label for="target_release"> + <a href="page.cgi?id=fields.html#target_release"> + Target Release</a></label>: + </td> + [% PROCESS select selname = "target_release" + size = (bug.product_obj.multiple_target_releases ? 5 : 1) + multiple = bug.product_obj.multiple_target_releases + is_array = 1 wheel = 1 + %] + [%## REDHAT EXTENSION START 706784 877243 %] + [% IF bug.check_can_change_field('target_release', 0, 1) %] + <input type="hidden" name="defined_target_release" value="1"> + [% END %] + [%## REDHAT EXTENSION END 706784 877243 %] </tr> [% END %] [% END %] @@ -476,11 +641,70 @@ </td> </tr> [% END %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param('usedocscontact') %] + <tr> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.docs_contact + editable = 1 + accesskey = "q" + %] + <td> + [% IF bug.check_can_change_field("docs_contact", 0, 1) %] + <div id="bz_docs_contact_edit_container" class="bz_default_hidden"> + <span> + [% INCLUDE global/user.html.tmpl who = bug.docs_contact %] + (<a href="#" id="bz_docs_contact_edit_action">edit</a>) + [% IF bug.docs_contact.id != user.id %] + (<a title="Change docs contact to yourself" + href="#" id="bz_docs_contact_take_action">take</a>) + [% END %] + </span> + </div> + <div id="bz_docs_contact_input"> + [% INCLUDE global/userselect.html.tmpl + id => "docs_contact" + name => "docs_contact" + value => bug.docs_contact.login + size => 30 + classes => ["bz_userfield"] + emptyok => 1 + %] + <br> + <input type="checkbox" id="set_default_docs_contact" name="set_default_docs_contact" value="1"> + <label for="set_default_docs_contact" id="set_default_docs_contact_label">Reset docs Contact to default for component</label> + </div> + <script type="text/javascript"> + hideEditableField('bz_docs_contact_edit_container', + 'bz_docs_contact_input', + 'bz_docs_contact_edit_action', + 'docs_contact', + '[% bug.docs_contact.login FILTER js %]'); + hideEditableField('bz_docs_contact_edit_container', + 'bz_docs_contact_input', + 'bz_docs_contact_take_action', + 'docs_contact', + '[% bug.docs_contact.login FILTER js %]', + '[% user.login FILTER js %]'); + initDefaultCheckbox('docs_contact'); + </script> + [% ELSE %] + [% INCLUDE global/user.html.tmpl who = bug.docs_contact %] + [% END %] + </td> + </tr> + [% END %] + [%## REDHAT EXTENSION START 653316 %] + [% my_comp_obj = bug.rh_sub_component_objs.size + ? bug.rh_sub_component_objs.0 : bug.component_obj %] <script type="text/javascript"> - assignToDefaultOnChange(['product', 'component'], - '[% bug.component_obj.default_assignee.login FILTER js %]', - '[% bug.component_obj.default_qa_contact.login FILTER js %]'); + assignToDefaultOnChange(['product', 'component'[% FOREACH c IN component_idtoname.keys %], 'rh_sub_component_[% c FILTER html %]'[% END %]], + '[% my_comp_obj.default_assignee.login FILTER js %]', + '[% my_comp_obj.default_qa_contact.login FILTER js %]', + '[% my_comp_obj.default_docs_contact.login FILTER js %]'); </script> + [%## REDHAT EXTENSION END 653316 %] + [%## REDHAT EXTENSION END 876015 %] [% END %] [%############################################################################%] @@ -539,16 +763,6 @@ </tr> [% END %] - [% IF use_keywords %] - <tr> - [% INCLUDE bug/field.html.tmpl - bug = bug, field = bug_fields.keywords, value = bug.keywords - editable = bug.check_can_change_field("keywords", 0, 1), - desc_url = "describekeywords.cgi", possible_values = all_keywords - %] - </tr> - [% END %] - [% IF user.id %] <tr> [% INCLUDE bug/field.html.tmpl @@ -596,7 +810,8 @@ field = bug_fields.blocked deps = bug.blocks_obj %] </tr> - [% IF bug.dependson.size || bug.blocked.size %] + [%## REDHAT EXTENSION 1215019 %] + [% IF 0 && (bug.dependson.size || bug.blocked.size) %] <tr> <th> </th> @@ -618,95 +833,113 @@ [% BLOCK section_restrict_visibility %] [% RETURN UNLESS bug.groups.size %] - - <div class="bz_group_visibility_section"> - [% inallgroups = 1 %] - [% inagroup = 0 %] - [% emitted_description = 0 %] - - [% FOREACH group = bug.groups %] - [% SET inallgroups = 0 IF NOT group.ingroup %] - [% SET inagroup = 1 IF group.ison %] - - [% NEXT IF group.mandatory %] - - [% IF NOT emitted_description %] - [% emitted_description = 1 %] - <div id="bz_restrict_group_visibility_help"> - <b>Only users in - [%+ IF Param('or_groups') %]at least one[% ELSE %]all[% END %] - of the selected groups can view this [% terms.bug %]:</b> - <p class="instructions"> - Unchecking all boxes makes this a more public [% terms.bug %]. - </p> - </div> - [% END %] - - [% IF group.ingroup %] - <input type="hidden" name="defined_groups" - value="[% group.name FILTER html %]"> - [% END %] - - <input type="checkbox" value="[% group.name FILTER html %]" - name="groups" id="group_[% group.bit %]" - [% ' checked="checked"' IF group.ison %] - [% ' disabled="disabled"' IF NOT group.ingroup %]> - <label for="group_[% group.bit %]"> - [%- group.description FILTER html_light %]</label> - <br> +[%## REDHAT EXTENSION START 1378285 %] + <div> + [% FOREACH gr = bug.groups.sort('category') %] + [% IF user.in_group('admin') || gr.ingroup %] + <input type="hidden" name="defined_groups" value="[% gr.name FILTER html %]"> [% END %] - - [% IF emitted_description %] - [% IF NOT inallgroups %] - <p class="instructions">Only members of a group can change the - visibility of [% terms.abug %] for that group.</p> - [% END %] [% END %] - - [% IF inagroup %] - <div id="bz_enable_role_visibility_help"> - <b>Users in the roles selected below can always view - this [% terms.bug %]:</b> + <div class="groups"> + <label><b>Groups:</b></label><br/> + [% prev = "" %] + <select id="groups" name="groups" multiple> + [%# Sort the groups array, by the category field, in the order given by group_categories %] + [% FOREACH gr = bug.groups.sort_by_field_order('category', Bugzilla.params.group_categories.split(',')) %] + [% SET inallgroups = 0 IF (NOT user.in_group('admin') && NOT gr.ingroup) %] + [% SET inagroup = 1 IF gr.ison %] + [% IF gr.category != prev %] + [% IF prev != "" %]</optgroup>[% END %][% prev = gr.category %] + <optgroup label="[% gr.category FILTER html %]"> + [% END %] + <option id="group_[% gr.bit FILTER html %]" [% ' disabled="disabled"' IF (NOT user.in_group('admin') && NOT gr.ingroup) || gr.mandatory %] value="[% gr.name FILTER html %]" [% ' selected="selected"' IF gr.ison || gr.mandatory %] title="[% gr.name FILTER html %] - [% gr.description FILTER html %]">[% gr.name FILTER html %]</option> + [% END %] + </optgroup> + </select> +<script type="text/javascript"> +$(document).ready(function() { + $('#groups').selectize({ + plugins: ['remove_button', 'minimum_search_length', 'extra_keys_control'], + selectOnTab: true, + minimum_search_length: 2, + render: { + option: function(item, escape) { + var html_str = '<div class="option" title="' + escape(item.title) + + '" id="' + escape(item.id) + '" data-value="' + escape(item.value) + '"'; + + if(item.disabled === true) html_str = html_str + ' data-disabled=""'; + + html_str = html_str + '>' + + '<span>' + escape(item.title) + '</span>' + + '</div>'; + return html_str; + } + }, + }); + var $obj; + [%# BUGBUG this is a dirty hack and should be done as a patch to selectize %] + [% FOREACH gr = bug.groups.sort('category') %] + [% IF gr.ison AND ((NOT user.in_group('admin') && NOT gr.ingroup) || gr.mandatory) %] + $obj = $("[data-value='[% gr.name FILTER html %]']"); + $obj.removeAttr('data-value').html("[% gr.name FILTER html %]"); + [% END %] + [% END %] +}); +</script> + <div> + <b>Only users in + [%+ IF Param('or_groups') %]at least one[% ELSE %]all[% END %] + of the selected groups can view this [% terms.bug %]:</b> + <p class="instructions"> + Unselecting all groups makes this a more public [% terms.bug %]. + </p> </div> - <div id="bz_enable_role_visibility"> - <div> - [% user_can_edit_accessible = - bug.check_can_change_field("reporter_accessible", 0, 1) - %] - [% IF user_can_edit_accessible %] - <input type="hidden" name="defined_reporter_accessible" value="1"> - [% END %] - <input type="checkbox" value="1" - name="reporter_accessible" id="reporter_accessible" - [% " checked" IF bug.reporter_accessible %] - [% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %]> - <label for="reporter_accessible">Reporter</label> - </div> - <div> - [% user_can_edit_accessible = - bug.check_can_change_field("cclist_accessible", 0, 1) - %] - [% IF user_can_edit_accessible %] - <input type="hidden" name="defined_cclist_accessible" value="1"> - [% END %] - <input type="checkbox" value="1" - name="cclist_accessible" id="cclist_accessible" - [% " checked" IF bug.cclist_accessible %] - [% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %]> - <label for="cclist_accessible">CC List</label> - </div> - <p class="instructions"> - The assignee - [% IF (Param('useqacontact')) %] - and QA contact - [% END %] - can always see [% terms.abug %], and this section does not - take effect unless the [% terms.bug %] is restricted to at - least one group. - </p> + </div> + <div> + <b>Users in the roles selected below can always view this [% terms.bug %]:</b> + </div> + <div> + <div> + [% user_can_edit_accessible = bug.check_can_change_field("reporter_accessible", 0, 1) %] + [% IF user_can_edit_accessible %] + <input type="hidden" name="defined_reporter_accessible" value="1"> + [% END %] + <input type="checkbox" value="1" + name="reporter_accessible" id="reporter_accessible" + [% " checked" IF bug.reporter_accessible %] + [% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %]> + <label for="reporter_accessible">Reporter</label> </div> - [% END %] - </div> [%# bz_group_visibility_section %] + <div> + [% user_can_edit_accessible = bug.check_can_change_field("cclist_accessible", 0, 1) %] + [% IF user_can_edit_accessible %] + <input type="hidden" name="defined_cclist_accessible" value="1"> + [% END %] + <input type="checkbox" value="1" + name="cclist_accessible" id="cclist_accessible" + [% " checked" IF bug.cclist_accessible %] + [% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %]> + <label for="cclist_accessible">CC List</label> + </div> + <p class="instructions"> + The assignee + [%## REDHAT EXTENSION START 876015 %] + [% IF (Param('useqacontact')) %] + [% IF (Param('usedocscontact')) %], [% ELSE %] and [% END %] + QA contact + [% END %] + [% IF (Param('usedocscontact')) %] + and Docs contact + [% END %] + [%## REDHAT EXTENSION END 876015 %] + can always see [% terms.abug %], and this section does not + take effect unless the [% terms.bug %] is restricted to at + least one group. + </p> + </div> + </div> +[%## REDHAT EXTENSION END 1378285 %] + [% END %] [%############################################################################%] @@ -716,7 +949,7 @@ [% BLOCK section_dates %] <tr> <th class="field_label"> - Reported: + <a href="page.cgi?id=fields.html#reporter">Reported:</a> </th> <td> [% bug.creation_ts FILTER time("%Y-%m-%d %H:%M %Z") %] by [% INCLUDE global/user.html.tmpl who = bug.reporter %] @@ -725,7 +958,7 @@ <tr> <th class="field_label"> - Modified: + <a href="page.cgi?id=fields.html#modified">Modified:</a> </th> <td> [% bug.delta_ts FILTER time("%Y-%m-%d %H:%M %Z") %] @@ -742,7 +975,7 @@ <tr> <th class="field_label"> <label [% IF user.id %]for="newcc"[% END %] accesskey="a"> - CC List: + <a href="page.cgi?id=fields.html#cclist">CC List:</a> </label> </th> <td> @@ -785,6 +1018,7 @@ size => 30 classes => ["bz_userfield"] multiple => 5 + field_title => 'A comma separated list of users' %] </div> [% END %] @@ -971,13 +1205,29 @@ [% BLOCK section_customfields %] [%# *** Custom Fields *** %] + +[%## REDHAT EXTENSION START 903706 %] +[% PROCESS bug/private_fields.none.tmpl %] +[%## REDHAT EXTENSION END 903706 %] + [% USE Bugzilla %] [% FOREACH field = Bugzilla.active_custom_fields %] + [% NEXT IF field.name == 'cf_extra_component' %] + [% NEXT IF field.name == 'cf_extra_version' %] + [%## REDHAT EXTENSION START 862020 %] + [% NEXT IF field.name == 'cf_pgm_internal' %] + [%## REDHAT EXTENSION END 862020 %] + [% NEXT IF field.name == 'cf_deadline' || field.name == 'cf_deadline_type' %] + + [% NEXT UNLESS field.user_can_view(user) %] + [% NEXT UNLESS field.is_visible_on_bug(bug) %] <tr> [%# Use PROCESS instead of INCLUDE, because extra_field_item is defined # in the template and must be returned back. INCLUDE cannot do that. %] [% PROCESS bug/field.html.tmpl value = bug.${field.name} - editable = bug.check_can_change_field(field.name, 0, 1) %] + editable = field.is_editable_on_bug(bug, user) + value_span = 2 + %] </tr> [% IF extra_field_item %] <tr> @@ -993,9 +1243,11 @@ [%############################################################################%] [% BLOCK section_spacer %] +[%# just use css to pad stuff <tr> <td colspan="2" class="bz_section_spacer"></td> </tr> +%] [% END %] @@ -1043,6 +1295,7 @@ [%############################################################################%] [% BLOCK section_timetracking %] +[% num_headers = 7 %] <table class="bz_time_tracking_table"> <tr> [% INCLUDE "bug/field-label.html.tmpl" @@ -1066,6 +1319,13 @@ [% INCLUDE "bug/field-label.html.tmpl" field = bug_fields.deadline, editable = 1 %] + [% FOREACH field = Bugzilla.active_custom_fields %] + [% NEXT IF field.name != 'cf_deadline' && field.name != 'cf_deadline_type' %] + [% NEXT UNLESS field.user_can_view(user) %] + [% NEXT UNLESS field.is_visible_on_bug(bug) %] + [% num_headers = num_headers + 1 %] + [% INCLUDE "bug/field-label.html.tmpl" field = field, editable = 0 %] + [% END %] </tr> <tr> <td> @@ -1097,14 +1357,25 @@ <td> [% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %] </td> - <td> + <td> [% INCLUDE bug/field.html.tmpl field = bug_fields.deadline, value = bug.deadline, no_tds = 1 editable = bug.check_can_change_field('deadline', 0, 1) %] </td> + [% FOREACH field = Bugzilla.active_custom_fields %] + [% NEXT IF field.name != 'cf_deadline' && field.name != 'cf_deadline_type' %] + [% NEXT UNLESS field.user_can_view(user) %] + [% NEXT UNLESS field.is_visible_on_bug(bug) %] + <td> + [% PROCESS bug/field.html.tmpl value = bug.${field.name} + editable = field.is_editable_on_bug(bug, user) + value_span = 2, no_tds = 1 + %] + </td> + [% END %] </tr> <tr> - <td colspan="7" class="bz_summarize_time"> + <td colspan="[% num_headers FILTER none %]" class="bz_summarize_time"> <a href="summarize_time.cgi?id=[% bug.bug_id %]&do_depends=1"> Summarize time (including time for [% terms.bugs %] blocking this [% terms.bug %])</a> @@ -1126,6 +1397,8 @@ [% IF user.is_insider && bug.check_can_change_field('longdesc', 0, 1) %] <input type="checkbox" name="comment_is_private" value="1" id="newcommentprivacy" + [%## REDHAT EXTENSION 465941 823364 %] + [% "checked" IF user.settings.private_comment_default.value == 'on' %] onClick="updateCommentTagControl(this, 'comment')"> <label for="newcommentprivacy"> Make comment private (visible only to members of the @@ -1140,6 +1413,7 @@ minrows = 10 maxrows = 25 cols = constants.COMMENT_COLS + classes = (user.settings.private_comment_default.value == 'on' ? 'bz_private' : '') %] [% IF user.is_insider %] <script> @@ -1151,6 +1425,11 @@ You are not allowed to make an additional comment on this [% terms.bug %]. [% END %] <br> + + [%## REDHAT EXTENSION END 406451 %] + [% PROCESS bug/needinfo.html.tmpl %] + [%## REDHAT EXTENSION END 406451 %] + [% PROCESS commit_button id=""%] [% Hook.process("after_comment_commit_button", 'bug/edit.html.tmpl') %] @@ -1191,22 +1470,41 @@ [%############################################################################%] [% BLOCK select %] - <td> + [% "<td>" IF NOT no_td %] + [% IF selname == 'target_milestone' %] + [% f = 'milestone' %] + [% ELSIF selname == 'target_release' %] + [% f = 'release' %] + [% ELSE %] + [% f = selname %] + [% END %] + [% varname = f _ "s" %] [% IF bug.check_can_change_field(selname, 0, 1) - AND bug.choices.${selname}.size > 1 %] + AND bug.product_obj.${varname}.size > 1 %] <input type="hidden" id="[% selname %]_dirty"> - <select id="[% selname %]" name="[% selname %]"> - [% FOREACH x = bug.choices.${selname} %] + <select id="[% selname %]" name="[% selname %]" + [% IF onchange %] onchange="[% onchange FILTER none %]"[% END %] + [% IF size %] size="[% size FILTER none %]"[% END %] + [% IF multiple %] multiple="multiple"[% END %]> + [% FOREACH x = bug.product_obj.${varname} %] + [% NEXT IF NOT x.is_active AND NOT bug.${selname}.contains(x.name) %] <option value="[% x.name FILTER html %]" - [% " selected" IF x.name == bug.${selname} %]> + [% " selected" IF bug.${selname}.contains(x.name) %]> [%- x.name FILTER html %] </option> [% END %] </select> [% ELSE %] - [% bug.${selname} FILTER html %] + <span id="[% selname %]"> + [% IF is_array %] + [% IF bug.${selname}.size == 0 %]---[% ELSE %][% bug.${selname}.join(',') FILTER html %][% END %] + [% ELSE %] + [% bug.${selname} FILTER html %] + [% END %] + </span> [% END %] - </td> + [% "</td>" IF NOT no_td %] + [% no_td = 0 %] [% END %] [%############################################################################%] @@ -1247,6 +1545,13 @@ <div class="knob-buttons"> <input type="submit" value="Save Changes" id="commit[% id FILTER css_class_quote %]"> + [% IF Param('minor_update_group') && user.can_minor_update() %] + <br> + <label class="" for="minor_update"> + This is a minor update (do not send email) + </label> + <input type="checkbox" name="minor_update" value="1"> + [% END %] </div> [% END %] [% END %] diff --git a/template/en/default/bug/field-events.js.tmpl b/template/en/default/bug/field-events.js.tmpl index 8ec51a441..382604313 100644 --- a/template/en/default/bug/field-events.js.tmpl +++ b/template/en/default/bug/field-events.js.tmpl @@ -24,6 +24,9 @@ [% END %] [% NEXT UNLESS vis_names.size %] + [%## REDHAT EXTENSION START 963097 %] + [% NEXT IF controlled_field.name == 'cf_pgm_internal' %] + [%## REDHAT EXTENSION END 963097 %] showFieldWhen('[% controlled_field.name FILTER js %]', '[% field.name FILTER js %]', [ diff --git a/template/en/default/bug/field-label.html.tmpl b/template/en/default/bug/field-label.html.tmpl index 94e2728fc..8625f7d69 100644 --- a/template/en/default/bug/field-label.html.tmpl +++ b/template/en/default/bug/field-label.html.tmpl @@ -17,6 +17,7 @@ #%] [% DEFAULT tag_name = "th" %] +[%## REDHAT EXTENSION 903706: Show private colors %] <[% tag_name FILTER html %] class="field_label [% ' bz_hidden_field' IF hidden %] [%- ' required' IF field.is_mandatory && NOT bug.id %]" id="field_label_[% field.name FILTER html %]" @@ -27,8 +28,11 @@ [% END %] <a + [% IF field.long_desc %] + title="[% field.long_desc FILTER html %][% field.acl_descr(user) FILTER html %]" + [% ELSE %] [% IF help_html.${field.name}.defined %] - title="[% help_html.${field.name} FILTER txt FILTER collapse FILTER html %]" + title="[% help_html.${field.name} FILTER txt FILTER collapse FILTER html %][% field.acl_descr(user) FILTER html %]" class="field_help_link" [% END %] [% IF desc_url %] @@ -36,6 +40,7 @@ [% ELSE %] href="page.cgi?id=fields.html#[% field.name FILTER uri %]" [% END %] + [% END %] >[%- field_descs.${field.name} FILTER html %]:</a> [% '</label>' IF editable %] diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index cdf15fbd8..a0a58d4af 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -18,12 +18,14 @@ # the field value. # no_tds: boolean; if true, don't display the label <th> or the # wrapping <td> for the field. + # onchange: If specified will be shown as the onchange event for select fields # bug (optional): The current Bugzilla::Bug being displayed, or a hash # with default field values being displayed on a page. #%] [% IF NOT no_tds %] [% field_hidden = 0 %] + [% RETURN IF bug AND !field.is_visible_on_bug(bug) AND cloned_bug_id %][%## REDHAT EXTENSION 1320235 cloned_bug_id is only set when cloning a bug %] [% IF bug AND !field.is_visible_on_bug(bug) %] [% field_hidden = 1 %] [% END %] @@ -38,10 +40,11 @@ [% SWITCH field.type %] [% CASE [ constants.FIELD_TYPE_FREETEXT constants.FIELD_TYPE_INTEGER ] %] - <input id="[% field.name FILTER html %]" class="text_input" + <input id="[% field.name FILTER html %]" + class="text_input [%- field.classes.join(' ') FILTER css_class_quote %]" name="[% field.name FILTER html %]" value="[% value FILTER html %]" size="40" - maxlength="[% constants.MAX_FREETEXT_LENGTH FILTER none %]" + maxlength="[% IF field.name == 'cf_fixed_in' %]32767[% ELSE %][% constants.MAX_FREETEXT_LENGTH FILTER none %][% END %]"[%## REDHAT EXTENSION 1187655 %] [% IF field.type == constants.FIELD_TYPE_INTEGER %] pattern="-?\d+[% IF dontchange %]|[% dontchange FILTER html %][% END %]" title="The value must be a valid positive or negative integer" @@ -53,6 +56,7 @@ [% size = (field.type == constants.FIELD_TYPE_DATE) ? 10 : 20 %] <input name="[% field.name FILTER html %]" size="[% size FILTER none %]" id="[% field.name FILTER html %]" + class="[% field.classes.join(' ') FILTER css_class_quote %]" value="[% value FILTER html %]" [% IF field.is_mandatory %] data-required="true" [% 'aria-required="true" required' UNLESS field_hidden %] @@ -70,9 +74,17 @@ <!-- [%+ PROCESS "global/calendar.js.tmpl" id = field.name %] //--></script> + [% CASE constants.FIELD_TYPE_FREETEXT_MULTI_INTEGER %] + <input id="[% field.name FILTER html %]" name="[% field.name FILTER html %]" + class="[% field.classes.join(' ') FILTER css_class_quote %]" + value="[% value.join(' ') FILTER html %]" size="40" + maxlength="[% constants.MAX_FREETEXT_LENGTH FILTER none %]"> + <br> + [% Hook.process('links') %] [% CASE constants.FIELD_TYPE_BUG_ID %] <span id="[% field.name FILTER html %]_input_area"> <input name="[% field.name FILTER html %]" id="[% field.name FILTER html %]" + class="[% field.classes.join(' ') FILTER css_class_quote %]" value="[% value FILTER html %]" size="7" [% IF field.is_mandatory %] data-required="true" [% 'aria-required="true" required' UNLESS field_hidden %] @@ -92,10 +104,12 @@ '[% field.name FILTER js %]', "[% value FILTER js %]"); </script> - [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT - constants.FIELD_TYPE_MULTI_SELECT ] %] + [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT, + constants.FIELD_TYPE_MULTI_SELECT, + constants.FIELD_TYPE_ONE_SELECT + ] %] [%# The 'product' field needs its own template if classifications are enabled. %] - [% IF field.name == "product" AND Param('useclassification') %] + [% IF field.name == "product" AND Param('useclassification') %] [% INCLUDE "global/product-select.html.tmpl" id = "product", name = "product", value = value products = override_legal_values %] @@ -103,6 +117,7 @@ <input type="hidden" id="[% field.name FILTER html %]_dirty"> <select id="[% field.name FILTER html %]" name="[% field.name FILTER html %]" + class="[% field.classes.join(' ') FILTER css_class_quote %]" [% IF field.type == constants.FIELD_TYPE_MULTI_SELECT %] [% SET field_size = 5 %] [% IF field.legal_values.size < 5 %] @@ -112,7 +127,13 @@ [% IF field.is_mandatory %] data-required="true" [% 'aria-required="true" required' UNLESS field_hidden %] [% END %] - [% END %]> + [% END %] + [%## REDHAT EXTENSION 1037909 %] + [% IF onchange %] onchange="[% onchange FILTER html %]" [% END %] + > + [% IF field.type == constants.FIELD_TYPE_ONE_SELECT %] + <option value="">None</option> + [% END %] [% IF allow_dont_change %] <option value="[% dontchange FILTER html %]" [% ' selected="selected"' IF value == dontchange %]> @@ -129,6 +150,7 @@ <option value="[% legal_value.name FILTER html %]" id="v[% legal_value.id FILTER html %]_ [%- field.name FILTER html %]" + title="[% legal_value.description FILTER html %]" [%# We always show selected values, even if they should be # hidden %] [% IF value.contains(legal_value.name).size %] @@ -151,15 +173,6 @@ <input type="hidden" name="defined_[% field.name FILTER html %]"> [% END %] [% END %] - - <script type="text/javascript"> - <!-- - initHidingOptionsForIE('[% field.name FILTER js %]'); - [%+ INCLUDE "bug/field-events.js.tmpl" - field = field, product = bug.product_obj %] - //--> - </script> - [% CASE constants.FIELD_TYPE_TEXTAREA %] <div id="[% field.name FILTER html %]_edit_container" class="bz_default_hidden"> <div> @@ -173,8 +186,10 @@ <div id="[% field.name FILTER html %]_input"> [% INCLUDE global/textarea.html.tmpl id = field.name name = field.name minrows = 4 maxrows = 8 + classes = field.classes.join(' ') cols = 60 defaultcontent = value mandatory = field.is_mandatory %] </div> + [% UNLESS field.name.match('^cf_') %] <script type="text/javascript"> hideEditableField('[% field.name FILTER js %]_edit_container', '[% field.name FILTER js %]_input', @@ -184,6 +199,7 @@ '', true); </script> + [% END %] [% CASE constants.FIELD_TYPE_BUG_URLS %] [% IF bug.id && value.size %] <ul class="bug_urls"> @@ -191,6 +207,7 @@ <li> [% PROCESS bug_url_link bug_url = bug_url %] <label><input type="checkbox" value="[% bug_url.name FILTER html %]" + class="[% field.classes.join(' ') FILTER css_class_quote %]" name="remove_[% field.name FILTER html %]"> Remove</label> </li> @@ -204,7 +221,7 @@ </span> <div id="container_[% field.name FILTER html %]"> <input type="text" id="[% field.name FILTER html %]" size="40" - class="text_input" name="[% field.name FILTER html %]" + class="text_input [% field.classes.join(' ') FILTER css_class_quote %]" [% IF !bug.id %]value="[% value FILTER html %]"[% END %]> </div> [% IF bug.id %] @@ -216,7 +233,7 @@ [% CASE constants.FIELD_TYPE_KEYWORDS %] <div id="[% field.name FILTER html %]_container"> <input type="text" id="[% field.name FILTER html %]" size="40" - class="text_input" name="[% field.name FILTER html %]" + class="text_input [% field.classes.join(' ') FILTER css_class_quote %]" name="[% field.name FILTER html %]" value="[% value FILTER html %]"> <div id="[% field.name FILTER html %]_autocomplete"></div> </div> @@ -239,8 +256,10 @@ [% IF value %] [% value FILTER bug_link(value, use_alias => 1) FILTER none %] [% END %] - [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT - constants.FIELD_TYPE_MULTI_SELECT ] %] + [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT, + constants.FIELD_TYPE_MULTI_SELECT, + constants.FIELD_TYPE_ONE_SELECT + ] %] [% FOREACH val = value %] [% display_value(field.name, val) FILTER html %] [% ', ' UNLESS loop.last() %] @@ -253,12 +272,16 @@ </li> [% END %] [% '</ul>' IF value.size %] + [%## REDHAT EXTENSION 1015377 START %] + [% CASE constants.FIELD_TYPE_DATETIME %] + [% value FILTER time %] + [%## REDHAT EXTENSION 1015377 END %] [% CASE %] [% value.join(', ') FILTER html %] [% END %] [% END %] -[% IF bug && field.name == 'component' %] +[% IF !dotweak && bug && field.name == 'component' %] (<a href="buglist.cgi?component=[% bug.component FILTER uri %]&product=[% bug.product FILTER uri %]&bug_status=__open__" target="_blank">show other [% terms.bugs %]</a>) [% END %] @@ -283,7 +306,8 @@ [% IF bug_url.isa('Bugzilla::BugUrl::Bugzilla::Local') %] [% bug_url.target_bug_id FILTER bug_link(bug_url.target_bug_id, use_alias => 1) FILTER none %] [% ELSE %] - <a href="[% bug_url.name FILTER html %]"> + <a href="[% bug_url.name FILTER html %]" + [%- ' class="bz_private_data"' IF bug_url.is_private %]> [% bug_url.name FILTER html %]</a> [% END %] [% END %] diff --git a/template/en/default/bug/knob.html.tmpl b/template/en/default/bug/knob.html.tmpl index 704647207..d60d2c367 100644 --- a/template/en/default/bug/knob.html.tmpl +++ b/template/en/default/bug/knob.html.tmpl @@ -11,10 +11,15 @@ no_tds = 1 field = bug_fields.bug_status value = bug.bug_status - override_legal_values = bug.choices.bug_status - editable = bug.choices.bug_status.size > 1 + override_legal_values = bug.statuses_available + editable = bug.statuses_available.size > 1 + onchange = "statusChange(event);" %] + [% IF bug.statuses_available.size == 1 %] + <input type="hidden" name="bug_status" value="[% bug.bug_status FILTER html %]"> + [% END %] + [% IF bug.resolution OR bug.check_can_change_field('resolution', bug.resolution, 1) %] @@ -26,8 +31,9 @@ no_tds = 1 field = bug_fields.resolution value = bug.resolution - override_legal_values = bug.choices.resolution + override_legal_values = bug.resolutions_available editable = bug.check_can_change_field('resolution', bug.resolution, 1) + onchange = "resolutionChange(event);" %] </span> @@ -45,7 +51,7 @@ <noscript>[% bug.dup_id FILTER bug_link(bug.dup_id) FILTER none %]</noscript> [% END %] <div id="dup_id_discoverable" class="bz_default_hidden"> - <a href="#" id="dup_id_discoverable_action">Mark as Duplicate</a> + <a href="#" id="dup_id_discoverable_action" onclick="markAsDupe(event);">Mark as Duplicate</a> </div> [% ELSIF bug.dup_id %] <noscript><br> duplicate</noscript> @@ -56,7 +62,7 @@ <script type="text/javascript"> var close_status_array = [ - [% FOREACH status = bug.choices.bug_status %] + [% FOREACH status = bug.statuses_available %] [% NEXT IF status.is_open %] '[% status.name FILTER js %]'[% ',' UNLESS loop.last %] [% END %] @@ -70,15 +76,42 @@ ['[% "is_duplicate" IF bug.dup_id %]', '[% bug.bug_status FILTER js %]']); YAHOO.util.Event.addListener( 'resolution', "change", showDuplicateItem); +[%## REDHAT EXTENSION START 1318533 %] +/* YAHOO.util.Event.addListener( 'dup_id_discoverable_action', 'click', setResolutionToDuplicate, '[% Param('duplicate_or_move_bug_status') FILTER js %]'); +*/ +[%## REDHAT EXTENSION END 1318533 %] YAHOO.util.Event.addListener( window, 'load', showHideStatusItems, ['[% "is_duplicate" IF bug.dup_id %]', '[% bug.bug_status FILTER js %]'] ); [% INCLUDE "bug/field-events.js.tmpl" field = select_fields.bug_status %] [% INCLUDE "bug/field-events.js.tmpl" field = select_fields.resolution %] + +[%## REDHAT EXTENSION START 1318533 %] +function statusChange(e) { + if($('#resolution').selectize()[0].selectize.getValue() == '') $('#resolution').selectize()[0].selectize.setValue('NOTABUG'); + showHideStatusItems(e,['[% "is_duplicate" IF bug.dup_id %]', '[% bug.bug_status FILTER js %]']); +} + +function resolutionChange(e) { + showDuplicateItem(e); +} + +function markAsDupe(e) { + e.preventDefault(); + var $select = $("#bug_status").selectize(); + var $selectize = $select[0].selectize; + $selectize.setValue('[% Param('duplicate_or_move_bug_status') FILTER js %]'); + + $select = $("#resolution").selectize(); + $selectize = $select[0].selectize; + $selectize.setValue('DUPLICATE'); +} + +[%## REDHAT EXTENSION END 1318533 %] </script> diff --git a/template/en/default/bug/link.html.tmpl b/template/en/default/bug/link.html.tmpl index f1e8d041a..779386cb1 100644 --- a/template/en/default/bug/link.html.tmpl +++ b/template/en/default/bug/link.html.tmpl @@ -37,6 +37,11 @@ [% IF use_alias && bug.alias.size %] [% link_text = bug.alias.join(', ') %] [% END %] +[%## REDHAT EXTENSION START 1109254 %] +[%# If the user cannot see the bug, don't show anything. %] +[% ELSE %] + [% link_title = '' %] +[%## REDHAT EXTENSION END 1109254 %] [% END %] [% SET anchor = '' %] @@ -46,7 +51,11 @@ <a class="bz_bug_link bz_status_[% bug.bug_status FILTER css_class_quote %] - [% ' bz_closed' IF !bug.isopened %]" + [% ' bz_closed' IF !bug.isopened %] [% extra_classes FILTER none %] + [%+ "bz_secure" IF bug.groups_in.size -%] + [%+ "bz_ignored" IF user.is_bug_ignored(bug.bug_id) -%] + [%+ "bz_requested" IF user.requested_on_bug(bug) -%] + [%+ "bz_updated" IF user.is_bug_updated(bug.bug_id) -%]" title="[% link_title FILTER collapse FILTER html %]" href="[% urlbase FILTER html IF full_url %]show_bug.cgi?id= [%~ bug.id FILTER uri %][% anchor FILTER html %]"> diff --git a/template/en/default/bug/navigate.html.tmpl b/template/en/default/bug/navigate.html.tmpl index b5e3ba7a2..0ff8f7e2b 100644 --- a/template/en/default/bug/navigate.html.tmpl +++ b/template/en/default/bug/navigate.html.tmpl @@ -8,20 +8,24 @@ [% RETURN IF !bug %] -[% IF bottom_navigator == 1 %] <ul class="related_actions"> <li><a href="show_bug.cgi?format=multiple&id= - [% bug.bug_id FILTER uri %]">Format For Printing</a></li> - <li> - <a href="show_bug.cgi?ctype=xml&id= - [% bug.bug_id FILTER uri %]">XML</a></li> - <li> - <a href="enter_bug.cgi?cloned_bug_id= - [% bug.bug_id FILTER uri %]">Clone This - [% terms.Bug %]</a></li> + [% bug.bug_id FILTER uri %]" title="Format For Printing"><i class="fa fa-print"></i></a></li> + <li><a href="show_bug.cgi?ctype=xml&id= + [% bug.bug_id FILTER uri %]" title="Export as XML"><i class="far fa-file-excel"></i></a></li> + <li><a href="enter_bug.cgi?cloned_bug_id= + [% bug.bug_id FILTER uri %]" title="Clone This + [% terms.Bug %]"><i class="fa fa-clone"></i></a></li> [%# Links to more things users can do with this bug. %] [% Hook.process("links") %] - <li> - <a href="#">Top of page </a></li> - </ul> +[% IF bottom_navigator == 1 %] + <li> + <a href="#" title="Top of page"> + <i class="fa fa-arrow-up" aria-hidden="true"></i> + </a> + </li> [% END %] + </ul> [% SET my_search = user.recent_search_for(bug) %] [% IF my_search %] @@ -35,38 +39,38 @@ [% IF this_bug_idx > 0 %] <a href="show_bug.cgi?id= [%- last_bug_list.first FILTER uri %]&list_id= - [%- my_search.id FILTER uri %]">First</a> - [% ELSE %] - <span class="navigation_link">First</span> - [% END %] - - [% IF this_bug_idx + 1 < last_bug_list.size %] - <a href="show_bug.cgi?id= - [%- last_bug_list.last FILTER uri %]&list_id= - [%- my_search.id FILTER uri %]">Last</a> + [%- my_search.id FILTER uri %]" title="Show fist search result"><i class="fas fa-fast-backward"></i></a> [% ELSE %] - <span class="navigation_link">Last</span> + <span class="navigation_link" title="You are at the first search result"><i class="fas fa-fast-backward"></i></span> [% END %] [% IF this_bug_idx > 0 %] [% prev_bug = this_bug_idx - 1 %] <a href="show_bug.cgi?id= [%- last_bug_list.$prev_bug FILTER uri %]&list_id= - [%- my_search.id FILTER uri %]">Prev</a> + [%- my_search.id FILTER uri %]" title="Show previous search result"><i class="fas fa-backward"></i></a> [% ELSE %] - <span class="navigation_link">Prev</span> + <span class="navigation_link" title="You are at the first search result"><i class="fas fa-backward"></i></span> [% END %] [% IF this_bug_idx + 1 < last_bug_list.size %] [% next_bug = this_bug_idx + 1 %] <a href="show_bug.cgi?id= [%- last_bug_list.$next_bug FILTER uri %]&list_id= - [%- my_search.id FILTER uri %]">Next</a> + [%- my_search.id FILTER uri %]" title="Show next search result"><i class="fas fa-forward"></i></a> + [% ELSE %] + <span class="navigation_link" title="You are at the last search result"><i class="fas fa-forward"></i></span> + [% END %] + + [% IF this_bug_idx + 1 < last_bug_list.size %] + <a href="show_bug.cgi?id= + [%- last_bug_list.last FILTER uri %]&list_id= + [%- my_search.id FILTER uri %]" title="Show last search result"><i class="fas fa-fast-forward"></i></a> [% ELSE %] - <span class="navigation_link">Next</span> + <span class="navigation_link" title="You are at the last search result"><i class="fas fa-fast-forward"></i></span> [% END %] - <a href="buglist.cgi?regetlastlist= - [%- my_search.id FILTER uri %]">Show last search results</a> + <a href="buglist.cgi?regetlastlist= + [%- my_search.id FILTER uri %]" title="Show search results as a list"><i class="fas fa-th-list"></i></a> </div> [% END %] diff --git a/template/en/default/bug/needinfo.html.tmpl b/template/en/default/bug/needinfo.html.tmpl new file mode 100644 index 000000000..84d72e5f5 --- /dev/null +++ b/template/en/default/bug/needinfo.html.tmpl @@ -0,0 +1,234 @@ +[%# 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/. + #%] + +[%## REDHAT EXTENSION START 406451 %] + +[% needinfo_set = 0 %] +[% needinfo_from_list = [] %] +[% needinfo_from_any = 0 %] + +[% FOREACH type = bug.flag_types %] + [% FOREACH flag = type.flags %] + [% IF type.name == 'needinfo'&& flag.status == '?' %] + [% needinfo_set = 1 %] + [% IF flag.requestee.login %] + [% needinfo_from_list.push(flag.requestee.login) %] + [% ELSE %] + [% needinfo_from_any = 1 %] + [% END %] + [% END %] + [% END %] +[% END %] + +[% IF massedit %] + <input type="checkbox" name="needinfo" value="1" id="needinfo"> + <label for="needinfo">Need additional information the selected [% terms.bugs %] from</label> + <select name="needinfo_role" id="needinfo_role" + onchange="needinfo_role_changed(this.value)"> + <option value="other">other</option> + <option value="reporter">reporter</option> + <option value="assigned_to">assignee</option> + [% IF Param('useqacontact') && bug.qa_contact.login != "" %] + <option value="qa_contact">qa contact</option> + [% END %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param('usedocscontact') && bug.docs_contact.login != "" %] + <option value="docs_contact">docs contact</option> + [% END %] + [%## REDHAT EXTENSION END 876015 %] + <option value="">anyone</option> + </select> + <span id="needinfo_from_container"> + <input type="text" id="needinfo_from" + name="needinfo_from" size="20" + maxsize="40" onchange="document.changeform.needinfo.checked=true;"/> + </span> + <span id="needinfo_role_identity"></span> + <br> + <div> + <label for="needinfo_userselect"><b>Or needinfo these users: </b></label> + [% INCLUDE global/userselect.html.tmpl + id => "needinfo_userselect" + name => "needinfo_userselect" + value => "" + size => 30 + classes => ["bz_userfield w100"] + multiple => 5 + field_title => 'A comma separated list of users' + %] + </div> + <br> + <input type="checkbox" id="clear_needinfo" name="clear_needinfo" value="1"/> + <label for="clear_needinfo">I am providing the requested information for these [% terms.bugs %] and should have their needinfo request cleared.</label> + <br> + <br> +[% ELSE %] + [% IF needinfo_set %] + [% IF (lsearch(needinfo_from_list, user.login) == -1 || needinfo_from_list.size > 1) %] + <input type="checkbox" id="clear_needinfo" name="clear_needinfo" value="1"/> + <label for="clear_needinfo">I am providing the requested information for this [% terms.bug %] (Will clear all needinfo requests).</label> + <br> + [% END %] + [% IF (lsearch(needinfo_from_list, user.login) != -1) %] + <input type="checkbox" id="clear_my_needinfo" name="clear_my_needinfo" value="1" /> + <label for="clear_my_needinfo"> + I am providing the information requested of myself (Will clear your needinfo + request). + </label> + <br> + [% END %] + [% END %] + + <br> + <input type="checkbox" name="needinfo" value="1" id="needinfo"> + <label for="needinfo">Need additional information from</label> + <select name="needinfo_role" id="needinfo_role" + onchange="needinfo_role_changed(this.value)"> + <option value="other">other</option> + <option value="reporter">reporter</option> + <option value="assigned_to">assignee</option> + [% IF Param('useqacontact') && bug.qa_contact.login != "" %] + <option value="qa_contact">qa contact</option> + [% END %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param('usedocscontact') && bug.docs_contact.login != "" %] + <option value="docs_contact">docs contact</option> + [% END %] + [%## REDHAT EXTENSION END 876015 %] + <option value="">anyone</option> + </select> + <span id="needinfo_from_container"> + <input type="text" id="needinfo_from" + name="needinfo_from" size="20" + maxsize="40" value="[% needinfo_from FILTER html %]" + onchange="document.changeform.needinfo.checked=true;"/> + </span> + <span id="needinfo_role_identity"></span> +[%# REDHAT EXTENSION START 1772202 %] + <div> + <label for="needinfo_user_roles"><b>Needinfo users from roles: </b></label> + <select name="needinfo_user_roles" id="needinfo_user_roles" multiple="multiple"> +[% IF bug.cc_users %] + <optgroup label="CCs"> + [% FOREACH cc_user IN bug.cc_users %] + <option value="cc_user_[% cc_user.login_name FILTER html %]">[% cc_user.login_name FILTER html %]</option> + [% END %] + </optgroup> +[% END %] +[% IF bug.pool && bug.pool.team.user_can_view%] + <optgroup label="Pool Team - [% bug.pool.team.name FILTER html %]"> + [% FOREACH role_name IN bug.pool.team.by_roles.keys %] + [% FOREACH role_user IN bug.pool.team.by_roles.$role_name %] + <option value="pool_[% role_user.login_name FILTER html %]">[% role_user.login_name FILTER html %] ([% role_name FILTER html %])</option> + [% END %] + [% END %] + </optgroup> +[% END %] +[% IF bug.default_pool_obj && bug.default_pool_obj.team.user_can_view && (!bug.pool || bug.default_pool_obj.id != bug.pool.id) %] + <optgroup label="Default Pool Team - [% bug.default_pool_obj.team.name FILTER html %]"> + [% FOREACH role_name IN bug.default_pool_obj.team.by_roles.keys %] + [% FOREACH role_user IN bug.default_pool_obj.team.by_roles.$role_name %] + <option value="team_[% role_user.login_name FILTER html %]">[% role_user.login_name FILTER html %] ([% role_name FILTER html %])</option> + [% END %] + [% END %] + </optgroup> +[% END %] +[% IF bug.my_team && bug.my_team.user_can_view && (!bug.pool || bug.my_team.id != bug.pool.team.id) %] + <optgroup label="Sub-Team - [% bug.my_team.name FILTER html %]"> + [% FOREACH role_name IN bug.my_team.by_roles.keys %] + [% FOREACH role_user IN bug.my_team.by_roles.$role_name %] + <option value="sub_team_[% role_user.login_name FILTER html %]">[% role_user.login_name FILTER html %] ([% role_name FILTER html %])</option> + [% END %] + [% END %] + </optgroup> +[% END %] + </select> + + </div> +[%# REDHAT EXTENSION END 1772202 %] + <div> + <label for="needinfo_userselect"><b>Needinfo other users: </b></label> + [% INCLUDE global/userselect.html.tmpl + id => "needinfo_userselect" + name => "needinfo_userselect" + value => "" + size => 30 + classes => ["bz_userfield"] + multiple => 5 + field_title => 'A comma separated list of users' + %] + </div> + <br> + <br> +[% END %] + +<script> + +[% IF needinfo_set && (lsearch(needinfo_from_list, user.login) != -1) %] +$('#comment').one( "focus", function() { + $("#clear_my_needinfo").attr('checked', true); +}); +[% END %] + +function escapeHtml(unsafe) { + return unsafe + .replace(/&/g, "&") + .replace(/</g, "<") + .replace(/>/g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +} + +function needinfo_fetch_username(email) { + + $('#needinfo_role')._onAjaxSend(); + var rpc = new Rpc('User', 'get', { names: [email], include_fields: ['email','real_name'] }) + .complete(function(cb){ + $('#needinfo_role')._onAjaxComplete(); + }) + .fail(function(cb){ + $('#needinfo_role_identity').html(escapeHtml(email)); + }) + .done(function(cb){ + var user = cb.users[0]; + var text = escapeHtml(user.real_name) + ' <' + escapeHtml(user.email) + '>'; + $('#needinfo_role_identity').html(text); + }); +} + + + +function needinfo_role_changed(role) { + document.changeform.needinfo.checked=true; + + if (role == 'other') { + $('#needinfo_from_container').removeClass('bz_default_hidden'); + $('#needinfo_from').prop('disabled', false); + $('#needinfo_role_identity').html(''); + } + else { + $('#needinfo_from_container').addClass('bz_default_hidden'); + $('#needinfo_from').prop('disabled', true); + + var identity = ''; + if (role == 'reporter') { + [%# This will be filtered in the RPC stage %] + identity = '[% bug.reporter.email FILTER none %]'; + } + else if (role == 'assigned_to') { + identity = document.getElementById('assigned_to').value; + } + else if (role == 'qa_contact') { + identity = document.getElementById('qa_contact').value; + } + else if (role == 'docs_contact') { + identity = document.getElementById('docs_contact').value; + } + needinfo_fetch_username(identity); + } +} +</script> +[%## REDHAT EXTENSION END 406451 %] + diff --git a/template/en/default/bug/process/midair.html.tmpl b/template/en/default/bug/process/midair.html.tmpl index 17025fee7..771422821 100644 --- a/template/en/default/bug/process/midair.html.tmpl +++ b/template/en/default/bug/process/midair.html.tmpl @@ -89,4 +89,12 @@ You have the following choices: </li> </ul> +[%## REDHAT EXTENSION START 470562 %] +<p> +<strong>CAUTION:</strong> If you simply click back and then reload your page, you will lose whatever changes you made. Please +make sure you copy and paste any changes such as comments, text areas, etc. that you made before reloading the page to aid +in reapplying the changes. +</p> +[%## REDHAT EXTENSION END 470562 %] + [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/bug/process/verify-new-product.html.tmpl b/template/en/default/bug/process/verify-new-product.html.tmpl index c562bf54d..5bb83ccd0 100644 --- a/template/en/default/bug/process/verify-new-product.html.tmpl +++ b/template/en/default/bug/process/verify-new-product.html.tmpl @@ -17,6 +17,17 @@ # verify_bug_groups: If groups need to be confirmed in addition to fields. #%] +[%## REDHAT EXTENSION 653316 %] +[% # We have to do this again (even though we did it in show-header-end.html, + # because it isn't sticky if we called bug/process/results.html or + # bug/create/created first + has_sub_components = 0; + IF (Param('usesubcomponents') && product.has_sub_components); + has_sub_components = 1; + onload = 'show_sub_components();'; + END; +%] + [% PROCESS global/header.html.tmpl title = 'Verify New Product Details...' style_urls = ['skins/standard/buglist.css'] @@ -24,7 +35,7 @@ <form action="process_bug.cgi" method="post"> -[% SET exclude_items = ['version', 'component', 'target_milestone'] %] +[% SET exclude_items = ['version', 'component', 'target_milestone', 'target_release'] %] [% IF verify_bug_groups %] [% exclude_items.push('groups', 'defined_groups') %] [% END %] @@ -34,21 +45,48 @@ exclude = '^' _ exclude_items.join('|') _ '$' %] <input type="hidden" name="confirm_product_change" value="1"> +[%## REDHAT EXTENSION START 1246318 %] +<input type="hidden" name="product_id" value="v[% product.id FILTER none %]_product"> +[%## REDHAT EXTENSION END 1246318 %] -[%# Verify the version, component, and target milestone fields. %] +[%# Verify the version, component, target milestone, and target release fields. %] <h3>Verify Version, Component [%- ", Target Milestone" IF Param("usetargetmilestone") - && bug.check_can_change_field('target_milestone', 0, 1) %]</h3> + && bug.check_can_change_field('target_milestone', 0, 1) %] + [%- ", Target Release" + IF Param("usetargetrelease") + && bug.check_can_change_field('target_release', 0, 1) %] +</h3> <p> [% IF Param("usetargetmilestone") && bug.check_can_change_field('target_milestone', 0, 1) + && Param("usetargetrelease") + && bug.check_can_change_field('target_release', 0, 1) %] You are moving the [% terms.bug %](s) to the product <b>[% product.name FILTER html %]</b>, + and the version, component, and/or target milestone, and/or target release fields are no longer + correct. Please set the correct version, component, target milestone, and target release now: +[% ELSIF Param("usetargetmilestone") + && bug.check_can_change_field('target_milestone', 0, 1) + && not Param("usetargetrelease") + && not bug.check_can_change_field('target_release', 0, 1) +%] + You are moving the [% terms.bug %](s) to the product + <b>[% product.name FILTER html %]</b>, and the version, component, and/or target milestone fields are no longer correct. Please set the correct version, component, and target milestone now: +[% ELSIF Param("usetargetrelease") + && bug.check_can_change_field('target_release', 0, 1) + && not Param("usetargetmilestone") + && not bug.check_can_change_field('target_milestone', 0, 1) +%] + You are moving the [% terms.bug %](s) to the product + <b>[% product.name FILTER html %]</b>, + and the version, component, and/or target release fields are no longer + correct. Please set the correct version, component, and target release now: [% ELSE %] You are moving the [% terms.bug %](s) to the product <b>[% product.name FILTER html %]</b>, @@ -68,6 +106,7 @@ [% END %] [% PROCESS "global/select-menu.html.tmpl" name="version" + multiple=product.multiple_versions options=versions default=default_version size=10 %] @@ -81,10 +120,22 @@ [% END %] [% PROCESS "global/select-menu.html.tmpl" name="component" + multiple=product.multiple_components options=components default=default_component + onchange = (has_sub_components ? 'show_sub_components();' : '') size=10 %] </td> + [% IF has_sub_components %] +[%## REDHAT EXTENSION START 1157849 - populate sub component ids %] + [% PROCESS bug/sub_component.html.tmpl + my_components = product.components + rh_sub_component_ids = bug.rh_sub_component_ids + action = "productchange" + %] +[%## REDHAT EXTENSION END 1157849 %] + [% END %] + [% IF Param("usetargetmilestone") && bug.check_can_change_field('target_milestone', 0, 1) %] @@ -92,11 +143,25 @@ <b>Target Milestone:</b><br> [% PROCESS "global/select-menu.html.tmpl" name="target_milestone" + multiple=0 options=milestones default=defaults.milestone size=10 %] </td> [% END %] + [% IF Param("usetargetrelease") + && bug.check_can_change_field('target_release', 0, 1) + %] + <td> + <b>Target Release:</b><br> + [% PROCESS "global/select-menu.html.tmpl" + name="target_release" + multiple=product.multiple_target_releases + options=releases + default=defaults.release + size=10 %] + </td> + [% END %] [% Hook.process('field') %] </tr> </table> @@ -159,7 +224,8 @@ <th>Group Name</th> </tr> - [% FOREACH group = optional_groups %] + [%## REDHAT EXTENSION 881990: Change sorting %] + [% FOREACH group = optional_groups.sort('description', 'name') %] <tr> <td class="center"> <input type="checkbox" name="defined_groups" @@ -182,7 +248,8 @@ [% END %] </table> [% ELSE %] - [% FOREACH group = optional_groups %] + [%## REDHAT EXTENSION 881990: Change sorting %] + [% FOREACH group = optional_groups.sort('description', 'name') %] <input type="hidden" name="defined_groups" value="[% group.group.name FILTER html %]"> <input type="checkbox" id="group_[% group.group.id FILTER html %]" @@ -197,6 +264,7 @@ <br> [% END %] [% END %] + [%## REDHAT EXTENSION END 819709 %] </p> [% END %] diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl index 583708492..c116fe2e8 100644 --- a/template/en/default/bug/show-header.html.tmpl +++ b/template/en/default/bug/show-header.html.tmpl @@ -17,7 +17,7 @@ [% filtered_desc = bug.short_desc FILTER html %] [% filtered_timestamp = bug.delta_ts FILTER time %] -[% subheader = filtered_desc %] +[%# subheader = filtered_desc %] [% title = "$bug.bug_id – " %] [% IF bug.alias.size %] [% title = title _ "($filtered_alias) " %] @@ -30,9 +30,12 @@ [% javascript_urls.push("js/bug.js") IF user.id %] [% javascript_urls.push('js/comment-tagging.js') IF user.id && Param('comment_taggers_group') %] +[% javascript_urls.push("js/comments.js") IF user.id %] +[% javascript_urls.push('js/flag.js') + IF user.id && (!bug || bug.check_can_change_field('flagtypes.name', 0, 1)) %] [% IF bug.defined %] [% header = "$terms.Bug $bug.bug_id" %] - [% header_addl_info = "Last modified: $filtered_timestamp" %] + [%# header_addl_info = "Last modified: $filtered_timestamp" %] [% unfiltered_title = "$bug.bug_id – " %] [% IF bug.alias.size %] [% unfiltered_title = unfiltered_title _ "(" _ bug.alias.join(', ') _ ") " %] diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index 8babdf04a..041df71e6 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -78,6 +78,11 @@ [% IF Param('useqacontact') %] [% rightcells.push('qa_contact') %] [% END %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param('usedocscontact') %] + [% rightcells.push('docs_contact') %] + [% END %] + [%## REDHAT EXTENSION END 876015 %] [% rightcells.push('') %] [% IF bug.cc.size %] [% rightcells.push('cc') %] @@ -108,7 +113,18 @@ [% PROCESS rightcell %] </tr> - [% PROCESS row cell = "component" %] + [%## REDHAT EXTENSION START 972971 %] + [% PROCESS row_special cell = "component" field="all_components" %] + [%## REDHAT EXTENSION END 972971 %] + + [% FOREACH sub_comp IN bug.rh_sub_component_objs %] + <tr> + <th>[% sub_comp.component.name FILTER html %] sub component:</th> + <td>[% sub_comp.name FILTER html %]</td> + + [% PROCESS rightcell %] + </tr> + [% END %] <tr> <th>[% field_descs.bug_status FILTER html %]:</th> @@ -138,8 +154,14 @@ [% PROCESS rightcell %] </tr> - [% PROCESS row cell = "version" %] + [%## REDHAT EXTENSION START 972971 %] + [% PROCESS row_special cell = "version" field="all_versions" %] + [%## REDHAT EXTENSION END 972971 %] [% PROCESS row cell = "target_milestone" IF Param('usetargetmilestone') %] + [%## REDHAT EXTENSION START 972971 %] + [% PROCESS row_special cell = "target_release" field = "target_release" + IF Param('usetargetrelease') %] + [%## REDHAT EXTENSION END 972971 %] [% PROCESS row cell = "rep_platform" %] [% PROCESS row cell = "op_sys" %] @@ -173,8 +195,14 @@ [% PROCESS row cell = "status_whiteboard" fullrow = 1 %] [% END %] + [% USE Bugzilla %] [% field_counter = 0 %] [% FOREACH field = Bugzilla.active_custom_fields %] + [%## REDHAT EXTENSION START 972971 %] + [% NEXT IF field.name == 'cf_extra_component' %] + [% NEXT IF field.name == 'cf_extra_version' %] + [% NEXT IF field.name == 'cf_pgm_internal' %] + [%## REDHAT EXTENSION END 972971 %] [% field_counter = field_counter + 1 %] [%# Odd-numbered fields get an opening <tr> %] [% '<tr>' IF field_counter % 2 %] @@ -311,6 +339,16 @@ [% fullrow = 0 %] [% END %] +[%## REDHAT EXTENSION START 972971 %] +[% BLOCK row_special %] + <tr> + <th>[% field_descs.${cell} FILTER html %]:</th> + <td[% " colspan=3" IF fullrow %]>[% display_value(cell, bug.${field}. join(', ')) FILTER html %]</td> + [% PROCESS rightcell IF !fullrow %] + </tr> + [% fullrow = 0 %] +[% END %] +[%## REDHAT EXTENSION END 972971 %] [%############################################################################%] [%# Block for dependencies #%] @@ -342,8 +380,9 @@ [% FOREACH c = bug.cc %] [% c FILTER email FILTER html %][% ", " IF not loop.last() %] [% END %] + [%## REDHAT EXTENSION 876015: Add docs contact %] [% ELSIF name == "reporter" || name == "assigned_to" - || name == "qa_contact" %] + || name == "qa_contact" || name == "docs_contact" %] <th class="rightcell">[% field_descs.${name} FILTER html %]:</th> <td>[% bug.${name}.identity FILTER email FILTER html %]</td> [% ELSIF name == "flags" %] diff --git a/template/en/default/bug/show.html.tmpl b/template/en/default/bug/show.html.tmpl index b8905119b..f034cd1db 100644 --- a/template/en/default/bug/show.html.tmpl +++ b/template/en/default/bug/show.html.tmpl @@ -10,6 +10,7 @@ [% bug = bugs.0 %] [% IF !header_done %] + [% needinfo_header = needinfo_status == "?" ? "[NEEDINFO]" : "" %] [% PROCESS "bug/show-header.html.tmpl" %] [% PROCESS global/header.html.tmpl %] [% END %] diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl index 1d376f874..8ee8a5ef2 100644 --- a/template/en/default/bug/show.xml.tmpl +++ b/template/en/default/bug/show.xml.tmpl @@ -111,8 +111,25 @@ # nicer once we have custfields, and a type attribute for the fields #%] [% name = '' %] - [% IF field == 'reporter' OR field == 'assigned_to' OR - field == 'qa_contact' %] + [% IF field == 'cf_extra_component' || field == 'cf_extra_version' || field == 'external_choices' %] + [%# We do not show these values %] + [% NEXT %] + [% ELSIF field == 'version' %] + [% FOREACH version = bug.all_versions %] + <[% field %]>[% version FILTER xml %]</[% field %]> + [% END %] + [% NEXT %] + [% ELSIF field == 'component' %] + [% FOREACH component = bug.all_components %] + <[% field %]>[% component FILTER xml %]</[% field %]> + [% END %] + [% NEXT %] + [% ELSIF field == 'external_bugs' %] + [% name = val.type.description %] + [% val = val.ext_bz_bug_id %] + [%## REDHAT EXTENSION 876015: Add docs contact %] + [% ELSIF field == 'reporter' OR field == 'assigned_to' OR + field == 'qa_contact' OR field == 'docs_contact' %] [% name = val.name %] [% val = val.email FILTER email %] [% ELSIF field == 'cc' %] @@ -121,7 +138,18 @@ [% val = val FILTER time("%Y-%m-%d %T %z") %] [% ELSIF field == "see_also" %] [% val = val.name %] + [%## REDHAT EXTENSION START 1090393 %] + [% ELSIF field == 'rh_sub_components' %] + [% FOREACH sub_comp = bug.rh_sub_component_objs %] + <sub_component name="[% sub_comp.component.name FILTER xml %]"> + [% FOREACH i = sub_comp.name_tree %] + <item>[% i FILTER xml %]</item> + [% END %] + </sub_component> + [% END %] + [% NEXT %] [% END %] + [%## REDHAT EXTENSION END 1090393 %] <[% field %][% IF name != '' %] name="[% name FILTER xml %]"[% END -%]> [%- val FILTER xml %]</[% field %]> [% END %] diff --git a/template/en/default/config.js.tmpl b/template/en/default/config.js.tmpl index 0399f8b28..dbdf34867 100644 --- a/template/en/default/config.js.tmpl +++ b/template/en/default/config.js.tmpl @@ -52,6 +52,18 @@ var platform = [ [% FOREACH x = platform %]'[% x FILTER js %]', [% END %] ] var severity = [ [% FOREACH x = severity %]'[% x FILTER js %]', [% END %] ]; +// Priorities +// ========== + +var priority = [ [% FOREACH x = priority %]'[% x FILTER js %]', [% END %] ]; + + +// Operating Systems +// ================= + +var op_sys = [ [% FOREACH x = op_sys %]'[% x FILTER js %]', [% END %] ]; + + // Custom Fields // ============= diff --git a/template/en/default/email/bugmail-common.txt.tmpl b/template/en/default/email/bugmail-common.txt.tmpl index 5d353598e..bfa700f16 100644 --- a/template/en/default/email/bugmail-common.txt.tmpl +++ b/template/en/default/email/bugmail-common.txt.tmpl @@ -22,4 +22,14 @@ [% IF change.field_name == 'longdescs.isprivate' %] [% field_label = field_label.replace('^(Comment )?', "Comment #${change.num} ") %] [% END %] - + +[% ## REDHAT EXTENSION BEGIN 823320 %] +[% IF isnew %] + [% IF change.field_name == 'version' %] + [% new_value = bug.all_versions.join(', ') %] + [% END %] + [% IF change.field_name == 'component' %] + [% new_value = bug.all_components.join(', ') %] + [% END %] +[% END %] +[% ## REDHAT EXTENSION END 823320 %] diff --git a/template/en/default/email/bugmail-header.txt.tmpl b/template/en/default/email/bugmail-header.txt.tmpl index 286c70bcd..63e22ece2 100644 --- a/template/en/default/email/bugmail-header.txt.tmpl +++ b/template/en/default/email/bugmail-header.txt.tmpl @@ -5,19 +5,43 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. #%] - +[%## REDHAT EXTENSION 1267048 %] +[%- UNLESS only_Xs -%] [% PROCESS "global/reason-descs.none.tmpl" %] [% isnew = bug.lastdiffed ? 0 : 1 %] [% show_new = isnew && (to_user.settings.bugmail_new_prefix.value == 'on') %] +[% END %] +[%## REDHAT EXTENSION START 1158769 %] +[% + types = []; + types.push(isnew ? 'new' : 'changed'); + FOREACH change = diffs; + IF change.blocker && !isnew; + types.push('dependency'); + LAST; + END; + END; +%] +[%## REDHAT EXTENSION END 1158769 %] +[%- UNLESS only_Xs -%] From: [% Param('mailfrom') %] To: [% to_user.email %] -Subject: [[% terms.Bug %] [%+ bug.id %]] [% 'New: ' IF show_new %][%+ bug.short_desc %] +Subject: [[% terms.Bug %] [%+ bug.id %]][% IF to_user.settings.product_in_subject.value == 'on' %] ([%bug.product %])[% END %] [%+ 'New: ' IF show_new %][%+ bug.short_desc %] Date: [% date %] +Precedence: bulk +Auto-Submitted: auto-generated +[%- END %] X-Bugzilla-Reason: [% reasonsheader %] -X-Bugzilla-Type: [% bugmailtype %] +X-Loop: [% Param('mailfrom') %] +X-BeenThere: [% Param('mailfrom') %] +[% ## REDHAT EXTENSION START 1158769 %] +X-Bugzilla-Type: [% types.join(" ") %] +[% ## REDHAT EXTENSION END 1158769 %] X-Bugzilla-Watch-Reason: [% reasonswatchheader %] [%+ INCLUDE "email/header-common.txt.tmpl" %] X-Bugzilla-Changed-Fields: [% changedfields.join(" ") %] +[% UNLESS only_Xs %] [%+ threadingmarker %] +[% END %] diff --git a/template/en/default/email/bugmail.html.tmpl b/template/en/default/email/bugmail.html.tmpl index fd348a656..8076142a5 100644 --- a/template/en/default/email/bugmail.html.tmpl +++ b/template/en/default/email/bugmail.html.tmpl @@ -16,6 +16,18 @@ <body> [% Hook.process('start') %] [% PROCESS generate_diffs %] + [%## REDHAT EXTENSION START 908343 1000542 1124872 %] + [% IF new_doc_text %] + <p> + <div> + --- Doc Text *updated*[% IF new_doc_text.who.id != last_changer %] by [% INCLUDE global/user.html.tmpl who = new_doc_text.who %][% END %] --- + + <pre>[% new_doc_text.new FILTER quoteUrls(bug, comment, to_user) FILTER html %]</pre> + </div> + </p> + [% END %] + [%## REDHAT EXTENSION END 908343 1000542 1124872 %] + <p> [% FOREACH comment = new_comments.reverse %] <div> @@ -69,6 +81,12 @@ [% SET in_table = 0 %] [% last_changer = 0 %] [% FOREACH change = diffs %] + [%## REDHAT EXTENSION START 1000542 1124872 %] + [% IF change.field_name == 'cf_release_notes' %] + [% new_doc_text = change %] + [% NEXT %] + [% END %] + [%## REDHAT EXTENSION END 1000542 1124872 %] [% IF !isnew && change.who.id != last_changer %] [% last_changer = change.who.id %] [% IF in_table == 1 %] diff --git a/template/en/default/email/bugmail.txt.tmpl b/template/en/default/email/bugmail.txt.tmpl index 1f04db7b1..f528f6513 100644 --- a/template/en/default/email/bugmail.txt.tmpl +++ b/template/en/default/email/bugmail.txt.tmpl @@ -14,6 +14,15 @@ [%+ PROCESS generate_diffs -%] +[%## REDHAT EXTENSION START 908343 1000542 1124872 %] +[%- IF new_doc_text %] + +--- Doc Text *updated*[% IF new_doc_text.who.id != last_changer %] by [% new_doc_text.who.identity %][% END %] --- + +[% new_doc_text.new %] +[% END -%] +[%## REDHAT EXTENSION END 908343 1000542 1124872 %] + [% FOREACH comment = new_comments %] [%- IF comment.count %] @@ -22,6 +31,12 @@ [%+ comment.body_full({ is_bugmail => 1, wrap => 1 }) FILTER strip_control_chars %] [% END %] +[%- IF edited_comment %] +--- Comment #[% edited_comment.count %] has been edited --- + +[%+ edited_comment.body_full({ is_bugmail => 1, wrap => 1 }) FILTER strip_control_chars %] +[% END %] + [% IF referenced_bugs.size %] Referenced [% terms.Bugs %]: @@ -50,6 +65,10 @@ You are receiving this mail because: [%+ +%] [% END %] [% FOREACH change = diffs %] + [%~## REDHAT EXTENSION START 1000542 1124872 %][% IF change.field_name == 'cf_release_notes' %] + [% new_doc_text = change %] + [% NEXT %] + [% END %][%## REDHAT EXTENSION END 1000542 1124872 ~%] [% IF !isnew && change.who.id != last_changer %] [% last_changer = change.who.id %] [% IF change.blocker %] diff --git a/template/en/default/email/flagmail.txt.tmpl b/template/en/default/email/flagmail.txt.tmpl index cf64d9661..bba341699 100644 --- a/template/en/default/email/flagmail.txt.tmpl +++ b/template/en/default/email/flagmail.txt.tmpl @@ -40,12 +40,24 @@ Subject: [% flagtype_name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug [Attachment [% attachment.id %]] [% attachment.description FILTER clean_text %][% END %] Date: [% date %] X-Bugzilla-Type: request +Precedence: bulk +Content-Transfer-Encoding: 7bit +Auto-Submitted: auto-generated +X-Bugzilla-Reason: [% flag.type.name %] [%+ subject_status %] +X-Loop: [% Param('mailfrom') %] +X-BeenThere: [% Param('mailfrom') %] [%+ INCLUDE "email/header-common.txt.tmpl" %] [%+ threadingmarker %] [%+ USE wrap -%] [%- FILTER bullet = wrap(80) -%] +[%## REDHAT EXTENSION START 457804 877251 %] +Product: [% bug.product FILTER html %] +Version: [% bug.all_versions.join(', ') FILTER html %] +Component: [% bug.all_components.join(', ') FILTER html %] +[%## REDHAT EXTENSION END 457804 877251 %] + [% IF on_behalf_of %] [% user.identity %] has reassigned [% flag.setter.identity %]'s request for [% IF requestee_identity %] [%+ requestee_identity %] [% END %] [% flagtype_name %] [% to_identity %]: diff --git a/template/en/default/email/header-common.txt.tmpl b/template/en/default/email/header-common.txt.tmpl index 02bd38e13..f2dacebfe 100644 --- a/template/en/default/email/header-common.txt.tmpl +++ b/template/en/default/email/header-common.txt.tmpl @@ -9,8 +9,6 @@ X-Bugzilla-Classification: [% bug.classification %] [% END %] X-Bugzilla-Product: [% bug.product %] -X-Bugzilla-Component: [% bug.component %] -X-Bugzilla-Version: [% bug.version %] X-Bugzilla-Keywords: [% bug.keywords %] X-Bugzilla-Severity: [% bug.bug_severity %] X-Bugzilla-Who: [% changer.login %] @@ -18,7 +16,29 @@ X-Bugzilla-Status: [% bug.bug_status %] X-Bugzilla-Resolution: [% bug.resolution %] X-Bugzilla-Priority: [% bug.priority %] X-Bugzilla-Assigned-To: [% bug.assigned_to.login %] +X-Bugzilla-QAContact: [% bug.qa_contact.login %] [% IF Param('usetargetmilestone') %] X-Bugzilla-Target-Milestone: [% bug.target_milestone %] [% END %] -X-Bugzilla-Flags:[% FOREACH flag = bug.flags %] [%+ flag.name %][% flag.status %][% END %] +[% ## REDHAT EXTENSION BEGIN 823320 1119581 %] +X-Bugzilla-Component: [% bug.all_components.join(', ') %] +X-Bugzilla-Sub-Component: [% bug.rh_sub_components.join(', ') %] +X-Bugzilla-Version: [% bug.all_versions.join(', ') %] +[% ## REDHAT EXTENSION END 823320 1119581 %] +[% ## REDHAT EXTENSION BEGIN 823262 %] +X-Bugzilla-Comment: [% comment_change %] +[% ## REDHAT EXTENSION END 823262 %] +[% ## REDHAT EXTENSION BEGIN 823548 %] +X-Bugzilla-Reporter: [% bug.reporter.login %] +[% IF heading_flags %] +X-Bugzilla-Flags: [% heading_flags %] +[% END %] +[% ## REDHAT EXTENSION END 823548 %] +[% IF bug.cf_partner.size > 0 %] +X-Bugzilla-Partner: [% bug.cf_partner.join(" ") %] +[% END %] +[% ## REDHAT EXTENSION BEGIN 1626576 %] +[% IF to_user.can_view_cf('cf_internal_target_release') && bug.can_have_cf('cf_internal_target_release') %] +X-Bugzilla-CF-Internal-Target-Release: [% bug.cf_internal_target_release %] +[% END %] +[% ## REDHAT EXTENSION END 1626576 %] diff --git a/template/en/default/email/lockout.txt.tmpl b/template/en/default/email/lockout.txt.tmpl index 51153ea45..4e7553b0c 100644 --- a/template/en/default/email/lockout.txt.tmpl +++ b/template/en/default/email/lockout.txt.tmpl @@ -7,7 +7,7 @@ #%] From: [% Param('mailfrom') %] -To: [% Param('maintainer') %] +To: [% Param('mail_errors_to') %] Subject: [[% terms.Bugzilla %]] Account Lock-Out: [% locked_user.login %] ([% address %]) X-Bugzilla-Type: admin diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 6adbbcb95..382984a48 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -59,7 +59,6 @@ 'column_headers.$group_field', 'column_headers.$column', 'request.status', - 'request.bug_id', 'request.attach_id', ], @@ -217,7 +216,6 @@ 'bug.remaining_time', 'bug.delta_ts', 'bug.bug_id', - 'group.bit', 'selname', 'inputname', '" colspan=\"$colspan\"" IF colspan', @@ -241,6 +239,12 @@ 'field', ], +## REDHAT EXTENSION START 458703 +'bug/dependency-tree.xml.tmpl' => [ + 'constants.BUGZILLA_VERSION', +], +## REDHAT EXTENSION START 458703 + 'bug/summarize-time.html.tmpl' => [ 'global.grand_total FILTER format("%.2f")', 'subtotal FILTER format("%.2f")', @@ -342,6 +346,7 @@ 'constants.FIELD_TYPE_SINGLE_SELECT', 'constants.FIELD_TYPE_MULTI_SELECT', 'constants.FIELD_TYPE_BUG_ID', + 'constants.FIELD_TYPE_ONE_SELECT', ], 'admin/params/common.html.tmpl' => [ diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl index 778c3e142..6a521f273 100644 --- a/template/en/default/flag/list.html.tmpl +++ b/template/en/default/flag/list.html.tmpl @@ -18,8 +18,6 @@ [% DEFAULT flag_table_id = "flags" %] -<script src="[% 'js/flag.js' FILTER mtime %]" type="text/javascript"></script> - <table id="[% flag_table_id FILTER html %]"> [% UNLESS flag_no_header %] <tr> @@ -82,7 +80,10 @@ [% ELSE %] [% flag.setter.nick FILTER html %]: [% END %] - <span class="nowrap">[%+ type.name FILTER html %][% flag.status %]</span> + [%## REDHAT EXTENSION 963946: Show private colors %] + [% IF type.view_group_id %]<span class="bz_private_field_value">[% END %] + [%+ type.name FILTER html %][% flag.status %] + [% IF type.view_group_id %]</span>[% END %] [% IF flag.requestee %] [% IF flag.requestee.name %] (<span title="[% flag.requestee.name FILTER html %]">[% flag.requestee.nick FILTER html %]</span>) @@ -97,9 +98,22 @@ [%# Display a table row for flags %] [% BLOCK flag_row %] + [% RETURN IF !flag && type.name.match('^approvals_request_') %] [% RETURN IF !flag && !((type.is_requestable && user.can_request_flag(type)) || user.can_set_flag(type)) %] [% SET fid = flag ? "flag-$flag.id" : "flag_type-$type.id" %] - [% can_edit_flag = (!read_only_flags || (flag && (flag.setter_id == user.id || (flag.requestee_id && flag.requestee_id == user.id)))) ? 1 : 0 %] + [% can_edit_flag = ( + !read_only_flags && ( + ( + flag && + ( + flag.setter_id == user.id || + (flag.requestee_id && flag.requestee_id == user.id) || + flag.user_can_edit(user) + ) + ) || + (!flag && type.user_can_edit(user, bug)) + ) + ) ? 1 : 0 %] <tbody[% ' class="bz_flag_type"' IF !flag %]> <tr> <td> @@ -109,16 +123,17 @@ [% addl_text FILTER html %] [% END %] </td> - <td class="nowrap"> + <td class="nowrap[% IF type.view_group_id %] bz_private_field_value[% END %]"> <label title="[% type.description FILTER html %]" for="[% fid FILTER html %]"> [%- type.name FILTER html %]</label> </td> <td> <input type="hidden" id="[% fid FILTER html %]_dirty"> <select id="[% fid FILTER html %]" name="[% fid FILTER html %]" + autocomplete="off" title="[% type.description FILTER html %]" onchange="toggleRequesteeField(this);" - class="flag_select flag_type-[% type.id %]" + class="flag_select flag_type-[% type.id %][% IF type.view_group_id %] bz_private_data[% END %]" [% IF !can_edit_flag %] disabled="disabled"[% END %]> [%# Only display statuses the user is allowed to set. %] [% IF edit_multiple_bugs && dontchange %] @@ -186,6 +201,12 @@ [% END %] </td> [% END %] + [% IF type.category == 'release' %] + <td> + <a href="page.cgi?id=releases%2Fack_view.html&page=extended-view&show=[% type.name FILTER uri %]&show_inactive=1&mode=0&user_type=assigned_to&s-resolved-type=ON_QA&s-resolved-type=VERIFIED&s-resolved-type=RELEASE_PENDING&s-resolved-type=CLOSED" title="View status of this release in AckView"><i class="fas fa-clipboard-check"></i></a> + <a href="page.cgi?id=releases/ack_list.html&update=[% type.name FILTER uri %]&list=ACK&mode=0&user_type=assigned_to&view-version=3&s-resolved-type=ON_QA&s-resolved-type=VERIFIED&s-resolved-type=RELEASE_PENDING&s-resolved-type=CLOSED" title="View report of this release in AckList"><i class="fas fa-clipboard-list"></i></a> + </td> + [% END %] </tr> </tbody> [% END %] diff --git a/template/en/default/global/banner.html.tmpl b/template/en/default/global/banner.html.tmpl index 37ec8c09a..ca9cbfa3c 100644 --- a/template/en/default/global/banner.html.tmpl +++ b/template/en/default/global/banner.html.tmpl @@ -9,4 +9,47 @@ [%# Migration note: this file corresponds to the old Param 'bannerhtml' %] <div id="banner"> + [% IF user.login %] + <ul class="links"> + <li class="submenu"> + <a href="#"><i class="fa fa-user"></i> + [% IF sudoer %] + [%+ sudoer.login FILTER html %] (<b>impersonating [%+ user.login FILTER html %]</b> + <a href="relogin.cgi?action=end-sudo">end session</a>) + [% ELSE %] + [% IF user.name %][%+ user.name FILTER html %][% ELSE %][%+ user.login FILTER html %][% END %] + [% END %] + </a> + <div> + <ul> + <li><a href="userprefs.cgi">Preferences</a></li> + [% IF user.authorizer.can_logout %] + <li> + <a href="index.cgi?logout=1">Log out</a> + </li> + [% END %] + </ul> + </div> + </li> + [% ELSE %] + <ul id="loginin_launcher"><a href="#" onclick="$('#loginin_launcher').addClass('bz_default_hidden');$('#login_container').removeClass('bz_default_hidden');"><i class="fa fa-user" aria-hidden="true"></i> Login</a></ul> + <ul id="login_container" class="bz_default_hidden"> + <a href="#" id="hide_mini_login[% qs_suffix FILTER none %]" onclick="$('#login_container').addClass('bz_default_hidden');$('#loginin_launcher').removeClass('bz_default_hidden');">[x]</a> + [%# Only display one login form when we're on a LOGIN_REQUIRED page. That + # way, we're guaranteed that the user will use the form that has + # hidden_fields in it (the center form) instead of this one. Also, it's + # less confusing to have one form (as opposed to three) when you're + # required to log in. + #%] + [%# IF user.authorizer.can_login && !Bugzilla.page_requires_login %] + [% PROCESS "account/auth/login-small.html.tmpl" %] + [%# END %] + [% IF 0 && Param('createemailregexp') + && user.authorizer.user_can_create_account %] + <li id="new_account_container[% qs_suffix FILTER html %]"> + <a href="createaccount.cgi"><i class="fa fa-user-plus" aria-hidden="true"></i> New Account</a> + </li> + [% END %] + [% END %] + </ul> </div> diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index 830a7e7f6..2f75b9ed0 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -104,6 +104,10 @@ [% ELSIF error == "comment_type_invalid" %] '[% type FILTER html %]' is not a valid comment type. + [% ELSIF error == "db_error" %] + An error occurred while performing a database operation: + <pre>[% err_message FILTER html %]</pre> + [% ELSIF error == "db_rename_conflict" %] Name conflict: Cannot rename [% old FILTER html %] to [%+ new FILTER html %] because [% new FILTER html %] already exists. @@ -221,6 +225,7 @@ [% ELSIF error == "invalid_field_name" %] [% title = "Invalid Field Name" %] Can't use "[% field.truncate(30, "...") FILTER html %]" as a field name. + Either the field does not exist or you do not have access to it [% ELSIF error == "jobqueue_insert_failed" %] [% title = "Job Queue Failure" %] @@ -283,6 +288,11 @@ [% title = "Invalid Parameter" %] Invalid parameter <code>[% param FILTER html %]</code> passed to <code>[% function FILTER html %]</code>: It must be numeric. + [% IF the_id %] + <p> + The ID passed was '[% the_id FILTER html %]'. + </p> + [% END %] [% ELSIF error == "param_required" %] [% title = "Missing Parameter" %] diff --git a/template/en/default/global/confirm-user-match.html.tmpl b/template/en/default/global/confirm-user-match.html.tmpl index 613f097e1..01c97987d 100644 --- a/template/en/default/global/confirm-user-match.html.tmpl +++ b/template/en/default/global/confirm-user-match.html.tmpl @@ -24,6 +24,7 @@ [%# This lists fields which use the user auto-completion feature and which # are not listed in field_descs. %] +[%## REDHAT EXTENSION 876015: Add initialdocscontact %] [% field_labels = { # Used by editcomponents.cgi "initialcc" => "Default CC List", "initialowner" => "Default Assignee", @@ -71,6 +72,10 @@ <p> Bugzilla was unable to make any match at all for one or more of the names and/or email addresses you entered on the previous page. + [%## REDHAT EXTENSION START 502807 %] + Please go back and try other names or email addresses. + These need to correspond to actual accounts already registered in [% terms.Bugzilla %]. + [%## REDHAT EXTENSION END 502807 %] [% IF !user.id %] <b>Note: You are currently logged out. Only exact matches against e-mail addresses will be performed.</b> diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl index f4e17c3f8..84efcd9b8 100644 --- a/template/en/default/global/field-descs.none.tmpl +++ b/template/en/default/global/field-descs.none.tmpl @@ -43,6 +43,7 @@ ${constants.FIELD_TYPE_FREETEXT} => "Free Text", ${constants.FIELD_TYPE_INTEGER} => "Integer", ${constants.FIELD_TYPE_SINGLE_SELECT} => "Drop Down", + ${constants.FIELD_TYPE_ONE_SELECT} => "External Drop Down" ${constants.FIELD_TYPE_MULTI_SELECT} => "Multiple-Selection Box", ${constants.FIELD_TYPE_TEXTAREA} => "Large Text Box", ${constants.FIELD_TYPE_DATETIME} => "Date/Time", @@ -50,6 +51,15 @@ ${constants.FIELD_TYPE_BUG_ID} => "$terms.Bug ID", } %] +[%## REDHAT EXTENSION BEGIN 587798 %] +[% MACRO display_value_array(field_name, value_name) BLOCK %][% FILTER trim %] + [% IF value_descs.${field_name}.${value_name}.defined %] + [% value_descs.${field_name}.${value_name}.join(', ') FILTER none %] + [% ELSE %] + [% value_name.join(', ') FILTER none %] + [% END %] +[% END %][% END %] +[%## REDHAT EXTENSION END 587798 %] [% IF in_template_var %] [% PROCESS "global/value-descs.none.tmpl" %] [% SET vars.value_descs = value_descs %] diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index bd40fff88..656df00f6 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -82,6 +82,36 @@ <!DOCTYPE html> <html lang="en"> <head> + [% IF Param('utf8') %] + <meta charset="UTF-8"> + [% END %] + + <meta name="referrer" content="origin"> + + [%- js_BUGZILLA = { + param => { + maxattachmentsize => Param('maxattachmentsize'), + maxusermatches => Param('maxusermatches'), + splinter_base => Param('splinter_base'), + }, + constant => { + COMMENT_COLS => constants.COMMENT_COLS, + }, + string => { + # Please keep these in alphabetical order. + attach_desc_required => + 'You must enter a Description for this attachment.', + component_required => + "You must select a Component for this $terms.bug", + description_required => + "You must enter a Description for this $terms.bug", + short_desc_required => + "You must enter a Summary for this $terms.bug", + version_required => + "You must select a Version for this $terms.bug" + } + }; + %] [% Hook.process("start") %] <title>[% title %]</title> @@ -160,7 +190,8 @@ var BUGZILLA = { param: { cookiepath: '[% Param('cookiepath') FILTER js %]', - maxusermatches: [% Param('maxusermatches') FILTER js %] + maxusermatches: [% Param('maxusermatches') FILTER js %], + maxattachmentsize: [% Param('maxattachmentsize') FILTER js %] }, constant: { COMMENT_COLS: [% constants.COMMENT_COLS FILTER js %] @@ -215,6 +246,7 @@ <body [% IF onload %] onload="[% onload %]"[% END %] class="[% urlbase.replace('^https?://','').replace('/$','').replace('[-~@:/.]+','-') FILTER css_class_quote %] + [% IF user.settings.status_colours.value != 'off' %] status_colours_[%user.settings.status_colours.value FILTER css_class_quote%] [% END %] [% FOREACH class = bodyclasses %] [%+ class FILTER css_class_quote %] [% END %] yui-skin-sam"> @@ -271,6 +303,10 @@ <link href="[% asset_url FILTER html %]" rel="stylesheet" type="text/css"> [% END %] +<noscript> + <div id="no-js-message">This site requires JavaScript to be enabled to function correctly, please enable it.</div> +</noscript> + [% BLOCK format_js_link %] <script type="text/javascript" src="[% asset_url FILTER mtime FILTER html %]"></script> [% END %] diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index bc8fe5b38..5590772f4 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -10,8 +10,20 @@ # alphabetical order by message tag, and leave a blank line between messages. #%] -[% message_tag = message %] +[% IF message.0 %] + [% foo = message %] + [% bar = '' %] + [% FOREACH mess = foo %] + [% PROCESS messages message_tag = mess.0, message = '', args = mess.1 %] + [% bar = bar _ message %] + [% UNLESS loop.last %][% bar = bar _ '<p>' %][% END %] + [% END %] + [% message = bar %] +[% ELSE %] + [% PROCESS messages message_tag = message, message = '' %] +[% END %] +[% BLOCK messages %] [% message = BLOCK %] [% IF message_tag == "account_created" %] The user account [% otheruser.login FILTER html %] has been created @@ -98,6 +110,16 @@ Please add your attachment by clicking the "Add an Attachment" link below. + [% ELSIF message_tag == "bad_referer" %] + [% title = "Insecure request detected" %] + <div class="confirmation"> + [% terms.Bugzilla %] detected a possibly insecure request, and as a result + omitted private bugs in the search result below. + <a class="blink" href="[% Bugzilla.cgi.url('-relative' => 1, '-path' => 1, '-query' => 1) FILTER none %]">Click here for unfiltered results</a>. + To avoid this filter upgrade to a browser that supports SameSite cookies + and then relogin. e.g. Firefox >= 61 or Chrome >= 68. + </div> + [% ELSIF message_tag == "bug_group_description" %] Access to [% terms.bugs %] in the [% product.name FILTER html %] product @@ -349,8 +371,8 @@ [% IF users.size %] Explicit membership to the <em>[% group FILTER html %]</em> group removed [% IF regexp %] for users matching '[% regexp FILTER html %]'[% END %]: - [% FOREACH user = users %] - [%+ user.login FILTER html %] + [% FOREACH luser = users %] + [%+ luser.login FILTER html %] [% END %] [% ELSE %] No users are being affected by your action. @@ -377,44 +399,48 @@ [% END %] [% CASE 'icon_url' %] <li>The group icon URL has been updated.</li> - [% CASE 'members_add' %] +[%## REDHAT EXTENSION BEGIN 751352 %] + [% CASE 'category' %] + <li>The category was changed to '[% changes.category.1 FILTER html %]'</li> +[%## REDHAT EXTENSION END 751352 %] + [% CASE 'members' %] <li>The following groups are now members of this group: - [%+ changes.members_add.join(', ') FILTER html %]</li> + [%+ changes.members.join(', ') FILTER html %]</li> [% CASE 'members_remove' %] <li>The following groups are no longer members of this group: [%+ changes.members_remove.join(', ') FILTER html %]</li> - [% CASE 'member_of_add' %] + [% CASE 'member_of' %] <li>This group is now a member of the following groups: - [%+ changes.member_of_add.join(', ') FILTER html %]</li> + [%+ changes.member_of.join(', ') FILTER html %]</li> [% CASE 'member_of_remove' %] <li>This group is no longer a member of the following groups: [%+ changes.member_of_remove.join(', ') FILTER html %]</li> - [% CASE 'bless_from_add' %] + [% CASE 'bless_from' %] <li>The following groups may now add users to this group: - [%+ changes.bless_from_add.join(', ') FILTER html %]</li> + [%+ changes.bless_from.join(', ') FILTER html %]</li> [% CASE 'bless_from_remove' %] <li>The following groups may no longer add users to this group: [%+ changes.bless_from_remove.join(', ') FILTER html %]</li> - [% CASE 'bless_to_add' %] + [% CASE 'bless_to' %] <li>This group may now add users to the following groups: - [%+ changes.bless_to_add.join(', ') FILTER html %]</li> + [%+ changes.bless_to.join(', ') FILTER html %]</li> [% CASE 'bless_to_remove' %] <li>This group may no longer add users to the following groups: [%+ changes.bless_to_remove.join(', ') FILTER html %]</li> - [% CASE 'visible_from_add' %] + [% CASE 'visible_from' %] <li>The following groups can now see users in this group: - [%+ changes.visible_from_add.join(', ') FILTER html %]</li> + [%+ changes.visible_from.join(', ') FILTER html %]</li> [% CASE 'visible_from_remove' %] <li>The following groups may no longer see users in this group: [%+ changes.visible_from_remove.join(', ') FILTER html %]</li> - [% CASE 'visible_to_me_add' %] + [% CASE 'visible_to_me' %] <li>This group may now see users in the following groups: - [%+ changes.visible_to_me_add.join(', ') FILTER html %]</li> + [%+ changes.visible_to_me.join(', ') FILTER html %]</li> [% CASE 'visible_to_me_remove' %] <li>This group may no longer see users in the following groups: [%+ changes.visible_to_me_remove.join(', ') FILTER html %]</li> [% CASE %] - [% Hook.process('group_updated_fields') %] + [% Hook.process('group_updated_fields', 'global/messages.html.tmpl') %] [% END %] [% END %] </ul> @@ -612,6 +638,13 @@ [% IF changes.is_multiplicable.defined %] <li>Flag type is [% "no longer" UNLESS flagtype.is_multiplicable %] multiplicable</li> [% END %] + [% IF changes.view_group_id.defined %] + [% IF flagtype.view_group_id %] + <li>View group updated to <em>[% flagtype.view_group.name FILTER html %]</em></li> + [% ELSE %] + <li>View group deleted</li> + [% END %] + [% END %] [% IF changes.grant_group_id.defined %] [% IF flagtype.grant_group_id %] <li>Grant group updated to <em>[% flagtype.grant_group.name FILTER html %]</em></li> @@ -626,6 +659,13 @@ <li>Request group deleted</li> [% END %] [% END %] + [% IF changes.category.defined %] + [% IF flagtype.category %] + <li>Category changed to <em>[% flagtype.category FILTER html %]</em></li> + [% ELSE %] + <li>Category deleted</li> + [% END %] + [% END %] [% IF changes.inclusions.defined || changes.exclusions.defined %] <li>The inclusions and exclusions lists have been updated</li> [% END %] @@ -845,8 +885,8 @@ [% ELSIF message_tag == "sudo_started" %] [% title = "Sudo session started" %] The sudo session has been started. For the next 6 hours, or until you - end the session, everything you do you do as the user you are - impersonating ([% target FILTER html %]). + end the session, every act you perform will be recorded as activity of the + user you are impersonating ([% target FILTER html %]). [% ELSIF message_tag == "sudo_ended" %] [% title = "Sudo session complete" %] @@ -933,9 +973,36 @@ No changes made to version <em>[% version.name FILTER html %]</em>. [% END %] + [% ELSIF message_tag == "whine_event_added" %] + A whine event was added. + + [% ELSIF message_tag == "whine_event_removed" %] + A whine event was removed. + + [% ELSIF message_tag == "whine_event_updated" %] + A whine event was updated. + + [% ELSIF message_tag == "whine_query_added" %] + A whine query was added. + [% ELSIF message_tag == "whine_query_failed" %] The query '[% query_name FILTER html %]' from [% author.login FILTER html %] - failed: [% reason FILTER html %] + failed for recipient '[% recipient.login FILTER html %]' with error: [% reason FILTER html %] + + [% ELSIF message_tag == "whine_query_updated" %] + A whine query was updated. + + [% ELSIF message_tag == "whine_query_removed" %] + A whine query was removed. + + [% ELSIF message_tag == "whine_schedule_added" %] + A whine schedule was added. + + [% ELSIF message_tag == "whine_schedule_updated" %] + A whine schedule was updated. + + [% ELSIF message_tag == "whine_schedule_removed" %] + A whine schedule was removed. [% ELSIF message_tag == "workflow_updated" %] The workflow has been updated. @@ -943,7 +1010,7 @@ [% END %] [% IF !message %] - [% message = Hook.process('messages') %] + [% message = Hook.process('messages', 'global/messages.html.tmpl') %] [% END %] [%# Give sensible error if the message function is used incorrectly. #%] @@ -957,3 +1024,4 @@ save this page and send it to [% Param('maintainer') %]. [% END %] [% END %] +[% END %] diff --git a/template/en/default/global/product-select.html.tmpl b/template/en/default/global/product-select.html.tmpl index 23a7b3d58..c64e477be 100644 --- a/template/en/default/global/product-select.html.tmpl +++ b/template/en/default/global/product-select.html.tmpl @@ -43,7 +43,9 @@ <option value="">[% add FILTER html %]</option> [% END %] [% IF dontchange %] + <optgroup label="Unclassified"> <option value="[% dontchange FILTER html %]">[% dontchange FILTER html %]</option> + </optgroup> [% END %] [% IF Param('useclassification') %] @@ -68,8 +70,8 @@ [% NEXT UNLESS classifications.${c}.size %] <optgroup label="[% c FILTER html %]"> [% FOREACH p = classifications.$c %] - <option value="[% p.$valueattribute FILTER html %]" - [% " selected" IF (cgi.param(name) == p.name) || (value.contains(p.name)) %]> + <option data-data="{"value":"[% p.$valueattribute FILTER json FILTER html %]","id":"v[% p.id FILTER json FILTER html %]_product"}" + [% " selected" IF (cgi.param(name) == p.name) || (value.contains(p.name) || (selected_product == p.name)) %]> [% p.name FILTER html %] </option> [% END %] @@ -80,13 +82,27 @@ [% products = user.get_selectable_products %] [% END %] [% FOREACH p = products %] - <option value="[% p.$valueattribute FILTER html %]" - [% " selected" IF (cgi.param(name) == p.name) || (value.contains(p.name)) %]> + <option data-data="{"value":"[% p.$valueattribute FILTER json FILTER html %]","id":"v[% p.id FILTER json FILTER html %]_product"}" + [% " selected" IF (cgi.param(name) == p.name) || (value.contains(p.name) || (selected_product == p.name)) %]> [% p.name FILTER html %] </option> [% END %] [% END %] </select> + [%## REDHAT EXTENSION START 1123823 %] + [% IF bug %] + <span class="show_others"> + <a href="buglist.cgi?product=[% bug.product FILTER uri %]" + title="Show other [% terms.bugs %] for this product"><i class="fas fa-th-list"></i></a> + <a href="enter_bug.cgi?product=[% bug.product FILTER uri %]&version=[% bug.version FILTER uri %]" + title="Create a new [% terms.bug %] for this product"><i class="fas fa-plus-circle"></i></a> + [%## REDHAT EXTENSION START %] + <a href="page.cgi?id=productdashboard.html&product=[% bug.product FILTER uri %]&bug_status=open&tab=charts" + title="View charts for this product"><i class="fas fa-chart-bar"></i></a> + [%## REDHAT EXTENSION END %] + </span> + [% END %] + [%## REDHAT EXTENSION END 1123823 %] [% ELSE %] [% value.join(', ') FILTER html %] [% END %] diff --git a/template/en/default/global/select-menu.html.tmpl b/template/en/default/global/select-menu.html.tmpl index e9f56b7ca..1e395e28f 100644 --- a/template/en/default/global/select-menu.html.tmpl +++ b/template/en/default/global/select-menu.html.tmpl @@ -31,13 +31,18 @@ [% options_type = BLOCK %][% options %][% END %] <select name="[% name FILTER html %]" + [%## REDHAT EXTENSION START 653316 %] + id="[% name FILTER html %]" [% IF onchange %]onchange="[% onchange FILTER html %]"[% END %] + [%## REDHAT EXTENSION END 653316 %] [% IF multiple %] multiple [% END %] [% IF size %] size="[% size %]" [% END %]> [% IF options_type.search("ARRAY") %] [% FOREACH value = options %] <option value="[% value FILTER html %]" - [% " selected" IF value == default %]> + [%## REDHAT EXTENSION BEGIN 1037909 %] + [% " selected" IF default.contains(value) %]> + [%## REDHAT EXTENSION END 1037909 %] [% value FILTER html %] </option> [% END %] diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 69afaf46a..db2103dd7 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -106,6 +106,14 @@ [% title = "Invalid API key" %] The API key you specified has been revoked by the user that created it. + [% ELSIF error == "api_key_banned" %] + [% title = "Banned API key" %] + The API key you specified has been banned by an admin. + + [% ELSIF error == "api_key_cannot_unban" %] + [% title = "Banned API key cannot be un-banned" %] + You cannot un-ban banned APIkeys! + [% ELSIF error == "attachment_bug_id_mismatch" %] [% title = "Invalid Attachments" %] You tried to perform an action on attachments from different [% terms.bugs %]. @@ -125,6 +133,10 @@ you aren't a member of the '[% group FILTER html %]' group, [% END %] + [% IF groups %] + you aren't a member of any of the groups: '[% groups.join("', '") FILTER html %]', + [% END %] + [% IF reason %] [% IF group %] and [% END %] [% IF reason == "cant_bless" %] @@ -228,11 +240,6 @@ [% Hook.process("auth_failure") %] - [% ELSIF error == "auth_invalid_token" %] - [% title = 'A token error occurred' %] - The token '[% token FILTER html %]' is not valid. It could be because - you loaded this page more than 3 days ago. - [% ELSIF error == "auth_untrusted_request" %] [% title = "Untrusted Authentication Request" %] You tried to log in using the <em>[% login FILTER html %]</em> account, @@ -258,7 +265,21 @@ [% ELSIF error == "bug_access_denied" %] [% title = "$terms.Bug Access Denied" %] [% admindocslinks = {'groups.html#groups' => 'Group Security'} %] - You are not authorized to access [% terms.bug %] #[% bug_id FILTER html %]. + [%## REDHAT EXTENSION START 1090106 %] + <p>You are not authorized to access [% terms.bug %] #[% bug_id FILTER html %].</p> + + <p>Most likely the [% terms.bug %] has been restricted for internal + development processes and we cannot grant access.</p> + + <p>If you are a Red Hat customer with an active subscription, please visit + the <a href="https://access.redhat.com/">Red Hat Customer Portal</a> for assistance + with your issue</p> + + <p>If you are a Fedora Project user and require assistance, please + consider using one of the + <a href="https://fedoraproject.org/wiki/Communicate">mailing lists</a> we + host for the Fedora Project.</p> + [%## REDHAT EXTENSION END 1090106 %] [% ELSIF error == "bug_access_query" %] [% title = "$terms.Bug Access Denied" %] @@ -480,6 +501,22 @@ would create a duplicate loop [% END %]. + [%## REDHAT EXTENSION 1174110 1276162 BEGIN %] + [% ELSIF error == "db_sync_error_web" %] + [% terms.Bugzilla %]'s database reported a query serialization error. + Most likely this occurred because another user or process + attempted to change the same data that you were attempting to change. + <br/><br/>Please press Back and retry the transaction. + <p><code>[% query FILTER html %]</code></p> + + [% ELSIF error == "db_sync_error_other" %] + [% terms.Bugzilla %]'s database reported a query serialization error. + Most likely this occurred because another user or process + attempted to change the same data that you were attempting to change. + Please retry the transaction again. + Query: [% query FILTER html %] + [%## REDHAT EXTENSION 1174110 1276162 END %] + [% ELSIF error == "email_change_in_progress" %] [% title = "Email Change Already In Progress" %] Email change already in progress; please check your email. @@ -703,11 +740,11 @@ for <code>[% flag_type.name FILTER html %]</code> on [% terms.bug %] [%+ bug_id FILTER html -%] [% IF attach_id && attach_id > 0 %], attachment [% attach_id FILTER html %][% END %], - but that [% terms.bug %] has been restricted to users in certain groups, - and the user you asked isn't in all the groups to which - the [% terms.bug %] has been restricted. - Please choose someone else to ask, or make the [% terms.bug %] accessible - to users on its CC: list and add that user to the list. + but that [% IF view_denied %]flag[% ELSE %][% terms.bug %][% END %] has been + restricted to users in certain groups, and the user you asked isn't in all the groups + to which the [% IF view_denied %]flag[% ELSE %][% terms.bug %][% END %] has been restricted. + Please choose someone else to ask. [% IF NOT view_denied %]Or make the [% terms.bug %] + accessible to users on its CC: list and add that user to the list.[% END %] [% ELSIF error == "flag_requestee_unauthorized_attachment" %] [% title = "Flag Requestee Not Authorized" %] @@ -816,7 +853,7 @@ [% ELSIF error == "group_cannot_delete" %] [% title = "Cannot Delete Group" %] The <em>[% group.name FILTER html %]</em> group cannot be deleted because - there are + there are [% refs FILTER html %] <a href="editgroups.cgi?action=del&group= [%- group.id FILTER uri %]">records</a> in the database which refer to it. All references to this group must @@ -910,6 +947,24 @@ [% END %] a user with the required permissions may change that field. + [%## REDHAT EXTENSION START 502604 %] + [% IF privs == 100 %] + <br><br> + You tried to transition the Status field to the VERIFIED state, but only a user + with the required permissions may transition to the VERIFIED state. Please use + the Verified field, selecting the appropriate ID that has verified the fix. + <br><br> + Click <a href="page.cgi?id=fields.html#cf_verified">here</a> here for more information + about the Verified field. + [% END %] + [%## REDHAT EXTENSION END 502604 %] + + [%## REDHAT EXTENSION START 862020 %] + [% IF privs == 101 %] + You can only update this field via the RPC interface. + [% END %] + [%## REDHAT EXTENSION END 862020 %] + [% ELSIF error == "illegal_change_deps" %] [% title = "Not allowed" %] You tried to change the @@ -1044,7 +1099,7 @@ [% ELSIF error == "invalid_group_name" %] [% title = "Invalid group name" %] - The group you specified, [% name FILTER html %], is not valid here. + The group you specified, [% name FILTER html %], either doesn't exist or you are not a member of this group. [% ELSIF error == "invalid_keyword_id" %] The keyword ID <em>[% id FILTER html %]</em> couldn't be found. @@ -1112,11 +1167,6 @@ the "Forgot Password" link. [% END %] - [% ELSIF error == "invalid_cookies_or_token" %] - [% title = "Invalid Cookies or Token" %] - The cookies or token provide were not valid or have expired. - You may login again to get new cookies or a new token. - [% ELSIF error == "json_rpc_get_method_required" %] When using JSON-RPC over GET, you must specify a 'method' parameter. See the documentation at @@ -1329,6 +1379,11 @@ You cannot set aliases when modifying multiple [% terms.bugs %] at once. + [% ELSIF error == "multiple_components_update_not_allowed" %] + [% title = "Multiple Components Update Not allowed" %] + You cannot update the name for multiple components of the + same product. + [% ELSIF error == "need_quip" %] [% title = "Quip Required" %] [% docslinks = {'administering/quips.html' => 'About quips'} %] @@ -1850,6 +1905,11 @@ [% IF Param('useqacontact') %] or QA contact [% END %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param('usedocscontact') %] + or Docs contact + [% END %] + [%## REDHAT EXTENSION END 876015 %] for at least one component. For this reason, you cannot delete the account at this time. @@ -1937,6 +1997,24 @@ [% END %] with the External Login ID "[% extern_id FILTER html %]". + [% ELSIF error == "must_supply_both_controls" %] + When updating a product's group controls via RPC you must supply both or + neither of 'membercontrol' and 'othercontrol'. + + [% ELSIF error == "bad_referer" %] + [% title = "Insecure request detected" %] + <div class="confirmation"> + [% terms.Bugzilla %] detected a possibly insecure search request and did + not run the search. + </div> + <p> + If you would like to run the search <a class="blink" href="[% Bugzilla.cgi.url('-relative' => 1, '-path' => 1, '-query' => 1) FILTER none %]">click here</a>. + </p> + <p> + To avoid this check you should upgrade to a browser that supports + SameSite cookies and then relogin. e.g. Firefox >= 61 or Chrome >= 68. + </p> + [% ELSE %] [%# Try to find hooked error messages %] @@ -1977,9 +2055,11 @@ [% error_message FILTER none %] </div> +[% UNLESS no_back %] <p id="post_err_msg"> Please press <b>Back</b> and try again. </p> +[% END %] [%# If a saved search fails, people want the ability to edit or delete it. # This is the best way of getting information about that possible saved @@ -2022,6 +2102,8 @@ version [% ELSIF class == "Bugzilla::Milestone" %] milestone + [% ELSIF class == "Bugzilla::Release" %] + release [% ELSIF class == "Bugzilla::Status" %] status [% ELSIF class == "Bugzilla::Flag" %] diff --git a/template/en/default/global/user.html.tmpl b/template/en/default/global/user.html.tmpl index 7050c6d37..1224f6674 100644 --- a/template/en/default/global/user.html.tmpl +++ b/template/en/default/global/user.html.tmpl @@ -10,7 +10,7 @@ # who: A Bugzilla::User object that we are going to represent. #%] -<span class="vcard"> +<span class="vcard [% IF who.is_insider %]redhat_user[% END %]"> [% FILTER collapse %] [% IF user.id %] <a class="email" href="mailto:[% who.email FILTER html %]" diff --git a/template/en/default/list/change-columns.html.tmpl b/template/en/default/list/change-columns.html.tmpl index c0279803c..a0d3a4e61 100644 --- a/template/en/default/list/change-columns.html.tmpl +++ b/template/en/default/list/change-columns.html.tmpl @@ -22,6 +22,9 @@ [% field_descs.assigned_to_realname = "$field_descs.assigned_to Real Name" %] [% field_descs.reporter_realname = "$field_descs.reporter Real Name" %] [% field_descs.qa_contact_realname = "$field_descs.qa_contact Real Name" %] +[%## REDHAT EXTENSION START 876015 %] +[% field_descs.docs_contact_realname = "$field_descs.docs_contact Real Name" %] +[%## REDHAT EXTENSION END 876015 %] [%# Create a mapping of field descriptions to field names, so that # the "Available Columns" list can be sorted alphabetically by diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index e581f0892..0f5f586c7 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -10,27 +10,6 @@ <input type="hidden" name="dontchange" value="[% dontchange FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> -<input type="button" id="uncheck_all" value="Uncheck All" - class="bz_default_hidden" onclick="SetCheckboxes(false);"> -<input type="button" id="check_all" value="Check All" - class="bz_default_hidden" onclick="SetCheckboxes(true);"> - -<script type="text/javascript"> - function SetCheckboxes(value) { - var elements = document.forms.changeform.getElementsByTagName('input'), - numelements = elements.length, - item, i; - for (i = 0; i < numelements; i++) { - item = elements[i]; - if (item.type === 'checkbox' && item.name.match(/^id_/)) { - item.checked = value; - } - } - } - YAHOO.util.Dom.removeClass("check_all", "bz_default_hidden"); - YAHOO.util.Dom.removeClass("uncheck_all", "bz_default_hidden"); -</script> - <hr> <div class="bz_info"> @@ -54,16 +33,58 @@ <th><label for="product">Product:</label></th> <td> + <input type="hidden" id="product_dirty"> [% INCLUDE "global/product-select.html.tmpl" - id => "product" - name => "product" - dontchange => dontchange - %] + id = "product" + name = "product" + dontchange = dontchange + onchange = "if(\$('#product').get_sel_ids()){\$('#product_dirty').val(1);\$('#component').fetch_all(0, true);}" + override_legal_values = products + value = dontchange + editable = 1 + no_tds = 1 + dotweak = dotweak + %] + </td> + + </tr> + <tr valign="top"> + + <th><label for="component">Component:</label></th> + <td> + <div id="bz_component_input"> + [% INCLUDE "bug/field.html.tmpl" + bug = bug + field = bug_fields.component + override_legal_values = one_component || [] + value = dontchange + onchange = " \$('#component_dirty').val(1); show_sub_components();" + editable = 1 + no_tds = 1 + allow_dont_change = 1 + dotweak = dotweak + %] + </div> + <script type="text/javascript"> + $(document).ready(function () { + init_products({}); + init_components({descrs: 1, disabled: 1}); + $("#component").selectize()[0].selectize.disable(); + }); + </script> </td> + [% IF has_sub_components || dotweak %] + [% PROCESS bug/sub_component.html.tmpl + my_components = one_product.components + rh_sub_component_ids = [] + action = "update" + %] + [% END %] <th><label for="version">Version:</label></th> <td> [% PROCESS selectmenu menuname = "version" + multiple = multiple_versions menuitems = versions property = "" %] </td> @@ -71,10 +92,15 @@ </tr> <tr> - <th><label for="component">Component:</label></th> + <th> + <label for="rep_platform"> + <a href="page.cgi?id=fields.html#rep_platform">[% field_descs.rep_platform FILTER html %]</a>: + </label> + </th> <td> - [% PROCESS selectmenu menuname = "component" - menuitems = components %] + [% PROCESS selectmenu menuname = "rep_platform" + multiple = 0 + menuitems = platforms %] </td> <th> @@ -88,17 +114,16 @@ </td> </tr> - <tr> + <tr> <th> - <label for="rep_platform"> - <a href="page.cgi?id=fields.html#rep_platform"> - [% field_descs.rep_platform FILTER html %]</a>: + <label for="op_sys"> + <a href="page.cgi?id=fields.html#op_sys">[% field_descs.op_sys FILTER html %]</a>: </label> </th> <td> - [% PROCESS selectmenu menuname = "rep_platform" - menuitems = platforms %] + [% PROCESS selectmenu menuname = "op_sys" + menuitems = op_sys %] </td> <th> @@ -114,25 +139,29 @@ </tr> - <tr> - <th> - <label for="op_sys"> - <a href="page.cgi?id=fields.html#op_sys">[% field_descs.op_sys FILTER html %]</a>: - </label> - </th> - <td [% " colspan=\"3\"" IF !Param("usetargetmilestone") %]> - [% PROCESS selectmenu menuname = "op_sys" - menuitems = op_sys %] - </td> + [% IF Param("usetargetrelease") || Param("usetargetmilestone") %] + <tr valign="top"> + [% END %] + [% IF Param("usetargetrelease") && (!one_product.defined || one_product.releases.size > 1 ) %] + <th><label for="target_release">Target Release:</label></th> + <td> + [% PROCESS selectmenu menuname = "target_release" + multiple = multiple_target_releases + menuitems = releases %] + </td> + [% END %] [% IF Param("usetargetmilestone") %] <th><label for="target_milestone">Target Milestone:</label></th> <td> [% PROCESS selectmenu menuname = "target_milestone" + multiple = 0 menuitems = milestones %] </td> [% END %] + [% IF Param("usetargetrelease") || Param("usetargetmilestone") %] </tr> + [% END %] <tr> <th><label for="bug_status">Status:</label></th> @@ -146,6 +175,7 @@ <td> <input id="estimated_time" name="estimated_time" + class="bz_private_data" value="[% dontchange FILTER html %]" size="6"> </td> @@ -160,6 +190,7 @@ <td> <input id="remaining_time" name="remaining_time" + class="bz_private_data" value="[% dontchange FILTER html %]" size="6"> </td> @@ -198,6 +229,24 @@ </tr> [% END %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param("usedocscontact") %] + <tr> + <th><label for="docs_contact">Docs Contact:</label></th> + <td colspan="3"> + [% INCLUDE global/userselect.html.tmpl + id => "docs_contact" + name => "docs_contact" + value => dontchange + size => 40 + %] + <input type="checkbox" id="set_default_docs_contact" name="set_default_docs_contact" value="1"> + <label for="set_default_docs_contact">Reset Docs Contact to default</label> + </td> + </tr> + [% END %] + [%## REDHAT EXTENSION END 876015 %] + <tr> <th><label for="masscc">CC List:</label></th> @@ -286,10 +335,18 @@ [%# Show all legal values and all fields, ignoring visibility controls. %] [% bug = 0 %] [% FOREACH field = Bugzilla.active_custom_fields %] + [% NEXT IF field.name == 'cf_extra_version' || field.name == 'cf_extra_component' %] + [%## REDHAT EXTENSION START 963097 %] + [% NEXT IF field.name == 'cf_pgm_internal' %] + [%## REDHAT EXTENSION END 963097 %] + [%## REDHAT EXTENSION START 1705980 %] + [% NEXT UNLESS field.user_can_edit(user) %] + [%## REDHAT EXTENSION END 1705980 %] <tr> [% PROCESS bug/field.html.tmpl value = dontchange editable = 1 - allow_dont_change = 1 %] + allow_dont_change = 1 + multi = 1 %] </tr> [% END %] @@ -301,7 +358,9 @@ [% IF user.is_insider %] <input type="checkbox" name="comment_is_private" value="1" id="newcommentprivacy" - onClick="updateCommentTagControl(this, 'comment')"> + onClick="updateCommentTagControl(this, 'comment')" + [%## REDHAT EXTENSION 465941 %] + [% "checked" IF user.settings.private_comment_default.value == 'on' %]/> <label for="newcommentprivacy"> Make comment private (visible only to members of the <strong>[% Param('insidergroup') FILTER html %]</strong> group) @@ -314,6 +373,7 @@ minrows = 5 maxrows = 25 cols = constants.COMMENT_COLS + classes = (user.settings.private_comment_default.value == 'on' ? 'bz_private' : '') %]<br> [% IF user.is_insider %] <script> @@ -321,6 +381,10 @@ </script> [% END %] +[%## REDHAT EXTENSION END 406451 %] +[% PROCESS bug/needinfo.html.tmpl massedit = 1 %] +[%## REDHAT EXTENSION END 406451 %] + [% IF flag_types %] <b><label for="flags">Flags:</label></b><br> [% PROCESS "flag/list.html.tmpl" @@ -349,7 +413,8 @@ <th>Group Name</th> </tr> - [% FOREACH group = groups %] + [%## REDHAT EXTENSION 881990: Change sorting %] + [% FOREACH group = groups.sort('description', 'name') %] <tr> <td class="center"> <input type="checkbox" name="defined_groups" @@ -389,13 +454,20 @@ [%+ Hook.process('after_groups') %] <input type="submit" id="commit" value="Commit"> +[% IF Param('minor_update_group') && user.can_minor_update() %] + <br> + <input type="checkbox" name="minor_update" value="1"> + <label for="minor_update"> + This is a minor update (do not send email) + </label> +[% END %] [%############################################################################%] [%# Select Menu Block #%] [%############################################################################%] [% BLOCK selectmenu %] - <select id="[% menuname %]" name="[% menuname %]"> + <select id="[% menuname %]" name="[% menuname %]"[% IF multiple %] multiple="multiple" size="5"[% END %][% IF onchange %] onchange="[% onchange FILTER none %]"[% END %]> <option value="[% dontchange FILTER html %]" selected="selected"> [% dontchange FILTER html %] </option> diff --git a/template/en/default/list/list.atom.tmpl b/template/en/default/list/list.atom.tmpl index fddbbd7a3..3514b0269 100644 --- a/template/en/default/list/list.atom.tmpl +++ b/template/en/default/list/list.atom.tmpl @@ -43,7 +43,7 @@ <td>[% bug.product FILTER html %]</td> </tr><tr class="bz_feed_component"> <td>[% columns.component.title FILTER html %]</td> - <td>[% bug.component FILTER html %]</td> + <td>[% bug.component.join(',') FILTER html %]</td> </tr><tr class="bz_feed_assignee"> <td>[% columns.assigned_to_realname.title FILTER html %]</td> <td>[% bug.assigned_to_realname ? bug.assigned_to_realname : bug.assigned_to FILTER html %]</td> diff --git a/template/en/default/list/list.csv.tmpl b/template/en/default/list/list.csv.tmpl index 31c5d8d4e..292a33e96 100644 --- a/template/en/default/list/list.csv.tmpl +++ b/template/en/default/list/list.csv.tmpl @@ -31,8 +31,17 @@ [% bug.$column = display_value("bug_status", bug.$column) %] [% ELSIF column == 'resolution' %] [%- bug.$column = display_value("resolution", bug.$column) %] +[%-## REDHAT EXTENSION START 818974 -%] + [% ELSIF column == 'ext_bz_count' %] + [% bug.$column = bug.external_bugs.size %] + [% ELSIF column == 'ext_bz_list' %] + [% bug.$column = [] %] + [% FOREACH ext_bz = bug.external_bugs %] + [% bug.${column}.push("${ext_bz.type.description} ${ext_bz.ext_bz_bug_id}") %] + [% END %] +[%-## REDHAT EXTENSION END 818974 -%] [% END %] - [% bug.$column FILTER csv %] + [% bug.$column.join(',') FILTER csv %] [% END %] [% END %] diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl index 368cd9c08..18d5b2beb 100644 --- a/template/en/default/list/list.html.tmpl +++ b/template/en/default/list/list.html.tmpl @@ -56,6 +56,15 @@ [%############################################################################%] [%# Page Header #%] [%############################################################################%] +[%## REDHAT EXTENSION 653316 %] +[%# We only show the sub components if this page has a single product %] +[% + has_sub_components = 0; + IF (dotweak && Param('usesubcomponents') && one_product && one_product.has_sub_components); + onload = 'show_sub_components();'; + has_sub_components = 1; + END; +%] [% PROCESS global/header.html.tmpl title = title @@ -65,6 +74,7 @@ javascript_urls = [ "js/util.js", "js/field.js", "js/TUI.js" ] style_urls = [ "skins/standard/buglist.css" ] doc_section = "using/finding.html" + doc_title = "Finding $terms.Bugs" %] <div class="bz_query_head"> @@ -95,10 +105,11 @@ </div> [% IF toolong %] - <h2 class="bz_smallminded"> - This list is too long for Bugzilla's little mind; the - Next/Prev/First/Last buttons won't appear on individual [% terms.bugs %]. - </h2> + <div class="bz_smallminded message"> + The list of search results is too long for Bugzilla to display the Next/Prev/First/Last + buttons on individual [% terms.bugs %]. Add additional filters to your search if you wish + to use this feature. + </div> [% END %] [% SET shown_types = [ @@ -106,6 +117,7 @@ 'greaterthan', 'greaterthaneq', 'changedbefore', 'changedafter', 'changedfrom', 'changedto', 'changedby', 'notsubstring', 'nowords', 'nowordssubstr', 'notmatches', 'isempty', 'isnotempty' + ,'anddependson', 'andblocked', 'notdependson', 'notblocked' ] %] <a id="search_description_controller" class="bz_default_hidden" href="javascript:TUI_toggle_class('search_description')">Hide Search Description</a> @@ -139,7 +151,7 @@ [%# Preceding Status Line #%] [%############################################################################%] -[% IF bugs.size > 9 %] +[% IF 0 && bugs.size > 9 %] [% PROCESS num_results %] [% END %] @@ -257,7 +269,7 @@ [%# Links to more things users can do with this bug list. %] [% Hook.process("links") %] </div> - <br> + <!--br--> [% END %] <div class="bz_query_edit"> <button type="button" id="edit_search" @@ -299,6 +311,110 @@ [%# Page Footer #%] [%############################################################################%] +<script> +jQuery.fn.dataTableExt.oSort['numeric-html-asc'] = function(a,b) { + a = parseInt($(a).text()); + b = parseInt($(b).text()); + return ((a < b) ? -1 : ((a > b) ? 1 : 0)); +}; + +jQuery.fn.dataTableExt.oSort['numeric-html-desc'] = function(a,b) { + a = parseInt($(a).text()); + b = parseInt($(b).text()); + return ((a < b) ? 1 : ((a > b) ? -1 : 0)); +}; + +jQuery.fn.dataTable.ext.type.detect.unshift( + function ( d ) { + return d === 'unspecified' || d === 'low' || d === 'medium' || d === 'high' || d === 'urgent' ? + 'urgency' : + null; + } +); + +jQuery.fn.dataTable.ext.type.order['urgency-pre'] = function ( d ) { + switch ( d ) { + case 'unspecified': return 1; + case 'low': return 2; + case 'medium': return 3; + case 'high': return 4; + case 'urgent': return 5; + } + return 0; +}; + +$(document).ready(function() { + var table = $('#bz_buglist').DataTable({ + stateSave: true, + ordering: true, + pagingType: 'full_numbers', + aLengthMenu: [[25, 50, 100, 500, -1], [25, 50, 100, 500, 'All']], +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] +[% IF dotweak %] + select: {style: 'multi'}, + dom: 'lBfrtip', + buttons: [ + 'selectAll', + 'selectNone' + ], +[% ELSE %] + colReorder: {fixedColumnsLeft: 1}, +[%- END %] + + columnDefs: [ + { targets: [0], type: "numeric-html"}, +[% IF !dotweak && user.id %] + { orderable: false, targets: -1 } +[%- END %] + ], + + order: [ +[%- FOREACH str = order.split(',') -%] + [% found = 0 %] + [%- class = 'asc' -%] + [%- field = str.split(' ') -%] + [% IF field.1 == 'DESC' %][%- class = 'desc' %][% END %] + [% FOREACH column = displaycolumns %] + [% IF field.0 == column %] + [% found = 1 %] + [[% loop.count %], '[% class FILTER css_class_quote %]'] + [% LAST %] + [% END %] + [% END %] + [% IF found and !loop.last %],[% END %] +[% END %] + ], + fixedHeader: true, + fnInitComplete: function (oSettings, json) { + } + }); + [% IF dotweak %] + // Update hidden field so it gets processed + table.on( 'select', function ( e, dt, type, indexes ) { + if ( type === 'row' ) { + $.each(indexes, function( i, tr ) { + var id = table.row(tr).id(); + id = id.substring(1, id.length); + $("#id_" + id).val(1); + }); + } + } ); + table.on( 'deselect', function ( e, dt, type, indexes ) { + if ( type === 'row' ) { + $.each(indexes, function( i, tr ) { + var id = table.row(tr).id(); + id = id.substring(1, id.length); + $("#id_" + id).val(""); + }); + } + } ); + + [% END %] +}); +</script> + [% PROCESS global/footer.html.tmpl %] [%##########%] @@ -340,10 +456,6 @@ [%- "&order=$qorder" FILTER html IF order %]&limit=0">See all search results for this query</a>. [% time_summary_limited = 1 %] - [% ELSIF bugs.size == 1 %] - One [% terms.bug %] found. - [% ELSE %] - [% bugs.size %] [%+ terms.bugs %] found. [% END %] </span> [% END %] diff --git a/template/en/default/list/list.ics.tmpl b/template/en/default/list/list.ics.tmpl index 327ae171c..fe7bfebc8 100644 --- a/template/en/default/list/list.ics.tmpl +++ b/template/en/default/list/list.ics.tmpl @@ -31,10 +31,10 @@ BEGIN:VTODO [%+ bug.product FILTER ics('X-BUGZILLA-PRODUCT') +%] [% END %] [% IF bug.component %] -[%+ bug.component FILTER ics('X-BUGZILLA-COMPONENT') +%] +[%+ bug.component.join(',') FILTER ics('X-BUGZILLA-COMPONENT') +%] [% END %] [% IF bug.version %] -[%+ bug.version FILTER ics('X-BUGZILLA-VERSION') +%] +[%+ bug.version.join(',') FILTER ics('X-BUGZILLA-VERSION') +%] [% END %] [% IF bug.keywords %] [%+ bug.keywords FILTER ics('X-BUGZILLA-KEYWORDS') +%] diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl index d3abc9b21..2119fcdfc 100644 --- a/template/en/default/list/table.html.tmpl +++ b/template/en/default/list/table.html.tmpl @@ -29,6 +29,7 @@ [% field_descs.qa_contact_realname = field_descs.qa_contact %] [%# Setting maxlength => 0 means no limit. We set it for performance reasons. %] +[%# RED HAT EXTENSION 1724026 - un-limit version %] [% abbrev = { "bug_severity" => { maxlength => 3 , title => "Sev" } , @@ -52,7 +53,7 @@ "flagtypes.name" => { maxlength => 0, wrap => 1 } , "component" => { maxlength => 8 , title => "Comp" } , "product" => { maxlength => 8 } , - "version" => { maxlength => 5 , title => "Vers" } , + "version" => { maxlength => 0 , title => "Vers" } , "op_sys" => { maxlength => 12 } , "bug_file_loc" => { maxlength => 30 } , "target_milestone" => { maxlength => 0, title => "TargetM" } , @@ -61,6 +62,10 @@ } %] +[%## REDHAT EXTENSION START 406151 454038 479375 %] +[% Hook.process('list_table_abbrev') %] +[%## REDHAT EXTENSION END 406151 %] + [% PROCESS bug/time.html.tmpl %] [% Hook.process("before_table") %] @@ -70,19 +75,14 @@ [%############################################################################%] [% tableheader = BLOCK %] - <table class="bz_buglist"> + <table id="bz_buglist" class="bz_buglist stripe"> + <thead> <tr class="bz_buglist_header bz_first_buglist_header"> - [% IF dotweak %] + [% IF 0 && dotweak %] <th> </th> [% END %] <th colspan="[% splitheader ? 2 : 1 %]" class="first-child"> - <a href="buglist.cgi? - [% urlquerypart FILTER html %]&order= - [% PROCESS new_order id='bug_id' %] - [%-#%]&query_based_on= - [% defaultsavename OR searchname FILTER uri %]">ID - [% PROCESS order_arrow id='bug_id' ~%] - </a> +ID </th> [% IF splitheader %] @@ -94,7 +94,7 @@ [% END %] </tr><tr class="bz_buglist_header"> - [% IF dotweak %] + [% IF 0 && dotweak %] <th> </th> [% END %] <th> </th> @@ -115,17 +115,12 @@ [% END %] </tr> +</thead> [% END %] [% BLOCK columnheader %] - <th colspan="[% splitheader ? 2 : 1 %]"> - <a href="buglist.cgi?[% urlquerypart FILTER html %]&order= - [% PROCESS new_order %] - [%-#%]&query_based_on= - [% defaultsavename OR searchname FILTER uri %]"> - [%- abbrev.$id.title || field_descs.$id || column.title FILTER html -%] - [% PROCESS order_arrow ~%] - </a> + <th colspan="[% splitheader ? 2 : 1 %]" class="bz_[% id FILTER css_class_quote %]"> + [%- abbrev.$id.title || field_descs.$id || column.title FILTER html -%] </th> [% END %] @@ -157,7 +152,7 @@ [%############################################################################%] [% tableheader %] - +<tbody> [% FOREACH bug = bugs %] [% count = loop.count() %] @@ -168,15 +163,19 @@ [%+ "bz_$bug.resolution" FILTER css_class_quote IF bug.resolution -%] [%+ "bz_secure" IF bug.secure_mode -%] [%+ "bz_secure_mode_$bug.secure_mode" FILTER css_class_quote IF bug.secure_mode -%] + [%+ "bz_ignored" IF user.is_bug_ignored(bug.bug_id) -%] + [%+ "bz_updated" IF user.is_bug_updated(bug.bug_id) -%] + [%+ "bz_requested" IF user.requested_on_bug(bug) -%] [%+ count % 2 == 1 ? "bz_row_odd" : "bz_row_even" -%] "> - [% IF dotweak %] + [% IF 0 && dotweak %] <td class="bz_checkbox_column"> <input type="checkbox" name="id_[% bug.bug_id %]"> </td> [% END %] - <td class="first-child bz_id_column"> + <td class="first-child bz_id_column"[% IF bug.secure_mode %] title="Private [% terms.Bug %]"[% END %]> + [% IF dotweak %]<input type="hidden" id="id_[% bug.bug_id %]" name="id_[% bug.bug_id %]" value="">[% END %] <a href="show_bug.cgi?id=[% bug.bug_id %]">[% bug.bug_id %]</a> <span class="bz_default_hidden">[%+ '[SEC]' IF bug.secure_mode %]</span> </td> @@ -186,9 +185,15 @@ <td class="bz_[% column FILTER css_class_quote %]_column [%~ ' nowrap' UNLESS col_abbrev.wrap OR bug_fields.$column.type == constants.FIELD_TYPE_FREETEXT - OR bug_fields.$column.type == constants.FIELD_TYPE_TEXTAREA %]"> + OR bug_fields.$column.type == constants.FIELD_TYPE_TEXTAREA %]" +[%## RED HAT EXTENSION START 1657824 %] + [% IF column == 'bug_status' %] data-order="[% statuses.${bug.bug_status} FILTER html %]"[% END %] +[%## RED HAT EXTENSION END 1657824 %] + > [% IF col_abbrev.maxlength %] - <span title="[%- display_value(column, bug.$column) FILTER html %]"> +[%## REDHAT EXTENSION BEGIN 587798 %] + <span title="[%- display_value_array(column, bug.$column) FILTER html %]"> +[%## REDHAT EXTENSION END 587798 %] [% END %] [% IF col_abbrev.format_value %] [%- bug.$column FILTER format(col_abbrev.format_value) FILTER html -%] @@ -216,8 +221,62 @@ rel="noreferrer" title="[% bug.bug_file_loc FILTER html %]"> [%- display_value(column, bug.$column).truncate(col_abbrev.maxlength, col_abbrev.ellipsis) FILTER html -%] </a> +[%## REDHAT EXTENSION 1135866 %] + [% ELSIF column == 'dependson_all' || column == 'blocks_all' %] + [% FOREACH bug_id = bug.$column %] + [% bug_id FILTER bug_link(bug_id, use_alias => 1) FILTER none %] + [% UNLESS loop.last %], [% END %] + [% END %] +[%## REDHAT EXTENSION BEGIN 818974 %] + [% ELSIF column == 'ext_bz_count' %] + [% ext_bzs = bug.external_bugs %] + [% IF ext_bzs.size == 0 %] + 0 + [% ELSE %] + [% ext_bz_count_type = {} %] + [% ext_bz_count = [] %] + [% FOREACH ext_bz IN ext_bzs %] + [% UNLESS ext_bz_count_type.defined(ext_bz.type.description) %] + [% ext_bz_count_type.${ext_bz.type.description} = 1 %] + [% ELSE %] + [% ext_bz_count_type.${ext_bz.type.description} = ext_bz_count_type.${ext_bz.type.description} + 1 %] + [% END %] + [% END %] + [% FOREACH x IN ext_bz_count_type.keys.sort %] + [% ext_bz_count.push("$x ${ext_bz_count_type.$x}") %] + [% END %] + <a title="[% ext_bz_count.join(', ') FILTER html %]">[% ext_bzs.size %]</a> + [% END %] + + [% ELSIF column == 'ext_bz_list' %] + [% FOREACH ext_bz = bug.external_bugs %] + <a href="[% ext_bz.full_url FILTER html %]">[% ext_bz.type.description FILTER html %] [% ext_bz.ext_bz_bug_id FILTER filter_ets(ext_bz.type.matchrx, ext_bz.type.format) FILTER none %]</a>[% UNLESS loop.last %], [% END %] + [% END %] + + [%## REDHAT EXTENSION START 1020897 %] + [% ELSIF column == 'bug_file_loc' && is_safe_url(bug.bug_file_loc) %] + <a href="[% bug.bug_file_loc FILTER html %]" target="_blank" + title="[% bug.bug_file_loc FILTER html %]"> + [%- display_value_array(column, bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%] + </a> + [%## REDHAT EXTENSION END 1020897 %] + [%## REDHAT EXTENSION START 1569389 %] + [% ELSIF column == 'relevance' %] + [% bug.relevance FILTER filter_relevance FILTER html %] + [%## REDHAT EXTENSION END 1569389 %] + [%## REDHAT EXTENSION BEGIN 1711359 %] + [% ELSIF column == 'keywords' %] + [% FOREACH kw = bug.$column.split(', ') %] + <span class="keyword [% kw FILTER html %]">[% kw FILTER html %]</span> + [% END %] + [%## REDHAT EXTENSION END 1711359 %] + [%## REDHAT EXTENSION BEGIN 1731820 %] + [% ELSIF column == 'changeddate' %] + [% bug.$column FILTER time %] + [%## REDHAT EXTENSION END 1731820 %] +[%## REDHAT EXTENSION BEGIN 818974 %] [% ELSE %] - [%- display_value(column, bug.$column).truncate(col_abbrev.maxlength, col_abbrev.ellipsis) FILTER html -%] + [%- display_value_array(column, bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%] [% END %] [% IF col_abbrev.maxlength %] </span> @@ -227,9 +286,11 @@ </tr> [% END %] - +</tbody> [% IF time_info.time_present %] +<tfoot> [% PROCESS time_summary_line %] +</tfoot> [% END %] </table> @@ -237,7 +298,7 @@ [% BLOCK time_summary_line %] <tr class="bz_time_summary_line"> [% columns_to_span = 1 %] [%# bugID %] - [% IF dotweak %] + [% IF 0 && dotweak %] [% columns_to_span = columns_to_span + 1 %] [% END %] [% FOREACH column = displaycolumns %] @@ -265,3 +326,4 @@ [% END %] </tr> [% END %] + diff --git a/template/en/default/pages/bug-writing.html.tmpl b/template/en/default/pages/bug-writing.html.tmpl index 22dd652a7..83acfca05 100644 --- a/template/en/default/pages/bug-writing.html.tmpl +++ b/template/en/default/pages/bug-writing.html.tmpl @@ -85,6 +85,26 @@ Drag-selecting any page crashes Mac builds in the NSGetFactory function. </pre> </blockquote> + <p><b>Version-Release number of selected component (if applicable):</b> + The version number of the component that is causing this problem. For + example if you were experiencing a problem with the grep command in + RHEL 6, the component version would be 2.6.3.</p> + + <blockquote> +<pre> +2.6.3 +</pre> + </blockquote> + + <p><b>How reproducible:</b> Can this [% terms.bug %] always be reproduced, + or only reproduced occasionally.</p> + + <blockquote> +<pre> +always +</pre> + </blockquote> + <p><b>Steps to Reproduce:</b> Minimized, easy-to-follow steps that will trigger the [% terms.bug %]. Include any special setup steps.</p> diff --git a/template/en/default/pages/bugzilla.dtd.tmpl b/template/en/default/pages/bugzilla.dtd.tmpl index 56e7773e3..6022bd347 100644 --- a/template/en/default/pages/bugzilla.dtd.tmpl +++ b/template/en/default/pages/bugzilla.dtd.tmpl @@ -48,6 +48,7 @@ actual_time, deadline?)?, qa_contact?, + docs_contact?, [% FOREACH field = Bugzilla.active_custom_fields %] [%+ field.name FILTER xml -%] [%- IF field.type == constants.FIELD_TYPE_MULTI_SELECT %]*[% ELSE %]?[% END %], @@ -92,6 +93,10 @@ <!ATTLIST qa_contact name CDATA #REQUIRED > +<!ELEMENT docs_contact (#PCDATA)> +<!ATTLIST docs_contact + name CDATA #REQUIRED +> <!ELEMENT status_whiteboard (#PCDATA)> <!ELEMENT op_sys (#PCDATA)> <!ELEMENT resolution (#PCDATA)> diff --git a/template/en/default/pages/fields.html.tmpl b/template/en/default/pages/fields.html.tmpl index 8db61c519..c121e3962 100644 --- a/template/en/default/pages/fields.html.tmpl +++ b/template/en/default/pages/fields.html.tmpl @@ -20,10 +20,6 @@ <td id="bug_status"> <h2>[% field_descs.bug_status FILTER upper FILTER html %]</h2> </td> - - <td id="resolution"> - <h2>[% field_descs.resolution FILTER upper FILTER html %]</h2> - </td> </tr> <tr> @@ -31,8 +27,6 @@ current state of a [% terms.bug %]. Only certain status transitions are allowed.</td> - <td>The [% field_descs.resolution FILTER html %] field indicates what - happened to this [%+ terms.bug %].</td> </tr> </thead> @@ -41,130 +35,284 @@ <td colspan="2">Open [% terms.Bugs %]</td> </tr> <tr> - <td> + <td colspan="2"> <dl> - <dt class="unconfirmed"> - [% display_value("bug_status", "UNCONFIRMED") FILTER html %] - </dt> - <dd class="unconfirmed"> - This [% terms.bug %] has recently been added to the database. - Nobody has confirmed that this [% terms.bug %] is valid. Users - who have the "canconfirm" permission set may confirm - this [% terms.bug %], changing its state to - <b>[% display_value("bug_status", "CONFIRMED") FILTER html %]</b>. - Or, it may be directly resolved and marked - <b>[% display_value("bug_status", "RESOLVED") FILTER html %]</b>. - </dd> - - <dt class="confirmed"> - [% display_value("bug_status", "CONFIRMED") FILTER html %] - </dt> - <dd class="confirmed"> - This [% terms.bug %] is valid and has recently been filed. - [%+ terms.Bugs %] in this state become - <b>[% display_value("bug_status", "IN_PROGRESS") FILTER html %]</b> - when somebody is working on them, or become resolved and marked - <b>[% display_value("bug_status", "RESOLVED") FILTER html %]</b>. - </dd> - - <dt class="in_progress"> - [% display_value("bug_status", "IN_PROGRESS") FILTER html %] - </dt> - <dd class="in_progress"> - This [% terms.bug %] is not yet resolved, but is assigned to the - proper person who is working on the [% terms.bug %]. From here, - [%+ terms.bugs %] can be given to another person and become - <b>[% display_value("bug_status", "CONFIRMED") FILTER html %]</b>, or - resolved and become - <b>[% display_value("bug_status", "RESOLVED") FILTER html %]</b>. - </dd> - + <dt class="new"> + [% display_value("bug_status", "NEW") FILTER html %] + </dt> + <dd class="new"> + This [% terms.bug %] report has recently been entered into + [% terms.Bugzilla %], and must be processed. [% terms.Bug %] + reports in this state may be moved to + <b>[% display_value("bug_status", "ASSIGNED") FILTER html %]</b> or + <b>[% display_value("bug_status", "CLOSED") FILTER html %]</b> + They can also be reassigned to another engineer or component. + </dd> + + <dt class="assigned"> + [% display_value("bug_status", "ASSIGNED") FILTER html %] + </dt> + <dd class="assigned"> + This [% terms.bug %] report is being worked on by the + Assigned Engineer. Use of this state is optional. + </dd> + + + <dt class="on_dev"> + [% display_value("bug_status", "ON_DEV") FILTER html %] + </dt> + <dd class="on_dev"> + This [% terms.bug %] report is being worked on by the + Assigned Engineer. Use of this state is optional. + </dd> + + <dt class="post"> + [% display_value("bug_status", "POST") FILTER html %] + </dt> + <dd class="post"> + This [% terms.bug %] report has a fix that has been posted + for review, either upstream or internally, by the Assigned + Engineer. Use of this state is optional. Some teams, such + as kernel and virtualization, use it. + </dd> + + <dt class="modified"> + [% display_value("bug_status", "MODIFIED") FILTER html %] + </dt> + <dd class="modified"> + This [% terms.bug %] report has been fixed, unit tested + and checked into source control by the Assigned Engineer. + </dd> + + <dt class="on_qa"> + [% display_value("bug_status", "ON_QA") FILTER html %] + </dt> + <dd class="on_qa"> + This [% terms.bug %] fix is available for the Assigned + Quality Engineer to test. If not using the Errata Tool, + typically moved to <b>[% display_value("bug_status", "ON_QA") FILTER html %]</b> + by RCM when the [% terms.bug %] + fix has been incorporated into a build which is available + to be tested. If using the Errata Tool, moved to + <b>[% display_value("bug_status", "ON_QA") FILTER html %]</b> + automatically when the [% terms.bug %] number is added to + the erratum’s [% terms.bug %] list, and a build is available + to be tested. Test cases or plans are written and available. + </dd> + + <dt class="verified"> + [% display_value("bug_status", "VERIFIED") FILTER html %] + </dt> + <dd class="verified"> + This [% terms.bug %] fix has successfully finished testing + by the Assigned Quality Engineer. If not using the Errata Tool, + [% terms.bug %] reports may move to + <b>[% display_value("bug_status", "CLOSED") FILTER html %]</b> once verified in + a build. + </dd> + + <dt class="release_pending"> + [% display_value("bug_status", "RELEASE_PENDING") FILTER html %] + </dt> + <dd class="release_pending"> + This [% terms.bug %] fix is being prepared for delivery + to customers by the Assigned Release Configuration Management + Engineer. The most likely next state is + <b>[% display_value("bug_status", "CLOSED") FILTER html %]</b>. If using the + Errata Tool, this state change happens automatically when the + advisory is shipped. It is also possible that the [% terms.bug %] + report may transition back to <b>[% display_value("bug_status", "ASSIGNED") FILTER html %]</b> + if a problem has been found. + </dd> + [% Hook.process('open-status') %] </dl> </td> - - <td> - No resolution yet. All [% terms.bugs %] which are in one of - these "open" states have no resolution set. - </td> </tr> <tr class="header_row"> <td colspan="2">Closed [% terms.Bugs %]</td> </tr> - <tr> <td> <dl> - <dt class="resolved"> - [% display_value("bug_status", "RESOLVED") FILTER html %] + <dt class="closed"> + [% display_value("bug_status", "CLOSED") FILTER html %] </dt> - <dd class="resolved"> - A resolution has been performed, and it is awaiting verification by - QA. From here [% terms.bugs %] are either reopened and given some - open status, or are verified by QA and marked - <b>[% display_value("bug_status", "VERIFIED") FILTER html %]</b>. + <dd class="closed"> + This [% terms.bug %] fix has been resolved by the Assigned Engineer. + The <b>[% display_value("bug_status", "CLOSED") FILTER html %]</b> + state includes the resolution field which describes why + [% terms.abug %] report is closed. See Resolution descriptions. If + the <b>[% display_value("bug_status", "CLOSED") FILTER html %]</b> + resolution <b>[% display_value("bug_status", "ERRATA") FILTER html %]</b> + is set, the [% terms.bug %] report cannot be reopened. Instead, + enter a new [% terms.bug %] report for a new problem. </dd> - <dt class="verified"> - [% display_value("bug_status", "VERIFIED") FILTER html %] - </dt> - <dd class="verified"> - QA has looked at the [% terms.bug %] and the resolution and - agrees that the appropriate resolution has been taken. This is - the final status for [% terms.bugs %]. - </dd> - [% Hook.process('closed-status') %] </dl> </td> + </tr> + + <tr> + <td id="resolution" colspan="2"> + <h2>[% field_descs.resolution FILTER upper FILTER html %]</h2> + The [% field_descs.resolution FILTER html %] field indicates what + happened to this [%+ terms.bug %]. + </td> + </tr> + <tr colspan="2"> <td> <dl> - <dt class="fixed"> - [% display_value("resolution", "FIXED") FILTER html %] + <dt class="currentrelease"> + [% display_value("resolution", "CURRENTRELEASE") FILTER html %] </dt> - <dd class="fixed"> - A fix for this [% terms.bug %] is checked into the tree and - tested. + <dd class="currentrelease"> + The problem described has been fixed in the current supported release. </dd> - <dt class="invalid"> - [% display_value("resolution", "INVALID") FILTER html %] + <dt class="duplicate"> + [% display_value("resolution", "DUPLICATE") FILTER html %] </dt> - <dd class="invalid"> - The problem described is not [% terms.abug %]. + <dd class="duplicate"> + The problem is a duplicate of an existing [% terms.bug %] report. + Marking [% terms.abug %] report duplicate requires the [% terms.bug %] + number of the duplicate [% terms.bug %] report. + </dd> + + <dt class="errata"> + [% display_value("resolution", "ERRATA") FILTER html %] + </dt> + <dd class="errata"> + The problem described has been fixed and is available as an update + from our support web site. + </dd> + + <dt class="notabug"> + [% display_value("resolution", "NOTABUG") FILTER html %] + </dt> + <dd class="notabug"> + The problem described is not [% terms.abug %]. An explanation of + why this resolution has been chosen should be supplied as a comment. </dd> <dt class="wontfix"> [% display_value("resolution", "WONTFIX") FILTER html %] </dt> <dd class="wontfix"> - The problem described is [% terms.abug %] which will never be - fixed. + The problem described is [% terms.abug %] report which will not + be fixed. An example of why this might be true is due to significant + divergence from upstream. An explanation of why this resolution has + been chosen should be supplied as a comment. </dd> - <dt class="duplicate"> - [% display_value("resolution", "DUPLICATE") FILTER html %] + <dt class="cantfix"> + [% display_value("resolution", "CANTFIX") FILTER html %] </dt> - <dd class="duplicate"> - The problem is a duplicate of an existing [% terms.bug %]. - When [% terms.abug %] is marked as a - <b>[% display_value("resolution", "DUPLICATE") FILTER html %]</b>, - you will see which [% terms.bug %] it is a duplicate of, - next to the resolution. + <dd class="cantfix"> + The problem described is [% terms.abug %] report which cannot be fixed. + It may be for a component which we do not support, or [% terms.abug %] + report that has not received a reply after requesting "needinfo" of + someone for a while. If possible, use more common resolutions such as + <b>[% display_value("bug_status", "WONTFIX") FILTER html %]</b> or + <b>[% display_value("bug_status", "NOTABUG") FILTER html %]</b>. + If you must choose this resolution, provide an + explanation of why this resolution has been chosen in a comment. + </dd> + + <dt class="deferred"> + [% display_value("resolution", "DEFERRED") FILTER html %] + </dt> + <dd class="deferred"> + The problem described is [% terms.abug %] which will be fixed in the + next supported release, but which is not planned to be released in the + release against which the [% terms.bug %] was filed. If a release flag + is being used on this [% terms.bug %] report, it is preferred to move + it to the next release flag instead of setting the Status field to + <b>[% display_value("bug_status", "CLOSED") FILTER html %]</b> + and the Resolution field + to <b>[% display_value("bug_status", "DEFERRED") FILTER html %]</b>. If you must + choose this resolution, provide an explanation of why this resolution + has been chosen in a comment. + </dd> + + + + <dt class="insufficient_data"> + [% display_value("resolution", "INSUFFICIENT_DATA") FILTER html %] + </dt> + <dd class="insufficient_data"> + The problem description is insufficient for the assignee to work + on the [% terms.bug %] report. This may be due to a lack of clear + requirements or insufficient information to reproduce the + [% terms.bug %]. Before using this resolution, please use the + needinfo flag to request more information and allow a reasonable + time for the information to be provided. If you must choose this + resolution, provide an explanation of why this resolution has + been chosen in a comment. + </dd> + + <dt class="nextrelease"> + [% display_value("resolution", "NEXTRELEASE") FILTER html %] + </dt> + <dd class="nextrelease"> + The problem described has been fixed in the next supported release + of the product, and is not planned to be fixed in the release + against which the [% terms.bug %] was filed. If a release flag is + being used on this [% terms.bug %] report, it is preferred to move + it to the next release flag instead of setting the Status field to + <b>[% display_value("bug_status", "CLOSED") FILTER html %]</b>and the Resolution + field to <b>[% display_value("bug_status", "NEXTRELEASE") FILTER html %]</b>. + If you must choose this resolution, provide an explanation of why + this resolution has been chosen in a comment. + </dd> + + <dt class="rawhide"> + [% display_value("resolution", "RAWHIDE") FILTER html %] + </dt> + <dd class="rawhide"> + The problem described has been fixed in the latest development + release of our product obtainable from our ftp site. This resolution + should not be used for Red Hat Enterprise Linux [% terms.bugs %]. + </dd> + + <dt class="upstream"> + [% display_value("resolution", "UPSTREAM") FILTER html %] + </dt> + <dd class="upstream"> + The problem described has been filed in an upstream [% terms.bug %] + tracker or reported to the upstream mailing list. This typically + includes almost all feature requests and enhancements, and most + [% terms.bugs %] that we don't consider release showstoppers. (Moving + [% terms.bugs %] upstream typically increases the chance that someone + will have time to look at it, and often the upstream developer or + [% terms.bug %] owner even works at Red Hat.<br><br> Moving [% terms.bugs %] + upstream simply allows us to keep everything in one place, and work + better with open source community developers outside of Red Hat. We only + keep [% terms.bugs %] open on redhat.com to track our immediate + short-term items, or issues with our patches and/or packaging, or because + the upstream package in question has poor [% terms.bug %] tracking.<br><br> + The main focus of development for most packages is the upstream community, + even when Red Hat is a big contributor to the community.) Some upstream + [% terms.bug %] trackers include http://bugzilla.gnome.org, + http://b[% %]ugs.kde.org, and http://b[% %]ugzilla.mozilla.org. + This resolution should not be used for Red Hat Enterprise Linux [% terms.bugs %]. </dd> <dt class="worksforme"> [% display_value("resolution", "WORKSFORME") FILTER html %] </dt> <dd class="worksforme"> - All attempts at reproducing this [% terms.bug %] were futile, - and reading the code produces no clues as to why the described - behavior would occur. If more information appears later, - the [% terms.bug %] can be reopened. + The problem described is not [% terms.abug %]. It is preferred that + resolution <b>[% display_value("bug_status", "NOTABUG") FILTER html %]</b> + be used if problem has been determined to not be + [% terms.abug %], or use the needinfo flag if more information is needed. + If you must choose this resolution (in Fedora, for example), provide + an explanation of why this resolution has been chosen in a comment. + This resolution should not be used for Red Hat Enterprise Linux [% terms.bugs %]. </dd> - [% Hook.process('resolution') %] </dl> </td> @@ -177,7 +325,7 @@ [% SET field_help_map = {} %] [% FOREACH field = bug_fields.keys %] [% SET field_desc = field_descs.$field %] - [% field_help_map.$field_desc = { help => help_html.$field, + [% field_help_map.$field_desc = { help => help_html.$field, field => field } %] [% END %] @@ -189,8 +337,9 @@ [%# These are fields that don't need to be documented, either because # they have docs somewhere else in the UI, or they don't show up on bugs. # %] -[% SET skip_fields = [ - 'days_elapsed', +[%## REDHAT EXTENSION 1399927 - add see_also and following %] +[% SET skip_fields = [ + 'days_elapsed', 'everconfirmed', 'reporter_accessible', 'cclist_accessible', @@ -199,6 +348,17 @@ 'owner_idle_time', 'bug_status', 'resolution', + 'see_also', + 'extra_components', + 'extra_versions', + 'reporter_realname', + 'assigned_to_realname', + 'rh_rule', + 'qa_contact_realname', + 'docs_contact_realname', + 'comment_tag', + 'view', + 'last_visit_ts' ] %] <dl class="field_descriptions"> @@ -212,8 +372,10 @@ [% NEXT IF field == 'status_whiteboard' AND !Param('usestatuswhiteboard') %] [% NEXT IF field == 'target_milestone' AND !Param('usetargetmilestone') %] + [% NEXT IF field_object.custom && !field_object.user_can_view(user) %] + [%# For now we don't have help for attachment fields and so on. %] - [% NEXT IF field.match('\.') %] + [% NEXT IF field.match('attach.*\.') %] [% NEXT IF skip_fields.contains(field) %] diff --git a/template/en/default/pages/release-notes.html.tmpl b/template/en/default/pages/release-notes.html.tmpl index b89e3a61d..dac1cb7c0 100644 --- a/template/en/default/pages/release-notes.html.tmpl +++ b/template/en/default/pages/release-notes.html.tmpl @@ -9,7 +9,6 @@ [% SET title = "Bugzilla 5.0 Release Notes" %] [% INCLUDE global/header.html.tmpl title = title - bodyclasses = ['narrow_page'] %] <h1>[% title FILTER html %]</h1> @@ -19,7 +18,7 @@ <li><a href="#point">Updates in this 5.0.x Release</a></li> <li><a href="#req">Minimum Requirements</a></li> <li><a href="#feat">New Features and Improvements</a></li> - <li><a href="#issues">Outstanding Issues</a></li> + <!--li><a href="#issues">Outstanding Issues</a></li--> <li><a href="#code_changes">Code Changes Which May Affect Customizations and Extensions</a></li> <li><a href="https://bugzilla.readthedocs.org/en/latest/installing/upgrading.html"> @@ -43,6 +42,8 @@ <h2 id="point">Updates in this 5.0.x Release</h2> +[% Hook.process('updates_top') %] + <h3>5.0.4</h3> <p>This release fixes one security issue. See the diff --git a/template/en/default/pages/whats-new.html.tmpl b/template/en/default/pages/whats-new.html.tmpl new file mode 100644 index 000000000..0bbefcf46 --- /dev/null +++ b/template/en/default/pages/whats-new.html.tmpl @@ -0,0 +1,180 @@ +[%# 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. + #%] + +[% SET title = "Bugzilla 5.0 Changes" %] +[% INCLUDE global/header.html.tmpl + title = title +%] + +<h1>[% title FILTER html %]</h1> + +<h2>Upstream changes</h2> +<ul class="bz_toc"> + <li><a href="#introduction">Introduction</a></li> + <li><a href="#rest">REST Interface</a></li> + <li><a href="#rpcauth">RPC Authentication</a></li> + <li><a href="#apichanges">API Changes</a></li> +</ul> +<h2>Red Hat changes</h2> +<ul class="bz_toc"> + <li><a href="#code">Code Base Refactor</a></li> + <li><a href="#uioverhaul">UI Refactor</a></li> + <li><a href="#emailin">Email In</a></li> + <li><a href="#saml">SAML Authentication</a></li> + <li><a href="#bulkupdates">Improved Bulk Updates</a></li> + <li><a href="#agile">Bayoteers Extensions</a></li> + <li><a href="#mce">Multiple Components & Versions deprecated</a></li> + <li><a href="#depproducts">Dependent Products</a></li> + <li><a href="#policies">Enforcement of group policies</a></li> + <li><a href="#proddash">Product Dashboards</a></li> + <li><a href="#diff2html">Update Patch Viewer</a></li> +</ul> + +<h2 id="introduction">Introduction</h2> + +<p>Bugzilla 5 introduces several changes for RPC, including a REST endpoint and +API Tokens. This document is a brief summary. For full changes please see the +<a href="page.cgi?id=release-notes.html">release notes</a>.</p> + +<p>No immediate changes are required, but please note that the existing login +method and RPC endpoints are deprecated.<br>The Bugzilla team recommends upgrading +your scripts to ensure a smooth transition when these features are removed.</p> +<hr> + +<section> +<h2>Upstream Changes</h2> +<h3 id="rest">The REST Interface</h3> + +<p>Bugzilla 5.0 introduces a new REST endpoint to replace XML-RPC and JSON-RPC</p> + +<p>Full documentation for the REST interface can be found <a href="docs/en/html/api/index.html">here</a>.</p> + +<p>The current XML and JSON RPC endpoints are deprecated in favor of REST, and are +<a href="page.cgi?id=release-notes.html#feat_webservices">slated to be removed +from Bugzilla 7</a>. Please consider updating your scripts to use the REST endpoint.</p> + +<h3 id="rpcauth">RPC Authentication</h3> + +<p>Bugzilla 5 introduces API keys as a new authentication mechanism. To create an +API key, simply visit your <a href="userprefs.cgi?tab=apikey">preferences</a> page +and click on the 'API Key' tab.</p> + +<p>The current method of logging in using passwords is deprecated, and will be removed +in a future release.</p> + +<p>Please see the full <a href="docs/en/html/api/core/v1/general.html#authentication">documentation</a> +for usage instructions.</p> + +<h4>Examples</h4> +<p>Instead of logging in, you would just use your pre-generated API key with each request.</p> + +<p>For a HTTP GET request you would append it to the URL like so:</p> +<pre>https://bugzilla.redhat.com/rest/bug/bug_id?<b>api_key=ABC123</b></pre> + +<p>For other requests, such as a +<a href="docs/en/html/api/core/v1/bug.html#update-bug">b[%# %]ug update</a> +you embed it in the JSON body with the other RPC parameters</p> +<pre><code> +PUT /rest/bug/bug_id +{ + "status": "CLOSED", + "resolution": "CURRENTRELEASE", + <b>"api_key": "abc123"</b> +} +</pre></code> + +<h3 id="apichanges">API Changes</h3> + +<p>There has been some minor API changes in Bugzilla 5.0</p> + +<h4>New Methods</h4> +<ul> + <li><a href="docs/en/html/api/core/v1/attachment.html#update-attachment">B[%# %]ug.update_attachment</a></li> + <li><a href="docs/en/html/api/core/v1/group.html#get-group">Group.get</a></li> + <li><a href="docs/en/html/api/core/v1/flagtype.html#get-flag-type">FlagType.get</a></li> + <li><a href="docs/en/html/api/core/v1/user.html#valid-login">User.valid_login</a></li> +</ul> + +<h4>Removed Methods</h4> +<p>These methods were deprecated in Bugzilla 4 and have been removed from Bugzilla 5.</p> +<ul> + <li>B[%# %]ug.get_bugs</li> + <li>B[%# %]ug.get_history</li> +</ul> +</section> +<hr> +<section> +<h2>Red Hat Changes</h2> +<h3 id="code">Code Base Refactor</h3> +<p>Red Hat Bugzilla has been carrying code deprecated upstream from Bugzilla 2 & 3. As part of the Bugzilla 5 merge we have removed a significant amount of this old code; paying down a significant technical debt and allowing us to become more agile at integrating upstream changes and adding custom extensions.</p> + +<h3 id="uioverhaul">User Interface Refactor</h3> +<p>The Bugzilla UI has been overhauled using <a href="https://selectize.github.io/selectize.js/">SelectizeJS</a> and <a href="https://datatables.net/">DataTables</a>.</p> +<p>This allows us to speed up page load times by performing expensive data lookups only when required.</p> + +<h3 id="emailin">Email In</h3> + +<p>[% terms.Bugs %] can now be created and updated by email. Full [% terms.bug %] editing and commenting is available.</p> +<p>For this feature to work your emails must be cryptographically signed, with a signature that Bugzilla recognizes</p> +<p>See the <a href="docs/en/html/integrating/api/email_in/email_in.html#description">email in</a> docs for instructions on how to set up a crypto key, and the email format required for creating and updating [% terms.bugs %].</p> + +<h3 id="saml">SAML Authentication</h3> + +<p>Red Hat Bugzilla now allows users to log in using SAML authentication.</p> +<p>If your email address in Bugzilla is known to one of the following identity +providers, you may log in with SAML</p> + +<ul> + <li>Red Hat Employee</li> + <li>Red Hat Customer Account</li> + <li>Fedora Account System</li> +</ul> + +<h3 id="bulkupdates">Improved Bulk Updates</h3> + +<p>Large bulk update operations no longer time out.</p> + +<h3 id="mce">Multiple Components & Versions deprecated</h3> + +<p>The "Multiple Components & Versions" extension has been deprecated. +Existing products that already use this extension may continue to use it until EOL. +No new products will be allowed to use it.</p> + +<p>In the future this extension will be removed completely.</p> + +<h3 id="agile">Bayoteers Extensions</h3> + +<p>Red Hat Bugzilla now incorporates some of the <a href="https://github.com/bayoteers">Bayoteers</a> extensions. This enables features such as:</p> + +<ul> + <li>BugViewPlus: + <ul> + <li>Inline Editing of [% terms.bugs %] in search results</li> + <li>Optional simplified [% terms.bug %] view</li> + <li>Simple content templates for new [% terms.bug %] creation</li> + </ul> + </li> + <li>TreeViewPlus: improved dependency tree view</li> + <li>AgileTools: team management and scrum tools </li> +</ul> + +<h3 id="depproducts">Dependent Products</h3> +<p>The layered products custom field has been replaced by the Dependent Products extension. This allows simpler and more accurate editing and control of the values within the field, as well as who receives notifications.</p> + +<p>Documentation for this feature is available <a href="docs/en/html/integrating/api/Bugzilla/Extension/DependentProducts.html">here</a> + +<h3 id="policies">Enforcement of group policies</h3> +<p>Red Hat Bugzilla has had policies restricting group membership and group relationships for a long time. It was left to site administrators to know and enforce these policies. As part of Bugzilla 5 we have encoded these policies and the system will now enforce them.</p> + +<h3 id="proddash">Product Dashboards</h3> +<p>We have added the BMO Product Dashboard to the "My Links" menu, allowing users to see overviews of product data and performance. You can see the Red Hat Bugzilla project's status <a href="page.cgi?id=productdashboard.html&product=Bugzilla">here</a></p> + +<h3 id="diff2html">Update Patch Viewer</h3> +<p>The old PatchViewer has been replaced with the much more modern <a href="https://diff2html.xyz/">diff2html</a> diff viewer</p> + +[% INCLUDE global/footer.html.tmpl %] diff --git a/template/en/default/reports/components.html.tmpl b/template/en/default/reports/components.html.tmpl index 22a7c948e..ce7b8665a 100644 --- a/template/en/default/reports/components.html.tmpl +++ b/template/en/default/reports/components.html.tmpl @@ -30,7 +30,10 @@ <div id="product_desc">[% product.description FILTER html_light %]</div> <p>Select a component to see open [% terms.bugs %] in that component.</p> - +<p> +Rows with<span class="disabled"> this background colour </span>are disabled and +cannot have new bugs opened for them. +</p> <table id="component_table"> <tr> <th>Component</th> @@ -52,7 +55,7 @@ [%############################################################################%] [% BLOCK describe_comp %] - <tr id="[% comp.name FILTER html %]"> + <tr id="[% comp.name FILTER html %]" class="[% UNLESS comp.isactive %] disabled[% END %]"> <td rowspan="2" class="component_name"> <a href="buglist.cgi?product= [%- product.name FILTER uri %]&component= @@ -60,17 +63,29 @@ [% comp.name FILTER html %]</a> </td> <td class="component_assignee"> - [% INCLUDE global/user.html.tmpl who = comp.default_assignee %] +[%## REDHAT EXTENSION BEGIN 735880 %] + <a href="buglist.cgi?product= + [%- product.name FILTER uri %]&component= + [%- comp.name FILTER uri %]&resolution=---&email1= + [%- comp.default_assignee.email FILTER uri %]&emailtype1=exact&emailassigned_to1=1"> + [% comp.default_assignee.name OR comp.default_assignee.email FILTER html %]</a> </td> [% IF Param("useqacontact") %] <td class="component_qa_contact"> - [% IF comp.default_qa_contact %] - [% INCLUDE global/user.html.tmpl who = comp.default_qa_contact %] - [% END %] + [% IF comp.default_qa_contact.email -%] + <a href="buglist.cgi?product= + [%- product.name FILTER uri %]&component= + [%- comp.name FILTER uri %]&resolution=---&email1= + [%- comp.default_qa_contact.email FILTER uri %]&emailtype1=exact&emailqa_contact1=1"> + [% comp.default_qa_contact.name OR comp.default_qa_contact.email FILTER html %]</a> + [%- ELSE -%] + + [%- END %] +[%## REDHAT EXTENSION END 735880 %] </td> [% END %] </tr> - <tr> + <tr class="[% UNLESS comp.isactive %] disabled[% END %]"> <td colspan="[% numcols - 1 %]" class="component_description"> [% comp.description FILTER html_light %] </td> diff --git a/template/en/default/reports/duplicates-table.html.tmpl b/template/en/default/reports/duplicates-table.html.tmpl index b8cd2ca78..709959b22 100644 --- a/template/en/default/reports/duplicates-table.html.tmpl +++ b/template/en/default/reports/duplicates-table.html.tmpl @@ -29,6 +29,7 @@ { name => "count", description => "Dupe<br>Count" }, { name => "delta", description => "Change in last<br>$changedsince day(s)" }, + { name => "product", description => field_descs.product }, { name => "component", description => field_descs.component }, { name => "bug_severity", description => field_descs.bug_severity }, { name => "priority", description => field_descs.priority }, @@ -88,6 +89,7 @@ </td> <td class="count">[% item.count FILTER html %]</td> <td class="delta">[% item.delta FILTER html %]</td> + <td class="product"> [% bug.product FILTER html %] </td> <td class="component">[% bug.component FILTER html %]</td> <td class="bug_severity"> [%- display_value('bug_severity', bug.bug_severity) FILTER html %] diff --git a/template/en/default/reports/keywords.html.tmpl b/template/en/default/reports/keywords.html.tmpl index 598979d33..9e89bfa4e 100644 --- a/template/en/default/reports/keywords.html.tmpl +++ b/template/en/default/reports/keywords.html.tmpl @@ -51,7 +51,7 @@ [% END %] </table> -[% IF user.in_group("editkeywords") %] +[% IF user.can_edit_keywords() %] <p> <a href="editkeywords.cgi">Edit keywords</a>. </p> diff --git a/template/en/default/reports/report-table.csv.tmpl b/template/en/default/reports/report-table.csv.tmpl index e94014b92..c43790f4e 100644 --- a/template/en/default/reports/report-table.csv.tmpl +++ b/template/en/default/reports/report-table.csv.tmpl @@ -14,8 +14,9 @@ [% row_field_disp = field_descs.$row_field || row_field %] [% IF tbl_field %] + [%## REDHAT EXTENSION 876015: Add docs contact %] [% IF tbl_field == 'assigned_to' OR tbl_field == 'reporter' - OR tbl_field == 'qa_contact' + OR tbl_field == 'qa_contact' OR tbl_field == 'docs_contact' %] [% tbl_disp = tbl FILTER email %] [% ELSE %] @@ -54,8 +55,9 @@ [% BLOCK value_display %] [% SET disp_value = display_value(field, value) %] + [%## REDHAT EXTENSION 876015: Add docs contact %] [% IF field == 'assigned_to' OR field == 'reporter' - OR field == 'qa_contact' + OR field == 'qa_contact' OR tbl_field == 'docs_contact' %] [% disp_value = value FILTER email %] [% END %] diff --git a/template/en/default/reports/report-table.html.tmpl b/template/en/default/reports/report-table.html.tmpl index 57e998b1d..e5f06b500 100644 --- a/template/en/default/reports/report-table.html.tmpl +++ b/template/en/default/reports/report-table.html.tmpl @@ -40,22 +40,58 @@ function bz_encode (str, decode) { return encodeURIComponent(str).replace(/'/g, escape); }; +[% IF urlbase.match('j_top=OR') %] +[% urlbase = urlbase.replace('j_top=OR', 'j_top=AND') %] +[% urlbase = urlbase _ '&f0=OP&j0=OR' %] +[% END %] +[% matches = urlbase.match('f([0-9]+)=', 1) %] +[% count = matches ? matches.nsort.pop + 1 : 0 %] +[% op_count = urlbase.match('=OP') ? urlbase.match('=OP', 1).size : 0 %] +[% cp_count = urlbase.match('=CP') ? urlbase.match('=CP', 1).size : 0 %] +[% cps_to_add = count + (op_count - cp_count) %] +[% WHILE count < cps_to_add %] +[% urlbase = urlbase _ '&f' _ count _ '=CP' %] +[% count = count +1 %] +[% END %] + YAHOO.util.Event.addListener(window, "load", function() { this.Linkify = function(elLiner, oRecord, oColumn, oData) { + var cmp = "equals"; + var val = bz_encode(oColumn.field); + if(val.search(/\S/) == -1){ + cmp = "isempty"; + val = ""; + } + + var rcmp = "equals"; + var rval = bz_encode(oRecord.getData("row_title"), 1); + if(rval.search(/\S/) == -1){ + rcmp = "isempty"; + rval = ""; + } + if (oData == 0) elLiner.innerHTML = "."; else if (oRecord.getData("row_title") == "Total") - elLiner.innerHTML = '<a href="[% urlbase FILTER js %]&[% col_field FILTER uri FILTER js %]=' - + bz_encode(oColumn.field) - + '[% "&" _ row_vals IF row_vals %]">' + oData + '</a>'; + elLiner.innerHTML = '<a href="[% urlbase FILTER js %]&f[% count %]=OP&j[% count %]=AND&f[% count + 1 %]=[% col_field FILTER uri FILTER js %]&o[% count + 1 %]=' + + cmp +'&v[% count + 1 %]=' + val + + '[% "&" _ row_vals IF row_vals %]&f[% count + 2 %]=CP">' + oData + '</a>'; else - elLiner.innerHTML = '<a href="[% urlbase FILTER js %]&[% row_field FILTER uri FILTER js %]=' - + bz_encode(oRecord.getData("row_title"), 1) - + '&[% col_field FILTER uri FILTER js %]=' - + bz_encode(oColumn.field) + '">' + oData + '</a>'; + elLiner.innerHTML = '<a href="[% urlbase FILTER js %]&f[% count %]=OP&j[% count %]=AND&f[% count + 1%]=[% row_field FILTER uri FILTER js %]&o[% count + 1 %]=' + + rcmp +'&v[% count + 1 %]=' + rval + + '&f[% count + 2 %]=[% col_field FILTER uri FILTER js %]&o[% count + 2 %]=' + + cmp +'&v[% count + 2 %]=' + val + '&f[% count + 3 %]=CP">' + oData + '</a>'; }; this.LinkifyTotal = function(elLiner, oRecord, oColumn, oData) { + + var rcmp = "equals"; + var rval = bz_encode(oRecord.getData("row_title"), 1); + if(rval.search(/\S/) == -1){ + rcmp = "isempty"; + rval = ""; + } + if (oData == 0) elLiner.innerHTML = "."; else if (oRecord.getData("row_title") == "Total") @@ -63,8 +99,8 @@ YAHOO.util.Event.addListener(window, "load", function() { [%~ "&" _ col_vals IF col_vals %]">' + oData + '</a>'; else - elLiner.innerHTML = '<a href="[% urlbase FILTER js %]&[% row_field FILTER uri FILTER js %]=' - + bz_encode(oRecord.getData("row_title"), 1) + elLiner.innerHTML = '<a href="[% urlbase FILTER js %]&f[% count %]=[% row_field FILTER uri FILTER js %]&o[% count %]=' + + rcmp +'&v[% count %]=' + rval + '[% "&" _ col_vals IF col_vals %]">' + oData + '</a>'; YAHOO.util.Dom.addClass(elLiner.parentNode, "ttotal"); @@ -248,8 +284,10 @@ YAHOO.util.Event.addListener(window, "load", function() { [% BLOCK value_display %] [% SET disp_value = display_value(field, value) %] + [%## REDHAT EXTENSION 876015: Add docs contact %] [% IF field == 'assigned_to' OR field == 'reporter' OR field == 'qa_contact' + OR field == 'docs_contact' %] [% disp_value = value FILTER email %] [% END %] diff --git a/template/en/default/request/queue.html.tmpl b/template/en/default/request/queue.html.tmpl index 101fdd046..caf844de3 100644 --- a/template/en/default/request/queue.html.tmpl +++ b/template/en/default/request/queue.html.tmpl @@ -8,8 +8,9 @@ [% USE Bugzilla %] [% cgi = Bugzilla.cgi %] - -[% PROCESS "global/js-products.html.tmpl" %] +[% table_id_list = [] %] +[% my_id = 0 %] +[%# PROCESS "global/js-products.html.tmpl" %] [% PROCESS global/header.html.tmpl title="Request Queue" @@ -49,7 +50,7 @@ to some group are shown by default. id => "product" name => "product" add => "Any" - onchange => "selectProduct(this, this.form.component, 'Any');" + onchange => "\$('#component').clearComponentSearch('product');\$('#component').fetch_all(0, true);" %] </td> <th>Flag:</th> @@ -60,16 +61,16 @@ to some group are shown by default. default=cgi.param('type') %] </td> + [%## REDHAT EXTENSION START 406291 %] [%# We could let people see a "queue" of non-pending requests. %] - <!-- <th>Status:</th> <td> - [%# PROCESS "global/select-menu.html.tmpl" + [% PROCESS "global/select-menu.html.tmpl" name="status" options=["all", "?", "+-", "+", "-"] default=cgi.param('status') %] </td> - --> + [%## REDHAT EXTENSION END 406291 %] </tr> <tr> @@ -87,13 +88,22 @@ to some group are shown by default. </td> <th>Component:</th> <td> - <select name="component"> + <select id="component" name="component"> <option value="">Any</option> [% FOREACH comp = components %] <option value="[% comp FILTER html %]" [% "selected" IF cgi.param('component') == comp %]> [% comp FILTER html %]</option> [% END %] </select> + <script type="text/javascript"> + $(document).ready(function () { + init_products({}); + init_components({disabled: 1, onclick: 1}); + [% UNLESS cgi.param('product') %]$("#component").selectize()[0].selectize.disable();[% END %] + }); + </script> + </td> + </td> <th>Group By:</th> <td> @@ -167,20 +177,43 @@ to some group are shown by default. <a href="request.cgi?[% urlquerypart FILTER html %]&ctype=csv">View entire list as CSV</a> [% END %] +<script> +$(document).ready(function() { +[% FOREACH tbl = table_id_list %] + $('#[% tbl FILTER js %]').DataTable({ + ordering: true, + stateSave: true, + pagingType: 'full_numbers', + aLengthMenu: [[25, 50, 100, 500, -1], [25, 50, 100, 500, 'All']], + fixedHeader: true, +[% IF user.settings.def_table_size.value %] + iDisplayLength: [% user.settings.def_table_size.value FILTER html %], +[%- END %] + }); +[% END %] +}); +</script> + [% PROCESS global/footer.html.tmpl %] [% BLOCK start_new_table %] [% buglist = {} %] - + [% my_id = my_id + 1 %] <h3>[% column_headers.$group_field %]: [%+ (request.$group_field || "None") FILTER email FILTER html %]</h3> - <table class="requests"> + [% table_id_list.push(my_id) %] + <table class="requests" + id="[% my_id FILTER email FILTER html %]" + > + <thead> <tr> [% FOREACH column = display_columns %] [% NEXT IF column == group_field || excluded_columns.contains(column) %] <th>[% column_headers.$column %]</th> [% END %] </tr> + </thead> + <tbody> [% END %] [% BLOCK display_type %] @@ -192,9 +225,7 @@ to some group are shown by default. [% END %] [% BLOCK display_bug %] - <a href="show_bug.cgi?id=[% request.bug_id %]" - [%- ' class="bz_secure"' IF request.restricted %]> - [% request.bug_id %]: [%+ request.bug_summary FILTER html %]</a> + [% request.bug_id _ ': ' _ request.bug_summary FILTER bug_link(request.bug_id, { use_alias => 1,extra_classes => (request.restricted ? 'bz_secure' : '')}) FILTER none %] [% END %] [% BLOCK display_attachment %] @@ -219,6 +250,7 @@ to some group are shown by default. [% END %] [% BLOCK display_buglist %] + </tbody> </table> [% NEXT UNLESS buglist.keys.size %] <a href="buglist.cgi?bug_id= diff --git a/template/en/default/search/boolean-charts.html.tmpl b/template/en/default/search/boolean-charts.html.tmpl index bfb4e7bf1..4ed24b51f 100644 --- a/template/en/default/search/boolean-charts.html.tmpl +++ b/template/en/default/search/boolean-charts.html.tmpl @@ -35,10 +35,11 @@ "notmatches", "isempty", "isnotempty", + "listofbugs", ] %] -<div class="bz_section_title" id="custom_search_filter"> - <div id="custom_search_query_controller" class="arrow">▼</div> +<div class="bz_section_title [% IF default.custom_search %] bz_search_has_options[% END %]" id="custom_search_filter"> + <div id="custom_search_query_controller" class="arrow"></div> <a id="chart" href="javascript:TUI_toggle_class('custom_search_query')" > Custom Search</a> <span class="section_help">Didn't find what you're looking for above? This area allows for ANDs, ORs, @@ -57,7 +58,7 @@ condition = { f => 'noop' } cond_num = cond_num + 1 %] <script type="text/javascript"> - TUI_alternates['custom_search_query'] = '►'; + TUI_alternates['custom_search_query'] = ''; TUI_hide_default('custom_search_query'); TUI_alternates['custom_search_advanced'] = "Show Advanced Features"; TUI_hide_default('custom_search_advanced'); @@ -142,6 +143,7 @@ END; %] [% FOREACH field_name = field_hash.keys.sort_by_field_name(field_descs) %] + [% NEXT IF field_name == 'cf_extra_version' || field_name == 'cf_extra_component' %] [% field = field_hash.$field_name %] <option value="[% field.name FILTER html %]" [%~ ' selected="selected"' IF field.name == condition.f %]> diff --git a/template/en/default/search/field.html.tmpl b/template/en/default/search/field.html.tmpl index 5a95d67c1..9dc1666a8 100644 --- a/template/en/default/search/field.html.tmpl +++ b/template/en/default/search/field.html.tmpl @@ -23,7 +23,7 @@ <input name="[% field.name FILTER html %]" id="[% field.name FILTER html %]" size="40" [% IF onchange %] onchange="[% onchange FILTER html %]"[% END %] - value="[% value FILTER html %]" [% 'autofocus' IF focus %]> + value="[% value FILTER html %]"> [% CASE constants.FIELD_TYPE_KEYWORDS %] [% INCLUDE "bug/field-label.html.tmpl" field = field @@ -87,7 +87,9 @@ [% PROCESS "global/calendar.js.tmpl" id = field.name _ 'to' %] //--></script> [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT, - constants.FIELD_TYPE_MULTI_SELECT ] %] + constants.FIELD_TYPE_MULTI_SELECT, + constants.FIELD_TYPE_ONE_SELECT + ] %] <div id="container_[% field.name FILTER html %]" class="search_field_grid"> [% INCLUDE "bug/field-label.html.tmpl" field = field @@ -97,6 +99,11 @@ <select name="[% field.name FILTER html%]" id="[% field.name FILTER html %]" [% IF onchange %] onchange="[% onchange FILTER html %]"[% END %] +[%## REDHAT EXTENSION START 1157849 %] +[% IF field.name == 'component' %] + title="Type '..' to see all components" +[% END %] +[%## REDHAT EXTENSION END 1157849 %] multiple="multiple" size="7"> [% legal_values = ${field.name} %] [% IF field.name == "component" %] @@ -105,13 +112,45 @@ [% FOREACH current_value = legal_values %] [% SET v = current_value.name OR '---' -%] [% SET display = display_value(field.name, current_value.name) %] + [% IF field.name == 'component' || field.name == 'product' %] + <option data-data="{"value":"[% current_value.name FILTER json FILTER html %]","id":"v[% current_value.id FILTER json FILTER html %]_[%- field.name FILTER json FILTER html %]","title":"[% current_value.description FILTER json FILTER html %]"}" + [% ELSE %] <option value="[% v FILTER html %]" id="v[% current_value.id FILTER html %]_[% field.name FILTER html %]" - [% ' selected="selected"' IF value.contains( v ) %]> + [% END %] + [% ' selected="selected"' IF value.contains( v ) AND (v != '---' OR field.name == 'resolution') %]> [%~ display FILTER html ~%] </option> [% END %] </select> +[%## REDHAT EXTENSION START 1157849 1224860 %] + [% IF field.name == 'component' %] + <div class="fetch_all" onclick="$('#component').fetch_all()"><i class="fa fa-download"></i><span title="Click to list all components">Click to list all components</span></div> + <script type="text/javascript"> + $(document).ready(function () { + init_products({classification: 1, disabled: 1}); + init_components({disabled: 1, descrs: 1}); + init_sub_components({disabled: 1, myid: 'rh_sub_components', nohide: 1, use_name: 1}); +// $('#component').clearComponentSearch('product'); +// This loses selected values on page load ... +// update_selects(); + }); + +[%## REDHAT EXTENSION BEGIN 1205491 %] + function fetch_subs() { + $('#rh_sub_components').clear_unselected(); + var $sel = $('#rh_sub_components').selectize()[0].selectize; + $sel.onSearchChange('..'); + $sel.refreshOptions(false); + $sel.unlock(); + $sel.enable(); + $sel.settings.placeholder = ' '; + $sel.updatePlaceholder(); + } +[%## REDHAT EXTENSION END 1205491 %] + </script> +[%## REDHAT EXTENSION END 1157849 1224860 %] + [% END %] </div> [% IF value_controllers.${field.name}.defined %] diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index ac8aeaf61..49f49a867 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -19,9 +19,9 @@ // that specifies otherwise. // ▸ and ▾ are both utf8 escaped characters for right // and down facing arrows respectivly. -TUI_alternates['history_query'] = '►'; -TUI_alternates['people_query'] = '►'; -TUI_alternates['information_query'] = '►'; +TUI_alternates['history_query'] = ''; +TUI_alternates['people_query'] = ''; +TUI_alternates['information_query'] = ''; TUI_hide_default('history_query'); TUI_hide_default('people_query'); @@ -63,13 +63,6 @@ TUI_hide_default('information_query'); [%# *** Classification Product Component *** %] -[% value_controllers = { - 'classification' => { 'products' => bug_fields.product }, - 'product' => { 'components' => bug_fields.component, - 'versions' => bug_fields.version, - 'milestones' => bug_fields.target_milestone }, -} %] - [% Hook.process('before_selects_top') %] [% IF Param('useclassification') %] [% INCLUDE "search/field.html.tmpl" @@ -79,16 +72,24 @@ TUI_hide_default('information_query'); %] [% END %] +[%## REDHAT EXTENSION 823339: Add the onchange %] +[%## REDHAT EXTENSION START 1157849 add .clearComponentSearch to onchange %] [% INCLUDE "search/field.html.tmpl" field => bug_fields.product accesskey => "p" value => default.product + onchange => "\$('#component').clearComponentSearch('product');update_selects(false, true);" %] +[%## REDHAT EXTENSION END 1157849 %] +[%## REDHAT EXTENSION 1410695: Add the onchange %] [% INCLUDE "search/field.html.tmpl" field => bug_fields.component accesskey => "m" value => default.component + onchange => "\$('#component_save').val(\$('#component').selectize()[0].selectize.getValue());fetch_subs();" %] +[%## REDHAT EXTENSION 653316 %] +[% INCLUDE "search/sub_components.html.tmpl" %] [% INCLUDE "search/field.html.tmpl" field => bug_fields.bug_status accesskey => "a" @@ -102,8 +103,22 @@ TUI_hide_default('information_query'); [% Hook.process('after_selects_top') %] -<div id="detailed_information" class="bz_section_title"> - <div id="information_query_controller" class="arrow">▼</div> +[%## REDHAT EXTENSION START 1209381 %] +[% show_di = 0 %] +[% IF default.votes OR default.bug_id OR default.deadlinefrom OR default.deadlineto OR default.version OR default.target_milestone OR default.target_release OR default.bug_severity OR default.priority OR default.rep_platform OR default.op_sys %] + [% show_di = 1 %] +[% END %] +[% IF show_di == 0 %] + [% FOREACH field_container = freetext_fields %] + [% IF default.${field_container.field.name} %] + [% show_di = 1 %] + [% LAST %] + [% END %] + [% END %] +[% END %] +[%## REDHAT EXTENSION END 1209381 %] +<div id="detailed_information" class="bz_section_title [% IF show_di %] bz_search_has_options[% END %]"> + <div id="information_query_controller" class="arrow"></div> <a href="javascript:TUI_toggle_class('information_query')"> Detailed [% terms.Bug %] Information </a> @@ -114,6 +129,7 @@ TUI_hide_default('information_query'); [% IF Param('timetrackinggroup') %] [%+ field_descs.deadline FILTER html %], [%+ END %] [% terms.Bug %] Numbers, [%+ field_descs.version FILTER html %], [% IF Param('usetargetmilestone') %] [%+ field_descs.target_milestone FILTER html %], [%+ END %] + [% IF Param('usetargetrelease') %] [%+ field_descs.target_release FILTER html %], [%+ END %] [% field_descs.bug_severity FILTER html %], [%+ field_descs.priority FILTER html %], [%+ field_descs.rep_platform FILTER html %], [%+ field_descs.op_sys FILTER html %] </span> @@ -172,6 +188,12 @@ TUI_hide_default('information_query'); <select name="bug_id_type" id="bug_id_type"> <option value="anyexact"[% " selected" IF default.bug_id_type.0 == "anyexact" %]>only included in</option> <option value="nowords"[% " selected" IF default.bug_id_type.0 == "nowords" %]>excluded from</option> + [%## REDHAT EXTENSION BEGIN 1215019 %] + <option value="anddependson"[% " selected" IF default.bug_id_type.0 == "anddependson" %]>included, with all [% terms.bugs %] they depend on, in</option> + <option value="andblocked"[% " selected" IF default.bug_id_type.0 == "andblocked" %]>included, with all [% terms.bugs %] they block, in</option> + <option value="notdependson"[% " selected" IF default.bug_id_type.0 == "notdependson" %]>excluded, with all[% terms.bugs %] they depend on, in</option> + <option value="notblocked"[% " selected" IF default.bug_id_type.0 == "notblocked" %]>excluded, with all [% terms.bugs %] they block, in</option> + [%## REDHAT EXTENSION END 1215019 %] </select> the results </span> </div> @@ -195,6 +217,14 @@ TUI_hide_default('information_query'); value => default.target_milestone %] [% END %] + [% IF Param('usetargetrelease') %] + [% fake_target_release_field = { name => bug_fields.target_release.name , + type => constants.FIELD_TYPE_SINGLE_SELECT } %] + [% INCLUDE "search/field.html.tmpl" + field => fake_target_release_field + value => default.target_release + %] + [% END %] [% INCLUDE "search/field.html.tmpl" field => bug_fields.bug_severity accesskey=> "v" @@ -219,8 +249,8 @@ TUI_hide_default('information_query'); </div> </div> [%# *** Email Numbering *** %] - <div class="bz_section_title" id="people_filter"> - <div id="people_query_controller" class="arrow">▼</div> + <div class="bz_section_title [% IF default.email %] bz_search_has_options[% END %]" id="people_filter"> + <div id="people_query_controller" class="arrow"></div> <a href="javascript:TUI_toggle_class('people_query')">Search By People</a> <span>Narrow results to a role (i.e. [% field_descs.assigned_to FILTER html %], [%+ field_descs.reporter FILTER html %], [% field_descs.commenter FILTER html %], @@ -239,6 +269,12 @@ TUI_hide_default('information_query'); [% PROCESS role_types field = { count => n, name => "emailqa_contact", label=> "the ${field_descs.qa_contact}" } %] [% END %] + [%## REDHAT EXTENSION START 876015 %] + [% IF Param('usedocscontact') %] + [% PROCESS role_types field = { count => n, name => "emaildocs_contact", + label=> "the ${field_descs.docs_contact}" } %] + [% END %] + [%## REDHAT EXTENSION END 876015 %] [% PROCESS role_types field = { count => n, name => "emailcc", label=> "a ${field_descs.cc} list member" } %] [% PROCESS role_types field = { count => n, name => "emaillongdesc", @@ -273,8 +309,8 @@ TUI_hide_default('information_query'); [% Hook.process('email_numbering_end') %] </div> [%# *** Bug Changes *** %] -<div class="bz_section_title" id="history_filter"> - <div id="history_query_controller" class="arrow">▼</div> +<div class="bz_section_title [% IF default.chfield %] bz_search_has_options[% END %]" id="history_filter"> + <div id="history_query_controller" class="arrow"></div> <a href="javascript:TUI_toggle_class('history_query')" >Search By Change History</a> <span>Narrow results to how fields have changed during a specific time period</span> </div> diff --git a/template/en/default/search/knob.html.tmpl b/template/en/default/search/knob.html.tmpl index e9e3daaf1..34657a15d 100644 --- a/template/en/default/search/knob.html.tmpl +++ b/template/en/default/search/knob.html.tmpl @@ -36,6 +36,7 @@ [% ordersdesc.$order FILTER html %]</option> [% END %] </select> + <div>Last search order: [% lastorder FILTER html %]</div>[%## REDHAT EXTENSION 1443918 %] </p> <p> diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl index 07c5fc528..676008bdc 100644 --- a/template/en/default/search/search-advanced.html.tmpl +++ b/template/en/default/search/search-advanced.html.tmpl @@ -37,7 +37,7 @@ function remove_token() { [% button_name = "Search" %] -<p id="search_help">Hover your mouse over each field label to get help for that field.</p> +<p id="search_help">Hover your mouse over each field label to get help for that field. Sections may be hidden/shown by clicking the label next to a triangle. A hollow triangle represents a section that had one or more values set when the form was loaded.</p> <form method="post" action="buglist.cgi" name="queryform" id="queryform" onsubmit="remove_token()"> diff --git a/template/en/default/search/search-report-select.html.tmpl b/template/en/default/search/search-report-select.html.tmpl index 40eeda1c1..69ebe5afb 100644 --- a/template/en/default/search/search-report-select.html.tmpl +++ b/template/en/default/search/search-report-select.html.tmpl @@ -20,7 +20,11 @@ [% FOREACH field = report_columns.keys.sort_by_field_name(field_descs) %] [% NEXT IF field == "classification" AND !Param('useclassification') %] [% NEXT IF field == "target_milestone" AND !Param('usetargetmilestone') %] + [% NEXT IF field == "target_release" AND !Param('usetargetrelease') %] [% NEXT IF field == "qa_contact" AND !Param('useqacontact') %] + [%## REDHAT EXTENSION START 876015 %] + [% NEXT IF field == "docs_contact" AND !Param('usedocscontact') %] + [%## REDHAT EXTENSION END 876015 %] <option value="[% field FILTER html %]" [% " selected" IF default.$name.0 == field %]> [% field_descs.$field || field FILTER html %]</option> diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index 78c4d861b..a00743c7f 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -236,6 +236,7 @@ security features in Bugzilla, to protect against certain types of attacks. A random string is generated by default. It's very important that this key is kept secret. It also must be very long. END + localconfig_test_password => 'Password for users created by the xt tests', localconfig_use_suexec => <<'END', Set this to 1 if Bugzilla runs in an Apache SuexecUserGroup environment. diff --git a/template/en/default/whine/mail.txt.tmpl b/template/en/default/whine/mail.txt.tmpl index 845869db4..61e906108 100644 --- a/template/en/default/whine/mail.txt.tmpl +++ b/template/en/default/whine/mail.txt.tmpl @@ -39,12 +39,14 @@ [% largest_title = 0 %] [% FOREACH col = query.columnlist %] [% NEXT IF col == 'bug_id' %] + [% NEXT UNLESS field_descs.${col} %] [% IF field_descs.${col}.length > largest_title %] [% largest_title = field_descs.${col}.length %] [% END %] [% END %] [% FOREACH col = query.columnlist %] [% NEXT IF col == 'bug_id' %] + [% NEXT UNLESS field_descs.${col} %] [%+ " " FILTER repeat(largest_title - field_descs.${col}.length) %] [% field_descs.$col %]: [% display_value($col, bug.$col) %] [% END %] |