Bugzilla::Version - Bugzilla product version class.
use Bugzilla::Version; my $version = new Bugzilla::Version(1, 'version_value'); my $product_id = $version->product_id; my $value = $version->value; $version->remove_from_db; my $updated = $version->update($version_name, $product); my $version = $hash_ref->{'version_value'}; my $version = Bugzilla::Version::create($version_name, $product);
Version.pm represents a Product Version object.
new($product_id, $value)
Description: The constructor is used to load an existing version by passing a product id and a version value. Params: $product_id - Integer with a product id. $value - String with a version value. Returns: A Bugzilla::Version object.
bug_count()
Description: Returns the total of bugs that belong to the version. Params: none. Returns: Integer with the number of bugs.
remove_from_db()
Description: Removes the version from the database. Params: none. Retruns: none.
update($name, $product)
Description: Update the value of the version. Params: $name - String with the new version value. $product - Bugzilla::Product object the version belongs to. Returns: An integer - 1 if the version has been updated, else 0.
create($version_name, $product)
Description: Create a new version for the given product. Params: $version_name - String with a version value. $product - A Bugzilla::Product object. Returns: A Bugzilla::Version object.