This module adds a quick-add button alongside the existing quick-add buttons for attachments, subtasks, and linked issues in the new Jira issue view. Users will use your quick-add button to add content to help describe, and ultimately resolve, an issue.
When a user clicks on your app's quick-add button, a panel is added below the issue description that displays content from a URL provided by your app (similar to the web panel module). This URL must be a relative URL from your app's server.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
{
"modules": {
"jiraIssueContents": [
{
"icon": {
"width": 0,
"height": 0,
"url": "/my_icon.svg"
},
"target": {
"type": "web_panel",
"url": "/url_to_panel_content_page.htm"
},
"tooltip": {
"value": "This is a tooltip"
},
"contentPresentConditions": [
{
"condition": "user_is_admin",
"invert": false
}
],
"jiraNativeAppsEnabled": false,
"name": {
"value": "My Issue Content Panel"
},
"key": "my-issue-content-panel"
}
]
}
}
ISSUE_QUICK_ADD_CLICKED
eventWhen a user clicks your quick-add button, the ISSUE_QUICK_ADD_CLICKED
event is sent. You can listen for this event using the JavaScript API. Here's an example:
1 2 3 4 5 6 7 8 9 10 11 12
AP.events.on('ISSUE_QUICK_ADD_CLICKED', function(event){
// display a dialog when quick add button was clicked. event = { isNewToIssue: boolean }
// isNewToIssue is true if this is first time content panel being added to current issue.
// isNewToIssue is false if content panel is already on issue view, and it is selected.
AP.dialog.create({
key: 'sized-panel',
width: '500px',
height: '200px',
chrome: true,
header: JSON.stringify(event)
});
});
You can use this to design an experience where you want a user to input, select, or review information before interacting with your web panel.
Find out more about recommended usage and get user experience suggestions in the design guidelines.
ISSUE_CHANGED
eventApps can receive a frontend event notifying them that an issue changed, either by being updated or commented on. This event is only available for Jira issue view modules.
1 2 3
AP.events.on('ISSUE_CHANGED', function (data) {
console.log('ISSUE_CHANGED (Connect)', data);
});
However, if you have multiple issue view modules in your app, you should use the Jira issue view background script module. This will give you a central place for fetching issue details, thus reducing the number of network requests and improving the user experience. Fetching issue details separately for every module would introduce unnecessary overhead and degrade performance.
Data shape
1 2 3 4 5 6 7 8
{
"issueId": string,
"projectId": string,
"changes":[{
"changeType": "updated" | "commented",
"atlassianId": string
}]
}
Limitations
icon
Type | |
Required | Yes |
Description | Specifies an icon to show alongside the quick-add menu item. The icon should be 24x24 pixels or larger, preferably in .SVG format. Defines an icon to display. Example1 2 3 4 5 6 7 8
|
url |
| ||||||||
height |
| ||||||||
width |
|
key
Type | |
Max length | 100 |
Required | Yes |
Pattern | ^[a-zA-Z0-9-]+$ |
Description | A key to identify this module. This key must be unique relative to the add on, with the exception of Confluence macros: Their keys need to be globally unique. Keys must only contain alphanumeric characters and dashes. The key is used to generate the url to your add-on's module. The url is generated as a combination of your add-on key and module key. For example, an add-on which looks like: 1 2 3 4 5 6 7 8 9
Will have a configuration page module with a URL of |
name
Type | |
Required | Yes |
Description | A human readable name. Represents a string that can be resolved via a localization properties file. You can use the same Example1 2 3 4
|
value |
| ||||||||
i18n |
|
target
Type | |
Required | Yes |
Description | Specifies the target of this content as a result of clicking on the menu item. Currently, you can only display a web panel in the issue's content area. Read about Issue Page Target Web Panel. |
tooltip
Type | |
Required | Yes |
Description | Specifies a tooltip for the quick-add menu item. Represents a string that can be resolved via a localization properties file. You can use the same Example1 2 3 4
|
value |
| ||||||||
i18n |
|
conditions
Type | |
Description | Conditions can be added to display only when all the given conditions are true. |
contentPresentConditions
Type | |
Description | Specifies a list of Conditions that, when resolved to true, will force the content to always be displayed for that issue. Users have the ability to collapse the content if they don't want to see it. |
jiraNativeAppsEnabled
Type | |
Defaults to | false |
Description | This is coming soon. We will update the docs here with the minimum supported Jira iOS and Android app versions when it is ready. Specifies whether the issue content module will be shown in the Jira mobile and desktop clients. |
Rate this page: