From: Kohei Yoshino Date: Thu, 28 Feb 2019 05:31:55 +0000 (-0500) Subject: Bug 1527178 - If an uplift request answers Yes to needing manual QA, automatically... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cf2560618e32f41f72f75c3c15c1dd124ef240b;p=thirdparty%2Fbugzilla.git Bug 1527178 - If an uplift request answers Yes to needing manual QA, automatically set the qe-verify flag --- 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 011bd92dd..4cbe7df17 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 @@ -45,7 +45,7 @@ Needs manual test from QE?
-
+
diff --git a/extensions/FlagTypeComment/web/js/ftc.js b/extensions/FlagTypeComment/web/js/ftc.js index 539eebd34..855ca7748 100644 --- a/extensions/FlagTypeComment/web/js/ftc.js +++ b/extensions/FlagTypeComment/web/js/ftc.js @@ -282,6 +282,21 @@ Bugzilla.FlagTypeComment = class FlagTypeComment { } }))); + // Collect bug flags from checkboxes + const bug_flags = [...this.$fieldset_wrapper.querySelectorAll('input[data-bug-flag]:checked')] + .map($input => ({ name: $input.getAttribute('data-bug-flag'), status: '?' })); + + // Update bug flags if needed + if (bug_flags.length) { + await new Promise(resolve => { + bugzilla_ajax({ + type: 'PUT', + url: `${BUGZILLA.config.basepath}rest/bug/${this.bug_id}`, + data: { flags: bug_flags }, + }, () => resolve(), () => resolve()); + }); + } + // Redirect to the bug once everything is done location.href = `${BUGZILLA.config.basepath}show_bug.cgi?id=${this.bug_id}`;