Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > contrib-updates > by-pkgid > a1f9d0f53c9c891f98219a2cd302aea6 > files > 676

bugzilla-3.6.4-1mdv2010.2.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::Bug</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::Bug</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>
  <ul   class='indexList indexList2'>
    <li class='indexItem indexItem2'><a href='#Utility_Functions'>Utility Functions</a>
    <li class='indexItem indexItem2'><a href='#Bug_Information'>Bug Information</a>
    <li class='indexItem indexItem2'><a href='#Bug_Creation_and_Modification'>Bug Creation and Modification</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::Bug - The API for creating,
changing,
and getting the details of bugs.</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 file a new bug in Bugzilla,
or get information about bugs that have already been filed.</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>

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

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

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

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

<dd>
<p>Get information about valid bug fields,
including the lists of legal values for each field.</p>

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

<dd>
<p>You can pass either field ids or field names.</p>

<p><b>Note</b>: If neither <code  class="code">ids</code> nor <code  class="code">names</code> is specified,
then all non-obsolete fields will be returned.</p>

<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>

<dl>
<dt><a name="ids_(array)_-_An_array_of_integer_field_ids."
><code  class="code">ids</code> (array) - An array of integer field ids.</a></dt>

<dd>
<dt><a name="names_(array)_-_An_array_of_strings_representing_field_names."
><code  class="code">names</code> (array) - An array of strings representing field names.</a></dt>
</dl>

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

<dd>
<p>A hash containing a single element,
<code  class="code">fields</code>.
This is an array of hashes,
containing the following keys:</p>

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

<dd>
<p><code  class="code">int</code> An integer id uniquely idenfifying this field in this installation only.</p>

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

<dd>
<p><code  class="code">int</code> The number of the fieldtype.
The following values are defined:</p>

<dl>
<dt><a name="0_Unknown"
><code  class="code">0</code> Unknown</a></dt>

<dd>
<dt><a name="1_Free_Text"
><code  class="code">1</code> Free Text</a></dt>

<dd>
<dt><a name="2_Drop_Down"
><code  class="code">2</code> Drop Down</a></dt>

<dd>
<dt><a name="3_Multiple-Selection_Box"
><code  class="code">3</code> Multiple-Selection Box</a></dt>

<dd>
<dt><a name="4_Large_Text_Box"
><code  class="code">4</code> Large Text Box</a></dt>

<dd>
<dt><a name="5_Date/Time"
><code  class="code">5</code> Date/Time</a></dt>

<dd>
<dt><a name="6_Bug_Id"
><code  class="code">6</code> Bug Id</a></dt>

