<<

Bugzilla::Webservice::Product

NAME

Bugzilla::Webservice::Product - The Product API

DESCRIPTION

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

METHODS

See Bugzilla::WebService for a description of how parameters are passed, and what STABLE, UNSTABLE, and EXPERIMENTAL mean.

List Products

get_selectable_products

EXPERIMENTAL

Description

Returns a list of the ids of the products the user can search on.

Params (none)
Returns

A hash containing one item, ids, that contains an array of product ids.

Errors (none)

get_enterable_products

EXPERIMENTAL

Description

Returns a list of the ids of the products the user can enter bugs against.

Params (none)
Returns

A hash containing one item, ids, that contains an array of product ids.

Errors (none)

get_accessible_products

UNSTABLE

Description

Returns a list of the ids of the products the user can search or enter bugs against.

Params (none)
Returns

A hash containing one item, ids, that contains an array of product ids.

Errors (none)

get

EXPERIMENTAL

Description

Returns a list of information about the products passed to it.

Note: Can also be called as "get_products" for compatibilty with Bugzilla 3.0 API.

Params

In addition to the parameters below, this method also accepts the standard include_fields and exclude_fields arguments.

ids

An array of product ids

names

An array of product names

Returns

A hash containing one item, products, that is an array of hashes. Each hash describes a product, and has the following items:

id

int An integer id uniquely identifying the product in this installation only.

name

string The name of the product. This is a unique identifier for the product.

description

string A description of the product, which may contain HTML.

is_active

boolean A boolean indicating if the product is active.

default_milestone

string The name of the default milestone for the product.

has_unconfirmed

boolean Indicates whether the UNCONFIRMED bug status is available for this product.

classification

string The classification name for the product.

components

array An array of hashes, where each hash describes a component, and has the following items:

id

int An integer id uniquely identifying the component in this installation only.

name

string The name of the component. This is a unique identifier for this component.

description

string A description of the component, which may contain HTML.

default_assigned_to

string The login name of the user to whom new bugs will be assigned by default.

default_qa_contact

string The login name of the user who will be set as the QA Contact for new bugs by default.

sort_key

int Components, when displayed in a list, are sorted first by this integer and then secondly by their name.

is_active

boolean A boolean indicating if the component is active. Inactive components are not enabled for new bugs.

versions

array An array of hashes, where each hash describes a version, and has the following items: name, sort_key and is_active.

milestones

array An array of hashes, where each hash describes a milestone, and has the following items: name, sort_key and is_active.

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

Errors (none)
History
In Bugzilla 4.2, names was added as an input parameter.
In Bugzilla 4.2, classification, components, versions, milestones, default_milestone and has_unconfirmed were added to the fields returned by get as a replacement for internals, which has been removed.

Product Creation

create

EXPERIMENTAL

Description

This allows you to create a new product in Bugzilla.

Params

Some params must be set, or an error will be thrown. These params are marked Required.

name

Required string The name of this product. Must be globally unique within Bugzilla.

description

Required string A description for this product. Allows some simple HTML.

version

Required string The default version for this product.

has_unconfirmed

boolean Allow the UNCONFIRMED status to be set on bugs in this product. Default: true.

classification

string The name of the Classification which contains this product.

default_milestone

string The default milestone for this product. Default: '---'.

is_open

boolean True if the product is currently allowing bugs to be entered into it. Default: true.

create_series

boolean True if you want series for New Charts to be created for this new product. Default: true.

Returns

A hash with one element, id. This is the id of the newly-filed product.

Errors
51 (Classification does not exist)

You must specify an existing classification name.

700 (Product blank name)

You must specify a non-blank name for this product.

701 (Product name too long)

The name specified for this product was longer than the maximum allowed length.

702 (Product name already exists)

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

703 (Product must have description)

You must specify a description for this product.

704 (Product must have version)

You must specify a version for this product.

<<