5.7.234. Bugzilla::Extension::SubComponents::WebService¶
5.7.234.1. NAME¶
Bugzilla::Extension::SubComponents::WebService - The SubComponent API
5.7.234.2. DESCRIPTION¶
This part of the Bugzilla API allows you to get info about accessible subcomponents, create new subcomponents and also edit the attributes of existing subcomponents.
5.7.234.3. METHODS¶
See Bugzilla::WebService for a description of what STABLE, UNSTABLE, and EXPERIMENTAL mean, and for more information about error codes.
Get SubComponents¶
- getEXPERIMENTAL
- Description
Returns information about Bugzilla::SubComponent in accessible Bugzilla::Component.
You may retreive a list of all sub componets for a component using the Product.get method. Documentation is available in Bugzilla::WebService::Product
- Params
At least one of the following two parameters must be specified:
ids(array) - An array of integers, representing subcomponents ids.
names(array) - An array of hashes, each hash has product, component and subcomponent name.
- Returns
Information about all accessible product subcomponents passed. SubComponents that do not exist or are not accessible are silently ignored.
The return value will be a hash containing one item,
subcomponents, that is an array of hashes. Each hash describes a subcomponent, and has the following items:
- id
intThe unique integer ID that Bugzilla uses to identify this subcomponent. Even if the name of the subcomponent changes, this ID will stay the same.
- name
stringThe name of the subcomponent.
- name_tree
arrayAn array of strings containing the names of all the sub components above this sub component.
- description
stringThe description of the subcomponent.
- product_id
intThe id of the product that the subcomponent belongs to.
- product_name
stringThe name of the product that this component belongs to
- component_id
intThe id of the component that this subcomponent belongs to
- component_name
stringThe name of the component that this subcomponent belongs to
- default_assignee
stringThe login name of the default owner of the subcomponent if the user is logged in, if the user is not logged in then only the realname of the default owner will be returned.
- default_qa_contact
stringThe login name of the default qa contact of the subcomponent if the user is logged in, if the user is not logged in then only the realname of the default qa contact will be returned.
- default_docs_contact
stringThe login name of the default docs contact of the subcomponent if the user is logged in, if the user is not logged in then only the realname of the default docs contact will be returned.
- default_cc
arrayThe default CC list for this subcomponent. It is an array of login names if the user is logged in. If the user is not logged in then only the realnames of the default cc list members will be returned.
- level
intHow many levels deep is this subcomponent. 0 is a top level subcomponent.
- sort_key
intThe sort key of this subcomponent.
- is_active
booleanTrue if the component is active. False if it is inactive.
- parent_id
intoptional The ID of the parent subcomponent. Will be absent if there is no parent.
- agile_team
stringThe name of the Agile Team bugs in this subcomponent will default to.
- Errors
- 51 (Invalid Object)A non existing product or subcomponent name was passed to the function, as a result no product or subcomponent object existed for that invalid name.
- 106 (Invalid Product)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).
Create SubComponent¶
- createEXPERIMENTAL
- DescriptionCreates new subcomponent for an existing product.
- Params
A hash containing the following subcomponent fields:
- product
stringRequired The name of the product that the subcomponent will be added to.
- component
stringRequired The name of the component this subcomponent will be a child of
- subcomponent
stringRequired The name of the new sub component.
- description
stringRequired The description of the new subcomponent.
- default_assignee
stringRequired The initial owner of the new subcomponent.
- default_qa_contact
stringOptional The initial qa contact for the new subcomponent.
- default_docs_contact
stringOptional The initial docs contact for the new subcomponent.
- default_cc
arrayOptional Array of the initial cclist for the new subcomponent.
- parent_id
intOptional If this subcomponent has a parent subcomponent, this will contain its id.
- sort_key
intOptional The sort key for this subcomponent.
- is_active
booleanOptional True to create the subcomponent active. False to create the subcomponent inactive.
- default_to_private
booleanTrue if bugs for this subcomponent default to private.
- ReturnsA hash containing one item,
id, which is the id of the newly created subcomponent
- Errors
- 304 (Authorization Required) Logged-in user not authorized to create subcomponents.
- 106 (Product Access Denied) Logged-in user doesn’t have access to the specified product to create
subcomponents for it.
- 50 (Product Not Specified) Logged-in user didn’t specify any product names for the subcomponent they want
to create.
- 106 (Product Doesn’t Exist) The specified product doesn’t exist.
- 105 (Component Name Is Too Long) The name of the subcomponent is longer than 64 characters.
- 105 (Component Requires Default Assignee) User didn’t specify a default assignee for the new subcomponent.
- 105 (Blank Component Description Not Allowed) User didn’t specify a description for the new subcomponent.
- 105 (Blank Component Name Not Allowed) User didn’t specifiy name for the new subcomponent.
- 105 (Component Already Exists) Trying to create a subcomponent which has similar name to an existing subcomponent.
- 51 (Invalid Username) Invalid login name was provided for the subcomponent’s default assignee,
default qa contact, default docs contact or one of the default cc.
Update SubComponents¶
- updateEXPERIMENTAL
- DescriptionUpdates single or multiple subcomponents information.
- Params
A hash containing either
ids, which is an array of integers of the sub component ids. Ornames, which is an array of hashes. Each hash has a product name, component name and subcomponent name. And,updateswhich is a hash containing the subcomponent fields that will be updated. the update hash may contain any of the following items:
- name
stringThe name of the subcomponent.
- description
stringThe description of the subcomponent.
- default_assignee
stringThe login name of the default owner of the subcomponent.
- default_qa_contact
stringThe login name of the default qa contact of the subcomponent.
- default_docs_contact
stringThe login name of the default docs contact of the subcomponent.
- default_cc
arrayA list of the login names in the default cc list of the subcomponent.
- parent_id
intoptional The parent id of this subcomponent
- sort_key
intOptional The sort key for this sub component.
- is_active
booleanOptional True to enable the subcomponent, False to disable the subcomponent.
- default_to_private
booleanTrue if bugs for this subcomponent default to private.
- Returns
A hash containing one item,
subcomponents_updates, which is a hash of hashes, with subcomponent ids as the hash keys pointing to hashes that contains the changes that were made to the subcomponent information. The hash may contain any of the following:
- name
arrayAn array of (strings) that holds the old and the new names of the subcomponent.
- description
arrayAn array of (strings) that holds the old and the new descriptions of the subcomponent.
- default_assignee
arrayAn Array of (strings) that holds the old and the new login names of the default owner of the subcomponent.
- default_qa_contact
arrayAn array of (strings) that holds the old and the new login names of the default qa contact of the subcomponent.
- default_docs_contact
arrayAn array of (strings) that holds the old and the new login names of the default docs contact of the subcomponent.
- default_cc
arrayAn array of (strings) that holds the old and the new lists of the login names in the default cc list of the subcomponent.
- Errors
- 50 (Invalid Product)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).
- 304 (Authorization Required) Logged-in user not authorized to edit subcomponents.
- 105 (Component Already Exists) Trying to change subcomponent name to similar name of an existing subcomponent
of the same product.
- 51 (Invalid Username) Invalid login name was provided for the subcomponent’s default assignee,
default qa contact, default docs contact or one of the default cc.
- 105 (Component Name Is Too Long) The name of the subcomponent is longer than 64 characters.
- 105 (Multiple Components Update Not Allowed) Can not do multiple subcomponents update when changing the name
of multiple subcomponents of the same product.
Delete SubComponents¶
- deleteEXPERIMENTAL
- DescriptionDeletes one or more subcomponents.
- Params
A hash containing either
ids, which is an array of integers of the sub component ids you wish to delete. Ornames, which is an array of hashes. Each hash has a product name, component name and subcomponent name.If any of the subcomponents has bugs belonging to that sub component, the entire delete operation will fail. That is to say, all subcomponents you wish to delete must have zero bugs.
- ReturnsA hash containing one item,
deletedwhich contains an array of subcomponent ids that were deleted.
- Errors
- 50 (Invalid Product)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).
- 304 (Authorization Required) Logged-in user not authorized to edit subcomponents.
- 105 (Component Already Exists) Trying to change subcomponent name to similar name of an existing subcomponent
of the same product.
- 105 (Sub Component Has Bugs) Attempting to delete a sub component that has bugs in it.
This documentation undoubtedly has bugs; if you find some, please file them here.
