summaryrefslogtreecommitdiffstats
path: root/editfields.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-10-25 06:11:30 +0200
committermkanat%bugzilla.org <>2008-10-25 06:11:30 +0200
commit3cea91884b28b52df4e38f2ba88c00b65071a81f (patch)
treec0f451235176b2b542a38b0c935dcddf0453a1ee /editfields.cgi
parente0da20baba17b7f068946c8647fb6d67e77c39b7 (diff)
downloadbugzilla-3cea91884b28b52df4e38f2ba88c00b65071a81f.tar.gz
bugzilla-3cea91884b28b52df4e38f2ba88c00b65071a81f.tar.xz
Bug 291433: Ability to have custom fields whose visibility depends on the values of other fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
Diffstat (limited to 'editfields.cgi')
-rw-r--r--editfields.cgi5
1 files changed, 4 insertions, 1 deletions
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);