Sophie

Sophie

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

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::Component</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::Component</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>
  <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::Component - Bugzilla product component 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::Component;

    my $component = new Bugzilla::Component($comp_id);
    my $component = new Bugzilla::Component({ product =&#62; $product, name =&#62; $name });

    my $bug_count          = $component-&#62;bug_count();
    my $bug_ids            = $component-&#62;bug_ids();
    my $id                 = $component-&#62;id;
    my $name               = $component-&#62;name;
    my $description        = $component-&#62;description;
    my $product_id         = $component-&#62;product_id;
    my $default_assignee   = $component-&#62;default_assignee;
    my $default_qa_contact = $component-&#62;default_qa_contact;
    my $initial_cc         = $component-&#62;initial_cc;
    my $product            = $component-&#62;product;
    my $bug_flag_types     = $component-&#62;flag_types-&#62;{&#39;bug&#39;};
    my $attach_flag_types  = $component-&#62;flag_types-&#62;{&#39;attachment&#39;};

    my $component = Bugzilla::Component-&#62;check({ product =&#62; $product, name =&#62; $name });

    my $component =
      Bugzilla::Component-&#62;create({ name             =&#62; $name,
                                    product          =&#62; $product,
                                    initialowner     =&#62; $user_login1,
                                    initialqacontact =&#62; $user_login2,
                                    description      =&#62; $description});

    $component-&#62;set_name($new_name);
    $component-&#62;set_description($new_description);
    $component-&#62;set_default_assignee($new_login_name);
    $component-&#62;set_default_qa_contact($new_login_name);
    $component-&#62;set_cc_list(\@new_login_names);
    $component-&#62;update();

    $component-&#62;remove_from_db;</pre>

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

<p>Component.pm represents a Product Component 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($param)"
><code  class="code">new($param)</code></a></dt>

<dd>
<pre  class="code"> Description: The constructor is used to load an existing component
              by passing a component ID or a hash with the product
              object the component belongs to and the component name.

 Params:      $param - If you pass an integer, the integer is the
                       component ID from the database that we want to
                       read in. 
                       However, If you pass in a hash, it must contain
                       two keys:
                       name (string): the name of the component
                       product (object): an object of Bugzilla::Product
                       representing the product that the component belongs to.

 Returns:     A Bugzilla::Component object.</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 component.

 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 all bug IDs that belong to the component.

 Params:      none.

 Returns:     A reference to an array of bug IDs.</pre>

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

<dd>
<pre  class="code"> Description: Returns a user object that represents the default assignee for
              the component.

 Params:      none.

 Returns:     A Bugzilla::User object.</pre>

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

<dd>
<pre  class="code"> Description: Returns a user object that represents the default QA contact for
              the component.

 Params:      none.

 Returns:     A Bugzilla::User object if the default QA contact is defined for
              the component. Otherwise, returns undef.</pre>

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

<dd>
<pre  class="code"> Description: Returns a list of user objects representing users being
              in the initial CC list.

 Params:      none.

 Returns:     An arrayref of L&#60;Bugzilla::User&#62; objects.</pre>

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

<dd>
<pre  class="code"> Description: Returns all bug and attachment flagtypes available for
              the component.

 Params:      none.

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

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

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

 Params:      none.

 Returns:     A Bugzilla::Product object.</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 component.

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

 Returns:     Nothing.</pre>

<dt><a name="set_description($new_desc)"
><code  class="code">set_description($new_desc)</code></a></dt>

<dd>
<pre  class="code"> Description: Changes the description of the component.

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

 Returns:     Nothing.</pre>

<dt><a name="set_default_assignee($new_assignee)"
><code  class="code">set_default_assignee($new_assignee)</code></a></dt>

<dd>
<pre  class="code"> Description: Changes the default assignee of the component.

 Params:      $new_owner - login name of the new default assignee of
                           the component (string). This user account
                           must already exist.

 Returns:     Nothing.</pre>

<dt><a name="set_default_qa_contact($new_qa_contact)"
><code  class="code">set_default_qa_contact($new_qa_contact)</code></a></dt>

<dd>
<pre  class="code"> Description: Changes the default QA contact of the component.

 Params:      $new_qa_contact - login name of the new QA contact of
                                the component (string). This user
                                account must already exist.

 Returns:     Nothing.</pre>

<dt><a name="set_cc_list(\@cc_list)"
><code  class="code">set_cc_list(\@cc_list)</code></a></dt>

<dd>
<pre  class="code"> Description: Changes the list of users being in the CC list by default.

 Params:      \@cc_list - list of login names (string). All the user
                          accounts must already exist.

 Returns:     Nothing.</pre>

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

<dd>
<pre  class="code"> Description: Write changes made to the component into the DB.

 Params:      none.

 Returns:     A hashref with changes made to the component 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 component 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(\%params)"
><code  class="code">create(\%params)</code></a></dt>

<dd>
<pre  class="code"> Description: Create a new component for the given product.

 Params:      The hashref must have the following keys:
              name             - name of the new component (string). This name
                                 must be unique within the product.
              product          - a Bugzilla::Product object to which
                                 the Component is being added.
              description      - description of the new component (string).
              initialowner     - login name of the default assignee (string).
              The following keys are optional:
              initialqacontact - login name of the default QA contact (string),
                                 or an empty string to clear it.
              initial_cc       - an arrayref of login names to add to the
                                 CC list by default.

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

<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="is_set_on_bug"
>is_set_on_bug</a></dt>

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

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

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

<dd>
<dt><a name="is_active"
>is_active</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>