From 77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 31 Aug 2010 00:20:07 -0400 Subject: Bug 77193 - Add the ability to retire (disable) old versions, components and milestones r/a=mkanat --- Bugzilla/Version.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Version.pm') diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm index 4270b1e5f..7f53add13 100644 --- a/Bugzilla/Version.pm +++ b/Bugzilla/Version.pm @@ -44,6 +44,7 @@ use constant DB_COLUMNS => qw( id value product_id + isactive ); use constant REQUIRED_FIELD_MAP => { @@ -52,11 +53,13 @@ use constant REQUIRED_FIELD_MAP => { use constant UPDATE_COLUMNS => qw( value + isactive ); use constant VALIDATORS => { - product => \&_check_product, - value => \&_check_value, + product => \&_check_product, + value => \&_check_value, + isactive => \&Bugzilla::Object::check_boolean, }; use constant VALIDATOR_DEPENDENCIES => { @@ -153,6 +156,7 @@ sub remove_from_db { ############################### sub product_id { return $_[0]->{'product_id'}; } +sub is_active { return $_[0]->{'isactive'}; } sub product { my $self = shift; @@ -166,7 +170,8 @@ sub product { # Validators ################################ -sub set_name { $_[0]->set('value', $_[1]); } +sub set_name { $_[0]->set('value', $_[1]); } +sub set_is_active { $_[0]->set('isactive', $_[1]); } sub _check_value { my ($invocant, $name, undef, $params) = @_; -- cgit v1.2.3-24-g4f1b