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/Milestone.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Bugzilla/Milestone.pm') diff --git a/Bugzilla/Milestone.pm b/Bugzilla/Milestone.pm index cb7d53da3..92bc2192a 100644 --- a/Bugzilla/Milestone.pm +++ b/Bugzilla/Milestone.pm @@ -43,6 +43,7 @@ use constant DB_COLUMNS => qw( value product_id sortkey + isactive ); use constant REQUIRED_FIELD_MAP => { @@ -52,12 +53,14 @@ use constant REQUIRED_FIELD_MAP => { use constant UPDATE_COLUMNS => qw( value sortkey + isactive ); use constant VALIDATORS => { - product => \&_check_product, - sortkey => \&_check_sortkey, - value => \&_check_value, + product => \&_check_product, + sortkey => \&_check_sortkey, + value => \&_check_value, + isactive => \&Bugzilla::Object::check_boolean, }; use constant VALIDATOR_DEPENDENCIES => { @@ -203,8 +206,9 @@ sub _check_product { # Methods ################################ -sub set_name { $_[0]->set('value', $_[1]); } -sub set_sortkey { $_[0]->set('sortkey', $_[1]); } +sub set_name { $_[0]->set('value', $_[1]); } +sub set_sortkey { $_[0]->set('sortkey', $_[1]); } +sub set_is_active { $_[0]->set('isactive', $_[1]); } sub bug_count { my $self = shift; @@ -226,6 +230,7 @@ sub bug_count { sub name { return $_[0]->{'value'}; } sub product_id { return $_[0]->{'product_id'}; } sub sortkey { return $_[0]->{'sortkey'}; } +sub is_active { return $_[0]->{'isactive'}; } sub product { my $self = shift; -- cgit v1.2.3-24-g4f1b