summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Field
diff options
context:
space:
mode:
authorghendricks%novell.com <>2009-07-18 00:40:09 +0200
committerghendricks%novell.com <>2009-07-18 00:40:09 +0200
commite394756f42902de5eade4f6738127c25fa2bcef7 (patch)
treebbb29b8118eb619d791ea4605207befa1a076692 /Bugzilla/Field
parentf304db03fdb9c7ad5c814700f048bb9061131cd3 (diff)
downloadbugzilla-e394756f42902de5eade4f6738127c25fa2bcef7.tar.gz
bugzilla-e394756f42902de5eade4f6738127c25fa2bcef7.tar.xz
Bug 456743 - Add the ability to disable field values (mark them as inactive)
patch by ghendricks@novell.com r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Field')
-rw-r--r--Bugzilla/Field/Choice.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/Bugzilla/Field/Choice.pm b/Bugzilla/Field/Choice.pm
index f23b0c46d..ce1020d6b 100644
--- a/Bugzilla/Field/Choice.pm
+++ b/Bugzilla/Field/Choice.pm
@@ -17,6 +17,7 @@
# The Original Code is the Bugzilla Bug Tracking System.
#
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
+# Greg Hendricks <ghendricks@novell.com>
use strict;
@@ -40,12 +41,14 @@ use constant DB_COLUMNS => qw(
id
value
sortkey
+ isactive
visibility_value_id
);
use constant UPDATE_COLUMNS => qw(
value
sortkey
+ isactive
visibility_value_id
);
@@ -58,6 +61,7 @@ use constant VALIDATORS => {
value => \&_check_value,
sortkey => \&_check_sortkey,
visibility_value_id => \&_check_visibility_value_id,
+ isactive => \&Bugzilla::Object::check_boolean,
};
use constant CLASS_MAP => {
@@ -211,7 +215,8 @@ sub _check_if_controller {
# Accessors #
#############
-sub sortkey { return $_[0]->{'sortkey'}; }
+sub is_active { return $_[0]->{'isactive'}; }
+sub sortkey { return $_[0]->{'sortkey'}; }
sub bug_count {
my $self = shift;
@@ -301,8 +306,9 @@ sub controlled_values {
# Mutators #
############
-sub set_name { $_[0]->set('value', $_[1]); }
-sub set_sortkey { $_[0]->set('sortkey', $_[1]); }
+sub set_is_active { $_[0]->set('isactive', $_[1]); }
+sub set_name { $_[0]->set('value', $_[1]); }
+sub set_sortkey { $_[0]->set('sortkey', $_[1]); }
sub set_visibility_value {
my ($self, $value) = @_;
$self->set('visibility_value_id', $value);