From e3153622907e9ddfb31ef980c486b4985ed577e3 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Wed, 31 Oct 2012 15:52:09 -0400 Subject: Bug 787478 - Create Custom Entry Form for Data Safety/Legal/Security/Privacy Assurance Bugs --- extensions/MozProjectReview/Config.pm | 19 + extensions/MozProjectReview/Extension.pm | 253 ++++++++ ...comment-moz-project-review-data-safety.txt.tmpl | 40 ++ .../comment-moz-project-review-finance.txt.tmpl | 26 + .../comment-moz-project-review-legal.txt.tmpl | 22 + ...ment-moz-project-review-privacy-policy.txt.tmpl | 18 + ...omment-moz-project-review-privacy-tech.txt.tmpl | 12 + ...ment-moz-project-review-privacy-vendor.txt.tmpl | 16 + .../comment-moz-project-review-sec-review.txt.tmpl | 20 + .../bug/create/comment-moz-project-review.txt.tmpl | 34 + .../bug/create/create-moz-project-review.html.tmpl | 702 +++++++++++++++++++++ .../hook/global/messages-messages.html.tmpl | 13 + .../MozProjectReview/web/js/moz_project_review.js | 149 +++++ .../web/style/moz_project_review.css | 41 ++ 14 files changed, 1365 insertions(+) create mode 100644 extensions/MozProjectReview/Config.pm create mode 100644 extensions/MozProjectReview/Extension.pm create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-safety.txt.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-sec-review.txt.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl create mode 100644 extensions/MozProjectReview/template/en/default/hook/global/messages-messages.html.tmpl create mode 100644 extensions/MozProjectReview/web/js/moz_project_review.js create mode 100644 extensions/MozProjectReview/web/style/moz_project_review.css (limited to 'extensions') diff --git a/extensions/MozProjectReview/Config.pm b/extensions/MozProjectReview/Config.pm new file mode 100644 index 000000000..5a9d2b730 --- /dev/null +++ b/extensions/MozProjectReview/Config.pm @@ -0,0 +1,19 @@ +# 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. +package Bugzilla::Extension::MozProjectReview; + +use strict; + +use constant NAME => 'MozProjectReview'; + +use constant REQUIRED_MODULES => [ +]; + +use constant OPTIONAL_MODULES => [ +]; + +__PACKAGE__->NAME; diff --git a/extensions/MozProjectReview/Extension.pm b/extensions/MozProjectReview/Extension.pm new file mode 100644 index 000000000..4bf71188f --- /dev/null +++ b/extensions/MozProjectReview/Extension.pm @@ -0,0 +1,253 @@ +# 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. +package Bugzilla::Extension::MozProjectReview; + +use strict; + +use base qw(Bugzilla::Extension); + +use Bugzilla::User; +use Bugzilla::Group; +use Bugzilla::Error; +use Bugzilla::Constants; + +our $VERSION = '0.01'; + +sub post_bug_after_creation { + my ($self, $args) = @_; + my $vars = $args->{vars}; + my $bug = $vars->{bug}; + + my $user = Bugzilla->user; + my $params = Bugzilla->input_params; + my $template = Bugzilla->template; + + return if !($params->{format} + && $params->{format} eq 'moz-project-review' + && $bug->component eq 'Project Review'); + + my $error_mode_cache = Bugzilla->error_mode; + Bugzilla->error_mode(ERROR_MODE_DIE); + + # do a match if applicable + Bugzilla::User::match_field({ + 'legal_cc' => { 'type' => 'multi' } + }); + + my ($do_sec_review, $do_legal, $do_finance, $do_privacy_vendor, + $do_data_safety, $do_privacy_tech, $do_privacy_policy); + + if ($params->{mozilla_data} eq 'Yes') { + $do_legal = 1; + $do_privacy_policy = 1; + $do_privacy_tech = 1; + $do_sec_review = 1; + } + + if ($params->{mozilla_data} eq 'Yes' + && $params->{data_safety_user_data} eq 'Yes') + { + $do_data_safety = 1; + } + + if ($params->{new_or_change} eq 'New') { + $do_legal = 1; + $do_privacy_policy = 1; + } + elsif ($params->{new_or_change} eq 'Existing') { + $do_legal = 1; + } + + if ($params->{separate_party} eq 'Yes') { + $do_legal = 1; + } + + if ($params->{data_access} eq 'Yes') { + $do_privacy_policy = 1; + $do_sec_review = 1; + } + + if ($params->{data_access} eq 'Yes' + && $params->{'privacy_policy_vendor_user_data'} eq 'Yes') + { + $do_privacy_vendor = 1; + } + + if ($params->{vendor_cost} eq '> $25,000') { + $do_finance = 1; + } + + my ($sec_review_bug, $legal_bug, $finance_bug, $privacy_vendor_bug, + $data_safety_bug, $privacy_tech_bug, $privacy_policy_bug); + + eval { + if ($do_sec_review) { + my $bug_data = { + short_desc => 'Security Review for ' . $bug->short_desc, + product => 'mozilla.org', + component => 'Security Assurance: Review Request', + bug_severity => 'normal', + groups => [ 'mozilla-corporation-confidential' ], + keywords => 'sec-review-needed', + op_sys => 'All', + rep_platform => 'All', + version => 'other', + blocked => $bug->bug_id, + }; + $sec_review_bug = _file_child_bug($bug, $vars, 'sec-review', $bug_data); + } + + if ($do_legal) { + my $component; + if ($params->{new_or_change} eq 'New') { + $component = 'General'; + } + elsif ($params->{new_or_change} eq 'Existing') { + $component = $params->{mozilla_project}; + } + + if ($params->{separate_party} eq 'Yes' + && $params->{relationship_type}) + { + $component = $params->{relationship_type} eq 'unspecified' + ? 'General' + : $params->{relationship_type}; + } + + my $bug_data = { + short_desc => 'Complete Legal Review for ' . $bug->short_desc, + product => 'Legal', + component => $component, + bug_severity => 'normal', + priority => '--', + groups => [ 'legal' ], + op_sys => 'All', + rep_platform => 'All', + version => 'unspecified', + blocked => $bug->bug_id, + cc => $params->{'legal_cc'}, + }; + $legal_bug = _file_child_bug($bug, $vars, 'legal', $bug_data); + + } + + if ($do_finance) { + my $bug_data = { + short_desc => 'Complete Finance Review for ' . $bug->short_desc, + product => 'Finance', + component => 'Purchase Request Form', + bug_severity => 'normal', + priority => '--', + groups => [ 'finance' ], + op_sys => 'All', + rep_platform => 'All', + version => 'unspecified', + blocked => $bug->bug_id, + }; + $finance_bug = _file_child_bug($bug, $vars, 'finance', $bug_data); + } + + if ($do_data_safety) { + my $bug_data = { + short_desc => 'Data Safety Review for ' . $bug->short_desc, + product => 'Data Safety', + component => 'General', + bug_severity => 'normal', + priority => '--', + op_sys => 'All', + rep_platform => 'All', + version => 'unspecified', + blocked => $bug->bug_id, + }; + $data_safety_bug = _file_child_bug($bug, $vars, 'data-safety', $bug_data); + } + + if ($do_privacy_tech) { + my $bug_data = { + short_desc => 'Complete Privacy-Technical Review for ' . $bug->short_desc, + product => 'mozilla.org', + component => 'Security Assurance: Review Request', + bug_severity => 'normal', + priority => '--', + keywords => 'privacy-review-needed', + groups => [ 'mozilla-corporation-confidential' ], + op_sys => 'All', + rep_platform => 'All', + version => 'other', + blocked => $bug->bug_id, + }; + $privacy_tech_bug = _file_child_bug($bug, $vars, 'privacy-tech', $bug_data); + } + + if ($do_privacy_policy) { + my $bug_data = { + short_desc => 'Complete Privacy-Policy Review for ' . $bug->short_desc, + product => 'Privacy', + component => 'Privacy Review', + bug_severity => 'normal', + priority => '--', + op_sys => 'All', + rep_platform => 'All', + version => 'unspecified', + blocked => $bug->bug_id, + }; + $privacy_policy_bug = _file_child_bug($bug, $vars, 'privacy-policy', $bug_data); + } + + if ($do_privacy_vendor) { + my $bug_data = { + short_desc => 'Complete Privacy / Vendor Review for ' . $bug->short_desc, + product => 'Privacy', + component => 'Vendor Review', + bug_severity => 'normal', + priority => '--', + op_sys => 'All', + rep_platform => 'All', + version => 'unspecified', + blocked => $bug->bug_id, + }; + $privacy_vendor_bug = _file_child_bug($bug, $vars, 'privacy-vendor', $bug_data); + } + }; + + my $error = $@; + Bugzilla->error_mode($error_mode_cache); + + if ($error + || ($do_legal && !$legal_bug) + || ($do_sec_review && !$sec_review_bug) + || ($do_finance && !$finance_bug) + || ($do_data_safety && !$data_safety_bug) + || ($do_privacy_tech && !$privacy_tech_bug) + || ($do_privacy_policy && !$privacy_policy_bug) + || ($do_privacy_vendor && !$privacy_vendor_bug)) + { + warn "Failed to create additional moz-project-review bugs: $error" if $error; + $vars->{message} = 'moz_project_review_creation_failed'; + $vars->{message_error} = $error; + } +} + +sub _file_child_bug { + my ($parent_bug, $vars, $template_suffix, $bug_data) = @_; + my $template = Bugzilla->template; + my $comment = ""; + + my $full_template = "bug/create/comment-moz-project-review-$template_suffix.txt.tmpl"; + $template->process($full_template, $vars, \$comment) + || ThrowTemplateError($template->error()); + + $bug_data->{comment} = $comment; + my $new_bug = Bugzilla::Bug->create($bug_data); + + $parent_bug->set_all({ dependson => { add => [ $new_bug->bug_id ] }}); + Bugzilla::BugMail::Send($new_bug->id, { changer => Bugzilla->user }); + + return $new_bug; +} + +__PACKAGE__->NAME; diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-safety.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-safety.txt.tmpl new file mode 100644 index 000000000..5a6ffbbbd --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-data-safety.txt.tmpl @@ -0,0 +1,40 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %] + +Data Safety Questions: + +User Data: [% cgi.param('data_safety_user_data') %] +How many involved?: [% cgi.param('data_safety_user_count') %] +How many users do you anticipate to be involved?: [% cgi.param('data_safety_user_count_anticipated') %] +Type of Data: +[%+ cgi.param('data_safety_data_type') %] +Data Reason: +[%+ cgi.param('data_safety_data_reason') %] +Community Benefit: +[%+ cgi.param('data_safety_community_benefit') %] +Data Collection: +[%+ cgi.param('data_safety_community_collection') %] +Data Retention: [% cgi.param('data_safety_retention') %] +Data Retention Length: [% cgi.param('data_safety_retention_length') %] +Separate Party: [% cgi.param('data_safety_separate_party') %] +Separate Party Data Type: +[%+ cgi.param('data_safety_separate_party_data') %] +Separate Party Data Communication: +[%+ cgi.param('data_safety_separate_party_data_communication') %] +Who are the separate parties?: +[%+ cgi.param('data_safety_separate_party_who') %] +Community Visibility and Input: [% cgi.param('data_safety_community_visibility') %] +Communication Channels: +[%+ cgi.param('data_safety_communication_channels') %] +Public Communication Plan: +[%+ cgi.param('data_safety_communication_plan') %] diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl new file mode 100644 index 000000000..1fc72de6f --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-finance.txt.tmpl @@ -0,0 +1,26 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %] + +Finance Questions: + +What is the purchase for?: +[%+ cgi.param('finance_purchase_what') %] +Why is the purchase needed?: +[%+ cgi.param('finance_purchase_why') %] +What is the risk if not purchased?: +[%+ cgi.param('finance_purchase_risk') %] +What is the alternative?: +[%+ cgi.param('finance_purchase_alternative') %] +Is this line item in budget?: [% cgi.param('finance_purchase_inbudget') %] +What is the urgency?: [% cgi.param('finance_purchase_urgency') %] +Total Cost: [% cgi.param('finance_purchase_cost') %] diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl new file mode 100644 index 000000000..345557743 --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-legal.txt.tmpl @@ -0,0 +1,22 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %] + +Legal Questions: + +Priority: [% cgi.param('legal_priority') %] +Other Party: [% cgi.param('legal_other_party') %] +Business Objective: [% cgi.param('legal_business_objective') %] +URL: [% cgi.param('legal_url') %] +SOW Details: [% cgi.param('legal_sow_details') %] +Description: +[%+ cgi.param('legal_description') %] diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl new file mode 100644 index 000000000..816834c40 --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-policy.txt.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %] + +Privacy Policy: [% cgi.param('privacy_policy_project') %] +Privacy Policy Link: [% cgi.param('privacy_policy_project_link') %] +User Data: [% cgi.param('privacy_policy_user_data') %] +Data Safety [% terms.Bug %] ID: [% cgi.param('privacy_policy_user_data_bug') %] +Legal [% terms.Bug %] ID: [% cgi.param('privacy_policy_legal_bug') %] diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl new file mode 100644 index 000000000..7b72cf1bc --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-tech.txt.tmpl @@ -0,0 +1,12 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %] diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl new file mode 100644 index 000000000..eaf9f12e3 --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-privacy-vendor.txt.tmpl @@ -0,0 +1,16 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %] + +Privacy Policy: [% cgi.param('privacy_policy_vendor_user_data') %] +Vendor's Privacy Policy: [% cgi.param('privacy_policy_vendor_link') %] +Privacy Questionnaire: [% cgi.param('privacy_policy_vendor_questionnaire') %] diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-sec-review.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-sec-review.txt.tmpl new file mode 100644 index 000000000..029f6df48 --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review-sec-review.txt.tmpl @@ -0,0 +1,20 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS "bug/create/comment-moz-project-review.txt.tmpl" %] + +Security Review Questions: + +Affects Products: [% cgi.param('sec_affects_products') %] +Review Due Date: [% cgi.param('sec_review_date') %] +Review Invitees: [% cgi.param('sec_review_invitees') %] +Extra Information: +[%+ cgi.param('sec_review_extra') %] diff --git a/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl new file mode 100644 index 000000000..16bdcb568 --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/comment-moz-project-review.txt.tmpl @@ -0,0 +1,34 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +Initial Questions: + +Project/Feature Name: [% cgi.param('short_desc') %] +Tracking [% terms.Bug %] ID:[% cgi.param('tracking_id') %] +Description: +[%+ cgi.param('description') %] +Additional Information: +[%+ cgi.param('additional') %] +Urgency: [% cgi.param('urgency') %] +Current Goal: [% cgi.param('goal') %] +Release Date: [% cgi.param('release_date') %] +Project Status: [% cgi.param('project_status') %] +Mozilla Data: [% cgi.param('mozilla_data') %] +New or Change: [% cgi.param('new_or_change') %] +Mozilla Project: [% cgi.param('mozilla_project') %] +Mozilla Related: [% cgi.param('mozilla_related') %] +Separate Party: [% cgi.param('separate_party') %] +[% IF cgi.param('separate_part') == 'Yes' %] +Type of Relationship: [% cgi.param('relationship_type') %] +Data Access: [% cgi.param('data_access') %] +Privacy Policy: [% cgi.param('privacy_policy') %] +Vendor Cost: [% cgi.param('vendor_cost') %] +[% END %] diff --git a/extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl b/extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl new file mode 100644 index 000000000..f11cda038 --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/bug/create/create-moz-project-review.html.tmpl @@ -0,0 +1,702 @@ +[%# 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 %] + +[% PROCESS global/header.html.tmpl + title = "Mozilla Project Review" + style_urls = [ 'extensions/MozProjectReview/web/style/moz_project_review.css' ] + javascript_urls = [ 'js/field.js', 'js/util.js', + 'extensions/MozProjectReview/web/js/moz_project_review.js' ] + yui = [ 'autocomplete', 'calendar' ] +%] + +

