You can no longer publish Connect apps on the Atlassian Marketplace. All new extensibility features will be delivered only on Forge.
Refer to this blog post for our timeline to end Connect support.
Have an existing Connect app? You can incrementally migrate it to Forge.
A JavaScript module which provides functions to interact with Jira.
Refresh an issue page without reloading the browser.
This is helpful when your add-on updates information about an issue in the background.
1 2AP.jira.refreshIssuePage();
Retrieves a workflow configuration object.
Name | Type | Description |
---|---|---|
callback | WorkflowConfiguration | the callback that handles the response. |
Returns whether the current user is permitted to edit the dashboard item
Name | Type | Description |
---|---|---|
callback | function | the callback that handles the response |
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.
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
callback | function | invoked when dialog is closed, takes a single parameter - array of issues created | ||||||||||||||||
params | Object | contains data to pre-fill the dialog with Properties
|
1 2AP.jira.openCreateIssueDialog(function(issues){ alert(issues[0]['fields']['summary']); }, { pid: 10000, issueType: 1, fields : { summary: "Hello World", environment : "My environment", priority : 2, assignee: "tom", reporter: "bob", labels : ["Mylabel","MyOtherLabel"], description : "My first Issue", duedate : "11/Oct/16", fixVersions : 10001, versions : 10000, components : [10005, 10006], timetracking_originalestimate: "2w", timetracking_remainingestimate: "3d", worklog_activate: true, worklog_timeLogged: "2" } });
Opens the issue dialog for an issue. A callback is invoked when the issue dialog is closed or an error occurs when opening the issue dialog.
Name | Type | Description |
---|---|---|
issueKey | String | The key of the issue. |
callback | function | Invoked when the dialog is closed. Takes a single parameter, either |
1 2AP.jira.openIssueDialog( 'DEMO-1', function(){ alert('Closed!'); } );
Set the title of a dashboard item to the given text.
Name | Type | Description |
---|---|---|
title | String | the title of the dashboard item. Any HTML is escaped. |
Shows a date picker component. A callback will be invoked when the date (and time) is selected by the user.
Name | Type | Description |
---|---|---|
options | DatePicker~options | Configuration of the date picker. |
1 2var dateField = document.querySelector("#date-field"); var dateTrigger = document.querySelector("#date-trigger"); dateTrigger.addEventListener("click", function(e) { e.preventDefault(); AP.jira.openDatePicker({ element: dateTrigger, date: "2011-12-13T15:20+01:00", showTime: true, onSelect: function (isoDate, date) { dateField.value = date; dateField.setAttribute("data-iso", isoDate); dateField.focus(); } }); });
Prepares the JQL Editor dialog in preparation for fast rendering. This method should be called on iframe load if it contains a JQL editor trigger.
1 2AP.jira.initJQLEditor();
Launches a JQL Editor dialog. A callback will be invoked when the JQL is submitted by the user.
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
callback | function | invoked when dialog is submitted, includes an object containing the jql | ||||||||||||||||||||||||
options | Object | contains data to pre-fill the dialog with Properties
|
1 2var options = { jql: 'project = ACJS', header: 'My title', descriptionText: 'My custom description text for dialog', submitText: 'My submit label', cancelText: 'My cancel label' }; var callback = function(obj) { alert(obj.jql); }; AP.jira.showJQLEditor(options, callback);
Returns whether the addon is being shown within a native app on iOS, Android or Mac.
Name | Type | Description |
---|---|---|
callback | function | the callback that handles the response |
Rate this page: