Sophie

Sophie

distrib > Mageia > 3 > x86_64 > by-pkgid > c84848a346e9c806fc942b61911131d4 > files > 875

bugzilla-4.4-0.rc2.3.mga3.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>
Bugzilla::Webservice::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::Webservice::Product</h1>
<div class='indexgroup'>
<ul   class='indexList indexList1'>
  <li class='indexItem indexItem1'><a href='#NAME'>NAME</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='#List_Products'>List Products</a>
  <ul   class='indexList indexList2'>
    <li class='indexItem indexItem2'><a href='#get_selectable_products'>get_selectable_products</a>
    <li class='indexItem indexItem2'><a href='#get_enterable_products'>get_enterable_products</a>
    <li class='indexItem indexItem2'><a href='#get_accessible_products'>get_accessible_products</a>
    <li class='indexItem indexItem2'><a href='#get'>get</a>
  </ul>
  <li class='indexItem indexItem1'><a href='#Product_Creation_and_Modification'>Product Creation and Modification</a>
  <ul   class='indexList indexList2'>
    <li class='indexItem indexItem2'><a href='#create'>create</a>
    <li class='indexItem indexItem2'><a href='#update'>update</a>
  </ul>
</ul>
</div>

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

<p>Bugzilla::Webservice::Product - The Product API</p>

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

<p>This part of the Bugzilla API allows you to list the available Products and get information about them.</p>

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

<p>See <a href="../../Bugzilla/WebService.html" class="podlinkpod"
>Bugzilla::WebService</a> for a description of how parameters are passed,
and what <b>STABLE</b>,
<b>UNSTABLE</b>,
and <b>EXPERIMENTAL</b> mean.</p>

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

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

<p><b>EXPERIMENTAL</b></p>

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

<dd>
<p>Returns a list of the ids of the products the user can search on.</p>

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

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

<dd>
<p>A hash containing one item,
<code  class="code">ids</code>,
that contains an array of product ids.</p>

<dt><a name="Errors_(none)"
><b>Errors</b> (none)</a></dt>
</dl>

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

<p><b>EXPERIMENTAL</b></p>

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

<dd>
<p>Returns a list of the ids of the products the user can enter bugs against.</p>

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

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

<dd>
<p>A hash containing one item,
<code  class="code">ids</code>,
that contains an array of product ids.</p>

<dt><a name="Errors_(none)"
><b>Errors</b> (none)</a></dt>
</dl>

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

<p><b>UNSTABLE</b></p>

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

<dd>
<p>Returns a list of the ids of the products the user can search or enter bugs against.</p>

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

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

<dd>
<p>A hash containing one item,
<code  class="code">ids</code>,
that contains an array of product ids.</p>

<dt><a name="Errors_(none)"
><b>Errors</b> (none)</a></dt>
</dl>

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

<p><b>EXPERIMENTAL</b></p>

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

<dd>
<p>Returns a list of information about the products passed to it.</p>

<p><b>Note</b>: You must at least specify one of <code  class="code">ids</code> or <code  class="code">names</code>.</p>

<p><b>Note</b>: Can also be called as &#34;get_products&#34; for compatibilty with Bugzilla 3.0 API.</p>

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

<dd>
<p>In addition to the parameters below,
this method also accepts the standard <a href="../../Bugzilla/WebService.html#include_fields" class="podlinkpod"
>include_fields</a> and <a href="../../Bugzilla/WebService.html#exclude_fields" class="podlinkpod"
>exclude_fields</a> arguments.</p>

<p>This RPC call supports sub field restrictions.</p>

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

<dd>
<p>An array of product ids</p>

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

<dd>
<p>An array of product names</p>
</dd>
</dl>

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

<dd>
<p>A hash containing one item,
<code  class="code">products</code>,
that is an array of hashes.
Each hash describes a product,
and has the following items:</p>

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

