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 git-svn-id: svn://10.0.0.236/trunk@254946 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user