Class: IssueTypeClient

IssueTypeClient(jiraClient)

new IssueTypeClient(jiraClient)

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

Parameters:
Name Type Description
jiraClient JiraClient
Source:

Methods

createIssueType(opts, callbackopt) → {Promise}

Creates an issue type from a JSON representation and adds the issue newly created issue type to the default issue type scheme.

Parameters:
Name Type Attributes Description
opts Object

Object containing details of the new issueType.

Properties
Name Type Attributes Description
name string

The name of the issue type

description string <optional>

The description of the issue type

type 'subtype' | 'standard' <optional>

The type of the issue type

callback callback <optional>

Called when the issue type has been created.

Source:
Returns:

Resolved when the issue type has been created.

Type
Promise

deleteIssueType(opts, callbackopt) → {Promise}

Deletes the specified issue type. If the issue type has any associated issues, these issues will be migrated to the alternative issue type specified in the parameter. You can determine the alternative issue types by calling the /rest/api/2/issuetype/{id}/alternatives resource.

Parameters:
Name Type Attributes Description
opts Object

The options to send to the JIRA API

Properties
Name Type Attributes Description
issueTypeId string

ID of the issueType to be deleted.

alternativeIssueTypeId string <optional>

the id of an issue type to which issues associated with the removed issue type will be migrated.

callback callback <optional>

Called when the issue type has been deleted.

Source:
Returns:

Resolved when the issue type has been deleted.

Type
Promise

getAllIssueTypes(optsopt, callbackopt) → {Promise}

Returns a list of all issue types visible to the user

Parameters:
Name Type Attributes Description
opts Object <optional>

Ignored

callback callback <optional>

Called when the issue types have been retrieved.

Source:
Returns:

Resolved when the issue types have been retrieved.

Type
Promise

getAlternativeIssueTypes(opts, callbackopt) → {Promise}

Returns a list of all alternative issue types for the given issue type id. The list will contain these issues types, to which issues assigned to the given issue type can be migrated. The suitable alternatives are issue types which are assigned to the same workflow, the same field configuration and the same screen scheme.

Parameters:
Name Type Attributes Description
opts Object

The options sent to the Jira API

Properties
Name Type Description
issueTypeId string

A String containing an issue type id

callback callback <optional>

Called when the issue type has been retrieved.

Source:
Returns:

Resolved when the issue type has been retrieved.

Type
Promise

getIssueType(opts, callbackopt) → {Promise}

Get a full representation of the issue type that has the given id.

Parameters:
Name Type Attributes Description
opts Object

The options sent to the Jira API

Properties
Name Type Description
issueTypeId string

A String containing an issue type id

callback callback <optional>

Called when the issue type has been retrieved.

Source:
Returns:

Resolved when the issue type has been retrieved.

Type
Promise

updateIssueType(opts, callbackopt) → {Promise}

Updates the specified issue type from a JSON representation.

Parameters:
Name Type Attributes Description
opts Object

The options sent to the Jira API

Properties
Name Type Description
issueTypeId string

ID of the issue type to update.

issueType Object

Object containing details of the issueType to be updated.

Properties
Name Type Attributes Description
name string <optional>

The name of the issue type

avatarId string <optional>

The id of the avatar for the issue type

description string <optional>

The description of the issue type

callback callback <optional>

Called when the issue type has been updated.

Source:
Returns:

Resolved when the issue type has been updated.

Type
Promise