<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title> Bugzilla::Milestone</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" title="style" type="text/css" href=".././../../../style.css" media="all" > </head> <body id="pod"> <p class="backlinktop"><b><a name="___top" href="../index.html" accesskey="1" title="All Documents"><<</a></b></p> <h1>Bugzilla::Milestone</h1> <div class='indexgroup'> <ul class='indexList indexList1'> <li class='indexItem indexItem1'><a href='#NAME'>NAME</a> <li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a> <li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a> <li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a> <li class='indexItem indexItem1'><a href='#CLASS_METHODS'>CLASS METHODS</a> </ul> </div> <h1><a class='u' href='#___top' title='click to go to top of document' name="NAME" >NAME</a></h1> <p>Bugzilla::Milestone - Bugzilla product milestone class.</p> <h1><a class='u' href='#___top' title='click to go to top of document' name="SYNOPSIS" >SYNOPSIS</a></h1> <pre class="code"> use Bugzilla::Milestone; my $milestone = new Bugzilla::Milestone({ name => $name, product => $product }); my $name = $milestone->name; my $product_id = $milestone->product_id; my $product = $milestone->product; my $sortkey = $milestone->sortkey; my $milestone = Bugzilla::Milestone->create( { name => $name, product => $product, sortkey => $sortkey }); $milestone->set_name($new_name); $milestone->set_sortkey($new_sortkey); $milestone->update(); $milestone->remove_from_db;</pre> <h1><a class='u' href='#___top' title='click to go to top of document' name="DESCRIPTION" >DESCRIPTION</a></h1> <p>Milestone.pm represents a Product Milestone object.</p> <h1><a class='u' href='#___top' title='click to go to top of document' name="METHODS" >METHODS</a></h1> <dl> <dt><a name="new({name_=_$name,_product_=>_$product})>" ><code class="code">new({name =</code> $name, product => $product})></a></dt> <dd> <pre class="code"> 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.</pre> <dt><a name="name()" ><code class="code">name()</code></a></dt> <dd> <pre class="code"> Description: Name (value) of the milestone. Params: none. Returns: The name of the milestone.</pre> <dt><a name="product_id()" ><code class="code">product_id()</code></a></dt> <dd> <pre class="code"> Description: ID of the product the milestone belongs to. Params: none. Returns: The ID of a product.</pre> <dt><a name="product()" ><code class="code">product()</code></a></dt> <dd> <pre class="code"> Description: The product object of the product the milestone belongs to. Params: none. Returns: A Bugzilla::Product object.</pre> <dt><a name="sortkey()" ><code class="code">sortkey()</code></a></dt> <dd> <pre class="code"> Description: Sortkey of the milestone. Params: none. Returns: The sortkey of the milestone.</pre> <dt><a name="bug_count()" ><code class="code">bug_count()</code></a></dt> <dd> <pre class="code"> Description: Returns the total of bugs that belong to the milestone. Params: none. Returns: Integer with the number of bugs.</pre> <dt><a name="set_name($new_name)" ><code class="code">set_name($new_name)</code></a></dt> <dd> <pre class="code"> 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.</pre> <dt><a name="set_sortkey($new_sortkey)" ><code class="code">set_sortkey($new_sortkey)</code></a></dt> <dd> <pre class="code"> Description: Changes the sortkey of the milestone. Params: $new_sortkey - new sortkey of the milestone (signed integer). Returns: Nothing.</pre> <dt><a name="update()" ><code class="code">update()</code></a></dt> <dd> <pre class="code"> 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.</pre> <dt><a name="remove_from_db()" ><code class="code">remove_from_db()</code></a></dt> <dd> <pre class="code"> Description: Deletes the current milestone from the DB. The object itself is not destroyed. Params: none. Returns: Nothing.</pre> </dd> </dl> <h1><a class='u' href='#___top' title='click to go to top of document' name="CLASS_METHODS" >CLASS METHODS</a></h1> <dl> <dt><a name="create({name_=_$name,_product_=>_$product,_sortkey_=>_$sortkey})>" ><code class="code">create({name =</code> $name, product => $product, sortkey => $sortkey})></a></dt> <dd> <pre class="code"> Description: Create a new milestone for the given product. Params: $name - 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.</pre> </dd> </dl> <p class="backlinkbottom"><b><a name="___bottom" href="../index.html" title="All Documents"><<</a></b></p> <!-- end doc --> </body></html>