Bugzilla::Milestone - Bugzilla product milestone class.
use Bugzilla::Milestone;
my $milestone = new Bugzilla::Milestone({ name => $name, product => $product_obj });
my $milestone = Bugzilla::Milestone->check({ name => $name, product => $product_obj });
my $milestone = Bugzilla::Milestone->check({ id => $id });
my $name = $milestone->name;
my $product_id = $milestone->product_id;
my $product = $milestone->product;
my $sortkey = $milestone->sortkey;
my $milestone = Bugzilla::Milestone->create(
{ value => $name, product => $product, sortkey => $sortkey });
$milestone->set_name($new_name);
$milestone->set_sortkey($new_sortkey);
$milestone->update();
$milestone->remove_from_db;
Milestone.pm represents a Product Milestone object.
new({name => $name, product => $product}) Description: The constructor is used to load an existing milestone
by passing a product object and a milestone name.
Params: $product - a Bugzilla::Product object.
$name - the name of a milestone (string).
Returns: A Bugzilla::Milestone object.
name()Description: Name (value) of the milestone. Params: none. Returns: The name of the milestone.
product_id()Description: ID of the product the milestone belongs to. Params: none. Returns: The ID of a product.
product()Description: The product object of the product the milestone belongs to. Params: none. Returns: A Bugzilla::Product object.
sortkey()Description: Sortkey of the milestone. Params: none. Returns: The sortkey of the milestone.
bug_count()Description: Returns the total of bugs that belong to the milestone. Params: none. Returns: Integer with the number of bugs.
set_name($new_name) Description: Changes the name of the milestone.
Params: $new_name - new name of the milestone (string). This name
must be unique within the product.
Returns: Nothing.
set_sortkey($new_sortkey)Description: Changes the sortkey of the milestone. Params: $new_sortkey - new sortkey of the milestone (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 milestone object.
remove_from_db() Description: Deletes the current milestone from the DB. The object itself
is not destroyed.
Params: none.
Returns: Nothing.
create({value => $value, product => $product, sortkey => $sortkey}) Description: Create a new milestone for the given product.
Params: $value - name of the new milestone (string). This name
must be unique within the product.
$product - a Bugzilla::Product object.
$sortkey - the sortkey of the new milestone (signed integer)
Returns: A Bugzilla::Milestone object.