<dd>
<dt><a name="7_Bug_URLs_(&#34;See_Also&#34;)"
><code  class="code">7</code> Bug URLs (&#34;See Also&#34;)</a></dt>
</dl>

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

<dd>
<p><code  class="code">boolean</code> True when this is a custom field,
false otherwise.</p>

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

<dd>
<p><code  class="code">string</code> The internal name of this field.
This is a unique identifier for this field.
If this is not a custom field,
then this name will be the same across all Bugzilla installations.</p>

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

<dd>
<p><code  class="code">string</code> The name of the field,
as it is shown in the user interface.</p>

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

<dd>
<p><code  class="code">boolean</code> For custom fields,
this is true if the field is shown when you enter a new bug.
For standard fields,
this is currently always false,
even if the field shows up when entering a bug.
(To know whether or not a standard field is valid on bug entry,
see <a href="#create" class="podlinkpod"
>&#34;create&#34;</a>.)</p>

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

<dd>
<p><code  class="code">string</code> The name of a field that controls the visibility of this field in the user interface.
This field only appears in the user interface when the named field is equal to one of the values in <code  class="code">visibility_values</code>.
Can be null.</p>

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

<dd>
<p><code  class="code">array</code> of <code  class="code">string</code>s This field is only shown when <code  class="code">visibility_field</code> matches one of these values.
When <code  class="code">visibility_field</code> is null,
then this is an empty array.</p>

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

<dd>
<p><code  class="code">string</code> The name of the field that controls whether or not particular values of the field are shown in the user interface.
Can be null.</p>

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

<dd>
<p>This is an array of hashes,
representing the legal values for select-type (drop-down and multiple-selection) fields.
This is also populated for the <code  class="code">component</code>,
<code  class="code">version</code>,
and <code  class="code">target_milestone</code> fields,
but not for the <code  class="code">product</code> field (you must use <a href="../../Bugzilla/WebService/Product.html#get_accessible_products" class="podlinkpod"
>Product.get_accessible_products</a> for that.</p>

<p>For fields that aren&#39;t select-type fields,
this will simply be an empty array.</p>

<p>Each hash has the following keys:</p>

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

<dd>
<p><code  class="code">string</code> The actual value--this is what you would specify for this field in <a href="#create" class="podlinkpod"
>&#34;create&#34;</a>,
etc.</p>

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

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

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

<dd>
<p>If <code  class="code">value_field</code> is defined for this field,
then this value is only shown if the <code  class="code">value_field</code> is set to one of the values listed in this array.
Note that for per-product fields,
<code  class="code">value_field</code> is set to <code  class="code">&#39;product&#39;</code> and <code  class="code">visibility_values</code> will reflect which product(s) this value appears in.</p>

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

<dd>
<p><code  class="code">boolean</code> For <code  class="code">bug_status</code> values,
determines whether this status specifies that the bug is &#34;open&#34; (true) or &#34;closed&#34; (false).
This item is only included for the <code  class="code">bug_status</code> field.</p>

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

<dd>
<p>For <code  class="code">bug_status</code> values,
this is an array of hashes that determines which statuses you can transition to from this status.
(This item is only included for the <code  class="code">bug_status</code> field.)</p>

<p>Each hash contains the following items:</p>

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

<dd>
<p>the name of the new status</p>

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

<dd>
<p>this <code  class="code">boolean</code> True if a comment is required when you change a bug into this status using this transition.</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="51_(Invalid_Field_Name_or_Id)"
>51 (Invalid Field Name or Id)</a></dt>

<dd>
<p>You specified an invalid field name or id.</p>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="Added_in_Bugzilla_3.6."
>Added in Bugzilla <b>3.6</b>.</a></dt>
</dl>
</dd>
</dl>

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

<dd>
<p><b>DEPRECATED</b> - Use <a href="#fields" class="podlinkpod"
>&#34;fields&#34;</a> instead.</p>

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

<dd>
<p>Tells you what values are allowed for a particular field.</p>

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

<dd>
<dl>
<dt><a 
><code  class="code">field</code> - The name of the field you want information about.
This should be the same as the name you would use in <a href="#create" class="podlinkpod"
>&#34;create&#34;</a>,
below.</a></dt>

<dd>
<dt><a 
><code  class="code">product_id</code> - If you&#39;re picking a product-specific field,
you have to specify the id of the product you want the values for.</a></dt>
</dl>

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

<dd>
<p><code  class="code">values</code> - An array of strings: the legal values for this field.
The values will be sorted as they normally would be in Bugzilla.</p>

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

<dd>
<dl>
<dt><a name="106_(Invalid_Product)"
>106 (Invalid Product)</a></dt>

<dd>
<p>You were required to specify a product,
and either you didn&#39;t,
or you specified an invalid product (or a product that you can&#39;t access).</p>

<dt><a name="108_(Invalid_Field_Name)"
>108 (Invalid Field Name)</a></dt>

<dd>
<p>You specified a field that doesn&#39;t exist or isn&#39;t a drop-down field.</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>

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

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

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

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

<dd>
<p>It allows you to get data about attachments,
given a list of bugs and/or attachment ids.</p>

<p><b>Note</b>: Private attachments will only be returned if you are in the insidergroup or if you are the submitter of the attachment.</p>

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

<dd>
<p><b>Note</b>: At least one of <code  class="code">ids</code> or <code  class="code">attachment_ids</code> is required.</p>

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

<dd>
<p>See the description of the <code  class="code">ids</code> parameter in the <a href="#get" class="podlinkpod"
>&#34;get&#34;</a> method.</p>

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

<dd>
<p><code  class="code">array</code> An array of integer attachment ids.</p>
</dd>
</dl>

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

<dd>
<p>A hash containing two elements: <code  class="code">bugs</code> and <code  class="code">attachments</code>.
The return value looks like this:</p>

<pre  class="code"> {
     bugs =&#62; {
         1345 =&#62; {
             attachments =&#62; [
                 { (attachment) },
                 { (attachment) }
             ]
         },
         9874 =&#62; {
             attachments =&#62; [
                 { (attachment) },
                 { (attachment) }
             ]

         },
     },

     attachments =&#62; {
         234 =&#62; { (attachment) },
         123 =&#62; { (attachment) },
     }
 }</pre>

<p>The attachments of any bugs that you specified in the <code  class="code">ids</code> argument in input are returned in <code  class="code">bugs</code> on output. <code  class="code">bugs</code> is a hash that has integer bug IDs for keys and contains a single key, <code  class="code">attachments</code>. That key points to an arrayref that contains attachments as a hash. (Fields for attachments are described below.)</p>

<p>For any attachments that you specified directly in <code  class="code">attachment_ids</code>, they are returned in <code  class="code">attachments</code> on output. This is a hash where the attachment ids point directly to hashes describing the individual attachment.</p>

<p>The fields for each attachment (where it says <code  class="code">(attachment)</code> in the diagram above) are:</p>

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

<dd>
<p><code  class="code">dateTime</code> The time the attachment was created.</p>

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

<dd>
<p><code  class="code">dateTime</code> The last time the attachment was modified.</p>

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

<dd>
<p><code  class="code">int</code> The numeric id of the attachment.</p>

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

<dd>
<p><code  class="code">int</code> The numeric id of the bug that the attachment is attached to.</p>

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

<dd>
<p><code  class="code">string</code> The file name of the attachment.</p>

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

<dd>
<p><code  class="code">string</code> The description for the attachment.</p>

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

<dd>
<p><code  class="code">string</code> The MIME type of the attachment.</p>

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

