summaryrefslogtreecommitdiffstats
path: root/extensions/Needinfo
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-12-06 20:59:01 +0100
committerDavid Lawrence <dkl@mozilla.com>2016-12-06 20:59:01 +0100
commit6d01972698db25da5f6285dad9d9713d1d769016 (patch)
tree9794544f9372bbd07e5cee03f7ab9b7ba39f001c /extensions/Needinfo
parentfe64441855adfa650671e6c8b0a1ab44d217fc18 (diff)
downloadbugzilla-6d01972698db25da5f6285dad9d9713d1d769016.tar.gz
bugzilla-6d01972698db25da5f6285dad9d9713d1d769016.tar.xz
Bug 1287461 - Can't request needinfo from someone when I'm needinfo'd on a bug
Diffstat (limited to 'extensions/Needinfo')
-rw-r--r--extensions/Needinfo/Extension.pm3
-rw-r--r--extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl26
2 files changed, 16 insertions, 13 deletions
diff --git a/extensions/Needinfo/Extension.pm b/extensions/Needinfo/Extension.pm
index cb897e72e..0c8c88a87 100644
--- a/extensions/Needinfo/Extension.pm
+++ b/extensions/Needinfo/Extension.pm
@@ -92,9 +92,10 @@ sub bug_start_of_update {
Bugzilla->input_params($params);
my $add_needinfo = delete $params->{needinfo};
+ my $needinfo_type = delete $params->{needinfo_type} // '';
my $needinfo_from = delete $params->{needinfo_from};
my $needinfo_role = delete $params->{needinfo_role};
- my $is_redirect = delete $params->{needinfo_redirect};
+ my $is_redirect = $needinfo_type eq 'redirect_to' ? 1 : 0;
my $is_private = $params->{'comment_is_private'};
my @needinfo_overrides;
diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
index 3a3bc7325..4d2a39f38 100644
--- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
+++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
@@ -122,11 +122,15 @@ $(function() {
function existing_needinfo_changed(event) {
var $target = $(event.target);
var is_redirect = !$target.is(':checked') && $target.data('is-self');
- $('#needinfo_from_label').text(is_redirect
- ? 'Redirect my needinfo request to'
- : 'Need more information from'
- );
- $('#needinfo_redirect').val(is_redirect ? '1' : '');
+ if (is_redirect) {
+ $('#needinfo_from_label').hide();
+ $('#needinfo_type').show();
+ $('#needinfo_type').val('redirect_to');
+ } else {
+ $('#needinfo_from_label').show();
+ $('#needinfo_type').hide();
+ $('#needinfo_type').val('needinfo_from');
+ }
}
function needinfo_role_changed() {
@@ -186,18 +190,16 @@ $(function() {
[% IF needinfo_flags.size == 0 || needinfo_flagtype.is_multiplicable %]
<tr>
<td class="needinfo-cb-td">
- <input
- type="checkbox"
- name="needinfo"
- id="needinfo"
- value="1"
- >
+ <input type="checkbox" name="needinfo" id="needinfo" value="1">
</td>
<td>
- <input type="hidden" name="needinfo_redirect" id="needinfo_redirect" value="">
<label for="needinfo" id="needinfo_from_label">
Need more information from
</label>
+ <select name="needinfo_type" id="needinfo_type" style="display:none;">
+ <option value="needinfo_from" selected="true">Need more information from</option>
+ <option value="redirect_to">Redirect needinfo request to</option>
+ </select>
<select name="needinfo_role" id="needinfo_role">
<option value="other">other</option>
[% IF NOT bug.reporter.needinfo_blocked %]