diff options
author | Dave Lawrence <dkl@redhat.com> | 2010-08-31 00:20:07 -0400 |
---|---|---|
committer | Dave Lawrence <dkl@redhat.com> | 2010-08-31 00:20:07 -0400 |
commit | 77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d (patch) | |
tree | a813d550674b01ce0c6d3d63e9f4f0b619841b31 /Bugzilla/Version.pm | |
parent | c75bcea5f0510417a1f6a14b2f88f2249b3a4109 (diff) | |
download | bugs-77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d.tar bugs-77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d.tar.gz bugs-77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d.tar.bz2 bugs-77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d.tar.xz bugs-77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d.zip |
Bug 77193 - Add the ability to retire (disable) old versions, components and milestones
r/a=mkanat
Diffstat (limited to 'Bugzilla/Version.pm')
-rw-r--r-- | Bugzilla/Version.pm | 11 |
1 files changed, 8 insertions, 3 deletions
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) = @_; |