Class: ComponentClient

ComponentClient(jiraClient)

new ComponentClient(jiraClient)

Used to access Jira REST endpoints in '/rest/api/2/component'

Parameters:
Name Type Description
jiraClient JiraClient
Source:

Methods

createComponent(opts, callbackopt) → {Promise}

Create a component via POST.

Parameters:
Name Type Attributes Description
opts

The request options sent to the Jira API

Properties
Name Type Description
component

See https://docs.atlassian.com/jira/REST/latest/#d2e3871

callback <optional>

Called when the component has been created.

Source:
Returns:

Resolved when the component has been created.

Type
Promise

deleteComponent(opts, callbackopt) → {Promise}

Delete a project component.

Parameters:
Name Type Attributes Description
opts

The options sent to the Jira API

Properties
Name Type Attributes Description
id

The id of the component to edit.

moveIssuesTo <optional>

The new component applied to issues whose 'id' component will be deleted. If this value is null, then the 'id' component is simply removed from the related isues.

callback <optional>

Called when the component has been deleted.

Source:
Returns:

Resolved when the component has been deleted.

Type
Promise

editComponent(opts, callbackopt) → {Promise}

Modify a component via PUT. Any fields present in the PUT will override existing values. As a convenience, if a field is not present, it is silently ignored. If leadUserName is an empty string ("") the component lead will be removed.

Parameters:
Name Type Attributes Description
opts

The request options sent to the Jira API.

Properties
Name Type Description
id

The id of the component to edit.

component

The new data to place in the component. See https://docs.atlassian.com/jira/REST/latest/#d2e3939

callback <optional>

Called when the component has beed edited.

Source:
Returns:

Resolved when the component has beed edited.

Type
Promise

getComponent(opts, callbackopt) → {Promise}

Get a project component.

Parameters:
Name Type Attributes Description
opts

The options sent to the Jira API

Properties
Name Type Description
id

The id of the component to edit.

callback <optional>

Called when the component has been retrieved.

Source:
Returns:

Resolved when the component has been retrieved.

Type
Promise

getRelatedIssueCounts(opts, callbackopt) → {Promise}

Get counts of issues related to this component.

Parameters:
Name Type Attributes Description
opts

The options sent to the Jira API

Properties
Name Type Description
id

The id of the component to edit.

callback <optional>

Called when the count has been retrieved.

Source:
Returns:

Resolved when the count has been retrieved.

Type
Promise