From 63be194996849202878c4a87e4c68a25d1976d3e Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 7 Nov 2008 17:34:39 +0000 Subject: 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 r=bbaetz, a=mkanat --- editvalues.cgi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'editvalues.cgi') 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'; -- cgit v1.2.3-24-g4f1b