• About Jira Service Management modules
  • Admin Page
  • Administration UI locations
  • Agent view
  • Automation action
  • Build
  • Customer portal
  • Dashboard Item
  • Deployment
  • Deployment gating
  • Development Tool
  • Dialog
  • Entity Property
  • Feature Flag
  • Global Permission
  • Home container
  • Issue Background Script
  • Issue Content
  • Issue Field
  • Issue Glance
  • Issue view UI locations
  • Keyboard Shortcut
  • Page
  • Portal icon
  • Project Admin Tab Panel
  • Project Page
  • Project Permission
  • Project settings UI locations
  • Project sidebar
  • Remote Link
  • Report
  • Request create property panel
  • Search Request View
  • Tab Panel
  • Time Tracking Provider
  • User profile menu
  • Web Item
  • Web Panel
  • Web Section
  • Web item target
  • Webhook
  • Workflow Condition
  • Workflow Post Function
  • Workflow Validator

Issue Background Script

This module lets your app render a hidden panel in the new issue view in order to listen for events, poll for changes, or otherwise run code that consumes the JavaScript API. This allows your app to execute its required functionality without adding unnecessary UI elements to the issue view.

The hidden panel behaves similarly to the web panel module in that it can reload on issue status transition and issue refresh depending on the value you assign to the shouldReloadOnRefresh property.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
  "modules": {
    "jiraBackgroundScripts": [
      {
        "url": "/issue-background-task-script",
        "location": {
          "type": "issue_view",
          "shouldReloadOnRefresh": true
        },
        "key": "my-issue-background-script"
      }
    ]
  }
}

Properties

key

Type
string
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
{
    "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.


location

Type
object
Required
Yes
Description

Specifies where the background script will be located inside Jira, and any location-specific configuration. Currently, a background script can only be located in the new issue view and on the dashboards.

Read about Issue Background Script Location.


url

Type
string
Format
uri-template
Required
Yes
Description

The URL of the app resource that serves the iframe containing the background script. As with other app iframes, the iframe must load all.js. This URL does not support context parameters. This URL must be relative to the app's baseUrl.


  • System status
  • Privacy
  • Developer Terms
  • Trademark
  • Cookie Preferences
  • © 2019 Atlassian