diff options
-rw-r--r-- | Bugzilla/Version.pm | 10 | ||||
-rwxr-xr-x | editversions.cgi | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm index 920853ecd..317b73d95 100644 --- a/Bugzilla/Version.pm +++ b/Bugzilla/Version.pm @@ -169,8 +169,8 @@ sub product { # Validators ################################ -sub set_name { $_[0]->set('value', $_[1]); } -sub set_is_active { $_[0]->set('isactive', $_[1]); } +sub set_value { $_[0]->set('value', $_[1]); } +sub set_isactive { $_[0]->set('isactive', $_[1]); } sub _check_value { my ($invocant, $name, undef, $params) = @_; @@ -219,7 +219,7 @@ Bugzilla::Version - Bugzilla product version class. my $version = Bugzilla::Version->create( { value => $name, product => $product_obj }); - $version->set_name($new_name); + $version->set_value($new_name); $version->update(); $version->remove_from_db; @@ -255,9 +255,9 @@ below. =item DEFAULT_VERSION -=item set_is_active +=item set_isactive -=item set_name +=item set_value =item product_id diff --git a/editversions.cgi b/editversions.cgi index 1d056c67b..06f2f580c 100755 --- a/editversions.cgi +++ b/editversions.cgi @@ -188,8 +188,10 @@ if ($action eq 'update') { $dbh->bz_start_transaction(); - $version->set_name($version_name); - $version->set_is_active($isactive); + $version->set_all({ + value => $version_name, + isactive => $isactive + }); my $changes = $version->update(); $dbh->bz_commit_transaction(); |