Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 4e237fd705495e1e21ef20696443e053 > files > 1070

bugzilla-5.0.4-3.mga7.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>
Bugzilla::Product</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">&lt;&lt;</a></b></p>
<h1>Bugzilla::Product</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='#SUBROUTINES'>SUBROUTINES</a>
  <li class='indexItem indexItem1'><a href='#SEE_ALSO'>SEE ALSO</a>
  <li class='indexItem indexItem1'><a href='#Methods_in_need_of_POD'>Methods in need of POD</a>
</ul>
</div>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p>Bugzilla::Product - Bugzilla product 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::Product;

    my $product = new Bugzilla::Product(1);
    my $product = new Bugzilla::Product({ name =&#62; &#39;AcmeProduct&#39; });

    my @components      = $product-&#62;components();
    my $groups_controls = $product-&#62;group_controls();
    my @milestones      = $product-&#62;milestones();
    my @versions        = $product-&#62;versions();
    my $bugcount        = $product-&#62;bug_count();
    my $bug_ids         = $product-&#62;bug_ids();
    my $has_access      = $product-&#62;user_has_access($user);
    my $flag_types      = $product-&#62;flag_types();
    my $classification  = $product-&#62;classification();

    my $id               = $product-&#62;id;
    my $name             = $product-&#62;name;
    my $description      = $product-&#62;description;
    my isactive          = $product-&#62;is_active;
    my $defaultmilestone = $product-&#62;default_milestone;
    my $classificationid = $product-&#62;classification_id;
    my $allows_unconfirmed = $product-&#62;allows_unconfirmed;</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>Product.pm represents a product object. It is an implementation of <a href="../Bugzilla/Object.html" class="podlinkpod"
>Bugzilla::Object</a>, and thus provides all methods that <a href="../Bugzilla/Object.html" class="podlinkpod"
>Bugzilla::Object</a> provides.</p>

<p>The methods that are specific to <code  class="code">Bugzilla::Product</code> are listed below.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="METHODS"
>METHODS</a></h1>

<dl>
<dt><a name="components"
><code  class="code">components</code></a></dt>

<dd>
<pre  class="code"> Description: Returns an array of component objects belonging to
              the product.

 Params:      none.

 Returns:     An array of Bugzilla::Component object.</pre>

<dt><a name="group_controls()"
><code  class="code">group_controls()</code></a></dt>

<dd>
<pre  class="code"> Description: Returns a hash (group id as key) with all product
              group controls.

 Params:      $full_data (optional, false by default) - when true,
              the number of bugs per group applicable to the product
              is also returned. Moreover, bug groups which have no
              special settings for the product are also returned.

 Returns:     A hash with group id as key and hash containing 
              a Bugzilla::Group object and the properties of group
              relative to the product.</pre>

<dt><a name="groups_available"
><code  class="code">groups_available</code></a></dt>

<dd>
<p>Tells you what groups are set to Default or Shown for the currently-logged-in user (taking into account both OtherControl and MemberControl). Returns an arrayref of <a href="../Bugzilla/Group.html" class="podlinkpod"
>Bugzilla::Group</a> objects with an extra hash keys set, <code  class="code">is_default</code>, which is true if the group is set to Default for the currently-logged-in user.</p>

<dt><a name="groups_mandatory"
><code  class="code">groups_mandatory</code></a></dt>

<dd>
<p>Tells you what groups are mandatory for bugs in this product, for the currently-logged-in user. Returns an arrayref of <code  class="code">Bugzilla::Group</code> objects.</p>

<dt><a name="group_is_settable"
><code  class="code">group_is_settable</code></a></dt>

<dd>
<dl>
<dt><a name="Description"
><b>Description</b></a></dt>

<dd>
<p>Tells you whether or not the currently-logged-in user can set a group on a bug (whether or not they match the MemberControl/OtherControl settings for a group in this product). Groups that are <code  class="code">Mandatory</code> for the currently-loggeed-in user are also acceptable since from Bugzilla&#39;s perspective, there&#39;s no problem with &#34;setting&#34; a Mandatory group on a bug. (In fact, the user <i>must</i> set the Mandatory group on the bug.)</p>

<dt><a name="Params"
><b>Params</b></a></dt>

<dd>
<dl>
<dt><a name="$group_-_A_Bugzilla::Group_object."
><code  class="code">$group</code> - A <a href="../Bugzilla/Group.html" class="podlinkpod"
>Bugzilla::Group</a> object.</a></dt>
</dl>

<dt><a name="Returns"
><b>Returns</b></a></dt>

<dd>
<p><code  class="code">1</code> if the group is valid in this product, <code  class="code">0</code> otherwise.</p>
</dd>
</dl>

<dt><a name="groups_valid"
><code  class="code">groups_valid</code></a></dt>

<dd>
<dl>
<dt><a name="Description"
><b>Description</b></a></dt>

<dd>
<p>Returns an arrayref of <a href="../Bugzilla/Group.html" class="podlinkpod"
>Bugzilla::Group</a> objects, representing groups that bugs could validly be restricted to within this product. Used mostly when you need the list of all possible groups that could be set in a product by anybody, disregarding whether or not the groups are active or who the currently logged-in user is.</p>

<p><b>Note</b>: This doesn&#39;t check whether or not the current user can add/remove bugs to/from these groups. It just tells you that bugs <i>could be in</i> these groups, in this product.</p>

<dt><a name="Params_(none)"
><b>Params</b> (none)</a></dt>

<dd>
<dt><a name="Returns_An_arrayref_of_Bugzilla::Group_objects."
><b>Returns</b> An arrayref of <a href="../Bugzilla/Group.html" class="podlinkpod"
>Bugzilla::Group</a> objects.</a></dt>
</dl>

<dt><a name="group_is_valid"
><code  class="code">group_is_valid</code></a></dt>

<dd>
<p>Returns <code  class="code">1</code> if the passed-in <a href="../Bugzilla/Group.html" class="podlinkpod"
>Bugzilla::Group</a> or group id could be set on a bug by <i>anybody</i>, in this product. Even inactive groups are considered valid. (This is a shortcut for searching <a href="#groups_valid" class="podlinkpod"
>&#34;groups_valid&#34;</a> to find out if a group is valid in a particular product.)</p>

<dt><a name="versions"
><code  class="code">versions</code></a></dt>

<dd>
<pre  class="code"> Description: Returns all valid versions for that product.

 Params:      none.

 Returns:     An array of Bugzilla::Version objects.</pre>

<dt><a name="milestones"
><code  class="code">milestones</code></a></dt>

<dd>
<pre  class="code"> Description: Returns all valid milestones for that product.

 Params:      none.

 Returns:     An array of Bugzilla::Milestone objects.</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 product.

 Params:      none.

 Returns:     Integer with the number of bugs.</pre>

<dt><a name="bug_ids()"
><code  class="code">bug_ids()</code></a></dt>

<dd>
<pre  class="code"> Description: Returns the IDs of bugs that belong to the product.

 Params:      none.

 Returns:     An array of integer.</pre>

<dt><a name="user_has_access()"
><code  class="code">user_has_access()</code></a></dt>

<dd>
<pre  class="code"> Description: Tells you whether or not the user is allowed to enter
              bugs into this product, based on the C&#60;entry&#62; group
              control. To see whether or not a user can actually
              enter a bug into a product, use C&#60;$user-&#38;gt;can_enter_product&#62;.

 Params:      C&#60;$user&#62; - A Bugzilla::User object.

 Returns      C&#60;1&#62; If this user&#39;s groups allow them C&#60;entry&#62; access to
              this Product, C&#60;0&#62; otherwise.</pre>

<dt><a name="flag_types()"
><code  class="code">flag_types()</code></a></dt>

<dd>
<pre  class="code"> Description: Returns flag types available for at least one of
              its components.

 Params:      none.

 Returns:     Two references to an array of flagtype objects.</pre>

<dt><a name="classification()"
><code  class="code">classification()</code></a></dt>

<dd>
<pre  class="code"> Description: Returns the classification the product belongs to.

 Params:      none.

 Returns:     A Bugzilla::Classification object.</pre>
</dd>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SUBROUTINES"
>SUBROUTINES</a></h1>

<dl>
<dt><a name="preload"
><code  class="code">preload</code></a></dt>

<dd>
<p>When passed an arrayref of <code  class="code">Bugzilla::Product</code> objects, preloads their <a href="#milestones" class="podlinkpod"
>&#34;milestones&#34;</a>, <a href="#components" class="podlinkpod"
>&#34;components&#34;</a>, and <a href="#versions" class="podlinkpod"
>&#34;versions&#34;</a>, which is much faster than calling those accessors on every item in the array individually.</p>

<p>If the 2nd argument passed to <code  class="code">preload</code> is true, flag types for these products and their components are also preloaded.</p>

<p>This function is not exported, so must be called like <code  class="code">Bugzilla::Product::preload($products)</code>.</p>
</dd>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>

<p><a href="../Bugzilla/Object.html" class="podlinkpod"
>Bugzilla::Object</a></p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="Methods_in_need_of_POD"
><b>Methods in need of POD</b></a></h1>

<dl>
<dt><a name="set_allows_unconfirmed"
>set_allows_unconfirmed</a></dt>

<dd>
<dt><a name="allows_unconfirmed"
>allows_unconfirmed</a></dt>

<dd>
<dt><a name="set_name"
>set_name</a></dt>

<dd>
<dt><a name="set_default_milestone"
>set_default_milestone</a></dt>

<dd>
<dt><a name="set_group_controls"
>set_group_controls</a></dt>

<dd>
<dt><a name="create"
>create</a></dt>

<dd>
<dt><a name="set_description"
>set_description</a></dt>

<dd>
<dt><a name="set_is_active"
>set_is_active</a></dt>

<dd>
<dt><a name="classification_id"
>classification_id</a></dt>

<dd>
<dt><a name="description"
>description</a></dt>

<dd>
<dt><a name="default_milestone"
>default_milestone</a></dt>

<dd>
<dt><a name="remove_from_db"
>remove_from_db</a></dt>

<dd>
<dt><a name="is_active"
>is_active</a></dt>

<dd>
<dt><a name="update"
>update</a></dt>
</dl>
<p class="backlinkbottom"><b><a name="___bottom" href="../index.html" title="All Documents">&lt;&lt;</a></b></p>

<!-- end doc -->

</body></html>