<dd>
<p><code  class="code">int</code> An integer id uniquely identifying the product in this installation only.</p>

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

<dd>
<p><code  class="code">string</code> The name of the product.
This is a unique identifier for the product.</p>

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

<dd>
<p><code  class="code">string</code> A description of the product,
which may contain HTML.</p>

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

<dd>
<p><code  class="code">boolean</code> A boolean indicating if the product is active.</p>

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

<dd>
<p><code  class="code">string</code> The name of the default milestone for the product.</p>

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

<dd>
<p><code  class="code">boolean</code> Indicates whether the UNCONFIRMED bug status is available for this product.</p>

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

<dd>
<p><code  class="code">string</code> The classification name for the product.</p>

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

<dd>
<p><code  class="code">array</code> An array of hashes,
where each hash describes a component,
and has the following items:</p>

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

<dd>
<p><code  class="code">int</code> An integer id uniquely identifying the component in this installation only.</p>

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

<dd>
<p><code  class="code">string</code> The name of the component.
This is a unique identifier for this component.</p>

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

<dd>
<p><code  class="code">string</code> A description of the component,
which may contain HTML.</p>

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

<dd>
<p><code  class="code">string</code> The login name of the user to whom new bugs will be assigned by default.</p>

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

<dd>
<p><code  class="code">string</code> The login name of the user who will be set as the QA Contact for new bugs by default.
Empty string if the QA contact is not defined.</p>

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

<dd>
<p><code  class="code">int</code> Components,
when displayed in a list,
are sorted first by this integer and then secondly by their name.</p>

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

<dd>
<p><code  class="code">boolean</code> A boolean indicating if the component is active.
Inactive components are not enabled for new bugs.</p>

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

<dd>
<p>A hash containing the two items <code  class="code">bug</code> and <code  class="code">attachment</code> that each contains an array of hashes,
where each hash describes a flagtype,
and has the following items:</p>

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

<dd>
<p><code  class="code">int</code> Returns the ID of the flagtype.</p>

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

<dd>
<p><code  class="code">string</code> Returns the name of the flagtype.</p>

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

<dd>
<p><code  class="code">string</code> Returns the description of the flagtype.</p>

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

<dd>
<p><code  class="code">string</code> Returns the concatenated CC list for the flagtype,
as a single string.</p>

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

<dd>
<p><code  class="code">int</code> Returns the sortkey of the flagtype.</p>

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

<dd>
<p><code  class="code">boolean</code> Returns whether the flagtype is active or disabled.
Flags being in a disabled flagtype are not deleted.
It only prevents you from adding new flags to it.</p>

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

