From a68b0d94e176d37e1381f38f235f760ca0a1001d Mon Sep 17 00:00:00 2001 From: dklawren Date: Wed, 29 Aug 2018 10:40:06 -0400 Subject: Bug 1486369 - please enable "due date" for Firefox -> Security: Review Request compoent --- extensions/BMO/lib/Data.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'extensions/BMO') diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm index 30a32c95e..b444d6a24 100644 --- a/extensions/BMO/lib/Data.pm +++ b/extensions/BMO/lib/Data.pm @@ -140,6 +140,7 @@ tie(%$cf_visible_in_products, "Tie::IxHash", "Data & BI Services Team" => [], "Data Compliance" => [], "Developer Engagement" => [], + "Firefox" => ["Security: Review Requests"], "Infrastructure & Operations" => [], "Marketing" => [], "mozilla.org" => ["Security Assurance: Review Request"], -- cgit v1.2.3-24-g4f1b From 2e6e3e13587ee526ba94faabd5551e67508518f5 Mon Sep 17 00:00:00 2001 From: dklawren Date: Fri, 7 Sep 2018 06:04:50 -0400 Subject: Bug 1488292 - Remove MozReview extension from BMO code tree as MozReview is being decommissioned --- extensions/BMO/lib/Data.pm | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm index b444d6a24..dc6a3894f 100644 --- a/extensions/BMO/lib/Data.pm +++ b/extensions/BMO/lib/Data.pm @@ -27,21 +27,6 @@ our @EXPORT = qw( $cf_visible_in_products # will result in the user being redirected to that URL when viewing the # attachment. -my $mozreview_url_re = qr{ - # begins with mozreview hostname - ^ - https?://reviewboard(?:-dev)?\.(?:allizom|mozilla)\.org - - # followed by a review path - /r/\d+ - - # ends with optional suffix - (?: / - | /diff/\#index_header - )? - $ -}ix; - sub phabricator_url_re { my $phab_uri = Bugzilla->params->{phabricator_base_uri} || 'https://example.com'; return qr/^\Q${phab_uri}\ED\d+$/i; @@ -54,12 +39,6 @@ our %autodetect_attach_urls = ( content_type => 'text/x-github-pull-request', can_review => 1, }, - reviewboard => { - title => 'MozReview', - regex => $mozreview_url_re, - content_type => 'text/x-review-board-request', - can_review => 1, - }, Phabricator => { title => 'Phabricator', regex => \&phabricator_url_re, -- cgit v1.2.3-24-g4f1b From 78a2dcba195b6ee3e44e4cd7df031d79bee2b491 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 17 Sep 2018 17:49:41 -0400 Subject: Bug 1491973 - Add GeckoView to BMO::Data special casing --- extensions/BMO/lib/Data.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm index dc6a3894f..ed576f1a5 100644 --- a/extensions/BMO/lib/Data.pm +++ b/extensions/BMO/lib/Data.pm @@ -93,6 +93,7 @@ tie(%$cf_visible_in_products, "Tie::IxHash", "External Software Affecting Firefox" => [], "Firefox" => [], "Firefox for Android" => [], + "GeckoView" => [], "JSS" => [], "MailNews Core" => [], "Mozilla Labs" => [], @@ -142,24 +143,27 @@ tie(%$cf_visible_in_products, "Tie::IxHash", "Firefox for Android" => [], "Firefox for iOS" => [], "Firefox" => [], + "GeckoView" => [], "Hello (Loop)" => [], "Cloud Services" => [], "Tech Evangelism" => [], "Toolkit" => [], }, qr/^cf_has_regression_range$/ => { - "Core" => [], + "Core" => [], "Firefox for Android" => [], "Firefox for iOS" => [], - "Firefox" => [], - "Toolkit" => [], + "Firefox" => [], + "GeckoView" => [], + "Toolkit" => [], }, qr/^cf_has_str$/ => { "Core" => [], "Firefox for Android" => [], "Firefox for iOS" => [], - "Firefox" => [], - "Toolkit" => [], + "Firefox" => [], + "GeckoView" => [], + "Toolkit" => [], }, qr/^cf_cab_review$/ => { "Infrastructure & Operations Graveyard" => [], -- cgit v1.2.3-24-g4f1b From 8c35832dd5d1de52b3dd5b4843be627b826a570d Mon Sep 17 00:00:00 2001 From: dklawren Date: Mon, 17 Sep 2018 17:51:18 -0400 Subject: Bug 1490901 - ReviewBoard stub attachments no longer make a redirect, download a text file instead --- extensions/BMO/lib/Data.pm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'extensions/BMO') diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm index ed576f1a5..349f88093 100644 --- a/extensions/BMO/lib/Data.pm +++ b/extensions/BMO/lib/Data.pm @@ -27,6 +27,21 @@ our @EXPORT = qw( $cf_visible_in_products # will result in the user being redirected to that URL when viewing the # attachment. +my $mozreview_url_re = qr{ + # begins with mozreview hostname + ^ + https?://reviewboard(?:-dev)?\.(?:allizom|mozilla)\.org + + # followed by a review path + /r/\d+ + + # ends with optional suffix + (?: / + | /diff/\#index_header + )? + $ +}ix; + sub phabricator_url_re { my $phab_uri = Bugzilla->params->{phabricator_base_uri} || 'https://example.com'; return qr/^\Q${phab_uri}\ED\d+$/i; @@ -39,6 +54,12 @@ our %autodetect_attach_urls = ( content_type => 'text/x-github-pull-request', can_review => 1, }, + reviewboard => { + title => 'MozReview', + regex => $mozreview_url_re, + content_type => 'text/x-review-board-request', + can_review => 0, + }, Phabricator => { title => 'Phabricator', regex => \&phabricator_url_re, -- cgit v1.2.3-24-g4f1b From b8b2a943056adbb112474df7bdf766970a56b2dc Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 18 Sep 2018 18:19:03 -0400 Subject: Bug 1455495 - Replace apache with Mojolicious --- extensions/BMO/Extension.pm | 101 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) (limited to 'extensions/BMO') diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 3b1c03eec..6c4ad2ef2 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -2719,4 +2719,105 @@ sub enter_bug_entrydefaultvars { } } +sub app_startup { + my ($self, $args) = @_; + my $app = $args->{app}; + my $r = $app->routes; + + $r->get( + '/favicon.ico' => sub { + my $c = shift; + $c->reply->file( + $c->app->home->child('extensions/BMO/web/images/favicon.ico') + ); + } + ); + + $r->any( '/:REWRITE_itrequest' => [ REWRITE_itrequest => qr{form[\.:]itrequest} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Infrastructure & Operations', 'format' => 'itrequest' } ); + $r->any( '/:REWRITE_mozlist' => [ REWRITE_mozlist => qr{form[\.:]mozlist} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'mozilla.org', 'format' => 'mozlist' } ); + $r->any( '/:REWRITE_poweredby' => [ REWRITE_poweredby => qr{form[\.:]poweredby} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'mozilla.org', 'format' => 'poweredby' } ); + $r->any( '/:REWRITE_presentation' => [ REWRITE_presentation => qr{form[\.:]presentation} ] ) + ->to( 'cgi#enter_bug_cgi' => { 'product' => 'mozilla.org', 'format' => 'presentation' } ); + $r->any( '/:REWRITE_trademark' => [ REWRITE_trademark => qr{form[\.:]trademark} ] ) + ->to( 'cgi#enter_bug_cgi' => { 'product' => 'mozilla.org', 'format' => 'trademark' } ); + $r->any( '/:REWRITE_recoverykey' => [ REWRITE_recoverykey => qr{form[\.:]recoverykey} ] ) + ->to( 'cgi#enter_bug_cgi' => { 'product' => 'mozilla.org', 'format' => 'recoverykey' } ); + $r->any( '/:REWRITE_legal' => [ REWRITE_legal => qr{form[\.:]legal} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Legal', 'format' => 'legal' }, ); + $r->any( '/:REWRITE_recruiting' => [ REWRITE_recruiting => qr{form[\.:]recruiting} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Recruiting', 'format' => 'recruiting' } ); + $r->any( '/:REWRITE_intern' => [ REWRITE_intern => qr{form[\.:]intern} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Recruiting', 'format' => 'intern' } ); + $r->any( '/:REWRITE_mozpr' => [ REWRITE_mozpr => qr{form[\.:]mozpr} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Mozilla PR', 'format' => 'mozpr' }, ); + $r->any( '/:REWRITE_reps_mentorship' => [ REWRITE_reps_mentorship => qr{form[\.:]reps[\.:]mentorship} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Mozilla Reps', 'format' => 'mozreps' }, ); + $r->any( '/:REWRITE_reps_budget' => [ REWRITE_reps_budget => qr{form[\.:]reps[\.:]budget} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Mozilla Reps', 'format' => 'remo-budget' } ); + $r->any( '/:REWRITE_reps_swag' => [ REWRITE_reps_swag => qr{form[\.:]reps[\.:]swag} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Mozilla Reps', 'format' => 'remo-swag' } ); + $r->any( '/:REWRITE_reps_it' => [ REWRITE_reps_it => qr{form[\.:]reps[\.:]it} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Mozilla Reps', 'format' => 'remo-it' } ); + $r->any( '/:REWRITE_reps_payment' => [ REWRITE_reps_payment => qr{form[\.:]reps[\.:]payment} ] ) + ->to( 'CGI#page_cgi' => { 'id' => 'remo-form-payment.html' } ); + $r->any( '/:REWRITE_csa_discourse' => [ REWRITE_csa_discourse => qr{form[\.:]csa[\.:]discourse} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Infrastructure & Operations', 'format' => 'csa-discourse' } ); + $r->any( '/:REWRITE_employee_incident' => [ REWRITE_employee_incident => qr{form[\.:]employee[\.\-:]incident} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'mozilla.org', 'format' => 'employee-incident' } ); + $r->any( '/:REWRITE_brownbag' => [ REWRITE_brownbag => qr{form[\.:]brownbag} ] ) + ->to( 'CGI#https_air_mozilla_org_requests' => {} ); + $r->any( '/:REWRITE_finance' => [ REWRITE_finance => qr{form[\.:]finance} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Finance', 'format' => 'finance' } ); + $r->any( + '/:REWRITE_moz_project_review' => [ REWRITE_moz_project_review => qr{form[\.:]moz[\.\-:]project[\.\-:]review} ] + )->to( 'CGI#enter_bug_cgi' => { 'product' => 'mozilla.org', 'format' => 'moz-project-review' } ); + $r->any( '/:REWRITE_docs' => [ REWRITE_docs => qr{form[\.:]docs?} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Developer Documentation', 'format' => 'doc' } ); + $r->any( '/:REWRITE_mdn' => [ REWRITE_mdn => qr{form[\.:]mdn?} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'mdn', 'product' => 'developer.mozilla.org' } ); + $r->any( '/:REWRITE_swag_gear' => [ REWRITE_swag_gear => qr{form[\.:](swag|gear)} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'swag', 'product' => 'Marketing' } ); + $r->any( '/:REWRITE_costume' => [ REWRITE_costume => qr{form[\.:]costume} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Marketing', 'format' => 'costume' } ); + $r->any( '/:REWRITE_ipp' => [ REWRITE_ipp => qr{form[\.:]ipp} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Internet Public Policy', 'format' => 'ipp' } ); + $r->any( '/:REWRITE_creative' => [ REWRITE_creative => qr{form[\.:]creative} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'creative', 'product' => 'Marketing' } ); + $r->any( '/:REWRITE_user_engagement' => [ REWRITE_user_engagement => qr{form[\.:]user[\.\-:]engagement} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'user-engagement', 'product' => 'Marketing' } ); + $r->any( '/:REWRITE_dev_engagement_event' => + [ REWRITE_dev_engagement_event => qr{form[\.:]dev[\.\-:]engagement[\.\-\:]event} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Developer Engagement', 'format' => 'dev-engagement-event' } ); + $r->any( '/:REWRITE_mobile_compat' => [ REWRITE_mobile_compat => qr{form[\.:]mobile[\.\-:]compat} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Tech Evangelism', 'format' => 'mobile-compat' } ); + $r->any( '/:REWRITE_web_bounty' => [ REWRITE_web_bounty => qr{form[\.:]web[\.:]bounty} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'web-bounty', 'product' => 'mozilla.org' } ); + $r->any( '/:REWRITE_automative' => [ REWRITE_automative => qr{form[\.:]automative} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Testing', 'format' => 'automative' } ); + $r->any( '/:REWRITE_comm_newsletter' => [ REWRITE_comm_newsletter => qr{form[\.:]comm[\.:]newsletter} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'comm-newsletter', 'product' => 'Marketing' } ); + $r->any( '/:REWRITE_screen_share_whitelist' => + [ REWRITE_screen_share_whitelist => qr{form[\.:]screen[\.:]share[\.:]whitelist} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'screen-share-whitelist', 'product' => 'Firefox' } ); + $r->any( '/:REWRITE_data_compliance' => [ REWRITE_data_compliance => qr{form[\.:]data[\.\-:]compliance} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Data Compliance', 'format' => 'data-compliance' } ); + $r->any( '/:REWRITE_fsa_budget' => [ REWRITE_fsa_budget => qr{form[\.:]fsa[\.:]budget} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'FSA', 'format' => 'fsa-budget' } ); + $r->any( '/:REWRITE_triage_request' => [ REWRITE_triage_request => qr{form[\.:]triage[\.\-]request} ] ) + ->to( 'CGI#page_cgi' => { 'id' => 'triage_request.html' } ); + $r->any( '/:REWRITE_crm_CRM' => [ REWRITE_crm_CRM => qr{form[\.:](crm|CRM)} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'crm', 'product' => 'Marketing' } ); + $r->any( '/:REWRITE_nda' => [ REWRITE_nda => qr{form[\.:]nda} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Legal', 'format' => 'nda' } ); + $r->any( '/:REWRITE_name_clearance' => [ REWRITE_name_clearance => qr{form[\.:]name[\.:]clearance} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'format' => 'name-clearance', 'product' => 'Legal' } ); + $r->any( '/:REWRITE_shield_studies' => [ REWRITE_shield_studies => qr{form[\.:]shield[\.:]studies} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Shield', 'format' => 'shield-studies' } ); + $r->any( '/:REWRITE_client_bounty' => [ REWRITE_client_bounty => qr{form[\.:]client[\.:]bounty} ] ) + ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Firefox', 'format' => 'client-bounty' } ); +} + __PACKAGE__->NAME; -- cgit v1.2.3-24-g4f1b From 7bf615124cd3380a6f7ea0fc553ba598a3ef05a5 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 20 Sep 2018 09:54:28 -0400 Subject: Bug 1492850 - Remove places where headers are printed There's one place where some (unused?) debug code prints out headers without using Bugzilla->cgi, and testagent.cgi which does the same. The first thing is removed and testagent.cgi is also removed, with its route handled by a simple route. --- extensions/BMO/lib/Reports/ReleaseTracking.pm | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/lib/Reports/ReleaseTracking.pm b/extensions/BMO/lib/Reports/ReleaseTracking.pm index 42ef24b47..9fba1e14b 100644 --- a/extensions/BMO/lib/Reports/ReleaseTracking.pm +++ b/extensions/BMO/lib/Reports/ReleaseTracking.pm @@ -421,16 +421,6 @@ sub report { $query .= join("\nAND ", @where); - if ($input->{debug}) { - print "Content-Type: text/plain\n\n"; - $query =~ s/\?/\000/g; - foreach my $param (@params) { - $query =~ s/\000/'$param'/; - } - print "$query\n"; - exit; - } - my $bugs = $dbh->selectcol_arrayref($query, undef, @params); push @$bugs, 0 unless @$bugs; -- cgit v1.2.3-24-g4f1b From ab743ac5f848e2168110b1d9720c893a89c04e7e Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Sun, 23 Sep 2018 18:18:19 -0400 Subject: Bug 1470536 - Add new GeckoView product to easy product selector on Browse and Enter Bug pages --- .../BMO/template/en/default/global/choose-product.html.tmpl | 12 ++++++++---- extensions/BMO/web/styles/choose_product.css | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl index dfa9b5af4..163c71f5c 100644 --- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl +++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl @@ -102,10 +102,18 @@ name="Toolkit" icon="component.png" %] + [% INCLUDE easyproduct + name="GeckoView" + icon="firefox_android.png" + %] [% INCLUDE easyproduct name="Mozilla Localizations" icon="localization.png" %] + [% INCLUDE easyproduct + name="Data Platform and Tools" + icon="telemetry.png" + %] [% INCLUDE easyproduct name="Thunderbird" icon="thunderbird.png" @@ -114,10 +122,6 @@ name="SeaMonkey" icon="seamonkey.png" %] - [% INCLUDE easyproduct - name="Data Platform and Tools" - icon="telemetry.png" - %]

+[% IF NOT is_describe %] + +[% END %] +

or choose from the following selections

diff --git a/extensions/BMO/web/js/new-bug-frequent-comp.js b/extensions/BMO/web/js/new-bug-frequent-comp.js new file mode 100644 index 000000000..4ca1fcf89 --- /dev/null +++ b/extensions/BMO/web/js/new-bug-frequent-comp.js @@ -0,0 +1,111 @@ +/* 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. */ + +/** + * Reference or define the Bugzilla app namespace. + * @namespace + */ +var Bugzilla = Bugzilla || {}; // eslint-disable-line no-var + +/** + * Show the current user's most-used components on the New Bug page. + */ +Bugzilla.NewBugFrequentComp = class NewBugFrequentComp { + /** + * Initialize a new NewBugFrequentComp instance. + */ + constructor() { + this.$container = document.querySelector('#frequent-components'); + + if (this.$container && BUGZILLA.user.login) { + this.init(); + } + } + + /** + * Initialize the UI. + */ + async init() { + this.$results = this.$container.querySelector('.results'); + this.$message = this.$results.appendChild(document.createElement('p')); + this.$message.textContent = 'Loading...'; + this.$results.setAttribute('aria-busy', 'true'); + this.$container.hidden = false; + + try { + const results = await this.fetch(); + + this.$message.remove(); + this.$results.insertAdjacentHTML('beforeend', + `
` + ); + } catch (error) { + this.$message.textContent = error.message || 'Your frequent components could not be retrieved.'; + } + + this.$results.removeAttribute('aria-busy'); + } + + /** + * Retrieve frequently used components. + * @param {Number} [max=10] Maximum number of results. + * @returns {Promise} Results or error. + */ + async fetch(max = 10) { + const params = new URLSearchParams({ + email1: BUGZILLA.user.login, + emailreporter1: '1', + emailtype1: 'exact', + chfield: '[Bug creation]', + chfieldfrom: '-1y', + chfieldto: 'Now', + include_fields: 'product,component', + }); + + return new Promise((resolve, reject) => { + bugzilla_ajax({ + url: `/rest/bug?${params.toString()}` + }, response => { + if (!response.bugs) { + reject(new Error('Your frequent components could not be retrieved.')); + + return; + } + + if (!response.bugs.length) { + reject(new Error(('Your frequent components could not be found.'))); + + return; + } + + const results = []; + + for (const { product, component } of response.bugs) { + const index = results.findIndex(result => product === result.product && component === result.component); + + if (index > -1) { + results[index].count++; + } else { + results.push({ product, component, count: 1 }); + } + } + + // Sort in descending order + results.sort((a, b) => (a.count < b.count ? 1 : a.count > b.count ? -1 : 0)); + + resolve(results.slice(0, max)); + }, () => { + reject(new Error('Your frequent components could not be retrieved.')); + }); + }); + } +}; + +window.addEventListener('DOMContentLoaded', () => new Bugzilla.NewBugFrequentComp(), { once: true }); diff --git a/extensions/BMO/web/styles/choose_product.css b/extensions/BMO/web/styles/choose_product.css index 5fd8c49e7..a4ecf749f 100644 --- a/extensions/BMO/web/styles/choose_product.css +++ b/extensions/BMO/web/styles/choose_product.css @@ -16,6 +16,22 @@ text-align: left; } +#frequent-components ul { + display: flex; + flex-wrap: wrap; + justify-content: center; + margin: 8px auto; + padding: 0; + list-style-type: none; + white-space: nowrap; +} + +#frequent-components li { + flex: none; + margin: 8px 16px; + padding: 0; +} + #product-list { margin: 32px 0; } @@ -55,6 +71,7 @@ } @media screen and (min-width: 1024px) { + #frequent-components ul, #product-list .tile { width: 960px; } @@ -65,6 +82,7 @@ } @media screen and (min-width: 768px) and (max-width: 1023px) { + #frequent-components ul, #product-list .tile { width: 720px; } @@ -75,6 +93,7 @@ } @media screen and (max-width: 767px) { + #frequent-components ul, #product-list .tile { width: auto; max-width: 480px; -- cgit v1.2.3-24-g4f1b From f0dd10b8e87731d7746f085b35e2074aa6e2ef73 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Mon, 24 Sep 2018 17:23:53 -0400 Subject: Bug 1493295 - Add short URL to each bug --- .../template/en/default/hook/global/header-additional_header.html.tmpl | 1 + 1 file changed, 1 insertion(+) (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl b/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl index 0566f48b3..6300b0d15 100644 --- a/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl +++ b/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl @@ -22,6 +22,7 @@ [% IF bug %] + [% END %] [%# *** Bug List Navigation *** %] -- cgit v1.2.3-24-g4f1b From 291bb971595489070ed8db3da1785f5a3977a15a Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Wed, 26 Sep 2018 11:29:19 -0400 Subject: Bug 1489718 - Insert form widgets for approval flag requests instead of free-form comment text --- .../default/hook/flag/type_comment-form.html.tmpl | 202 +++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl b/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl new file mode 100644 index 000000000..7963af850 --- /dev/null +++ b/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl @@ -0,0 +1,202 @@ +[%# 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. + #%] + + + + + + + + -- cgit v1.2.3-24-g4f1b From 09dd4d3192073ba9ecc7feb8a5dfcd213affd525 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Mon, 24 Sep 2018 17:27:12 -0400 Subject: Bug 1493500 - Remove all trailing whitespaces from all files --- .../en/default/bug/create/comment-finance.txt.tmpl | 4 +- .../en/default/bug/create/comment-mozlist.txt.tmpl | 2 +- .../en/default/bug/create/create-doc.html.tmpl | 4 +- .../en/default/bug/create/create-finance.html.tmpl | 4 +- .../en/default/bug/create/create-mozlist.html.tmpl | 4 +- .../bug/create/create-recoverykey.html.tmpl | 40 +++++++------- .../default/bug/create/create-trademark.html.tmpl | 62 +++++++++++----------- .../template/en/default/email/bugmail.html.tmpl | 2 +- .../en/default/hook/bug/field-help-end.none.tmpl | 20 +++---- .../en/default/hook/bug/show-header-end.html.tmpl | 2 +- .../pages/release_tracking_report.html.tmpl | 2 +- .../en/default/pages/upgrade-3.6.html.tmpl | 16 +++--- .../en/default/pages/user_activity.html.tmpl | 2 +- extensions/BMO/web/js/release_tracking_report.js | 2 +- extensions/BMO/web/js/sorttable.js | 52 +++++++++--------- extensions/BMO/web/js/swag.js | 18 +++---- 16 files changed, 118 insertions(+), 118 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl index f0427b4c5..c55ea1d96 100644 --- a/extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl +++ b/extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl @@ -14,10 +14,10 @@ Summary: [% cgi.param('short_desc') %] Priority to your Team: [% cgi.param('team_priority') %] Timeframe for Signature: [% cgi.param('signature_time') %] -Name of Other Party: +Name of Other Party: [%+ cgi.param('other_party') %] -Business Objective: +Business Objective: [%+ cgi.param('business_obj') %] What is this purchase?: diff --git a/extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl index c62461d42..7c14ec95f 100644 --- a/extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl +++ b/extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl @@ -24,7 +24,7 @@ # enter_bug.cgi) can be access via Bugzilla.cgi.param. It can be used to # pull out various custom fields and format an initial Description entry # from them. - #%] + #%] [% USE Bugzilla %] [% cgi = Bugzilla.cgi %] List Name: [% cgi.param("listName") %] diff --git a/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl index becbb2b56..9ff4ef2e3 100644 --- a/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl @@ -106,10 +106,10 @@ function validateAndSubmit() {
to your HTML Add class="sortable" to any table you'd like to make sortable Click on the headers to sort - + Thanks to many, many people for contributions and suggestions. Licenced as X11: http://www.kryogenix.org/code/browser/licence.html This basically means: do what you want with it. @@ -25,20 +25,20 @@ sorttable = { arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); - + if (!document.createElement || !document.getElementsByTagName) return; - + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; - + forEach(document.getElementsByTagName('table'), function(table) { if (table.className.search(/\bsortable\b/) != -1) { sorttable.makeSortable(table); } }); - + }, - /* + /* * Prepares the table so that it can be sorted * */ @@ -53,9 +53,9 @@ sorttable = { } // Safari doesn't support table.tHead, sigh if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; - + //if (table.tHead.rows.length != 1) return; // can't cope with two header rows - + // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, @@ -106,7 +106,7 @@ sorttable = { table.sorttable_rows = table_rows; table.sorttable_body_size = body_size; table.sorttable_bodies = bodies; - + // work through each column and calculate its type @@ -185,7 +185,7 @@ sorttable = { _check_already_sorted: function(cell) { if (cell.className.search(/\bsorttable_sorted\b/) != -1) { - // if we're already sorted by this column, just + // if we're already sorted by this column, just // reverse the table, which is quicker sorttable.reverse_table(cell); @@ -194,7 +194,7 @@ sorttable = { } if (cell.className.search(/\bsorttable_sorted_reverse\b/) != -1) { - // if we're already sorted by this column in reverse, just + // if we're already sorted by this column in reverse, just // re-reverse the table, which is quicker sorttable.reverse_table(cell); @@ -271,7 +271,7 @@ sorttable = { return; - // First, remove sorttable_sorted classes from the other header + // First, remove sorttable_sorted classes from the other header // that is currently sorted and its marker (the simbol indicating // that its sorted. sorttable._remove_sorted_classes(this.table.tHead); @@ -285,7 +285,7 @@ sorttable = { sorttable._mark_column_as_sorted(this, '▼', 0); sorttable.sort_table(this); - + }, sort_table: function(cell) { @@ -312,7 +312,7 @@ sorttable = { body_size = cell.table.sorttable_body_size; body_index = 0; - for (var j=0; j Date: Mon, 1 Oct 2018 11:46:40 -0400 Subject: Bug 1418378 - Use Material Icons on Bugzilla home page instead of low-res images --- extensions/BMO/template/en/default/hook/index-intro.html.tmpl | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 extensions/BMO/template/en/default/hook/index-intro.html.tmpl (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/hook/index-intro.html.tmpl b/extensions/BMO/template/en/default/hook/index-intro.html.tmpl deleted file mode 100644 index ddee1db2f..000000000 --- a/extensions/BMO/template/en/default/hook/index-intro.html.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -[%# 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. - #%] - -Documentation -- cgit v1.2.3-24-g4f1b From 3f104aa43d746c602b179564c96fce0d4d682886 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Mon, 1 Oct 2018 00:43:48 -0400 Subject: Bug 1495349 - Remove Persona extension --- .../en/default/pages/persona_deprecated.html.tmpl | 53 ---------------------- 1 file changed, 53 deletions(-) delete mode 100644 extensions/BMO/template/en/default/pages/persona_deprecated.html.tmpl (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/pages/persona_deprecated.html.tmpl b/extensions/BMO/template/en/default/pages/persona_deprecated.html.tmpl deleted file mode 100644 index 18b7a3f60..000000000 --- a/extensions/BMO/template/en/default/pages/persona_deprecated.html.tmpl +++ /dev/null @@ -1,53 +0,0 @@ -[%# 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. - #%] - -[% PROCESS global/header.html.tmpl - title = "Persona Deprecated" -%] - -

Persona Deprecated

- -

- Beginning on October 25th, 2016, Persona is no longer a supported authentication method - for bugzilla.mozilla.org (BMO). The Mozilla supported Persona service will cease operations on November 30th, 2016 so therefore - BMO will not longer be able to use the service for authentication. You can go - here for more information about Persona - and the reasons for shutting down service. -

- -

- For users of Persona on BMO, there are two other methods for authentication that are supported and you will need to switch - over to one of them after your current session expires starting October 25th, 2016. -

- -

Native Login

- -

- BMO has always supported native authentication using a password securely stored in our database. If you have used Persona since - first creating your BMO account, you will probably not know this password. But you can reset it to something you do know by first - logging out, and then clicking on 'Forgot Password' at the right-hand top of the page. Enter your email you used with Persona in - the text field and click 'Reset Password'. -

- -

- You will receive an email with a link you can use to reset your current password to something you can use from now on. - After you reset your password, simply enter your login and the password in the login fields at the top of any BMO page. -

- -

Github Login

- -

- Github is also a BMO supported method of authentication. To use Github, first log out and then - click 'Login' at the top of any BMO page and then click on the 'Github' login image. You will need to have a Github account that - has an email address the same as the Persona email you were using, otherwise a different BMO account will be created. You will - be able to choose the email address you want to use for BMO if you have more than one configured in your Github profile. If none - of the email addresses you have configured in Github match what you were using for Persona, native login described above may be - your best choice if you want to retain your BMO data. -

- -[% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b From 64467308132deee03293d88cb87a69e5ad78c435 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Wed, 3 Oct 2018 18:01:18 -0400 Subject: Bug 1496233 - "Dunno" -> "Don't know" in approval request form (#795) --- .../BMO/template/en/default/hook/flag/type_comment-form.html.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl b/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl index 7963af850..0ba8fade2 100644 --- a/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl +++ b/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl @@ -24,7 +24,7 @@
-
+
@@ -168,7 +168,7 @@
-
+
-- cgit v1.2.3-24-g4f1b From c84436a97c8e03962732bc5331430aae6c9826ae Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 5 Oct 2018 17:11:00 +0200 Subject: no bug - Don't know => Unknown --- .../BMO/template/en/default/hook/flag/type_comment-form.html.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl b/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl index 0ba8fade2..7703bed74 100644 --- a/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl +++ b/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl @@ -24,7 +24,7 @@
-
+
@@ -168,7 +168,7 @@
-
+
-- cgit v1.2.3-24-g4f1b From b52721090513808901cca1c77a91321d551f7690 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Fri, 5 Oct 2018 20:21:58 -0400 Subject: Bug 1496803 - Suggested component links ignore cloned bug data --- extensions/BMO/web/js/new-bug-frequent-comp.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/web/js/new-bug-frequent-comp.js b/extensions/BMO/web/js/new-bug-frequent-comp.js index 4ca1fcf89..88879738d 100644 --- a/extensions/BMO/web/js/new-bug-frequent-comp.js +++ b/extensions/BMO/web/js/new-bug-frequent-comp.js @@ -36,15 +36,27 @@ Bugzilla.NewBugFrequentComp = class NewBugFrequentComp { this.$results.setAttribute('aria-busy', 'true'); this.$container.hidden = false; + // Get the current params that may contain `cloned_bug_id` and `format` + const current_params = new URLSearchParams(location.search); + try { - const results = await this.fetch(); + const links = (await this.fetch()).map(({ product, component }) => { + const params = new URLSearchParams(current_params); + + params.append('product', product); + params.append('component', component); + + return { + href: `/enter_bug.cgi?${params.toString()}`, + text: `${product} :: ${component}`, + }; + }); this.$message.remove(); this.$results.insertAdjacentHTML('beforeend', - `` + `` ); } catch (error) { this.$message.textContent = error.message || 'Your frequent components could not be retrieved.'; -- cgit v1.2.3-24-g4f1b From 32206926ada9522ae59ba5c65a18d25ced653d6f Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Mon, 8 Oct 2018 12:00:05 -0400 Subject: Bug 1497234 - Remove Personas Plus GitHub link from Custom Bug Entry Forms index --- .../BMO/template/en/default/bug/create/custom_forms.none.tmpl | 6 ------ 1 file changed, 6 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl index 7b588f765..0d37a1386 100644 --- a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl +++ b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl @@ -168,12 +168,6 @@ custom_forms = { title => "Intern Requests", }, ] - "Mozilla Labs" => [ - { - link => "https://github.com/mozilla/personas-plus/issues", - title => "Report issue with Personas Plus on Github" - } - ], "Legal" => [ { title => 'Mozilla Foundation Vendor Request', -- cgit v1.2.3-24-g4f1b