Class: AgileBoardClient

AgileBoardClient(jiraClient)

new AgileBoardClient(jiraClient)

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

Parameters:
Name Type Description
jiraClient JiraClient
Source:

Methods

(static) setBoardProperty(opts, callbackopt) → {Promise}

Sets the value of the specified board's property. You can use this resource to store a custom data against the board identified by the id. The user who stores the data is required to have permissions to modify the board.

Parameters:
Name Type Attributes Description
opts Object
Properties
Name Type Description
boardId string | number
propertyKey string | number
property any

specified board's property.

callback callback <optional>
Source:
Returns:
Type
Promise

createBoard(name, type, filterId, location, callbackopt) → {Promise}

Creates a board

Parameters:
Name Type Attributes Description
name string

Must be less than 255 characters.

type string

Valid values: scrum, kanban

filterId number

ID of a filter that the user has permissions to view. Note, if the user does not have the 'Create shared objects' permission and tries to create a shared board, a private board will be created instead (remember that board sharing depends on the filter sharing).

location object

The container that the board will be located in. location must include the type property (Valid values: project, user). If choosing 'project', then a project must be specified by a projectKeyOrId property in location. If choosing 'user', the current user is chosen by default. The projectKeyOrId property should not be provided.

callback function <optional>

Called when the sprint has been created.

Source:
Returns:

Resolved when the sprint has been created.

Type
Promise

deleteBoard(opts, callbackopt) → {Promise}

Deletes the board. Admin without the view permission can still remove the board.

Parameters:
Name Type Attributes Description
opts

The request options sent to the Jira API.

Properties
Name Type Description
boardId number

The agile board id.

callback function <optional>

Called when the dashboard has been retrieved

Source:
Returns:

Resolved when the dashboard has been retrieved

Type
Promise

getAllBoards(optsopt, callbackopt) → {Promise}

Get a list of all dashboards, optionally filtering them.

Parameters:
Name Type Attributes Description
opts Object <optional>

The request options to send to the Jira API

Properties
Name Type Attributes Description
type string <optional>

Limits returning boards of a specific type: scrum or kanban.

startAt number <optional>

The index of the first dashboard to return (0-based). must be 0 or a multiple of maxResults

name string <optional>

Filters results to boards that match or partially match the specified name.

projectKeyOrId string <optional>

Filters results to boards that are relevant to a project. Relevance meaning that the jql filter defined in board contains a reference to a project.

maxResults number <optional>

A hint as to the the maximum number of dashboards to return in each call. Note that the JIRA server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated. Callers should always check the returned maxResults to determine the value that is effectively being used.

accountIdLocation string <optional>
userkeyLocation string <optional>
usernameLocation string <optional>
projectLocation string <optional>
includePrivate boolean <optional>

Appends private boards to the end of the list. The name and type fields are excluded for security reasons.

negateLocationFiltering boolean <optional>

If set to true, negate filters used for querying by location. By default false.

orderBy string <optional>

Ordering of the results by a given field. If not provided, values will not be sorted. Valid values: name.

expand string <optional>

List of fields to expand for each board. Valid values: admins, permissions.

callback function <optional>

Called when the dashboards have been retrieved.

Source:
Returns:

Resolved when the dashboards have been retrieved.

Type
Promise

getBoard(opts, callbackopt) → {Promise}

Get a single agile board.

Parameters:
Name Type Attributes Description
opts

The request options sent to the Jira API.

Properties
Name Type Description
boardId number

The agile board id.

callback function <optional>

Called when the dashboard has been retrieved

Source:
Returns:

Resolved when the dashboard has been retrieved

Type
Promise

getConfiguration(opts, callbackopt) → {Promise}

Get configuration for a board

Parameters:
Name Type Attributes Description
opts

The request options to send to the Jira API

Properties
Name Type Description
boardId number

The agile board id.

callback function <optional>

Called when the board configuration has been retrieved.

Source:
Returns:

Resolved when the board configuration has been retrieved.

Type
Promise

getEpics(opts, callbackopt) → {Promise}

Returns all epics from the board, for the given board ID. This only includes epics that the user has permission to view. Note, if the user does not have permission to view the board, no epics will be returned at all.

Parameters:
Name Type Attributes Description
opts

The request options to send to the Jira API

Properties
Name Type Attributes Description
boardId number

The agile board id.

startAt number <optional>

The starting index of the returned epics. Base index: 0. See the 'Pagination' section at the top of this page for more details.

maxResults number <optional>

The maximum number of epics to return per page. Default: 50. See the 'Pagination' section at the top of this page for more details.

done string <optional>

Filters results to epics that are either done or not done. Valid values: true, false.

callback function <optional>

Called when the board configuration has been retrieved.

Source:
Returns:

Resolved when the board configuration has been retrieved.

Type
Promise

getIssuesForBacklog(opts, callbackopt) → {Promise}

