Class: FilterClient

FilterClient(jiraClient)

new FilterClient(jiraClient)

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

Parameters:
Name Type Description
jiraClient JiraClient
Source:

Methods

addSharePermission(opts, callbackopt) → {Promise}

Adds a share permission for the given filter

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

Properties
Name Type Description
filterId number

The id of the filter for which to reset columns.

permission Object

The share permission to apply

callback <optional>

Called when the columns have been reset.

Source:
Returns:

Resolved when the columns have been reset.

Type
Promise

createFilter(opts, callbackopt) → {Promise}

Creates a new filter, and returns newly created filter. Currently sets permissions just using the users default sharing permissions

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

Properties
Name Type Attributes Description
expand Array <optional>

The parameters to expand.

filter Object

The filter to create. See https://docs.atlassian.com/jira/REST/latest/#d2e3347

callback <optional>

Called when the filter has been created.

Source:
Returns:

Resolved when the filter has been created.

Type
Promise

deleteFilter(opts, callbackopt) → {Promise}

Delete a filter.

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

Properties
Name Type Description
filterId number

The id of the filter to delete

callback <optional>

Called when the filter has been deleted.

Source:
Returns:

Resolved when the filter has been deleted.

Type
Promise

getDefaultShareScore(opts, callbackopt) → {Promise}

Returns the default share scope of the logged-in user.

Parameters:
Name Type Attributes Description
opts

Ignored.

callback <optional>

Called when the default share scope has been retrieved.

Source:
Returns:

Resolved when the default share scope has been retrieved.

Type
Promise

getFavouriteFilters(opts, callbackopt) → {Promise}

Returns the favourite filters of the logged-in user.

Parameters:
Name Type Attributes Description
opts

Ignored.

callback <optional>

Called when the list of favourites has been retrieved.

Source:
Returns:

Resolved when the list of favourites has been retrieved.

Type
Promise

getFilter(opts, callbackopt) → {Promise}

Returns a filter given an id

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

Properties
Name Type Description
filterId number

The id of the filter to retrieve

callback <optional>

Called when the filter has been retrieved.

Source:
Returns:

Resolved when the filter has been retrieved.

Type
Promise

getFilterColumns(opts, callbackopt) → {Promise}

Returns the default columns for the given filter. Currently logged in user will be used as the user making such request.

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

Properties
Name Type Description
filterId number

The id of the filter for which to retrieve columns.

callback <optional>

Called when the columns have been retrieved.

Source:
Returns:

Resolved when the columns have been retrieved.

Type
Promise

getFilters(opts, callbackopt) → {Promise}

Returns all filters for the current user(only for cloud)

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

callback <optional>

Called when the filter has been retrieved.

Source:
Returns:

Resolved when the filter has been retrieved.

Type
Promise

resetFilterColumns(opts, callbackopt) → {Promise}

Resets the columns for the given filter such that the filter no longer has its own column config.

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

Properties
Name Type Description
filterId number

The id of the filter for which to reset columns.

callback <optional>

Called when the columns have been reset.

Source:
Returns:

Resolved when the columns have been reset.

Type
Promise

setDefaultShareScope(opts, callbackopt) → {Promise}

Sets the default share scope of the logged-in user.

Parameters:
Name Type Attributes Description
opts Object

The request options sent to jira

Properties
Name Type Description
scope string

The new default share scope. Available values are GLOBAL and PRIVATE.

callback <optional>

Called when the default share scope has been set.

Source:
Returns:

Resolved when the default share scope has been set.

Type
Promise

setFilterColumns(opts, callbackopt) → {Promise}

Sets the default columns for the given filter

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

Properties
Name Type Description
filterId number

The id of the filter for which to update columns.

columns Array

The names of the new columns. See https://docs.atlassian.com/jira/REST/latest/#d2e3460

callback <optional>

Called when the columns have been set

Source:
Returns:

Resolved when the columns have been set

Type
Promise

updateFilter(opts, callbackopt) → {Promise}

Updates an existing filter, and returns its new value.

Parameters:
Name Type Attributes Description
opts Object

The request options sent to the Jira API

Properties
Name Type Description
filterId number

The id of the filter to update

filter Object

The new data for the filter. See https://docs.atlassian.com/jira/REST/latest/#d2e3401

callback <optional>

Called when the filter has been updated.

Source:
Returns:

Resolved when the filter has been updated.

Type
Promise