+ Please use this form for submitting a Mozilla Project Review + If you have a [% terms.bug %] to file, go here. +

+ +

+ (* = + Required Field) +

+ +
+ + + + + + + + + + +
+
Initial Questions
+ +
+ Project/Feature Name: + + + +
+ +
+ Tracking [% terms.Bug %] ID: + +
Master tracking [% terms.bug %] number (if it exists)?
+ +
+
+ +
+ Points of Contact: + +
Who are the points of contact for this review?
+ [% INCLUDE global/userselect.html.tmpl + id => "cc" + name => "cc" + value => "" + size => 60 + classes => ["bz_userfield"] + multiple => 5 + %] +
+
+ +
+ Description: + +
Please provide a short description of the feature / application / project / + business relationship (e.g. problem solved, use cases, etc.)
+ +
+
+ +
+ Additional Information: + +
Please provide links to additional information (e.g. feature page, wiki) + if available and not yet included in feature description.)
+ +
+
+ +
+ Urgency: + +
What is the urgency of this project?
+ +
+
+ +
+ Current Goal: + +
Does it support a current Mozilla goal (if so, which one)?
+ +
+
+ +
+ Release Date: + +
What is your key release / launch date?
+ + +
+ +
+
+ +
+ Project Status: + +
What is the current state of your project?
+ +
+
+ +
+ Mozilla Data: + +
Does this product/service/project access, interact with, or store Mozilla + (customer, contributor, user, employee) data? Example of such data includes + email addresses, first and last name, addresses, phone numbers, credit card data.)
+ +
+
+ +
+ New or Change: + +
Is this a NEW product, service, project, feature, or functionality, + a change to an EXISTING one, or neither?
+ +
+
+ +
+ Mozilla Project: + +
What product/service/project does this pertain to?
+ +
+
+ + + +
+ Separate Party: + +
Does this project involve a relationship with another party (such as a third + party vendor, hosted service provider, consultant or strategic partner (business deals))? + This includes NDAs, click to accept, API agreements, open source licenses, renewals, + additional services or goods, and any other agreements.
+ +
+
+ +
+
+ Type of Relationship: + +
What type of relationship?
+ +
+
+ +
+ Data Access: + +
Will the other party have access to Mozilla (customer, contributor, user, + employee) data? (If this is for an NDA, choose no)
+ +
+
+ +
+ Privacy Policy: + +
What is the url for their privacy policy?
+ +
+
+ +
+ Vendor Cost: + +
What is the anticipated cost of the vendor relationship? + (Entire Contract Cost, not monthly cost)
+ +
+
+
+
+ +
+
Security Review
+ +
+ Affects Products: + +
Does this feature or code change affect Firefox, Thunderbird or any + product or service the Mozilla ships to end users?
+ +
+
+ +
+ Review Due Date: + +
When would you like the review to be completed? + (more info)
+ + +
+ +
+
+ +
+ Review Invitees: + +
Whom should be invited to the review?
+ +
+
+ +
+ Extra Information: + +
If you feel something is missing here or you would like to provide other + kind of feedback, feel free to do so here?
+ +
+
+
+ +
+
Privacy (Policy/Project)
+ +
+ Privacy Policy: + +
Do you currently have a privacy policy for your project / site / product?
+ +
+
+ + + +
+ User Data: + +
Does your product/service/project collect, use or maintain any user data?
+ +
+
+ +
+ Data Safety [% terms.Bug %] ID: + +
Please provide link to Data Safety [% terms.bug %]
+ +
+
+ + +
+ +
+
Privacy (Policy/Vendor)
+ +
+ Privacy Policy: + +
Will the vendor have access to Mozilla (customer, contributor, user, employee) data?
+ +
+
+ +
+ + +
+ Privacy Questionnaire: + +
Has vendor completed Mozilla Vendor Privacy Questionnaire?
+ +
+
+
+
+ + + +
+
Finance
+ +
+ What is the purchase for?: + + + +
+ +
+ Why is the purchase needed?: + + + +
+ +
+ What is the risk
if not purchased?:
+ + + +
+ +
+ What is the alternative?: + + + +
+ +
+ Is this line item in budget?: + + + +
+ +
+ What is the urgency?: + + + +
+ +
+ Total Cost: + + + +
+
+ +
+
Data Safety
+ +
+ User Data: + +
Does your project collect data from users?
+ +
+
+ +
+
+ How many involved?: + +
How many users are currently involved?
+ +
+
+ +
+ How many antcipated?: + +
How many users do you anticipate to be involved?
+ +
+
+ +
+ Type of Data: + +
Please provide examples of the types of user data you collect.
+ +
+
+ +
+ Data Reason: + +
Why do you need to collect user data?
+ +
+
+ +
+ Community Benefit: + +
What community benefits are derived from the collection of user data for your project?
+ +
+
+ +
+ Data Collection: + +
How is the data being collected? (e.g., forms on web site, provided directly by user, + observed data collection, etc.) (Consider that you may be collecting data unintentionally + such as automatic logging by web servers)
+ +
+
+ +
+ Data Retention: + +
Will your project / team members need to retain user data?
+ +
+
+ +
+ Data Retention Length: + +
If the data is being retained, for how long?
+ +
+
+ +
+ Separate Party: + +
Will any user data be shared or accessed by third party partners, customers or providers?
+ +
+
+ +
+
+ Separate Party Data Type: + +
What is the data being shared or accessed?
+ +
+
+ +
+ Separate Party
Data Communication:
+ +
How would the data be communicated / transferred to the third parties?
+ +
+
+ +
+ Who are the separate parties?: + +
Who are the third party vendors and in what countries are they based?
+ +
+
+
+ +
+ Community Visibility and Input: + +
Has your proposal been shared publicly, including requirements for Mozilla to collect and host user data?
+ +
+
+ +
+ Communication Channels: + +
What communication channels are you using and what kind of input have you received thus far?
+ +
+
+ +
+ Public Communication Plan: + +
Data Safety discussion needed. Provide your plan for publicly sharing your proposal.
+ +
+
+
+
+ + +
+ +