<dd>
<p><code  class="code">boolean</code> Returns whether you can request for the given flagtype (i.e.
whether the &#39;?&#39; flag is available or not).</p>

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

<dd>
<p><code  class="code">boolean</code> Returns whether you can ask someone specifically or not.</p>

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

<dd>
<p><code  class="code">boolean</code> Returns whether you can have more than one flag for the given flagtype in a given bug/attachment.</p>

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

<dd>
<p><code  class="code">int</code> the group id that is allowed to grant/deny flags of this type.
If the item is not included all users are allowed to grant/deny this flagtype.</p>

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

<dd>
<p><code  class="code">int</code> the group id that is allowed to request the flag if the flag is of the type requestable.
If the item is not included all users are allowed request this flagtype.</p>
</dd>
</dl>
</dd>
</dl>

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

<dd>
<p><code  class="code">array</code> An array of hashes,
where each hash describes a version,
and has the following items: <code  class="code">name</code>,
<code  class="code">sort_key</code> and <code  class="code">is_active</code>.</p>

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

<dd>
<p><code  class="code">array</code> An array of hashes,
where each hash describes a milestone,
and has the following items: <code  class="code">name</code>,
<code  class="code">sort_key</code> and <code  class="code">is_active</code>.</p>
</dd>
</dl>

<p>Note,
that if the user tries to access a product that is not in the list of accessible products for the user,
or a product that does not exist,
that is silently ignored,
and no information about that product is returned.</p>

<dt><a name="Errors_(none)"
><b>Errors</b> (none)</a></dt>

<dd>
<dt><a name="History"
><b>History</b></a></dt>

<dd>
<dl>
<dt><a name="In_Bugzilla_4.2,_names_was_added_as_an_input_parameter."
>In Bugzilla <b>4.2</b>,
<code  class="code">names</code> was added as an input parameter.</a></dt>

<dd>
<dt><a 
>In Bugzilla <b>4.2</b>,
<code  class="code">classification</code>,
<code  class="code">components</code>,
<code  class="code">versions</code>,
<code  class="code">milestones</code>,
<code  class="code">default_milestone</code> and <code  class="code">has_unconfirmed</code> were added to the fields returned by <code  class="code">get</code> as a replacement for <code  class="code">internals</code>,
which has been removed.</a></dt>

<dd>
<dt><a name="In_Bugzilla_4.4,_flag_types_was_added_to_the_fields_returned_by_get."
>In Bugzilla <b>4.4</b>,
<code  class="code">flag_types</code> was added to the fields returned by <code  class="code">get</code>.</a></dt>
</dl>
</dd>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="Product_Creation_and_Modification"
>Product Creation and Modification</a></h1>

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

<p><b>EXPERIMENTAL</b></p>

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

<dd>
<p>This allows you to create a new product in Bugzilla.</p>

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

<dd>
<p>Some params must be set,
or an error will be thrown.
These params are marked <b>Required</b>.</p>

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

<dd>
<p><b>Required</b> <code  class="code">string</code> The name of this product.
Must be globally unique within Bugzilla.</p>

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

<dd>
<p><b>Required</b> <code  class="code">string</code> A description for this product.
Allows some simple HTML.</p>

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

<dd>
<p><b>Required</b> <code  class="code">string</code> The default version for this product.</p>

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

<dd>
<p><code  class="code">boolean</code> Allow the UNCONFIRMED status to be set on bugs in this product.
Default: true.</p>

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

<dd>
<p><code  class="code">string</code> The name of the Classification which contains this product.</p>

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

<dd>
<p><code  class="code">string</code> The default milestone for this product.
Default &#39;---&#39;.</p>

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

<dd>
<p><code  class="code">boolean</code> True if the product is currently allowing bugs to be entered into it.
Default: true.</p>

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

<dd>
<p><code  class="code">boolean</code> True if you want series for New Charts to be created for this new product.
Default: true.</p>
</dd>
</dl>

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

<dd>
<p>A hash with one element,
id.
This is the id of the newly-filed product.</p>

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

<dd>
<dl>
<dt><a name="51_(Classification_does_not_exist)"
>51 (Classification does not exist)</a></dt>

<dd>
<p>You must specify an existing classification name.</p>

<dt><a name="700_(Product_blank_name)"
>700 (Product blank name)</a></dt>

<dd>
<p>You must specify a non-blank name for this product.</p>

<dt><a name="701_(Product_name_too_long)"
>701 (Product name too long)</a></dt>

<dd>
<p>The name specified for this product was longer than the maximum allowed length.</p>

<dt><a name="702_(Product_name_already_exists)"
>702 (Product name already exists)</a></dt>

<dd>
<p>You specified the name of a product that already exists.
(Product names must be globally unique in Bugzilla.)</p>

<dt><a name="703_(Product_must_have_description)"
>703 (Product must have description)</a></dt>

<dd>
<p>You must specify a description for this product.</p>

<dt><a name="704_(Product_must_have_version)"
>704 (Product must have version)</a></dt>

<dd>
<p>You must specify a version for this product.</p>
</dd>
</dl>
</dd>
</dl>

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

<p><b>EXPERIMENTAL</b></p>

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

<dd>
<p>This allows you to update a product in Bugzilla.</p>

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

<dd>
<p><b>Note:</b> The following parameters specify which products you are updating.
You must set one or both of these parameters.</p>

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

<dd>
<p><code  class="code">array</code> of <code  class="code">int</code>s.
Numeric ids of the products that you wish to update.</p>

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

<dd>
<p><code  class="code">array</code> or <code  class="code">string</code>s.
Names of the products that you wish to update.</p>
</dd>
</dl>

<p><b>Note:</b> The following parameters specify the new values you want to set for the products you are updating.</p>

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

<dd>
<p><code  class="code">string</code> A new name for this product.
If you try to set this while updating more than one product,
an error will occur,
as product names must be unique.</p>

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

<dd>
<p><code  class="code">string</code> When a new bug is filed,
what milestone does it get by default if the user does not choose one?
Must represent a milestone that is valid for this product.</p>

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

<dd>
<p><code  class="code">string</code> Update the long description for these products to this value.</p>

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

<dd>
<p><code  class="code">boolean</code> Allow the UNCONFIRMED status to be set on bugs in products.</p>

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

<dd>
<p><code  class="code">boolean</code> True if the product is currently allowing bugs to be entered into it,
False otherwise.</p>
</dd>
</dl>

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

<dd>
<p>A <code  class="code">hash</code> with a single field &#34;products&#34;.
This points to an array of hashes with the following fields:</p>

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

<dd>
<p><code  class="code">int</code> The id of the product that was updated.</p>

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

<dd>
<p><code  class="code">hash</code> The changes that were actually done on this product.
The keys are the names of the fields that were changed,
and the values are a hash with two keys:</p>

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

<dd>
<p><code  class="code">string</code> The value that this field was changed to.</p>

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

<dd>
<p><code  class="code">string</code> The value that was previously set in this field.</p>
</dd>
</dl>

<p>Note that booleans will be represented with the strings &#39;1&#39; and &#39;0&#39;.</p>

<p>Here&#39;s an example of what a return value might look like:</p>

<pre  class="code"> { 
   products =&#62; [
     {
       id =&#62; 123,
       changes =&#62; {
         name =&#62; {
           removed =&#62; &#39;FooName&#39;,
           added   =&#62; &#39;BarName&#39;
         },
         has_unconfirmed =&#62; {
           removed =&#62; &#39;1&#39;,
           added   =&#62; &#39;0&#39;,
         }
       }
     }
   ]
 }</pre>

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

