Class: FilterClient

FilterClient

Constructor

new FilterClient(jiraClient)

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

Parameters:
Name Type Description
jiraClient JiraClient
Source:

Methods

createFilter(opts, callback)

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

Parameters:
Name Type 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

Called when the filter has been created.

Source:

deleteFilter(opts, callback)

Delete a filter.

Parameters:
Name Type 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

Called when the filter has been deleted.

Source:

getDefaultShareScore(opts, callback)

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

Parameters:
Name Type Description
opts

Ignored.

callback

Called when the default share scope has been retrieved.

Source:

getFavouriteFilters(opts, callback)

Returns the favourite filters of the logged-in user.

Parameters:
Name Type Description
opts

Ignored.

callback

Called when the list of favourites has been retrieved.

Source:

getFilter(opts, callback)

Returns a filter given an id

Parameters:
Name Type 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

Called when the filter has been retrieved.

Source:

getFilterColumns(opts, callback)

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

Parameters:
Name Type 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

Called when the columns have been retrieved.

Source:

resetFilterColumns(opts, callback)

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

Parameters:
Name Type 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

Called when the columns have been reset.

Source:

setDefaultShareScope(opts, callback)

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

Parameters:
Name Type 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

Called when the default share scope has been set.

Source:

setFilterColumns(opts, callback)

Sets the default columns for the given filter

Parameters:
Name Type 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

Called when the columns have been set

Source:

updateFilter(opts, callback)

Updates an existing filter, and returns its new value.

Parameters:
Name Type 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

Called when the filter has been updated.

Source: