summaryrefslogtreecommitdiffstats
path: root/editvalues.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-11-07 18:34:39 +0100
committermkanat%bugzilla.org <>2008-11-07 18:34:39 +0100
commit63be194996849202878c4a87e4c68a25d1976d3e (patch)
tree657fbe1458ce256015a832251219669070886e1e /editvalues.cgi
parentebd2e3a29a893e1ea26899bac53296fc6422f47c (diff)
downloadbugzilla-63be194996849202878c4a87e4c68a25d1976d3e.tar.gz
bugzilla-63be194996849202878c4a87e4c68a25d1976d3e.tar.xz
Bug 308253: Ability to add select (enum) fields to a bug whose list of values depends on the value of another field
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
Diffstat (limited to 'editvalues.cgi')
-rwxr-xr-xeditvalues.cgi11
1 files changed, 7 insertions, 4 deletions
diff --git a/editvalues.cgi b/editvalues.cgi
index 338245284..5b82cee01 100755
--- a/editvalues.cgi
+++ b/editvalues.cgi
@@ -112,10 +112,12 @@ if ($action eq 'add') {
if ($action eq 'new') {
check_token_data($token, 'add_field_value');
- my $created_value = Bugzilla::Field::Choice->type($field)->create(
- { value => scalar $cgi->param('value'),
- sortkey => scalar $cgi->param('sortkey'),
- is_open => scalar $cgi->param('is_open') });
+ my $created_value = Bugzilla::Field::Choice->type($field)->create({
+ value => scalar $cgi->param('value'),
+ sortkey => scalar $cgi->param('sortkey'),
+ is_open => scalar $cgi->param('is_open'),
+ visibility_value_id => scalar $cgi->param('visibility_value_id'),
+ });
delete_token($token);
@@ -180,6 +182,7 @@ if ($action eq 'update') {
$vars->{'value_old'} = $value->name;
$value->set_name($cgi->param('value_new'));
$value->set_sortkey($cgi->param('sortkey'));
+ $value->set_visibility_value($cgi->param('visibility_value_id'));
$vars->{'changes'} = $value->update();
delete_token($token);
$vars->{'message'} = 'field_value_updated';