summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/lib
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-10-14 17:53:48 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-10-14 17:53:56 +0200
commit0e11b4a741c9104db967a2c51fa77b071cb087f5 (patch)
tree27605728dab566604a46ef740e87d487dda79567 /extensions/BugModal/lib
parent9c792196e7f940dacda41424ed25a02bb4c0b633 (diff)
downloadbugzilla-0e11b4a741c9104db967a2c51fa77b071cb087f5.tar.gz
bugzilla-0e11b4a741c9104db967a2c51fa77b071cb087f5.tar.xz
Bug 1195952 - Please add the following choices to the CAB review drop down area of bugzilla
Diffstat (limited to 'extensions/BugModal/lib')
-rw-r--r--extensions/BugModal/lib/WebService.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/extensions/BugModal/lib/WebService.pm b/extensions/BugModal/lib/WebService.pm
index e85225f60..7a05f263b 100644
--- a/extensions/BugModal/lib/WebService.pm
+++ b/extensions/BugModal/lib/WebService.pm
@@ -91,11 +91,12 @@ sub edit {
Bugzilla->active_custom_fields({ product => $bug->product_obj, component => $bug->component_obj });
foreach my $field (@custom_fields) {
my $field_name = $field->name;
- $options{$field_name} = [
- map { { name => $_->name } }
- grep { $bug->$field_name eq $_->name || $_->is_active }
- @{ $field->legal_values }
- ];
+ my @values = map { { name => $_->name } }
+ grep { $bug->$field_name eq $_->name
+ || ($_->is_active
+ && $bug->check_can_change_field($field_name, $bug->$field_name, $_->name)) }
+ @{ $field->legal_values };
+ $options{$field_name} = \@values;
}
# keywords