+ Thanks for contacting us. You will be notified by email of any progress made in resolving your request. +

+ +[% PROCESS global/footer.html.tmpl %] diff --git a/extensions/MozProjectReview/template/en/default/hook/global/messages-messages.html.tmpl b/extensions/MozProjectReview/template/en/default/hook/global/messages-messages.html.tmpl new file mode 100644 index 000000000..ac7c1f6c7 --- /dev/null +++ b/extensions/MozProjectReview/template/en/default/hook/global/messages-messages.html.tmpl @@ -0,0 +1,13 @@ +[%# 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. + #%] + +[% IF message_tag == "moz_project_review_creation_failed" %] + The parent [% terms.bug %] was created successfully, but creation of + the dependent [% terms.bugs %] failed. The error has been logged + and no further action is required at this time. +[% END %] diff --git a/extensions/MozProjectReview/web/js/moz_project_review.js b/extensions/MozProjectReview/web/js/moz_project_review.js new file mode 100644 index 000000000..318122f19 --- /dev/null +++ b/extensions/MozProjectReview/web/js/moz_project_review.js @@ -0,0 +1,149 @@ +/* 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. + */ + +YAHOO.namespace('MozProjectReview'); + +var MPR = YAHOO.MozProjectReview; +var Dom = YAHOO.util.Dom; + +MPR.required_fields = { + "initial_questions": { + "short_desc": "Please enter a value for project or feature name in the initial questions section", + "cc": "Please enter a value for points of contact in the initial questions section", + "urgency": "Please enter a value for urgency in the initial questions section", + "release_date": "Please enter a value for release date in the initial questions section", + "project_status": "Please select a value for project status in the initial questions section", + "mozilla_data": "Please select a value for mozilla data in the initial questions section", + "new_or_change": "Please select a value for new or change to existing project in the initial questions section", + "separate_party": "Please select a value for separate party in the initial questions section" + }, + "finance_questions": { + "finance_purchase_what": "Please enter a value for what in the finance questions section", + "finance_purchase_why": "Please enter a value for why in the finance questions section", + "finance_purchase_risk": "Please enter a value for risk in the finance questions section", + "finance_purchase_alternative": "Please enter a value for alternative in the finance questions section", + "finance_purchase_inbudget": "Please enter a value for in budget in the finance questions section", + "finance_purchase_urgency": "Please select a value for urgency in the finance questions section", + "finance_purchase_cost": "Please enter a value for total cost in the finance questions section" + }, + "legal_questions": { + "legal_priority": "Please select a priority for the legal questions section" + } +}; + +MPR.toggleSpecialSections = function () { + var mozilla_data_select = Dom.get('mozilla_data'); + var data_access_select = Dom.get('data_access'); + var vendor_cost_select = Dom.get('vendor_cost'); + + if (mozilla_data_select.value == 'Yes') { + Dom.removeClass('legal_questions', 'bz_default_hidden'); + Dom.removeClass('privacy_policy_project_questions', 'bz_default_hidden'); + Dom.removeClass('data_safety_questions', 'bz_default_hidden'); + Dom.removeClass('sec_review_questions', 'bz_default_hidden'); + } + else { + Dom.addClass('legal_questions', 'bz_default_hidden'); + Dom.addClass('privacy_policy_project_questions', 'bz_default_hidden'); + Dom.addClass('data_safety_questions', 'bz_default_hidden'); + Dom.addClass('sec_review_questions', 'bz_default_hidden'); + } + + if (data_access_select.value == 'Yes' || mozilla_data_select.value == 'Yes') { + Dom.removeClass('sec_review_questions', 'bz_default_hidden'); + } + else { + Dom.addClass('sec_review_questions', 'bz_default_hidden'); + } + + if (data_access_select.value == 'Yes') { + Dom.removeClass('privacy_policy_vendor_questions', 'bz_default_hidden'); + } + else { + Dom.addClass('privacy_policy_vendor_questions', 'bz_default_hidden'); + } + + if (vendor_cost_select.value == '> $25,000') { + Dom.removeClass('finance_questions', 'bz_default_hidden'); + } + else { + Dom.addClass('finance_questions', 'bz_default_hidden'); + } +} + +MPR.toggleVisibleById = function () { + var args = Array.prototype.slice.call(arguments); + var select = args.shift(); + var value = args.shift(); + var ids = args; + + if (typeof select == 'string') { + select = Dom.get(select); + } + + for (var i = 0; i < ids.length; i++) { + if (select.value == value) { + Dom.removeClass(ids[i], 'bz_default_hidden'); + } + else { + Dom.addClass(ids[i], 'bz_default_hidden'); + } + } +} + +MPR.validateAndSubmit = function () { + var alert_text = ''; + var section = ''; + for (section in MPR.required_fields) { + console.log("section: " + section); + if (!Dom.hasClass(section, 'bz_default_hidden')) { + var field = ''; + for (field in MPR.required_fields[section]) { + console.log("field: " + field); + if (!MPR.isFilledOut(field)) { + alert_text += MPR.required_fields[section][field] + "\n"; + } + } + } + } + + if (Dom.get('separate_party').value == 'Yes') { + if (!MPR.isFilledOut('relationship_type')) alert_text += "Please select a value for type of relationship\n"; + if (!MPR.isFilledOut('data_access')) alert_text += "Please select a value for data access\n"; + if (!MPR.isFilledOut('vendor_cost')) alert_text += "Please select a value for vendor cost\n"; + } + + if (alert_text) { + alert(alert_text); + return false; + } + + return true; +} + +YAHOO.util.Event.onDOMReady(function() { + MPR.toggleSpecialSections(); + MPR.toggleVisibleById('new_or_change', 'Existing', 'mozilla_project_row'); + MPR.toggleVisibleById('separate_party', 'Yes', 'initial_separate_party_questions'); + MPR.toggleVisibleById('relationship_type', 'Vendor/Services', 'legal_sow_details_row'); + MPR.toggleVisibleById('vendor_cost', '> $25,000', 'finance_questions'); + MPR.toggleVisibleById('privacy_policy_project', 'Yes', 'privacy_policy_project_link_row'); + MPR.toggleVisibleById('privacy_policy_user_data', 'Yes', 'privacy_policy_project_user_data_bug_row'); + MPR.toggleVisibleById('privacy_policy_vendor_user_data', 'Yes', 'privacy_policy_vendor_extra'); + MPR.toggleVisibleById('data_safety_user_data', 'Yes', 'data_safety_extra_questions'); + MPR.toggleVisibleById('data_safety_retention', 'Yes', 'data_safety_retention_length_row'); + MPR.toggleVisibleById('data_safety_separate_party', 'Yes', 'data_safety_separate_party_data_row'); + MPR.toggleVisibleById('data_safety_community_visibility', 'Yes', 'data_safety_communication_channels_row'); + MPR.toggleVisibleById('data_safety_community_visibility', 'No', 'data_safety_communication_plan_row'); +}); + +//Takes a DOM element id and makes sure that it is filled out +MPR.isFilledOut = function (elem_id) { + var str = Dom.get(elem_id).value; + return str.length > 0 ? true : false; +} diff --git a/extensions/MozProjectReview/web/style/moz_project_review.css b/extensions/MozProjectReview/web/style/moz_project_review.css new file mode 100644 index 000000000..fb23a78e1 --- /dev/null +++ b/extensions/MozProjectReview/web/style/moz_project_review.css @@ -0,0 +1,41 @@ +/* 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. */ + +.header { + width:95%; + border-bottom: 1px solid rgb(116,126,147); + font-size: 1.5em; + color: rgb(102,100,88); + padding-bottom: 5px; + margin-bottom: 5px; + margin-top: 12px; +} +.field_row { + width:100%; + min-width:700px; +} +.field_label { + float:left; + width:20%; +} +.field_data { + float:left; + width:75%; + margin-left:5px; + margin-bottom:5px; +} +.field_description { + font-style:italic; + font-size:90%; + color: rgb(102,100,88); +} +span.required:before { + content: "* "; +} +span.required:before, span.required_star { + color: red; +} -- cgit v1.2.3-24-g4f1b