<dd>
<p><code  class="code">boolean</code> True if the attachment is private (only visible to a certain group called the &#34;insidergroup&#34;), False otherwise.</p>

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

<dd>
<p><code  class="code">boolean</code> True if the attachment is obsolete, False otherwise.</p>

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

<dd>
<p><code  class="code">boolean</code> True if the attachment is a URL instead of actual data, False otherwise. Note that such attachments only happen when the Bugzilla installation has at some point had the <code  class="code">allow_attach_url</code> parameter enabled.</p>

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

<dd>
<p><code  class="code">boolean</code> True if the attachment is a patch, False otherwise.</p>

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

<dd>
<p><code  class="code">string</code> The login name of the user that created the attachment.</p>
</dd>
</dl>

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

<dd>
<p>This method can throw all the same errors as <a href="#get" class="podlinkpod"
>&#34;get&#34;</a>. In addition, it can also throw the following error:</p>

<dl>
<dt><a name="304_(Auth_Failure,_Attachment_is_Private)"
>304 (Auth Failure, Attachment is Private)</a></dt>

<dd>
<p>You specified the id of a private attachment in the <code  class="code">attachment_ids</code> argument, and you are not in the &#34;insider group&#34; that can see private attachments.</p>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="Added_in_Bugzilla_3.6."
>Added in Bugzilla <b>3.6</b>.</a></dt>
</dl>
</dd>
</dl>

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

<dd>
<p><b>STABLE</b></p>

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

<dd>
<p>This allows you to get data about comments, given a list of bugs and/or comment ids.</p>

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

<dd>
<p><b>Note</b>: At least one of <code  class="code">ids</code> or <code  class="code">comment_ids</code> is required.</p>

<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>

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

<dd>
<p><code  class="code">array</code> An array that can contain both bug IDs and bug aliases. All of the comments (that are visible to you) will be returned for the specified bugs.</p>

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

<dd>
<p><code  class="code">array</code> An array of integer comment_ids. These comments will be returned individually, separate from any other comments in their respective bugs.</p>

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

<dd>
<p><code  class="code">dateTime</code> If specified, the method will only return comments <i>newer</i> than this time. This only affects comments returned from the <code  class="code">ids</code> argument. You will always be returned all comments you request in the <code  class="code">comment_ids</code> argument, even if they are older than this date.</p>
</dd>
</dl>

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

<dd>
<p>Two items are returned:</p>

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

<dd>
<p>This is used for bugs specified in <code  class="code">ids</code>. This is a hash, where the keys are the numeric ids of the bugs, and the value is a hash with a single key, <code  class="code">comments</code>, which is an array of comments. (The format of comments is described below.)</p>

<p>Note that any individual bug will only be returned once, so if you specify an id multiple times in <code  class="code">ids</code>, it will still only be returned once.</p>

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

<dd>
<p>Each individual comment requested in <code  class="code">comment_ids</code> is returned here, in a hash where the numeric comment id is the key, and the value is the comment. (The format of comments is described below.)</p>
</dd>
</dl>

<p>A &#34;comment&#34; as described above is a hash that contains the following keys:</p>

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

<dd>
<p><code  class="code">int</code> The globally unique ID for the comment.</p>

<dt><a name="bug_id"
>bug_id</a></dt>

<dd>
<p><code  class="code">int</code> The ID of the bug that this comment is on.</p>

<dt><a name="attachment_id"
>attachment_id</a></dt>

<dd>
<p><code  class="code">int</code> If the comment was made on an attachment, this will be the ID of that attachment. Otherwise it will be null.</p>

<dt><a name="text"
>text</a></dt>

<dd>
<p><code  class="code">string</code> The actual text of the comment.</p>

<dt><a name="author"
>author</a></dt>

<dd>
<p><code  class="code">string</code> The login name of the comment&#39;s author.</p>

<dt><a name="time"
>time</a></dt>

<dd>
<p><code  class="code">dateTime</code> The time (in Bugzilla&#39;s timezone) that the comment was added.</p>

<dt><a name="is_private"
>is_private</a></dt>

<dd>
<p><code  class="code">boolean</code> True if this comment is private (only visible to a certain group called the &#34;insidergroup&#34;), False otherwise.</p>
</dd>
</dl>

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

<dd>
<p>This method can throw all the same errors as <a href="#get" class="podlinkpod"
>&#34;get&#34;</a>. In addition, it can also throw the following errors:</p>

<dl>
<dt><a name="110_(Comment_Is_Private)"
>110 (Comment Is Private)</a></dt>

<dd>
<p>You specified the id of a private comment in the <code  class="code">comment_ids</code> argument, and you are not in the &#34;insider group&#34; that can see private comments.</p>

<dt><a name="111_(Invalid_Comment_ID)"
>111 (Invalid Comment ID)</a></dt>

<dd>
<p>You specified an id in the <code  class="code">comment_ids</code> argument that is invalid--either you specified something that wasn&#39;t a number, or there is no comment with that id.</p>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="Added_in_Bugzilla_3.4."
>Added in Bugzilla <b>3.4</b>.</a></dt>

<dd>
<dt><a name="attachment_id_was_added_to_the_return_value_in_Bugzilla_3.6."
><code  class="code">attachment_id</code> was added to the return value in Bugzilla <b>3.6</b>.</a></dt>
</dl>
</dd>
</dl>

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

<dd>
<p><b>STABLE</b></p>

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

<dd>
<p>Gets information about particular bugs in the database.</p>

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

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

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

<dd>
<p>An array of numbers and strings.</p>

<p>If an element in the array is entirely numeric, it represents a bug_id from the Bugzilla database to fetch. If it contains any non-numeric characters, it is considered to be a bug alias instead, and the bug with that alias will be loaded.</p>

<p>Note that it&#39;s possible for aliases to be disabled in Bugzilla, in which case you will be told that you have specified an invalid bug_id if you try to specify an alias. (It will be error 100.)</p>

<dt><a name="permissive_EXPERIMENTAL"
><code  class="code">permissive</code> <b>EXPERIMENTAL</b></a></dt>

<dd>
<p><code  class="code">boolean</code> Normally, if you request any inaccessible or invalid bug ids, Bug.get will throw an error. If this parameter is True, instead of throwing an error we return an array of hashes with a <code  class="code">id</code>, <code  class="code">faultString</code> and <code  class="code">faultCode</code> for each bug that fails, and return normal information for the other bugs that were accessible.</p>
</dd>
</dl>

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

<dd>
<p>Two items are returned:</p>

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

<dd>
<p>An array of hashes that contains information about the bugs with the valid ids. Each hash contains the following items:</p>

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

<dd>
<p><code  class="code">string</code> The alias of this bug. If there is no alias or aliases are disabled in this Bugzilla, this will be an empty string.</p>

<dt><a name="assigned_to"
>assigned_to</a></dt>

<dd>
<p><code  class="code">string</code> The login name of the user to whom the bug is assigned.</p>

<dt><a name="component"
>component</a></dt>

<dd>
<p><code  class="code">string</code> The name of the current component of this bug.</p>

<dt><a name="creation_time"
>creation_time</a></dt>

<dd>
<p><code  class="code">dateTime</code> When the bug was created.</p>

<dt><a name="dupe_of"
>dupe_of</a></dt>

<dd>
<p><code  class="code">int</code> The bug ID of the bug that this bug is a duplicate of. If this bug isn&#39;t a duplicate of any bug, this will be an empty int.</p>

<dt><a name="id"
>id</a></dt>

<dd>
<p><code  class="code">int</code> The numeric bug_id of this bug.</p>

<dt><a name="internals_DEPRECATED"
>internals <b>DEPRECATED</b></a></dt>

<dd>
<p>A hash. The internals of a <a href="../../Bugzilla/Bug.html" class="podlinkpod"
>Bugzilla::Bug</a> object. This is extremely unstable, and you should only rely on this if you absolutely have to. The structure of the hash may even change between point releases of Bugzilla.</p>

<p>This will be disappearing in a future version of Bugzilla.</p>

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

<dd>
<p><code  class="code">boolean</code> Returns true (1) if this bug is open, false (0) if it is closed.</p>

<dt><a name="last_change_time"
>last_change_time</a></dt>

<dd>
<p><code  class="code">dateTime</code> When the bug was last changed.</p>

<dt><a name="priority"
>priority</a></dt>

<dd>
<p><code  class="code">string</code> The priority of the bug.</p>

<dt><a name="product"
>product</a></dt>

<dd>
<p><code  class="code">string</code> The name of the product this bug is in.</p>

<dt><a name="resolution"
>resolution</a></dt>

<dd>
<p><code  class="code">string</code> The current resolution of the bug, or an empty string if the bug is open.</p>

<dt><a name="severity"
>severity</a></dt>

<dd>
<p><code  class="code">string</code> The current severity of the bug.</p>

<dt><a name="status"
>status</a></dt>

<dd>
<p><code  class="code">string</code> The current status of the bug.</p>

<dt><a name="summary"
>summary</a></dt>

<dd>
<p><code  class="code">string</code> The summary of this bug.</p>
</dd>
</dl>

<dt><a name="faults_EXPERIMENTAL"
><code  class="code">faults</code> <b>EXPERIMENTAL</b></a></dt>

<dd>
<p>An array of hashes that contains invalid bug ids with error messages returned for them. Each hash contains the following items:</p>

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

<dd>
<p><code  class="code">int</code> The numeric bug_id of this bug.</p>

<dt><a name="faultString"
>faultString</a></dt>

<dd>
<p>c&#60;string&#62; This will only be returned for invalid bugs if the <code  class="code">permissive</code> argument was set when calling Bug.get, and it is an error indicating that the bug id was invalid.</p>

<dt><a name="faultCode"
>faultCode</a></dt>

<dd>
<p>c&#60;int&#62; This will only be returned for invalid bugs if the <code  class="code">permissive</code> argument was set when calling Bug.get, and it is the error code for the invalid bug error.</p>
</dd>
</dl>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="100_(Invalid_Bug_Alias)"
>100 (Invalid Bug Alias)</a></dt>

<dd>
<p>If you specified an alias and either: (a) the Bugzilla you&#39;re querying doesn&#39;t support aliases or (b) there is no bug with that alias.</p>

<dt><a name="101_(Invalid_Bug_ID)"
>101 (Invalid Bug ID)</a></dt>

<dd>
<p>The bug_id you specified doesn&#39;t exist in the database.</p>

<dt><a name="102_(Access_Denied)"
>102 (Access Denied)</a></dt>

<dd>
<p>You do not have access to the bug_id you specified.</p>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="permissive_argument_added_to_this_method&#39;s_params_in_Bugzilla_3.4."
><code  class="code">permissive</code> argument added to this method&#39;s params in Bugzilla <b>3.4</b>.</a></dt>

<dd>
<dt><a name="The_following_properties_were_added_to_this_method&#39;s_return_values_in_Bugzilla_3.4:"
>The following properties were added to this method&#39;s return values in Bugzilla <b>3.4</b>:</a></dt>

<dd>
<dl>
<dt><a name="For_bugs"
>For <code  class="code">bugs</code></a></dt>

<dd>
<dl>
<dt><a name="assigned_to"
>assigned_to</a></dt>

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

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

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

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

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

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

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

<dd>
<dt><a name="status"
>status</a></dt>
</dl>

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

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

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

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

<dd>
<p>Gets the history of changes for particular bugs in the database.</p>

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

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

<dd>
<p>An array of numbers and strings.</p>

<p>If an element in the array is entirely numeric, it represents a bug_id from the Bugzilla database to fetch. If it contains any non-numeric characters, it is considered to be a bug alias instead, and the data bug with that alias will be loaded.</p>

<p>Note that it&#39;s possible for aliases to be disabled in Bugzilla, in which case you will be told that you have specified an invalid bug_id if you try to specify an alias. (It will be error 100.)</p>
</dd>
</dl>

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

<dd>
<p>A hash containing a single element, <code  class="code">bugs</code>. This is an array of hashes, containing the following keys:</p>

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

<dd>
<p><code  class="code">int</code> The numeric id of the bug.</p>

<dt><a name="alias"
>alias</a></dt>

<dd>
<p><code  class="code">string</code> The alias of this bug. If there is no alias or aliases are disabled in this Bugzilla, this will be undef.</p>

<dt><a name="history"
>history</a></dt>

<dd>
<p><code  class="code">array</code> An array of hashes, each hash having the following keys:</p>

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

<dd>
<p><code  class="code">dateTime</code> The date the bug activity/change happened.</p>

<dt><a name="who"
>who</a></dt>

<dd>
<p><code  class="code">string</code> The login name of the user who performed the bug change.</p>

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

<dd>
<p><code  class="code">array</code> An array of hashes which contain all the changes that happened to the bug at this time (as specified by <code  class="code">when</code>). Each hash contains the following items:</p>

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

<dd>
<p><code  class="code">string</code> The name of the bug field that has changed.</p>

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

<dd>
<p><code  class="code">string</code> The previous value of the bug field which has been deleted by the change.</p>

<dt><a name="added"
>added</a></dt>

<dd>
<p><code  class="code">string</code> The new value of the bug field which has been added by the change.</p>

<dt><a name="attachment_id"
>attachment_id</a></dt>

<dd>
<p><code  class="code">int</code> The id of the attachment that was changed. This only appears if the change was to an attachment, otherwise <code  class="code">attachment_id</code> will not be present in this hash.</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>

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

<dd>
<p>The same as <a href="#get" class="podlinkpod"
>&#34;get&#34;</a>.</p>

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

<dd>
<dl>
<dt><a name="Added_in_Bugzilla_3.4."
>Added in Bugzilla <b>3.4</b>.</a></dt>
</dl>
</dd>
</dl>

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

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

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

<dd>
<p>Allows you to search for bugs based on particular criteria.</p>

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

<dd>
<p>Unless otherwise specified in the description of a parameter, bugs are returned if they match <i>exactly</i> the criteria you specify in these parameters. That is, we don&#39;t match against substrings--if a bug is in the &#34;Widgets&#34; product and you ask for bugs in the &#34;Widg&#34; product, you won&#39;t get anything.</p>

<p>Criteria are joined in a logical AND. That is, you will be returned bugs that match <i>all</i> of the criteria, not bugs that match <i>any</i> of the criteria.</p>

<p>Each parameter can be either the type it says, or an array of the types it says. If you pass an array, it means &#34;Give me bugs with <i>any</i> of these values.&#34; For example, if you wanted bugs that were in either the &#34;Foo&#34; or &#34;Bar&#34; products, you&#39;d pass:</p>

<pre  class="code"> product =&#62; [&#39;Foo&#39;, &#39;Bar&#39;]</pre>

<p>Some Bugzillas may treat your arguments case-sensitively, depending on what database system they are using. Most commonly, though, Bugzilla is not case-sensitive with the arguments passed (because MySQL is the most-common database to use with Bugzilla, and MySQL is not case sensitive).</p>

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

<dd>
<p><code  class="code">string</code> The unique alias for this bug. Note that you can search by alias even if the alias field is disabled in this Bugzilla, but it&#39;s likely that there won&#39;t be any aliases set on bugs, in that case.</p>

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

<dd>
<p><code  class="code">string</code> The login name of a user that a bug is assigned to.</p>

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

<dd>
<p><code  class="code">string</code> The name of the Component that the bug is in. Note that if there are multiple Components with the same name, and you search for that name, bugs in <i>all</i> those Components will be returned. If you don&#39;t want this, be sure to also specify the <code  class="code">product</code> argument.</p>

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

<dd>
<p><code  class="code">dateTime</code> Searches for bugs that were created at this time or later. May not be an array.</p>

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

<dd>
<p><code  class="code">int</code> The numeric id of the bug.</p>

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

<dd>
<p><code  class="code">dateTime</code> Searches for bugs that were modified at this time or later. May not be an array.</p>

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

<dd>
<p><code  class="code">int</code> Limit the number of results returned to <code  class="code">int</code> records.</p>

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

<dd>
<p><code  class="code">int</code> Used in conjunction with the <code  class="code">limit</code> argument, <code  class="code">offset</code> defines the starting position for the search. For example, given a search that would return 100 bugs, setting <code  class="code">limit</code> to 10 and <code  class="code">offset</code> to 10 would return bugs 11 through 20 from the set of 100.</p>

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

<dd>
<p><code  class="code">string</code> The &#34;Operating System&#34; field of a bug.</p>

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

<dd>
<p><code  class="code">string</code> The Platform (sometimes called &#34;Hardware&#34;) field of a bug.</p>

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

<dd>
<p><code  class="code">string</code> The Priority field on a bug.</p>

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

<dd>
<p><code  class="code">string</code> The name of the Product that the bug is in.</p>

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

<dd>
<p><code  class="code">string</code> The login name of the user who reported the bug.</p>

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

<dd>
<p><code  class="code">string</code> The current resolution--only set if a bug is closed. You can find open bugs by searching for bugs with an empty resolution.</p>

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

<dd>
<p><code  class="code">string</code> The Severity field on a bug.</p>

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

<dd>
<p><code  class="code">string</code> The current status of a bug (not including its resolution, if it has one, which is a separate field above).</p>

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

<dd>
<p><code  class="code">string</code> Searches for substrings in the single-line Summary field on bugs. If you specify an array, then bugs whose summaries match <i>any</i> of the passed substrings will be returned.</p>

<p>Note that unlike searching in the Bugzilla UI, substrings are not split on spaces. So searching for <code  class="code">foo bar</code> will match &#34;This is a foo bar&#34; but not &#34;This foo is a bar&#34;. <code  class="code">[&#39;foo&#39;, &#39;bar&#39;]</code>, would, however, match the second item.</p>

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

<dd>
<p><code  class="code">string</code> The Target Milestone field of a bug. Note that even if this Bugzilla does not have the Target Milestone field enabled, you can still search for bugs by Target Milestone. However, it is likely that in that case, most bugs will not have a Target Milestone set (it defaults to &#34;---&#34; when the field isn&#39;t enabled).</p>

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

<dd>
<p><code  class="code">string</code> The login name of the bug&#39;s QA Contact. Note that even if this Bugzilla does not have the QA Contact field enabled, you can still search for bugs by QA Contact (though it is likely that no bug will have a QA Contact set, if the field is disabled).</p>

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

<dd>
<p><code  class="code">string</code> The &#34;URL&#34; field of a bug.</p>

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

<dd>
<p><code  class="code">string</code> The Version field of a bug.</p>

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

<dd>
<p><code  class="code">int</code> Searches for bugs with this many votes or greater. May not be an array.</p>

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

<dd>
<p><code  class="code">string</code> Search the &#34;Status Whiteboard&#34; field on bugs for a substring. Works the same as the <code  class="code">summary</code> field described above, but searches the Status Whiteboard field.</p>
</dd>
</dl>

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

<dd>
<p>The same as <a href="#get" class="podlinkpod"
>&#34;get&#34;</a>.</p>

<p>Note that you will only be returned information about bugs that you can see. Bugs that you can&#39;t see will be entirely excluded from the results. So, if you want to see private bugs, you will have to first log in and <i>then</i> call this method.</p>

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

<dd>
<p>Currently, this function doesn&#39;t throw any special errors (other than the ones that all webservice functions can throw). If you specify an invalid value for a particular field, you just won&#39;t get any results for that value.</p>

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

<dd>
<dl>
<dt><a name="Added_in_Bugzilla_3.4."
>Added in Bugzilla <b>3.4</b>.</a></dt>
</dl>
</dd>
</dl>
</dd>
</dl>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="Bug_Creation_and_Modification"
>Bug Creation and Modification</a></h2>

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

<dd>
<p><b>STABLE</b></p>

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

<dd>
<p>This allows you to create a new bug in Bugzilla. If you specify any invalid fields, they will be ignored. If you specify any fields you are not allowed to set, they will just be set to their defaults or ignored.</p>

<p>You cannot currently set all the items here that you can set on enter_bug.cgi.</p>

<p>The WebService interface may allow you to set things other than those listed here, but realize that anything undocumented is <b>UNSTABLE</b> and will very likely change in the future.</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>

<p>Some parameters can have defaults set in Bugzilla, by the administrator. If these parameters have defaults set, you can omit them. These parameters are marked <b>Defaulted</b>.</p>

<p>Clients that want to be able to interact uniformly with multiple Bugzillas should always set both the params marked <b>Required</b> and those marked <b>Defaulted</b>, because some Bugzillas may not have defaults set for <b>Defaulted</b> parameters, and then this method will throw an error if you don&#39;t specify them.</p>

<p>The descriptions of the parameters below are what they mean when Bugzilla is being used to track software bugs. They may have other meanings in some installations.</p>

<dl>
<dt><a name="product_(string)_Required_-_The_name_of_the_product_the_bug_is_being_filed_against."
><code  class="code">product</code> (string) <b>Required</b> - The name of the product the bug is being filed against.</a></dt>

<dd>
<dt><a name="component_(string)_Required_-_The_name_of_a_component_in_the_product_above."
><code  class="code">component</code> (string) <b>Required</b> - The name of a component in the product above.</a></dt>

<dd>
<dt><a name="summary_(string)_Required_-_A_brief_description_of_the_bug_being_filed."
><code  class="code">summary</code> (string) <b>Required</b> - A brief description of the bug being filed.</a></dt>

<dd>
<dt><a name="version_(string)_Required_-_A_version_of_the_product_above;_the_version_the_bug_was_found_in."
><code  class="code">version</code> (string) <b>Required</b> - A version of the product above; the version the bug was found in.</a></dt>

<dd>
<dt><a 
><code  class="code">description</code> (string) <b>Defaulted</b> - The initial description for this bug. Some Bugzilla installations require this to not be blank.</a></dt>

<dd>
<dt><a name="op_sys_(string)_Defaulted_-_The_operating_system_the_bug_was_discovered_on."
><code  class="code">op_sys</code> (string) <b>Defaulted</b> - The operating system the bug was discovered on.</a></dt>

<dd>
<dt><a name="platform_(string)_Defaulted_-_What_type_of_hardware_the_bug_was_experienced_on."
><code  class="code">platform</code> (string) <b>Defaulted</b> - What type of hardware the bug was experienced on.</a></dt>

<dd>
<dt><a 
><code  class="code">priority</code> (string) <b>Defaulted</b> - What order the bug will be fixed in by the developer, compared to the developer&#39;s other bugs.</a></dt>

<dd>
<dt><a name="severity_(string)_Defaulted_-_How_severe_the_bug_is."
><code  class="code">severity</code> (string) <b>Defaulted</b> - How severe the bug is.</a></dt>

<dd>
<dt><a 
><code  class="code">alias</code> (string) - A brief alias for the bug that can be used instead of a bug number when accessing this bug. Must be unique in all of this Bugzilla.</a></dt>

<dd>
<dt><a name="assigned_to_(username)_-_A_user_to_assign_this_bug_to,_if_you_don&#39;t_want_it_to_be_assigned_to_the_component_owner."
><code  class="code">assigned_to</code> (username) - A user to assign this bug to, if you don&#39;t want it to be assigned to the component owner.</a></dt>

<dd>
<dt><a name="cc_(array)_-_An_array_of_usernames_to_CC_on_this_bug."
><code  class="code">cc</code> (array) - An array of usernames to CC on this bug.</a></dt>

<dd>
<dt><a 
><code  class="code">qa_contact</code> (username) - If this installation has QA Contacts enabled, you can set the QA Contact here if you don&#39;t want to use the component&#39;s default QA Contact.</a></dt>

<dd>
<dt><a 
><code  class="code">status</code> (string) - The status that this bug should start out as. Note that only certain statuses can be set on bug creation.</a></dt>

<dd>
<dt><a name="target_milestone_(string)_-_A_valid_target_milestone_for_this_product."
><code  class="code">target_milestone</code> (string) - A valid target milestone for this product.</a></dt>
</dl>

<p>In addition to the above parameters, if your installation has any custom fields, you can set them just by passing in the name of the field and its value as a string.</p>

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

<dd>
<p>A hash with one element, <code  class="code">id</code>. This is the id of the newly-filed bug.</p>

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

<dd>
<dl>
<dt><a name="51_(Invalid_Object)"
>51 (Invalid Object)</a></dt>

<dd>
<p>The component you specified is not valid for this Product.</p>

<dt><a name="103_(Invalid_Alias)"
>103 (Invalid Alias)</a></dt>

<dd>
<p>The alias you specified is invalid for some reason. See the error message for more details.</p>

<dt><a name="104_(Invalid_Field)"
>104 (Invalid Field)</a></dt>

<dd>
<p>One of the drop-down fields has an invalid value, or a value entered in a text field is too long. The error message will have more detail.</p>

<dt><a name="105_(Invalid_Component)"
>105 (Invalid Component)</a></dt>

<dd>
<p>You didn&#39;t specify a component.</p>

<dt><a name="106_(Invalid_Product)"
>106 (Invalid Product)</a></dt>

<dd>
<p>Either you didn&#39;t specify a product, this product doesn&#39;t exist, or you don&#39;t have permission to enter bugs in this product.</p>

<dt><a name="107_(Invalid_Summary)"
>107 (Invalid Summary)</a></dt>

<dd>
<p>You didn&#39;t specify a summary for the bug.</p>

<dt><a name="504_(Invalid_User)"
>504 (Invalid User)</a></dt>

<dd>
<p>Either the QA Contact, Assignee, or CC lists have some invalid user in them. The error message will have more details.</p>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="Before_3.0.4,_parameters_marked_as_Defaulted_were_actually_Required,_due_to_a_bug_in_Bugzilla."
>Before <b>3.0.4</b>, parameters marked as <b>Defaulted</b> were actually <b>Required</b>, due to a bug in Bugzilla.</a></dt>
</dl>
</dd>
</dl>

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

<dd>
<p><b>STABLE</b></p>

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

<dd>
<p>This allows you to add a comment to a bug in Bugzilla.</p>

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

<dd>
<dl>
<dt><a name="id_(int)_Required_-_The_id_or_alias_of_the_bug_to_append_a_comment_to."
><code  class="code">id</code> (int) <b>Required</b> - The id or alias of the bug to append a comment to.</a></dt>

<dd>
<dt><a 
><code  class="code">comment</code> (string) <b>Required</b> - The comment to append to the bug. If this is empty or all whitespace, an error will be thrown saying that you did not set the <code  class="code">comment</code> parameter.</a></dt>

<dd>
<dt><a name="is_private_(boolean)_-_If_set_to_true,_the_comment_is_private,_otherwise_it_is_assumed_to_be_public."
><code  class="code">is_private</code> (boolean) - If set to true, the comment is private, otherwise it is assumed to be public.</a></dt>

<dd>
<dt><a 
><code  class="code">work_time</code> (double) - Adds this many hours to the &#34;Hours Worked&#34; on the bug. If you are not in the time tracking group, this value will be ignored.</a></dt>
</dl>

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

<dd>
<p>A hash with one element, <code  class="code">id</code> whose value is the id of the newly-created comment.</p>

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

<dd>
<dl>
<dt><a name="54_(Hours_Worked_Too_Large)"
>54 (Hours Worked Too Large)</a></dt>

<dd>
<p>You specified a <code  class="code">work_time</code> larger than the maximum allowed value of <code  class="code">99999.99</code>.</p>

<dt><a name="100_(Invalid_Bug_Alias)"
>100 (Invalid Bug Alias)</a></dt>

<dd>
<p>If you specified an alias and either: (a) the Bugzilla you&#39;re querying doesn&#39;t support aliases or (b) there is no bug with that alias.</p>

<dt><a name="101_(Invalid_Bug_ID)"
>101 (Invalid Bug ID)</a></dt>

<dd>
<p>The id you specified doesn&#39;t exist in the database.</p>

<dt><a name="108_(Bug_Edit_Denied)"
>108 (Bug Edit Denied)</a></dt>

<dd>
<p>You did not have the necessary rights to edit the bug.</p>

<dt><a name="113_(Can&#39;t_Make_Private_Comments)"
>113 (Can&#39;t Make Private Comments)</a></dt>

<dd>
<p>You tried to add a private comment, but don&#39;t have the necessary rights.</p>

<dt><a name="114_(Comment_Too_Long)"
>114 (Comment Too Long)</a></dt>

<dd>
<p>You tried to add a comment longer than the maximum allowed length (65,535 characters).</p>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="Added_in_Bugzilla_3.2."
>Added in Bugzilla <b>3.2</b>.</a></dt>

<dd>
<dt><a name="Modified_to_return_the_new_comment&#39;s_id_in_Bugzilla_3.4"
>Modified to return the new comment&#39;s id in Bugzilla <b>3.4</b></a></dt>

<dd>
<dt><a name="Modified_to_throw_an_error_if_you_try_to_add_a_private_comment_but_can&#39;t,_in_Bugzilla_3.4."
>Modified to throw an error if you try to add a private comment but can&#39;t, in Bugzilla <b>3.4</b>.</a></dt>

<dd>
<dt><a 
>Before Bugzilla <b>3.6</b>, the <code  class="code">is_private</code> argument was called <code  class="code">private</code>, and you can still call it <code  class="code">private</code> for backwards-compatibility purposes if you wish.</a></dt>

<dd>
<dt><a name="Before_Bugzilla_3.6,_error_54_and_error_114_had_a_generic_error_code_of_32000."
>Before Bugzilla <b>3.6</b>, error 54 and error 114 had a generic error code of 32000.</a></dt>
</dl>
</dd>
</dl>

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

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

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

<dd>
<p>Adds or removes URLs for the &#34;See Also&#34; field on bugs. These URLs must point to some valid bug in some Bugzilla installation or in Launchpad.</p>

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

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

<dd>
<p>Array of <code  class="code">int</code>s or <code  class="code">string</code>s. The ids or aliases of bugs that you want to modify.</p>

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

<dd>
<p>Array of <code  class="code">string</code>s. URLs to Bugzilla bugs. These URLs will be added to the See Also field. They must be valid URLs to <code  class="code">show_bug.cgi</code> in a Bugzilla installation or to a bug filed at launchpad.net.</p>

<p>If the URLs don&#39;t start with <code  class="code">http://</code> or <code  class="code">https://</code>, it will be assumed that <code  class="code">http://</code> should be added to the beginning of the string.</p>

<p>It is safe to specify URLs that are already in the &#34;See Also&#34; field on a bug--they will just be silently ignored.</p>

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

<dd>
<p>Array of <code  class="code">string</code>s. These URLs will be removed from the See Also field. You must specify the full URL that you want removed. However, matching is done case-insensitively, so you don&#39;t have to specify the URL in exact case, if you don&#39;t want to.</p>

<p>If you specify a URL that is not in the See Also field of a particular bug, it will just be silently ignored. Invaild URLs are currently silently ignored, though this may change in some future version of Bugzilla.</p>
</dd>
</dl>

<p>NOTE: If you specify the same URL in both <code  class="code">add</code> and <code  class="code">remove</code>, it will be <i>added</i>. (That is, <code  class="code">add</code> overrides <code  class="code">remove</code>.)</p>

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

<dd>
<p><code  class="code">changes</code>, a hash where the keys are numeric bug ids and the contents are a hash with one key, <code  class="code">see_also</code>. <code  class="code">see_also</code> points to a hash, which contains two keys, <code  class="code">added</code> and <code  class="code">removed</code>. These are arrays of strings, representing the actual changes that were made to the bug.</p>

<p>Here&#39;s a diagram of what the return value looks like for updating bug ids 1 and 2:</p>

<pre  class="code"> {
   changes =&#62; {
       1 =&#62; {
           see_also =&#62; {
               added   =&#62; (an array of bug URLs),
               removed =&#62; (an array of bug URLs),
           }
       },
       2 =&#62; {
           see_also =&#62; {
               added   =&#62; (an array of bug URLs),
               removed =&#62; (an array of bug URLs),
           }
       }
   }
 }</pre>

<p>This return value allows you to tell what this method actually did. It is in this format to be compatible with the return value of a future <code  class="code">Bug.update</code> method.</p>

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

<dd>
<p>This method can throw all of the errors that <a href="#get" class="podlinkpod"
>&#34;get&#34;</a> throws, plus:</p>

<dl>
<dt><a name="108_(Bug_Edit_Denied)"
>108 (Bug Edit Denied)</a></dt>

<dd>
<p>You did not have the necessary rights to edit the bug.</p>

<dt><a name="112_(Invalid_Bug_URL)"
>112 (Invalid Bug URL)</a></dt>

<dd>
<p>One of the URLs you provided did not look like a valid bug URL.</p>

<dt><a name="115_(See_Also_Edit_Denied)"
>115 (See Also Edit Denied)</a></dt>

<dd>
<p>You did not have the necessary rights to edit the See Also field for this bug.</p>
</dd>
</dl>

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

<dd>
<dl>
<dt><a name="Added_in_Bugzilla_3.4."
>Added in Bugzilla <b>3.4</b>.</a></dt>

<dd>
<dt><a name="Before_Bugzilla_3.6,_error_115_had_a_generic_error_code_of_32000."
>Before Bugzilla <b>3.6</b>, error 115 had a generic error code of 32000.</a></dt>
</dl>
</dd>
</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>