5.7.59. Bugzilla::Release

5.7.59.1. NAME

Bugzilla::Release - Bugzilla product release class.

5.7.59.2. SYNOPSIS

use Bugzilla::Release;

my $release = new Bugzilla::Release({ name => $name, product => $product_obj });
my $release = Bugzilla::Release->check({ name => $name, $product => $product_obj })
my $release = Bugzilla::Release->check({ id => $id });

my $name       = $release->name;
my $product_id = $release->product_id;
my $product    = $release->product;
my $sortkey    = $release->sortkey;

my $release = Bugzilla::Release->create(
    { value => $name, product => $product, sortkey => $sortkey });

$release->set_name($new_name);
$release->set_sortkey($new_sortkey);
$release->update();

$release->remove_from_db;

5.7.59.3. DESCRIPTION

Release.pm represents a Product Release object.

5.7.59.4. METHODS

  • new({name => $name, product => $product})
Description: The constructor is used to load an existing release
             by passing a product object and a release name.

Params:      $product - a Bugzilla::Product object.
             $name - the name of a release (string).

Returns:     A Bugzilla::Release object.
  • name()
Description: Name (value) of the release.

Params:      none.

Returns:     The name of the release.
  • product_id()
Description: ID of the product the release belongs to.

Params:      none.

Returns:     The ID of a product.
  • product()
Description: The product object of the product the release belongs to.

Params:      none.

Returns:     A Bugzilla::Product object.
  • sortkey()
Description: Sortkey of the release.

Params:      none.

Returns:     The sortkey of the release.
  • bug_count()
Description: Returns the total of bugs that belong to the release.

Params:      none.

Returns:     Integer with the number of bugs.
  • set_name($new_name)
Description: Changes the name of the release.

Params:      $new_name - new name of the release (string). This name
                         must be unique within the product.

Returns:     Nothing.
  • set_sortkey($new_sortkey)
Description: Changes the sortkey of the release.

Params:      $new_sortkey - new sortkey of the release (signed integer).

Returns:     Nothing.
  • update()
Description: Writes the new name and/or the new sortkey into the DB.

Params:      none.

Returns:     A hashref with changes made to the release object.
  • remove_from_db()
Description: Deletes the current release from the DB. The object itself
             is not destroyed.

Params:      none.

Returns:     Nothing.

5.7.59.5. CLASS METHODS

  • create({value => $value, product => $product, sortkey => $sortkey})
Description: Create a new release for the given product.

Params:      $value   - name of the new release (string). This name
                        must be unique within the product.
             $product - a Bugzilla::Product object.
             $sortkey - the sortkey of the new release (signed integer)

Returns:     A Bugzilla::Release object.

5.7.59.6. Methods in need of POD

  • set_is_active
  • is_active

This documentation undoubtedly has bugs; if you find some, please file them here.