From 3cea91884b28b52df4e38f2ba88c00b65071a81f Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 25 Oct 2008 04:11:30 +0000 Subject: Bug 291433: Ability to have custom fields whose visibility depends on the values of other fields Patch By Max Kanat-Alexander r=bbaetz, a=mkanat --- editfields.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'editfields.cgi') diff --git a/editfields.cgi b/editfields.cgi index 138c6b729..e1c7d12c2 100644 --- a/editfields.cgi +++ b/editfields.cgi @@ -55,7 +55,6 @@ elsif ($action eq 'add') { } elsif ($action eq 'new') { check_token_data($token, 'add_field'); - $vars->{'field'} = Bugzilla::Field->create({ name => scalar $cgi->param('name'), description => scalar $cgi->param('desc'), @@ -65,6 +64,8 @@ elsif ($action eq 'new') { enter_bug => scalar $cgi->param('enter_bug'), obsolete => scalar $cgi->param('obsolete'), custom => 1, + visibility_field_id => scalar $cgi->param('visibility_field_id'), + visibility_value_id => scalar $cgi->param('visibility_value_id'), }); delete_token($token); @@ -107,6 +108,8 @@ elsif ($action eq 'update') { $field->set_in_new_bugmail($cgi->param('new_bugmail')); $field->set_enter_bug($cgi->param('enter_bug')); $field->set_obsolete($cgi->param('obsolete')); + $field->set_visibility_field($cgi->param('visibility_field_id')); + $field->set_visibility_value($cgi->param('visibility_value_id')); $field->update(); delete_token($token); -- cgit v1.2.3-24-g4f1b