Get a list of all issues from the board's backlog, for the given board Id.

Parameters:
Name Type Attributes Description
opts

The request options to send to the Jira API

Properties
Name Type Attributes Description
boardId number

The agile board id.

jql string <optional>

Filters results using a JQL query.

validateQuery boolean <optional>

Specifies whether to valide the JQL query.

fields Array.<string> | string <optional>

The list of fields to return for each issue.

startAt number <optional>

The index of the first dashboard to return (0-based). must be 0 or a multiple of maxResults

maxResults number <optional>

A hint as to the the maximum number of issues to return in each call. Note that the JIRA server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated. Callers should always check the returned maxResults to determine the value that is effectively being used.

callback function <optional>

Called when the backlog issues have been retrieved.

Source:
Returns:

Resolved when the backlog issues have been retrieved.

Type
Promise

getIssuesForBoard(opts, callbackopt) → {Promise}

Get a list of all issues associated with an agile board

Parameters:
Name Type Attributes Description
opts

The request options to send to the Jira API

Properties
Name Type Attributes Description
boardId

The agile board id.

startAt <optional>

The index of the first issue to return (0-based). must be 0 or a multiple of maxResults

maxResults <optional>

A hint as to the the maximum number of issues to return in each call. Note that the JIRA server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated. Callers should always check the returned maxResults to determine the value that is effectively being used.

jql <optional>

Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of the returned issues. Note that username and userkey have been deprecated as search terms for this parameter. See the migration guide for details. Use accountId instead.

fields <optional>

The list of fields to return for each issue. By default, all navigable and Agile fields are returned.

expand <optional>

The parameters to expand

callback <optional>

Called when the issues have been retrieved.

Source:
Returns:

Resolved when the issues have been retrieved.

Type
Promise

getIssuesWithoutEpic(opts, callbackopt) → {Promise}

Returns all issues that do not belong to any epic on a board, for a given board ID. This only includes issues that the user has permission to view. Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank.

Parameters:
Name Type Attributes Description
opts
Properties
Name Type Attributes Description
boardId number | string
startAt number <optional>

The starting index of the returned issues. Base index: 0. See the 'Pagination' section at the top of this page for more details.

maxResults number <optional>

The maximum number of issues to return per page. Default: 50. See the 'Pagination' section at the top of this page for more details. Note, the total number of issues returned is limited by the property 'jira.search.views.default.max' in your Jira instance. If you exceed this limit, your results will be truncated.

jql string <optional>

Filters results using a JQL query. If you define an order in your JQL query, it will override the default order of the returned issues. Note that username and userkey have been deprecated as search terms for this parameter. See the migration guide for details. Use accountId instead.

validateQuery boolean <optional>

Specifies whether to validate the JQL query or not. Default: true.

fields Array.<string> <optional>

The list of fields to return for each issue. By default, all navigable and Agile fields are returned.

expand string <optional>

A comma-separated list of the parameters to expand.

callback function <optional>

Called when the board configuration has been retrieved.

Source:
Returns:

Resolved when the board configuration has been retrieved.

Type
Promise

getProjectsForBoard(opts, callback) → {Promise}

Get a list of projects associated board

Parameters:
Name Type Description
opts

The request options to send to the Jira API

Properties
Name Type Attributes Description
boardId

The agile board id.

startAt <optional>

The index of the first sprint to return (0-based). must be 0 or a multiple of maxResults

maxResults <optional>

A hint as to the the maximum number of sprints to return in each call. Note that the JIRA server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated. Callers should always check the returned maxResults to determine the value that is effectively being used.

callback

Called when the sprints have been retrieved.

Source:
Returns:

Resolved when the sprints have been retrieved.

Type
Promise

getReportsForBoard(opts, callbackopt) → {Promise}

Get reports for associated board

Parameters:
Name Type Attributes Description
opts Object

The request options to send to the Jira API

Properties
Name Type Description
boardId number

The agile board id.

callback function <optional>

Called when the sprints have been retrieved.

Source:
Returns:

Resolved when the sprints have been retrieved.

Type
Promise

getSprintsForBoard(opts, callback) → {Promise}

Get a list of sprints associated with an agile board

Parameters:
Name Type Description
opts

The request options to send to the Jira API

Properties
Name Type Attributes Description
boardId

The agile board id.

startAt <optional>

The index of the first sprint to return (0-based). must be 0 or a multiple of maxResults

maxResults <optional>

A hint as to the the maximum number of sprints to return in each call. Note that the JIRA server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated. Callers should always check the returned maxResults to determine the value that is effectively being used.

state <optional>

Optionally filter by state, e.g. 'active'.

callback

Called when the sprints have been retrieved.

Deprecated:
  • Use board.getAllSprints
Source:
Returns:

Resolved when the sprints have been retrieved.

Type
Promise