5.7.206. Bugzilla::Extension::Releases::Release

5.7.206.1. NAME

Release - Red Hat Bugzilla Release class.

5.7.206.2. SYNOPSIS

use Bugzilla::Extension::Releases::Release;

my $release = new Bugzilla::Extension::Releases::Release($release_id);
my $release = new Bugzilla::Extension::Releases::Release({ release => $release });

my $release = Bugzilla::Extension::Releases::Release->check({ release => $release });

my $release =
  Bugzilla::Extension::Releases::Release->create({ type_id     => $flagtype->id,
                                              description => $description });

$release->set_description($new_description);
$release->set_type_id($flagtype->id);
$release->update();

$release->remove_from_db;

5.7.206.3. DESCRIPTION

Release.pm represents a Red Hat Bugzilla Release object.

5.7.206.4. METHODS

  • new($param)
Description: The constructor is used to load an existing Release
             by passing a release ID or a hash with the release
             name.

Params:      $param - If you pass an integer, the integer is the
                      release ID from the database that we want to
                      read in. If you pass in a hash with the 'release'
                      key, then the value of the release
                      key is the release name.

Returns:     A Release object.
  • set_type_id($new_type_id)
Description: Changes the flag type id of the release.

Params:      $new_type_id - new type_id of the release (integer).

Returns:     Nothing.
  • set_description($new_desc)
Description: Changes the description of the release.

Params:      $new_desc - new description of the release(string).

Returns:     Nothing.
  • update()
Description: Write changes made to the release 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.206.5. CLASS METHODS

  • create(\%params)
Description: Create a new release.

Params:      The hashref must have the following keys:
             type_id         - flag type id for the new release (integer).
             description     - description of the new release (string).

Returns:     A Release object.

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