Rate this page:

Issue Glance

This module adds a special user interface element that appears in the right side of the new Jira issue view under the status and alongside other fields like the assignee, priority, and labels.

Glances provide a quick way for a user to get an overview of some information, provided by your app, that relates to an issue.

The Glance object (which includes your icon, content and URL) is defined using the Issue Glance module.

Setting the status for a Glance

The status of a Glance for a specific an issue can be set using the Set issue property API.

The issue property key needs to be formatted as com.atlassian.jira.issue:[addonKey]:[moduleKey]:status to set the status.

The JSON in your PUT request to set the status should follow this format depending on the type of status you wish you display:

More recommended usage and user experience suggestions are available in the design guidelines.

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
{
  "modules": {
    "jiraIssueGlances": [
      {
        "icon": {
          "width": 0,
          "height": 0,
          "url": "my_icon.svg"
        },
        "content": {
          "type": "label",
          "label": {
            "value": "my label"
          }
        },
        "target": {
          "type": "web_panel",
          "url": "/panel_url"
        },
        "jiraNativeAppsEnabled": false,
        "name": {
          "value": "My Issue Glance "
        },
        "key": "my-issue-glance"
      }
    ]
  }
}

ISSUE_GLANCE_OPENED event

When a user clicks a glance, the glance panel slides in and covers the details on the right side of the issue. The ISSUE_GLANCE_OPENED event is sent. which you can listen for using the JavaScript API. See the example provided below.

1
2
3
AP.events.on('ISSUE_GLANCE_OPENED', function() {
        // You can decide the logic here in add-on.
  });

You can use this to load additional web resource or trigger activity in your add-on.

More recommended usage and user experience suggestions are available in the design guidelines.

Properties

content
Type
Required
Yes
Description

This content becomes the label next to the icon. It's handy for communicating a small amount of information.

Read about Issue Glance Content Label.


icon
Type
Required
Yes
Description

Specifies an icon to display at the left of the glance view control. The icon resource provided in this field should be 24x24 pixels or larger, preferably in SVG format.

Defines an icon to display.

Example

1
2
3
4
5
6
7
8
{
  "icon": {
    "width": 16,
    "height": 16,
    "url": "/my-icon.png"
  }
}

Properties

url
Type
Format
uri
Required
Yes
Description

The URL of the icon. Your icon needs to be hosted remotely at a web-accessible location. You can specify the URL as an absolute URL or relative to the add-on's base URL.

height
Type
Description

The height in pixels of the icon image.

width
Type
Description

The width in pixels of the icon image.


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
{
    "key": "my-addon",
    "modules": {
        "configurePage": {
            "key": "configure-me",
        }
    }
}

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.


target
Type
Required
Yes
Description

Specifies the target action when clicking on the glance.

Read about Issue Glance Target Web Panel.


conditions
Type
Description

Conditions can be added to display only when all the given conditions are true.


jiraNativeAppsEnabled
Type
Defaults to
false
Description

Specifies whether the issue glance will be shown in the Jira mobile and desktop clients.

The issue glance will be shown in Jira for iOS/Mac version 109 or later and Jira for Android version 55 or later.

Read about enabling your addon for the Jira mobile and desktop clients.


Rate this page: