Apps 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.
projectId - ID of the project the issue belongs to
changes - the list of issue changes
changeType - type of the change
commented - a new comment was added to the page
updated - the issue has been updated
atlassianId - ID of the user who made the change
Limitations
UI kit apps don't have an event system in place and so aren't supported.
There is a delay between the moment the issue is modified and when the event is emitted. It might take up to a few seconds.
We can't guarantee that all issue change events will be received by Jira. Therefore, the issue view may sometimes remain stale.
When the issue is modified by the user who is currently viewing it, it will not be refreshed. This is because we assume the change was made by that same user and there is no need for an update.
Description of the issue field. This will be displayed for the user under the field in the create or edit issue view.
Represents a string that can be resolved via a localization properties file. You can use the same i18n Property key
and value in multiple places if you like, but identical keys must have identical values.
Example
1
2
3
4
{
"value": "My text"
}
Properties
value
Type
Max length
1500
Required
Yes
Description
The human-readable default value. This will be used if no translation exists.
Only the following HTML tags are supported: b, i, strong, em, and code.
i18n
Type
Max length
300
Description
The localization key for the human-readable value.
Translations for the keys are defined at the top level of the
add-on descriptor.
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:
Will have a configuration page module with a URL of /plugins/servlet/ac/my-addon/configure-me.
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 i18n Property key
and value in multiple places if you like, but identical keys must have identical values.
Example
1
2
3
4
{
"value": "My text"
}
Properties
value
Type
Max length
1500
Required
Yes
Description
The human-readable default value. This will be used if no translation exists.
Only the following HTML tags are supported: b, i, strong, em, and code.
i18n
Type
Max length
300
Description
The localization key for the human-readable value.
Translations for the keys are defined at the top level of the
add-on descriptor.
type
Type
Required
Yes
Allowed values
string
STRING
text
TEXT
rich_text
RICH_TEXT
single_select
SINGLE_SELECT
multi_select
MULTI_SELECT
number
NUMBER
read_only
READ_ONLY
Description
The type of the field. The following types are available:
number Allows to set a number.
string Allows to set a string, supports exact matches in JQL.
text Allows to set a string, supports fuzzy search in JQL (with the "~" operator).
rich_text Allows to set multi-line text in Jira, and supports fuzzy search in JQL. Note: If you migrate from text to rich_text for an already existing field, the data won't be migrated.
single_select Allows to select one value from a predefined set. The Issue field options REST API can be user to manage available values.
multi_select Allows to select multiple values from a predefined set. The Issue field options REST API can be used to manage available values.
read_only Displays a given issue property, not editable by users.
extractions
Type
Description
Extractions used for JQL search. This is valid only when the type is single_select or multi_select.
property
Type
Description
The property that stores the field value.
Required when the type is read_only, otherwise not used.
Defines an issue property that will store the value for the issue field of the read_only type.
For instance, for JSON "{"label": {"color": "red", "text":"connect"}} the valid path
referencing the color is label.color.
type
Type
Required
Yes
Allowed values
number
NUMBER
string
STRING
date
DATE
Description
The type of the referenced value. It will affect how the value is interpreted and displayed,
and how the field behaves in JQL.
The type can be one of the following:
number, which is displayed as a number and allows the range ordering and searching on this field.
string, which supports a string, for example "example text", and a list of strings, for example ["example text1", "example text2"].
The string is displayed as is and enables a search for matching phrases. The list is displayed as comma-separated values and enables a search for matches to any phrase from the list.
date, which is displayed as a date with time and allows date-based searching.
The value is expected to be a date string in one of the following formats: