Class: AgileSprintClient

AgileSprintClient(jiraClient)

new AgileSprintClient(jiraClient)

Used to access Jira REST endpoints in '/rest/agile/1.0/sprint'

Parameters:
Name Type Description
jiraClient JiraClient
Source:

Methods

createSprint(sprint, callbackopt) → {Promise}

Creates a sprint from a JSON representation.

Parameters:
Name Type Attributes Description
sprint Object

The sprint data in the form of POST body to the Jira API.

callback callback <optional>

Called when the sprint has been created.

Source:
Returns:

Resolved when the sprint has been created.

Type
Promise

deleteSprint(opts, callbackopt) → {Promise}

Delete an existing sprint.

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API.

Properties
Name Type Attributes Description
sprintId string

The id of the sprint. EX: 331

filter string <optional>
startAt string <optional>
maxResults string <optional>
callback callback <optional>

Called when the sprint is deleted.

Source:
Returns:

Resolved when the sprint is deleted.

Type
Promise

getSprint(opts, callbackopt) → {Promise}

Get a single sprint.

Parameters:
Name Type Attributes Description
opts object

The request options sent to the Jira API.

Properties
Name Type Attributes Description
sprintId string

The sprint id.

filter string <optional>
startAt string <optional>
maxResults string <optional>
callback callback <optional>

Called when the sprint has been retrieved.

Source:
Returns:

Resolved when the sprint has been retrieved.

Type
Promise

getSprintIssues(opts, callbackopt) → {Promise}

Return all issues in a sprint, for a given sprint id.

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API.

Properties
Name Type Attributes Description
sprintId string

The sprint id.

startAt string <optional>
maxResults string <optional>
jql string <optional>

Filters results using a JQL query.

validateQuery boolean <optional>

Specifies whether to valide the JQL query.

fields string <optional>

The list of fields to return for each issue.

expand string <optional>

A comma-separated list of the parameters to expand.

callback callback <optional>

Called when the issues are returned.

Source:
Returns:

Resolved when the issues are returned.

Type
Promise

moveSprintIssues(opts, callbackopt) → {Promise}

Move issues to a sprint, for a given sprint id.

Parameters:
Name Type Attributes Description
opts Object

The issue data in the form of POST body to the Jira API.

Properties
Name Type Attributes Description
sprintId string

The sprint id.

issues Array.<string>

Ids of the issues to move.

rankBeforeIssue string <optional>
rankAfterIssue string <optional>
rankCustomField string <optional>
callback callback <optional>

Called when the sprint has been retrieved.

Source:
Returns:

Resolved when the sprint has been retrieved.

Type
Promise

partiallyUpdateSprint(sprint, callbackopt) → {Promise}

Perform a partial update of a sprint.

Parameters:
Name Type Attributes Description
sprint Object

The sprint data in the form of POST body to the Jira API.

Properties
Name Type Attributes Description
sprintId string <optional>

The id of the sprint. EX: 331.

callback callback <optional>

Called when the sprint has been updated.

Source:
Returns:

Resolved when the sprint has been updated.

Type
Promise

swapSprint(opts, callbackopt) → {Promise}

Swap the position of the sprint (given by sprint id) with the second sprint.

Parameters:
Name Type Attributes Description
opts Object

The data in the form of POST body to the Jira API.

Properties
Name Type Description
sprintId string

The id of the sprint. EX: 311

sprintToSwapWith string

The id of the sprint. EX: 311

callback callback <optional>

Called when the sprint has been retrieved.

Source:
Returns:

Resolved when the sprint has been retrieved.

Type
Promise

updateSprint(sprint, callbackopt) → {Promise}

Perform a full update of a sprint.

Parameters:
Name Type Attributes Description
sprint Object

The sprint data in the form of PUT body to the Jira API.

Properties
Name Type Description
sprintId string

The id of the sprint. EX: 331

callback callback <optional>

Called when the sprint has been updated.

Source:
Returns:

Resolved when the sprint has been updated.

Type
Promise