<dd>
<dl>
<dt><a name="700_(Product_blank_name)"
>700 (Product blank name)</a></dt>

<dd>
<p>You must specify a non-blank name for this product.</p>

<dt><a name="701_(Product_name_too_long)"
>701 (Product name too long)</a></dt>

<dd>
<p>The name specified for this product was longer than the maximum allowed length.</p>

<dt><a name="702_(Product_name_already_exists)"
>702 (Product name already exists)</a></dt>

<dd>
<p>You specified the name of a product that already exists. (Product names must be globally unique in Bugzilla.)</p>

<dt><a name="703_(Product_must_have_description)"
>703 (Product must have description)</a></dt>

<dd>
<p>You must specify a description for this product.</p>

<dt><a name="704_(Product_must_have_version)"
>704 (Product must have version)</a></dt>

<dd>
<p>You must specify a version for this product.</p>

<dt><a name="705_(Product_must_define_a_default_milestone)"
>705 (Product must define a default milestone)</a></dt>

<dd>
<p>You must define a default milestone.</p>
</dd>
</dl>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="Added_in_Bugzilla_4.4."
>Added in Bugzilla <b>4.4</b>.</a></dt>
</dl>
</dd>
</dl>
<p class="backlinkbottom"><b><a name="___bottom" href="../../index.html" title="All Documents">&lt;&lt;</a></b></p>

<!-- end doc -->

</body></html>