Documentation

jira

Allows custom validation and save callback functions for jira workflow configurations and dashboard items.

See:

Methods

getWorkflowConfiguration(callback)

get a workflow configuration object

Parameters:
NameTypeDescription
callbackWorkflowConfiguration

the callback that handles the response

isDashboardItemEditable(callback)

Returns whether the current user is permitted to edit the dashboard item

Parameters:
NameTypeDescription
callbackfunction

the callback that handles the response

openCreateIssueDialog(callback, fields)

Open the quick create issue dialog. The dialog fields may be pre-filled with supplied data. A callback will be invoked when the dialog is closed and will include an array of issues created.

Note: This is unavailable on general admin and project admin pages.

Parameters:
NameTypeDescription
callbackfunction

invoked when dialog is closed, takes a single parameter - array of issues created

fieldsObject

contains data to pre-fill the dialog with

Properties
NameTypeDescription
pidProjectId

Project to pre-fill the dialog with

issueTypeIssueType

Issue type to pre-fill the dialog with

Example
AP.require('jira', function(jira){ jira.openCreateIssueDialog(function(issues){ alert(issues[0]['fields']['summary']); },{ pid: 10000, issueType: 1 }); });

refreshIssuePage()

Refresh an issue page without reloading the browser. This is helpful when your add-on updates information about an issue in the background.

Example
AP.require('jira', function(jira){ jira.refreshIssuePage(); });

setDashboardItemTitle(title)

Set title of a dashboard item

Parameters:
NameTypeDescription
title

the title to set