<!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"><<</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> <li class='indexItem indexItem1'><a href='#Utility_Functions'>Utility Functions</a> <ul class='indexList indexList2'> <li class='indexItem indexItem2'><a href='#fields'>fields</a> <li class='indexItem indexItem2'><a href='#legal_values'>legal_values</a> </ul> <li class='indexItem indexItem1'><a href='#Bug_Information'>Bug Information</a> <ul class='indexList indexList2'> <li class='indexItem indexItem2'><a href='#attachments'>attachments</a> <li class='indexItem indexItem2'><a href='#comments'>comments</a> <li class='indexItem indexItem2'><a href='#get'>get</a> <li class='indexItem indexItem2'><a href='#history'>history</a> <li class='indexItem indexItem2'><a href='#possible_duplicates'>possible_duplicates</a> <li class='indexItem indexItem2'><a href='#search'>search</a> </ul> <li class='indexItem indexItem1'><a href='#Bug_Creation_and_Modification'>Bug Creation and Modification</a> <ul class='indexList indexList2'> <li class='indexItem indexItem2'><a href='#create'>create</a> <li class='indexItem indexItem2'><a href='#add_attachment'>add_attachment</a> <li class='indexItem indexItem2'><a href='#add_comment'>add_comment</a> <li class='indexItem indexItem2'><a href='#update'>update</a> <li class='indexItem indexItem2'><a href='#update_see_also'>update_see_also</a> <li class='indexItem indexItem2'><a href='#update_tags'>update_tags</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> <h1><a class='u' href='#___top' title='click to go to top of document' name="Utility_Functions" >Utility Functions</a></h1> <h2><a class='u' href='#___top' title='click to go to top of document' name="fields" >fields</a></h2> <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 identifying 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_("See_Also")" ><code class="code">7</code> Bug URLs ("See Also")</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_mandatory" ><code class="code">is_mandatory</code></a></dt> <dd> <p><code class="code">boolean</code> True if the field must have a value when filing new bugs. Also, mandatory fields cannot have their value cleared when updating bugs.</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" >"create"</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>, <code class="code">target_milestone</code>, and <code class="code">keywords</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'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" >"create"</a>, etc.</p> <dt><a name="sort_key" ><code class="code">sort_key</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="sortkey" ><code class="code">sortkey</code></a></dt> <dd> <p><b>DEPRECATED</b> - Use <code class="code">sort_key</code> instead.</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">'product'</code> and <code class="code">visibility_values</code> will reflect which product(s) this value appears in.</p> <dt><a name="is_active" ><code class="code">is_active</code></a></dt> <dd> <p><code class="code">boolean</code> This value is defined only for certain product specific fields such as version, target_milestone or component. When true, the value is active, otherwise the value is not active.</p> <dt><a name="description" ><code class="code">description</code></a></dt> <dd> <p><code class="code">string</code> The description of the value. This item is only included for the <code class="code">keywords</code> field.</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 "open" (true) or "closed" (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> <dd> <dt><a name="The_is_mandatory_return_value_was_added_in_Bugzilla_4.0." >The <code class="code">is_mandatory</code> return value was added in Bugzilla <b>4.0</b>.</a></dt> <dd> <dt><a name="sortkey_was_renamed_to_sort_key_in_Bugzilla_4.2." ><code class="code">sortkey</code> was renamed to <code class="code">sort_key</code> in Bugzilla <b>4.2</b>.</a></dt> <dd> <dt><a name="is_active_return_key_for_values_was_added_in_Bugzilla_4.4." ><code class="code">is_active</code> return key for <code class="code">values</code> was added in Bugzilla <b>4.4</b>.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="legal_values" >legal_values</a></h2> <p><b>DEPRECATED</b> - Use <a href="#fields" class="podlinkpod" >"fields"</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" >"create"</a>, below.</a></dt> <dd> <dt><a ><code class="code">product_id</code> - If you'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't, or you specified an invalid product (or a product that you can't access).</p> <dt><a name="108_(Invalid_Field_Name)" >108 (Invalid Field Name)</a></dt> <dd> <p>You specified a field that doesn't exist or isn't a drop-down field.</p> </dd> </dl> </dd> </dl> <h1><a class='u' href='#___top' title='click to go to top of document' name="Bug_Information" >Bug Information</a></h1> <h2><a class='u' href='#___top' title='click to go to top of document' name="attachments" >attachments</a></h2> <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" >"get"</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> <p>Also accepts the <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> <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 => { 1345 => [ { (attachment) }, { (attachment) } ], 9874 => [ { (attachment) }, { (attachment) } ], }, attachments => { 234 => { (attachment) }, 123 => { (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 the values are arrayrefs that contain hashes as attachments. (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="data" ><code class="code">data</code></a></dt> <dd> <p><code class="code">base64</code> The raw data of the attachment, encoded as Base64.</p> <dt><a name="size" ><code class="code">size</code></a></dt> <dd> <p><code class="code">int</code> The length (in bytes) of the attachment.</p> <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="summary" ><code class="code">summary</code></a></dt> <dd> <p><code class="code">string</code> A short string describing the attachment.</p> <p>Also returned as <code class="code">description</code>, for backwards-compatibility with older Bugzillas. (However, this backwards-compatibility will go away in Bugzilla 5.0.)</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 "insidergroup"), 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_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="creator" ><code class="code">creator</code></a></dt> <dd> <p><code class="code">string</code> The login name of the user that created the attachment.</p> <p>Also returned as <code class="code">attacher</code>, for backwards-compatibility with older Bugzillas. (However, this backwards-compatibility will go away in Bugzilla 5.0.)</p> <dt><a name="flags" ><code class="code">flags</code></a></dt> <dd> <p>An array of hashes containing the information about flags currently set for each attachment. Each flag hash contains the following items:</p> <dl> <dt><a name="id" ><code class="code">id</code></a></dt> <dd> <p><code class="code">int</code> The id of the flag.</p> <dt><a name="name" ><code class="code">name</code></a></dt> <dd> <p><code class="code">string</code> The name of the flag.</p> <dt><a name="type_id" ><code class="code">type_id</code></a></dt> <dd> <p><code class="code">int</code> The type id of the flag.</p> <dt><a name="creation_date" ><code class="code">creation_date</code></a></dt> <dd> <p><code class="code">dateTime</code> The timestamp when this flag was originally created.</p> <dt><a name="modification_date" ><code class="code">modification_date</code></a></dt> <dd> <p><code class="code">dateTime</code> The timestamp when the flag was last modified.</p> <dt><a name="status" ><code class="code">status</code></a></dt> <dd> <p><code class="code">string</code> The current status of the flag.</p> <dt><a name="setter" ><code class="code">setter</code></a></dt> <dd> <p><code class="code">string</code> The login name of the user who created or last modified the flag.</p> <dt><a name="requestee" ><code class="code">requestee</code></a></dt> <dd> <p><code class="code">string</code> The login name of the user this flag has been requested to be granted or denied. Note, this field is only returned if a requestee is set.</p> </dd> </dl> </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" >"get"</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 "insider group" 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> <dd> <dt><a name="In_Bugzilla_4.0,_the_attacher_return_value_was_renamed_to_creator." >In Bugzilla <b>4.0</b>, the <code class="code">attacher</code> return value was renamed to <code class="code">creator</code>.</a></dt> <dd> <dt><a name="In_Bugzilla_4.0,_the_description_return_value_was_renamed_to_summary." >In Bugzilla <b>4.0</b>, the <code class="code">description</code> return value was renamed to <code class="code">summary</code>.</a></dt> <dd> <dt><a name="The_data_return_value_was_added_in_Bugzilla_4.0." >The <code class="code">data</code> return value was added in Bugzilla <b>4.0</b>.</a></dt> <dd> <dt><a name="In_Bugzilla_4.2,_the_is_url_return_value_was_removed_(this_attribute_no_longer_exists_for_attachments)." >In Bugzilla <b>4.2</b>, the <code class="code">is_url</code> return value was removed (this attribute no longer exists for attachments).</a></dt> <dd> <dt><a name="The_size_return_value_was_added_in_Bugzilla_4.4." >The <code class="code">size</code> return value was added in Bugzilla <b>4.4</b>.</a></dt> <dd> <dt><a name="The_flags_array_was_added_in_Bugzilla_4.4." >The <code class="code">flags</code> array was added in Bugzilla <b>4.4</b>.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="comments" >comments</a></h2> <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 "comment" 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="count" >count</a></dt> <dd> <p><code class="code">int</code> The number of the comment local to the bug. The Description is 0, comments start with 1.</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="creator" >creator</a></dt> <dd> <p><code class="code">string</code> The login name of the comment's author.</p> <p>Also returned as <code class="code">author</code>, for backwards-compatibility with older Bugzillas. (However, this backwards-compatibility will go away in Bugzilla 5.0.)</p> <dt><a name="time" >time</a></dt> <dd> <p><code class="code">dateTime</code> The time (in Bugzilla's timezone) that the comment was added.</p> <dt><a name="creation_time" >creation_time</a></dt> <dd> <p><code class="code">dateTime</code> This is exactly same as the <code class="code">time</code> key. Use this field instead of <code class="code">time</code> for consistency with other methods including <a href="#get" class="podlinkpod" >"get"</a> and <a href="#attachments" class="podlinkpod" >"attachments"</a>. For compatibility, <code class="code">time</code> is still usable. However, please note that <code class="code">time</code> may be deprecated and removed in a future release.</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 "insidergroup"), 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" >"get"</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 "insider group" 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'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> <dd> <dt><a name="In_Bugzilla_4.0,_the_author_return_value_was_renamed_to_creator." >In Bugzilla <b>4.0</b>, the <code class="code">author</code> return value was renamed to <code class="code">creator</code>.</a></dt> <dd> <dt><a name="count_was_added_to_the_return_value_in_Bugzilla_4.4." ><code class="code">count</code> was added to the return value in Bugzilla <b>4.4</b>.</a></dt> <dd> <dt><a name="creation_time_was_added_in_Bugzilla_4.4." ><code class="code">creation_time</code> was added in Bugzilla <b>4.4</b>.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="get" >get</a></h2> <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 "get_bugs" 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> <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> <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="actual_time" ><code class="code">actual_time</code></a></dt> <dd> <p><code class="code">double</code> The total number of hours that this bug has taken (so far).</p> <p>If you are not in the time-tracking group, this field will not be included in the return value.</p> <dt><a name="alias" ><code class="code">alias</code></a></dt> <dd> <p><code class="code">string</code> The unique alias of this bug.</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 the user to whom the bug is assigned.</p> <dt><a name="blocks" ><code class="code">blocks</code></a></dt> <dd> <p><code class="code">array</code> of <code class="code">int</code>s. The ids of bugs that are "blocked" by this bug.</p> <dt><a name="cc" ><code class="code">cc</code></a></dt> <dd> <p><code class="code">array</code> of <code class="code">string</code>s. The login names of users on the CC list of this bug.</p> <dt><a name="classification" ><code class="code">classification</code></a></dt> <dd> <p><code class="code">string</code> The name of the current classification the bug is in.</p> <dt><a name="component" ><code class="code">component</code></a></dt> <dd> <p><code class="code">string</code> The name of the current component of this bug.</p> <dt><a name="creation_time" ><code class="code">creation_time</code></a></dt> <dd> <p><code class="code">dateTime</code> When the bug was created.</p> <dt><a name="creator" ><code class="code">creator</code></a></dt> <dd> <p><code class="code">string</code> The login name of the person who filed this bug (the reporter).</p> <dt><a name="deadline" ><code class="code">deadline</code></a></dt> <dd> <p><code class="code">string</code> The day that this bug is due to be completed, in the format <code class="code">YYYY-MM-DD</code>.</p> <p>If you are not in the time-tracking group, this field will not be included in the return value.</p> <dt><a name="depends_on" ><code class="code">depends_on</code></a></dt> <dd> <p><code class="code">array</code> of <code class="code">int</code>s. The ids of bugs that this bug "depends on".</p> <dt><a name="dupe_of" ><code class="code">dupe_of</code></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't a duplicate of any bug, this will be null.</p> <dt><a name="estimated_time" ><code class="code">estimated_time</code></a></dt> <dd> <p><code class="code">double</code> The number of hours that it was estimated that this bug would take.</p> <p>If you are not in the time-tracking group, this field will not be included in the return value.</p> <dt><a name="flags" ><code class="code">flags</code></a></dt> <dd> <p>An array of hashes containing the information about flags currently set for the bug. Each flag hash contains the following items:</p> <dl> <dt><a name="id" ><code class="code">id</code></a></dt> <dd> <p><code class="code">int</code> The id of the flag.</p> <dt><a name="name" ><code class="code">name</code></a></dt> <dd> <p><code class="code">string</code> The name of the flag.</p> <dt><a name="type_id" ><code class="code">type_id</code></a></dt> <dd> <p><code class="code">int</code> The type id of the flag.</p> <dt><a name="creation_date" ><code class="code">creation_date</code></a></dt> <dd> <p><code class="code">dateTime</code> The timestamp when this flag was originally created.</p> <dt><a name="modification_date" ><code class="code">modification_date</code></a></dt> <dd> <p><code class="code">dateTime</code> The timestamp when the flag was last modified.</p> <dt><a name="status" ><code class="code">status</code></a></dt> <dd> <p><code class="code">string</code> The current status of the flag.</p> <dt><a name="setter" ><code class="code">setter</code></a></dt> <dd> <p><code class="code">string</code> The login name of the user who created or last modified the flag.</p> <dt><a name="requestee" ><code class="code">requestee</code></a></dt> <dd> <p><code class="code">string</code> The login name of the user this flag has been requested to be granted or denied. Note, this field is only returned if a requestee is set.</p> </dd> </dl> <dt><a name="groups" ><code class="code">groups</code></a></dt> <dd> <p><code class="code">array</code> of <code class="code">string</code>s. The names of all the groups that this bug is in.</p> <dt><a name="id" ><code class="code">id</code></a></dt> <dd> <p><code class="code">int</code> The unique numeric id of this bug.</p> <dt><a name="is_cc_accessible" ><code class="code">is_cc_accessible</code></a></dt> <dd> <p><code class="code">boolean</code> If true, this bug can be accessed by members of the CC list, even if they are not in the groups the bug is restricted to.</p> <dt><a name="is_confirmed" ><code class="code">is_confirmed</code></a></dt> <dd> <p><code class="code">boolean</code> True if the bug has been confirmed. Usually this means that the bug has at some point been moved out of the <code class="code">UNCONFIRMED</code> status and into another open status.</p> <dt><a name="is_open" ><code class="code">is_open</code></a></dt> <dd> <p><code class="code">boolean</code> True if this bug is open, false if it is closed.</p> <dt><a name="is_creator_accessible" ><code class="code">is_creator_accessible</code></a></dt> <dd> <p><code class="code">boolean</code> If true, this bug can be accessed by the creator (reporter) of the bug, even if he or she is not a member of the groups the bug is restricted to.</p> <dt><a name="keywords" ><code class="code">keywords</code></a></dt> <dd> <p><code class="code">array</code> of <code class="code">string</code>s. Each keyword that is on this bug.</p> <dt><a name="last_change_time" ><code class="code">last_change_time</code></a></dt> <dd> <p><code class="code">dateTime</code> When the bug was last changed.</p> <dt><a name="op_sys" ><code class="code">op_sys</code></a></dt> <dd> <p><code class="code">string</code> The name of the operating system that the bug was filed against.</p> <dt><a name="platform" ><code class="code">platform</code></a></dt> <dd> <p><code class="code">string</code> The name of the platform (hardware) that the bug was filed against.</p> <dt><a name="priority" ><code class="code">priority</code></a></dt> <dd> <p><code class="code">string</code> The priority of the 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 this bug is in.</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 current QA Contact on the bug.</p> <dt><a name="remaining_time" ><code class="code">remaining_time</code></a></dt> <dd> <p><code class="code">double</code> The number of hours of work remaining until work on this bug is complete.</p> <p>If you are not in the time-tracking group, this field will not be included in the return value.</p> <dt><a name="resolution" ><code class="code">resolution</code></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="see_also" ><code class="code">see_also</code></a></dt> <dd> <p><b>UNSTABLE</b></p> <p><code class="code">array</code> of <code class="code">string</code>s. The URLs in the See Also field on the bug.</p> <dt><a name="severity" ><code class="code">severity</code></a></dt> <dd> <p><code class="code">string</code> The current severity of the bug.</p> <dt><a name="status" ><code class="code">status</code></a></dt> <dd> <p><code class="code">string</code> The current status of the bug.</p> <dt><a name="summary" ><code class="code">summary</code></a></dt> <dd> <p><code class="code">string</code> The summary of this bug.</p> <dt><a name="target_milestone" ><code class="code">target_milestone</code></a></dt> <dd> <p><code class="code">string</code> The milestone that this bug is supposed to be fixed by, or for closed bugs, the milestone that it was fixed for.</p> <dt><a name="update_token" ><code class="code">update_token</code></a></dt> <dd> <p><code class="code">string</code> The token that you would have to pass to the <em class="code">process_bug.cgi</em> page in order to update this bug. This changes every time the bug is updated.</p> <p>This field is not returned to logged-out users.</p> <dt><a name="url" ><code class="code">url</code></a></dt> <dd> <p><b>UNSTABLE</b></p> <p><code class="code">string</code> A URL that demonstrates the problem described in the bug, or is somehow related to the bug report.</p> <dt><a name="version" ><code class="code">version</code></a></dt> <dd> <p><code class="code">string</code> The version the bug was reported against.</p> <dt><a name="whiteboard" ><code class="code">whiteboard</code></a></dt> <dd> <p><code class="code">string</code> The value of the "status whiteboard" field on the bug.</p> <dt><a name="custom_fields" ><i>custom fields</i></a></dt> <dd> <p>Every custom field in this installation will also be included in the return value. Most fields are returned as <code class="code">string</code>s. However, some field types have different return values:</p> <dl> <dt><a name="Bug_ID_Fields_-_int" >Bug ID Fields - <code class="code">int</code></a></dt> <dd> <dt><a name="Multiple-Selection_Fields_-_array_of_strings." >Multiple-Selection Fields - <code class="code">array</code> of <code class="code">string</code>s.</a></dt> <dd> <dt><a name="Date/Time_Fields_-_dateTime" >Date/Time Fields - <code class="code">dateTime</code></a></dt> </dl> </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><code class="code">string</code> 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><code class="code">int</code> 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 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'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's_params_in_Bugzilla_3.4." ><code class="code">permissive</code> argument added to this method's params in Bugzilla <b>3.4</b>.</a></dt> <dd> <dt><a name="The_following_properties_were_added_to_this_method's_return_values_in_Bugzilla_3.4:" >The following properties were added to this method'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> <dt><a >In Bugzilla <b>4.0</b>, the following items were added to the <code class="code">bugs</code> return value: <code class="code">blocks</code>, <code class="code">cc</code>, <code class="code">classification</code>, <code class="code">creator</code>, <code class="code">deadline</code>, <code class="code">depends_on</code>, <code class="code">estimated_time</code>, <code class="code">is_cc_accessible</code>, <code class="code">is_confirmed</code>, <code class="code">is_creator_accessible</code>, <code class="code">groups</code>, <code class="code">keywords</code>, <code class="code">op_sys</code>, <code class="code">platform</code>, <code class="code">qa_contact</code>, <code class="code">remaining_time</code>, <code class="code">see_also</code>, <code class="code">target_milestone</code>, <code class="code">update_token</code>, <code class="code">url</code>, <code class="code">version</code>, <code class="code">whiteboard</code>, and all custom fields.</a></dt> <dd> <dt><a name="The_flags_array_was_added_in_Bugzilla_4.4." >The <code class="code">flags</code> array was added in Bugzilla <b>4.4</b>.</a></dt> <dd> <dt><a name="The_actual_time_item_was_added_to_the_bugs_return_value_in_Bugzilla_4.4." >The <code class="code">actual_time</code> item was added to the <code class="code">bugs</code> return value in Bugzilla <b>4.4</b>.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="history" >history</a></h2> <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> </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, 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" >"get"</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> <dd> <dt><a >Field names returned by the <code class="code">field_name</code> field changed to be consistent with other methods. Since Bugzilla <b>4.4</b>, they now match names used by <a href="#update" class="podlinkpod" >Bug.update</a> for consistency.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="possible_duplicates" >possible_duplicates</a></h2> <p><b>UNSTABLE</b></p> <dl> <dt><a name="Description" ><b>Description</b></a></dt> <dd> <p>Allows a user to find possible duplicate bugs based on a set of keywords such as a user may use as a bug summary. Optionally the search can be narrowed down to specific products.</p> <dt><a name="Params" ><b>Params</b></a></dt> <dd> <dl> <dt><a name="summary_(string)_Required_-_A_string_of_keywords_defining_the_type_of_bug_you_are_trying_to_report." ><code class="code">summary</code> (string) <b>Required</b> - A string of keywords defining the type of bug you are trying to report.</a></dt> <dd> <dt><a name="product_(array)_-_One_or_more_product_names_to_narrow_the_duplicate_search_to._If_omitted,_all_bugs_are_searched." ><code class="code">product</code> (array) - One or more product names to narrow the duplicate search to. If omitted, all bugs are searched.</a></dt> </dl> <dt><a name="Returns" ><b>Returns</b></a></dt> <dd> <p>The same as <a href="#get" class="podlinkpod" >"get"</a>.</p> <p>Note that you will only be returned information about bugs that you can see. Bugs that you can'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> <dl> <dt><a name="50_(Param_Required)" >50 (Param Required)</a></dt> <dd> <p>You must specify a value for <code class="code">summary</code> containing a string of keywords to search for duplicates.</p> </dd> </dl> <dt><a name="History" ><b>History</b></a></dt> <dd> <dl> <dt><a name="Added_in_Bugzilla_4.0." >Added in Bugzilla <b>4.0</b>.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="search" >search</a></h2> <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't match against substrings--if a bug is in the "Widgets" product and you ask for bugs in the "Widg" product, you won'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 "Give me bugs with <i>any</i> of these values." For example, if you wanted bugs that were in either the "Foo" or "Bar" products, you'd pass:</p> <pre class="code"> product => ['Foo', 'Bar']</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.</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'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="creator" ><code class="code">creator</code></a></dt> <dd> <p><code class="code">string</code> The login name of the user who created the bug.</p> <p>You can also pass this argument with the name <code class="code">reporter</code>, for backwards compatibility with older Bugzillas.</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. If the limit is more than zero and higher than the maximum limit set by the administrator, then the maximum limit will be used instead. If you set the limit equal to zero, then all matching results will be returned instead.</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 "Operating System" 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 "Hardware") 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="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 "This is a foo bar" but not "This foo is a bar". <code class="code">['foo', 'bar']</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 "---" when the field isn'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'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 "URL" 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="whiteboard" ><code class="code">whiteboard</code></a></dt> <dd> <p><code class="code">string</code> Search the "Status Whiteboard" 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" >"get"</a>.</p> <p>Note that you will only be returned information about bugs that you can see. Bugs that you can'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>If you specify an invalid value for a particular field, you just won't get any results for that value.</p> <dl> <dt><a name="1000_(Parameters_Required)" >1000 (Parameters Required)</a></dt> <dd> <p>You may not search without any search terms.</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="Searching_by_votes_was_removed_in_Bugzilla_4.0." >Searching by <code class="code">votes</code> was removed in Bugzilla <b>4.0</b>.</a></dt> <dd> <dt><a name="The_reporter_input_parameter_was_renamed_to_creator_in_Bugzilla_4.0." >The <code class="code">reporter</code> input parameter was renamed to <code class="code">creator</code> in Bugzilla <b>4.0</b>.</a></dt> <dd> <dt><a >In <b>4.2.6</b> and newer, added the ability to return all results if <code class="code">limit</code> is set equal to zero. Otherwise maximum results returned are limited by system configuration.</a></dt> </dl> </dd> </dl> <h1><a class='u' href='#___top' title='click to go to top of document' name="Bug_Creation_and_Modification" >Bug 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>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, an error will be thrown stating which field is invalid. 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'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'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'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'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 name="comment_is_private_(boolean)_-_If_set_to_true,_the_description_is_private,_otherwise_it_is_assumed_to_be_public." ><code class="code">comment_is_private</code> (boolean) - If set to true, the description is private, otherwise it is assumed to be public.</a></dt> <dd> <dt><a ><code class="code">groups</code> (array) - An array of group names to put this bug into. You can see valid group names on the Permissions tab of the Preferences screen, or, if you are an administrator, in the Groups control panel. If you don't specify this argument, then the bug will be added into all the groups that are set as being "Default" for this product. (If you want to avoid that, you should specify <code class="code">groups</code> as an empty array.)</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't want to use the component'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 ><code class="code">resolution</code> (string) - If you are filing a closed bug, then you will have to specify a resolution. You cannot currently specify a resolution of <code class="code">DUPLICATE</code> for new bugs, though. That must be done with <a href="#update" class="podlinkpod" >"update"</a>.</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>You specified a field value that is invalid. The error message will have more details.</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't specify a component.</p> <dt><a name="106_(Invalid_Product)" >106 (Invalid Product)</a></dt> <dd> <p>Either you didn't specify a product, this product doesn't exist, or you don'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't specify a summary for the bug.</p> <dt><a name="116_(Dependency_Loop)" >116 (Dependency Loop)</a></dt> <dd> <p>You specified values in the <code class="code">blocks</code> or <code class="code">depends_on</code> fields that would cause a circular dependency between bugs.</p> <dt><a name="120_(Group_Restriction_Denied)" >120 (Group Restriction Denied)</a></dt> <dd> <p>You tried to restrict the bug to a group which does not exist, or which you cannot use with this product.</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> <dd> <dt><a >The <code class="code">groups</code> argument was added in Bugzilla <b>4.0</b>. Before Bugzilla 4.0, bugs were only added into Mandatory groups by this method. Since Bugzilla <b>4.0.2</b>, passing an illegal group name will throw an error. In Bugzilla 4.0 and 4.0.1, illegal group names were silently ignored.</a></dt> <dd> <dt><a >The <code class="code">comment_is_private</code> argument was added in Bugzilla <b>4.0</b>. Before Bugzilla 4.0, you had to use the undocumented <code class="code">commentprivacy</code> argument.</a></dt> <dd> <dt><a name="Error_116_was_added_in_Bugzilla_4.0._Before_that,_dependency_loop_errors_had_a_generic_code_of_32000." >Error 116 was added in Bugzilla <b>4.0</b>. Before that, dependency loop errors had a generic code of <code class="code">32000</code>.</a></dt> <dd> <dt><a name="The_ability_to_file_new_bugs_with_a_resolution_was_added_in_Bugzilla_4.4." >The ability to file new bugs with a <code class="code">resolution</code> was added in Bugzilla <b>4.4</b>.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="add_attachment" >add_attachment</a></h2> <p><b>STABLE</b></p> <dl> <dt><a name="Description" ><b>Description</b></a></dt> <dd> <p>This allows you to add an attachment to a bug in Bugzilla.</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><b>Required</b> <code class="code">array</code> An array of ints and/or strings--the ids or aliases of bugs that you want to add this attachment to. The same attachment and comment will be added to all these bugs.</p> <dt><a name="data" ><code class="code">data</code></a></dt> <dd> <p><b>Required</b> <code class="code">base64</code> or <code class="code">string</code> The content of the attachment. If the content of the attachment is not ASCII text, you must encode it in base64 and declare it as the <code class="code">base64</code> type.</p> <dt><a name="file_name" ><code class="code">file_name</code></a></dt> <dd> <p><b>Required</b> <code class="code">string</code> The "file name" that will be displayed in the UI for this attachment.</p> <dt><a name="summary" ><code class="code">summary</code></a></dt> <dd> <p><b>Required</b> <code class="code">string</code> A short string describing the attachment.</p> <dt><a name="content_type" ><code class="code">content_type</code></a></dt> <dd> <p><b>Required</b> <code class="code">string</code> The MIME type of the attachment, like <code class="code">text/plain</code> or <code class="code">image/png</code>.</p> <dt><a name="comment" ><code class="code">comment</code></a></dt> <dd> <p><code class="code">string</code> A comment to add along with this attachment.</p> <dt><a name="is_patch" ><code class="code">is_patch</code></a></dt> <dd> <p><code class="code">boolean</code> True if Bugzilla should treat this attachment as a patch. If you specify this, you do not need to specify a <code class="code">content_type</code>. The <code class="code">content_type</code> of the attachment will be forced to <code class="code">text/plain</code>.</p> <p>Defaults to False if not specified.</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 should be private (restricted to the "insidergroup"), False if the attachment should be public.</p> <p>Defaults to False if not specified.</p> </dd> </dl> <dt><a name="Returns" ><b>Returns</b></a></dt> <dd> <p>A single item <code class="code">ids</code>, which contains an array of the attachment id(s) created.</p> <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" >"get"</a>, plus:</p> <dl> <dt><a name="600_(Attachment_Too_Large)" >600 (Attachment Too Large)</a></dt> <dd> <p>You tried to attach a file that was larger than Bugzilla will accept.</p> <dt><a name="601_(Invalid_MIME_Type)" >601 (Invalid MIME Type)</a></dt> <dd> <p>You specified a <code class="code">content_type</code> argument that was blank, not a valid MIME type, or not a MIME type that Bugzilla accepts for attachments.</p> <dt><a name="603_(File_Name_Not_Specified)" >603 (File Name Not Specified)</a></dt> <dd> <p>You did not specify a valid for the <code class="code">file_name</code> argument.</p> <dt><a name="604_(Summary_Required)" >604 (Summary Required)</a></dt> <dd> <p>You did not specify a value for the <code class="code">summary</code> argument.</p> <dt><a name="606_(Empty_Data)" >606 (Empty Data)</a></dt> <dd> <p>You set the "data" field to an empty string.</p> </dd> </dl> <dt><a name="History" ><b>History</b></a></dt> <dd> <dl> <dt><a name="Added_in_Bugzilla_4.0." >Added in Bugzilla <b>4.0</b>.</a></dt> <dd> <dt><a name="The_is_url_parameter_was_removed_in_Bugzilla_4.2." >The <code class="code">is_url</code> parameter was removed in Bugzilla <b>4.2</b>.</a></dt> <dd> <dt><a name="The_return_value_has_changed_in_Bugzilla_4.4." >The return value has changed in Bugzilla <b>4.4</b>.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="add_comment" >add_comment</a></h2> <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_or_string)_Required_-_The_id_or_alias_of_the_bug_to_append_a_comment_to." ><code class="code">id</code> (int or string) <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 "Hours Worked" 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 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't exist in the database.</p> <dt><a name="109_(Bug_Edit_Denied)" >109 (Bug Edit Denied)</a></dt> <dd> <p>You did not have the necessary rights to edit the bug.</p> <dt><a name="113_(Can't_Make_Private_Comments)" >113 (Can't Make Private Comments)</a></dt> <dd> <p>You tried to add a private comment, but don'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's_id_in_Bugzilla_3.4" >Modified to return the new comment'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't,_in_Bugzilla_3.4." >Modified to throw an error if you try to add a private comment but can'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> <h2><a class='u' href='#___top' title='click to go to top of document' name="update" >update</a></h2> <p><b>UNSTABLE</b></p> <dl> <dt><a name="Description" ><b>Description</b></a></dt> <dd> <p>Allows you to update the fields of a bug. Automatically sends emails out about the changes.</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 the bugs that you want to modify.</p> </dd> </dl> <p><b>Note</b>: All following fields specify the values you want to set on the bugs you are updating.</p> <dl> <dt><a name="alias" ><code class="code">alias</code></a></dt> <dd> <p>(string) The alias of the bug. You can only set this if you are modifying a single bug. If there is more than one bug specified in <code class="code">ids</code>, passing in a value for <code class="code">alias</code> will cause an error to be thrown.</p> <dt><a name="assigned_to" ><code class="code">assigned_to</code></a></dt> <dd> <p><code class="code">string</code> The full login name of the user this bug is assigned to.</p> <dt><a name="blocks" ><code class="code">blocks</code></a></dt> <dd> <dt><a name="depends_on" ><code class="code">depends_on</code></a></dt> <dd> <p><code class="code">hash</code> These specify the bugs that this bug blocks or depends on, respectively. To set these, you should pass a hash as the value. The hash may contain the following fields:</p> <dl> <dt><a name="add_An_array_of_ints._Bug_ids_to_add_to_this_field." ><code class="code">add</code> An array of <code class="code">int</code>s. Bug ids to add to this field.</a></dt> <dd> <dt><a ><code class="code">remove</code> An array of <code class="code">int</code>s. Bug ids to remove from this field. If the bug ids are not already in the field, they will be ignored.</a></dt> <dd> <dt><a ><code class="code">set</code> An array of <code class="code">int</code>s. An exact set of bug ids to set this field to, overriding the current value. If you specify <code class="code">set</code>, then <code class="code">add</code> and <code class="code">remove</code> will be ignored.</a></dt> </dl> <dt><a name="cc" ><code class="code">cc</code></a></dt> <dd> <p><code class="code">hash</code> The users on the cc list. To modify this field, pass a hash, which may have the following fields:</p> <dl> <dt><a ><code class="code">add</code> Array of <code class="code">string</code>s. User names to add to the CC list. They must be full user names, and an error will be thrown if you pass in an invalid user name.</a></dt> <dd> <dt><a ><code class="code">remove</code> Array of <code class="code">string</code>s. User names to remove from the CC list. They must be full user names, and an error will be thrown if you pass in an invalid user name.</a></dt> </dl> <dt><a name="is_cc_accessible" ><code class="code">is_cc_accessible</code></a></dt> <dd> <p><code class="code">boolean</code> Whether or not users in the CC list are allowed to access the bug, even if they aren't in a group that can normally access the bug.</p> <dt><a name="comment" ><code class="code">comment</code></a></dt> <dd> <p><code class="code">hash</code>. A comment on the change. The hash may contain the following fields:</p> <dl> <dt><a ><code class="code">body</code> <code class="code">string</code> The actual text of the comment. <b>Note</b>: For compatibility with the parameters to <a href="#add_comment" class="podlinkpod" >"add_comment"</a>, you can also call this field <code class="code">comment</code>, if you want.</a></dt> <dd> <dt><a ><code class="code">is_private</code> <code class="code">boolean</code> Whether the comment is private or not. If you try to make a comment private and you don't have the permission to, an error will be thrown.</a></dt> </dl> <dt><a name="comment_is_private" ><code class="code">comment_is_private</code></a></dt> <dd> <p><code class="code">hash</code> This is how you update the privacy of comments that are already on a bug. This is a hash, where the keys are the <code class="code">int</code> id of comments (not their count on a bug, like #1, #2, #3, but their globally-unique id, as returned by <a href="#comments" class="podlinkpod" >"comments"</a>) and the value is a <code class="code">boolean</code> which specifies whether that comment should become private (<code class="code">true</code>) or public (<code class="code">false</code>).</p> <p>The comment ids must be valid for the bug being updated. Thus, it is not practical to use this while updating multiple bugs at once, as a single comment id will never be valid on multiple bugs.</p> <dt><a name="component" ><code class="code">component</code></a></dt> <dd> <p><code class="code">string</code> The Component the bug is in.</p> <dt><a name="deadline" ><code class="code">deadline</code></a></dt> <dd> <p><code class="code">string</code> The Deadline field--a date specifying when the bug must be completed by, in the format <code class="code">YYYY-MM-DD</code>.</p> <dt><a name="dupe_of" ><code class="code">dupe_of</code></a></dt> <dd> <p><code class="code">int</code> The bug that this bug is a duplicate of. If you want to mark a bug as a duplicate, the safest thing to do is to set this value and <i>not</i> set the <code class="code">status</code> or <code class="code">resolution</code> fields. They will automatically be set by Bugzilla to the appropriate values for duplicate bugs.</p> <dt><a name="estimated_time" ><code class="code">estimated_time</code></a></dt> <dd> <p><code class="code">double</code> The total estimate of time required to fix the bug, in hours. This is the <i>total</i> estimate, not the amount of time remaining to fix it.</p> <dt><a name="groups" ><code class="code">groups</code></a></dt> <dd> <p><code class="code">hash</code> The groups a bug is in. To modify this field, pass a hash, which may have the following fields:</p> <dl> <dt><a ><code class="code">add</code> Array of <code class="code">string</code>s. The names of groups to add. Passing in an invalid group name or a group that you cannot add to this bug will cause an error to be thrown.</a></dt> <dd> <dt><a ><code class="code">remove</code> Array of <code class="code">string</code>s. The names of groups to remove. Passing in an invalid group name or a group that you cannot remove from this bug will cause an error to be thrown.</a></dt> </dl> <dt><a name="keywords" ><code class="code">keywords</code></a></dt> <dd> <p><code class="code">hash</code> Keywords on the bug. To modify this field, pass a hash, which may have the following fields:</p> <dl> <dt><a ><code class="code">add</code> An array of <code class="code">strings</code>s. The names of keywords to add to the field on the bug. Passing something that isn't a valid keyword name will cause an error to be thrown.</a></dt> <dd> <dt><a ><code class="code">remove</code> An array of <code class="code">string</code>s. The names of keywords to remove from the field on the bug. Passing something that isn't a valid keyword name will cause an error to be thrown.</a></dt> <dd> <dt><a ><code class="code">set</code> An array of <code class="code">strings</code>s. An exact set of keywords to set the field to, on the bug. Passing something that isn't a valid keyword name will cause an error to be thrown. Specifying <code class="code">set</code> overrides <code class="code">add</code> and <code class="code">remove</code>.</a></dt> </dl> <dt><a name="op_sys" ><code class="code">op_sys</code></a></dt> <dd> <p><code class="code">string</code> The Operating System ("OS") field on the bug.</p> <dt><a name="platform" ><code class="code">platform</code></a></dt> <dd> <p><code class="code">string</code> The Platform or "Hardware" field on the bug.</p> <dt><a name="priority" ><code class="code">priority</code></a></dt> <dd> <p><code class="code">string</code> The Priority field on the 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. If you change this, you will probably also want to change <code class="code">target_milestone</code>, <code class="code">version</code>, and <code class="code">component</code>, since those have different legal values in every product.</p> <p>If you cannot change the <code class="code">target_milestone</code> field, it will be reset to the default for the product, when you move a bug to a new product.</p> <p>You may also wish to add or remove groups, as which groups are valid on a bug depends on the product. Groups that are not valid in the new product will be automatically removed, and groups which are mandatory in the new product will be automaticaly added, but no other automatic group changes will be done.</p> <p>Note that users can only move a bug into a product if they would normally have permission to file new bugs in that product.</p> <dt><a name="qa_contact" ><code class="code">qa_contact</code></a></dt> <dd> <p><code class="code">string</code> The full login name of the bug's QA Contact.</p> <dt><a name="is_creator_accessible" ><code class="code">is_creator_accessible</code></a></dt> <dd> <p><code class="code">boolean</code> Whether or not the bug's reporter is allowed to access the bug, even if he or she isn't in a group that can normally access the bug.</p> <dt><a name="remaining_time" ><code class="code">remaining_time</code></a></dt> <dd> <p><code class="code">double</code> How much work time is remaining to fix the bug, in hours. If you set <code class="code">work_time</code> but don't explicitly set <code class="code">remaining_time</code>, then the <code class="code">work_time</code> will be deducted from the bug's <code class="code">remaining_time</code>.</p> <dt><a name="reset_assigned_to" ><code class="code">reset_assigned_to</code></a></dt> <dd> <p><code class="code">boolean</code> If true, the <code class="code">assigned_to</code> field will be reset to the default for the component that the bug is in. (If you have set the component at the same time as using this, then the component used will be the new component, not the old one.)</p> <dt><a name="reset_qa_contact" ><code class="code">reset_qa_contact</code></a></dt> <dd> <p><code class="code">boolean</code> If true, the <code class="code">qa_contact</code> field will be reset to the default for the component that the bug is in. (If you have set the component at the same time as using this, then the component used will be the new component, not the old one.)</p> <dt><a name="resolution" ><code class="code">resolution</code></a></dt> <dd> <p><code class="code">string</code> The current resolution. May only be set if you are closing a bug or if you are modifying an already-closed bug. Attempting to set the resolution to <i>any</i> value (even an empty or null string) on an open bug will cause an error to be thrown.</p> <p>If you change the <code class="code">status</code> field to an open status, the resolution field will automatically be cleared, so you don't have to clear it manually.</p> <dt><a name="see_also" ><code class="code">see_also</code></a></dt> <dd> <p><code class="code">hash</code> The See Also field on a bug, specifying URLs to bugs in other bug trackers. To modify this field, pass a hash, which may have the following fields:</p> <dl> <dt><a ><code class="code">add</code> An array of <code class="code">strings</code>s. URLs to add to the field. Each URL must be a valid URL to a bug-tracker, or an error will be thrown.</a></dt> <dd> <dt><a name="remove_An_array_of_strings._URLs_to_remove_from_the_field._Invalid_URLs_will_be_ignored." ><code class="code">remove</code> An array of <code class="code">string</code>s. URLs to remove from the field. Invalid URLs will be ignored.</a></dt> </dl> <dt><a name="severity" ><code class="code">severity</code></a></dt> <dd> <p><code class="code">string</code> The Severity field of a bug.</p> <dt><a name="status" ><code class="code">status</code></a></dt> <dd> <p><code class="code">string</code> The status you want to change the bug to. Note that if a bug is changing from open to closed, you should also specify a <code class="code">resolution</code>.</p> <dt><a name="summary" ><code class="code">summary</code></a></dt> <dd> <p><code class="code">string</code> The Summary field of the bug.</p> <dt><a name="target_milestone" ><code class="code">target_milestone</code></a></dt> <dd> <p><code class="code">string</code> The bug's Target Milestone.</p> <dt><a name="url" ><code class="code">url</code></a></dt> <dd> <p><code class="code">string</code> The "URL" field of a bug.</p> <dt><a name="version" ><code class="code">version</code></a></dt> <dd> <p><code class="code">string</code> The bug's Version field.</p> <dt><a name="whiteboard" ><code class="code">whiteboard</code></a></dt> <dd> <p><code class="code">string</code> The Status Whiteboard field of a bug.</p> <dt><a name="work_time" ><code class="code">work_time</code></a></dt> <dd> <p><code class="code">double</code> The number of hours worked on this bug as part of this change. If you set <code class="code">work_time</code> but don't explicitly set <code class="code">remaining_time</code>, then the <code class="code">work_time</code> will be deducted from the bug's <code class="code">remaining_time</code>.</p> </dd> </dl> <p>You can also set the value of any custom field by passing its name as a parameter, and the value to set the field to. For multiple-selection fields, the value should be an array of strings.</p> <dt><a name="Returns" ><b>Returns</b></a></dt> <dd> <p>A <code class="code">hash</code> with a single field, "bugs". 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 bug that was updated.</p> <dt><a name="alias" ><code class="code">alias</code></a></dt> <dd> <p><code class="code">string</code> The alias of the bug that was updated, if this bug has an alias.</p> <dt><a name="last_change_time" ><code class="code">last_change_time</code></a></dt> <dd> <p><code class="code">dateTime</code> The exact time that this update was done at, for this bug. If no update was done (that is, no fields had their values changed and no comment was added) then this will instead be the last time the bug 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 bug. The keys are the names of the fields that were changed, and the values are a hash with two keys:</p> <dl> <dt><a ><code class="code">added</code> (<code class="code">string</code>) The values that were added to this field, possibly a comma-and-space-separated list if multiple values were added.</a></dt> <dd> <dt><a ><code class="code">removed</code> (<code class="code">string</code>) The values that were removed from this field, possibly a comma-and-space-separated list if multiple values were removed.</a></dt> </dl> </dd> </dl> <p>Here's an example of what a return value might look like:</p> <pre class="code"> { bugs => [ { id => 123, alias => 'foo', last_change_time => '2010-01-01T12:34:56', changes => { status => { removed => 'NEW', added => 'ASSIGNED' }, keywords => { removed => 'bar', added => 'qux, quo, qui', } }, } ] }</pre> <p>Currently, some fields are not tracked in changes: <code class="code">comment</code>, <code class="code">comment_is_private</code>, and <code class="code">work_time</code>. This means that they will not show up in the return value even if they were successfully updated. This may change in a future version of Bugzilla.</p> <dt><a name="Errors" ><b>Errors</b></a></dt> <dd> <p>This function can throw all of the errors that <a href="#get" class="podlinkpod" >"get"</a>, <a href="#create" class="podlinkpod" >"create"</a>, and <a href="#add_comment" class="podlinkpod" >"add_comment"</a> can throw, plus:</p> <dl> <dt><a name="50_(Empty_Field)" >50 (Empty Field)</a></dt> <dd> <p>You tried to set some field to be empty, but that field cannot be empty. The error message will have more details.</p> <dt><a name="52_(Input_Not_A_Number)" >52 (Input Not A Number)</a></dt> <dd> <p>You tried to set a numeric field to a value that wasn't numeric.</p> <dt><a name="54_(Number_Too_Large)" >54 (Number Too Large)</a></dt> <dd> <p>You tried to set a numeric field to a value larger than that field can accept.</p> <dt><a name="55_(Number_Too_Small)" >55 (Number Too Small)</a></dt> <dd> <p>You tried to set a negative value in a numeric field that does not accept negative values.</p> <dt><a name="56_(Bad_Date/Time)" >56 (Bad Date/Time)</a></dt> <dd> <p>You specified an invalid date or time in a date/time field (such as the <code class="code">deadline</code> field or a custom date/time field).</p> <dt><a name="112_(See_Also_Invalid)" >112 (See Also Invalid)</a></dt> <dd> <p>You attempted to add an invalid value to the <code class="code">see_also</code> field.</p> <dt><a name="115_(Permission_Denied)" >115 (Permission Denied)</a></dt> <dd> <p>You don't have permission to change a particular field to a particular value. The error message will have more detail.</p> <dt><a name="116_(Dependency_Loop)" >116 (Dependency Loop)</a></dt> <dd> <p>You specified a value in the <code class="code">blocks</code> or <code class="code">depends_on</code> fields that causes a dependency loop.</p> <dt><a name="117_(Invalid_Comment_ID)" >117 (Invalid Comment ID)</a></dt> <dd> <p>You specified a comment id in <code class="code">comment_is_private</code> that isn't on this bug.</p> <dt><a name="118_(Duplicate_Loop)" >118 (Duplicate Loop)</a></dt> <dd> <p>You specified a value for <code class="code">dupe_of</code> that causes an infinite loop of duplicates.</p> <dt><a name="119_(dupe_of_Required)" >119 (dupe_of Required)</a></dt> <dd> <p>You changed the resolution to <code class="code">DUPLICATE</code> but did not specify a value for the <code class="code">dupe_of</code> field.</p> <dt><a name="120_(Group_Add/Remove_Denied)" >120 (Group Add/Remove Denied)</a></dt> <dd> <p>You tried to add or remove a group that you don't have permission to modify for this bug, or you tried to add a group that isn't valid in this product.</p> <dt><a name="121_(Resolution_Required)" >121 (Resolution Required)</a></dt> <dd> <p>You tried to set the <code class="code">status</code> field to a closed status, but you didn't specify a resolution.</p> <dt><a name="122_(Resolution_On_Open_Status)" >122 (Resolution On Open Status)</a></dt> <dd> <p>This bug has an open status, but you specified a value for the <code class="code">resolution</code> field.</p> <dt><a name="123_(Invalid_Status_Transition)" >123 (Invalid Status Transition)</a></dt> <dd> <p>You tried to change from one status to another, but the status workflow rules don't allow that change.</p> </dd> </dl> <dt><a name="History" ><b>History</b></a></dt> <dd> <dl> <dt><a name="Added_in_Bugzilla_4.0." >Added in Bugzilla <b>4.0</b>.</a></dt> </dl> </dd> </dl> <h2><a class='u' href='#___top' title='click to go to top of document' name="update_see_also" >update_see_also</a></h2> <p><b>EXPERIMENTAL</b></p> <dl> <dt><a name="Description" ><b>Description</b></a></dt> <dd> <p>Adds or removes URLs for the "See Also" 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'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 "See Also" 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't have to specify the URL in exact case, if you don'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's a diagram of what the return value looks like for updating bug ids 1 and 2:</p> <pre class="code"> { changes => { 1 => { see_also => { added => (an array of bug URLs), removed => (an array of bug URLs), } }, 2 => { see_also => { added => (an array of bug URLs), removed => (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" >"get"</a> throws, plus:</p> <dl> <dt><a name="109_(Bug_Edit_Denied)" >109 (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> <h2><a class='u' href='#___top' title='click to go to top of document' name="update_tags" >update_tags</a></h2> <p><b>UNSTABLE</b></p> <dl> <dt><a name="Description" ><b>Description</b></a></dt> <dd> <p>Adds or removes tags on bugs.</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><b>Required</b> <code class="code">array</code> An array of ints and/or strings--the ids or aliases of bugs that you want to add or remove tags to. All the tags will be added or removed to all these bugs.</p> <dt><a name="tags" ><code class="code">tags</code></a></dt> <dd> <p><b>Required</b> <code class="code">hash</code> A hash representing tags to be added and/or removed. The hash has the following fields:</p> <dl> <dt><a name="add_An_array_of_strings_representing_tag_names_to_be_added_to_the_bugs." ><code class="code">add</code> An array of <code class="code">string</code>s representing tag names to be added to the bugs.</a></dt> <dd> <p>It is safe to specify tags that are already associated with the bugs--they will just be silently ignored.</p> <dt><a name="remove_An_array_of_strings_representing_tag_names_to_be_removed_from_the_bugs." ><code class="code">remove</code> An array of <code class="code">string</code>s representing tag names to be removed from the bugs.</a></dt> <dd> <p>It is safe to specify tags that are not associated with any bugs--they will just be silently ignored.</p> </dd> </dl> </dd> </dl> <dt><a name="Returns" ><b>Returns</b></a></dt> <dd> <p><code class="code">changes</code>, a hash containing bug IDs as keys and one single value name "tags" which is also a hash, with <code class="code">added</code> and <code class="code">removed</code> as keys. See <a href="#update_see_also" class="podlinkpod" >"update_see_also"</a> for an example of how it looks like.</p> <dt><a name="Errors" ><b>Errors</b></a></dt> <dd> <p>This method can throw the same errors as <a href="#get" class="podlinkpod" >"get"</a>.</p> <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"><<</a></b></p> <!-- end doc --> </body></html>