From 46dc79df7519dac7600399f21f79ba4a9f6cf21d Mon Sep 17 00:00:00 2001 From: "Dylan William Hardison [:dylan]" Date: Tue, 13 May 2014 14:30:21 +0800 Subject: Bug 995000: Please create an Automation Request Form in Bugzilla --- .htaccess | 1 + .../default/bug/create/comment-automative.txt.tmpl | 52 ++++ .../default/bug/create/create-automative.html.tmpl | 276 +++++++++++++++++++++ 3 files changed, 329 insertions(+) create mode 100644 extensions/BMO/template/en/default/bug/create/comment-automative.txt.tmpl create mode 100644 extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl diff --git a/.htaccess b/.htaccess index 01a712d84..f6ea870c3 100644 --- a/.htaccess +++ b/.htaccess @@ -73,4 +73,5 @@ RewriteRule ^form[\.:]user[\.\-:]engagement$ enter_bug.cgi?product=Marketing&for RewriteRule ^form[\.:]dev[\.\-:]engagement[\.\-\:]event$ enter_bug.cgi?product=Developer+Engagement&format=dev-engagement-event RewriteRule ^form[\.:]mobile[\.\-:]compat$ enter_bug.cgi?product=Tech+Evangelism&format=mobile-compat RewriteRule ^form[\.:]web[\.:]bounty$ enter_bug.cgi?product=mozilla.org&format=web-bounty +RewriteRule ^form[\.:]automative$ enter_bug.cgi?product=Testing&format=automative RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE] diff --git a/extensions/BMO/template/en/default/bug/create/comment-automative.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-automative.txt.tmpl new file mode 100644 index 000000000..c23a6427d --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/comment-automative.txt.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/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] +[% PROCESS global/variables.none.tmpl %] +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi +%] +>>Problem: +[%+ cgi.param('desc_problem') %] + +>>Solution: +[%+ cgi.param('desc_solution') %] + +>>Mozilla Top Level Goal: +[%+ cgi.param('desc_top_level_goal') %] + +>>Existing [% terms.Bug %]: +[% IF cgi.param('existing_bug') %] +[%+ terms.Bug %] [% cgi.param("existing_bug") %] +[% ELSE %] +No [% terms.bug %] +[% END %] + +>>Per-Commit: +[%+ cgi.param('per_commit') || 'No' %] + +>>Data other than Pass/Fail: +[%+ cgi.param('desc_data_produce') || 'No' %] + +>>Prototype Date: +[%+ cgi.param("prototype_date") || 'Not provided' %] + +>>Production Date: +[%+ cgi.param("production_date") || 'Not provided' %] + +>>Most Valuable Piece: +[%+ cgi.param('most_valuable_piece') || 'Not provided' %] + +>>Responsible Engineer: +[%+ cgi.param('responsible_engineer') || 'Not provided' %] + +>>Manager: +[%+ cgi.param('manager') || 'Not provided' %] + +>>Other Teams/External Dependencies: +[%+ cgi.param('other_teams') || 'Not provided' %] + +>>Additional Info: +[%+ cgi.param('additional_info') || 'Not provided' %] diff --git a/extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl new file mode 100644 index 000000000..cbe2da910 --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl @@ -0,0 +1,276 @@ +[%# 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/variables.none.tmpl %] + +[% inline_style = BLOCK %] +#automative_form { + padding: 10px; +} +#automative_form .required:after { + content: " *"; + color: red; +} +#automative_form .field_label { + font-weight: bold; +} +#automative_form .field_desc { + padding-bottom: 3px; +} +#automative_form .field_desc, +#automative_form .head_desc { + width: 600px; + word-wrap: normal; +} +#automative_form .head_desc { + padding-top: 5px; + padding-bottom: 12px; +} +#automative_form .form_section { + margin-bottom: 10px; +} +#automative_form textarea { + font-family: inherit; + font-size: inherit; +} +#automative_form em { + font-size: 1em; +} +.yui-calcontainer { + z-index: 2; +} +[% END %] + +[% inline_javascript = BLOCK %] +function validateAndSubmit() { + 'use strict'; + var alert_text = ''; + var requiredLabels = YAHOO.util.Selector.query('label.required'); + if (requiredLabels) { + requiredLabels.forEach(function (label) { + var name = label.getAttribute('for'); + var ids = YAHOO.util.Selector.query( + '#automative_form *[name="' + name + '"]' + ).map(function (e) { + return e.id + }); + + if (ids && ids[0]) { + if (!isFilledOut(ids[0])) { + var desc = label.textContent || name; + alert_text += + "Please enter a value for " + + desc.replace(/[\r\n]+/, "").replace(/\s+/g, " ") + + "\n"; + } + } + }); + } + + if (alert_text != '') { + alert(alert_text); + return false; + } + return true; +} +[% END %] + +[% PROCESS global/header.html.tmpl + title = "Automation Request Form" + style = inline_style + javascript = inline_javascript + javascript_urls = [ 'extensions/BMO/web/js/form_validate.js', + 'js/field.js', 'js/util.js' ] + yui = [ "autocomplete", "calendar", "selector" ] +%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +
+ + + + + + + + + + +
+ Welcome to the Automation Request Form! +
+ +
+ +
+ One-line summary of the problem you'd like automation to help solve +
+ +
+ +
+ +
+ Detailed description of the problem +
+ +
+ +
+ +
+ Detailed description of the proposed automation solution +
+ +
+ +
+ +
Describe the top-level project goal which this is + supporting
+ +
+ +
+ +
Existing [% terms.bug %] (if any)
+ +
+ +
+ +
+ Does this automation need to be run per-commit and report to TBPL? Can it + be run less frequently? +
+ +
+ +
+ +
If this automation will report data other than + pass/fail (e.g. some sort of performance metric), describe the data that + you'd like to have the automation produce. Do we already have a method of + capturing this kind of data, or do we need to develop one?
+ +
+ +
+ +
+ When is a prototype needed? +
+ + +
+ +
+ +
+ +
+ When is a finished project running in production needed? +
+ + +
+ +
+ +
+ +
If there are multiple pieces, tests, or features in + the proposed automation, what is the single most valuable piece?
+ +
+ +
+ +
+ Which engineer is responsible for working with the automation engineer for + information, support, and troubleshooting? +
+ [% INCLUDE global/userselect.html.tmpl + id => "responsible_engineer" + name => "responsible_engineer" + value => "" + size => 80 + classes => ["bz_userfield"] + %] +
+ +
+ +
+ Which manager/project manager is responsible for issues related to + milestones and priorities? +
+ [% INCLUDE global/userselect.html.tmpl + id => "manager" + name => "manager" + value => "" + size => 80 + classes => ["bz_userfield"] + %] +
+ +
+ +
+ What other teams are involved and are there any other external + dependencies? +
+ +
+ +
+ +
+ Additional information +
+ +
+ + + +

+ [ * + Required Field ] +

+
+ +[% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b