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/Component.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Component.pm') diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index e5eb78a2d..2a176f5dc 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -45,6 +45,7 @@ use constant DB_COLUMNS => qw( initialowner initialqacontact description + isactive ); use constant UPDATE_COLUMNS => qw( @@ -52,6 +53,7 @@ use constant UPDATE_COLUMNS => qw( initialowner initialqacontact description + isactive ); use constant REQUIRED_FIELD_MAP => { @@ -66,6 +68,7 @@ use constant VALIDATORS => { description => \&_check_description, initial_cc => \&_check_cc_list, name => \&_check_name, + isactive => \&Bugzilla::Object::check_boolean, }; use constant VALIDATOR_DEPENDENCIES => { @@ -300,6 +303,7 @@ sub _create_series { sub set_name { $_[0]->set('name', $_[1]); } sub set_description { $_[0]->set('description', $_[1]); } +sub set_is_active { $_[0]->set('isactive', $_[1]); } sub set_default_assignee { my ($self, $owner) = @_; @@ -416,6 +420,7 @@ sub product { sub description { return $_[0]->{'description'}; } sub product_id { return $_[0]->{'product_id'}; } +sub is_active { return $_[0]->{'isactive'}; } ############################################## # Implement Bugzilla::Field::ChoiceInterface # @@ -423,7 +428,6 @@ sub product_id { return $_[0]->{'product_id'}; } use constant FIELD_NAME => 'component'; use constant is_default => 0; -use constant is_active => 1; sub is_set_on_bug { my ($self, $bug) = @_; -- cgit v1.2.3-24-g4f1b