Rate this page:
The jira:issueViewBackgroundScript
module adds an invisible container to the
Issue view page.
This makes it the perfect candidate for:
Because modules might be rendered in a different order, you should handle both scenarios.
Use the events API for communication between an issue view background script and an issue panel.
Issue view background script:
1 2import { events } from '@forge/bridge'; // Emit the data to an already rendered issue panel events.emit('app.data-change', 'initial-data'); // Listen to data change requests from issue panels events.on('app.request-data', (payload) => { events.emit('app.data-change', 'initial-or-changed-data'); });
Issue panel:
1 2import { events } from '@forge/bridge'; // Request data in case the background script is already rendered events.emit('app.request-data'); // Listen to data change events.on('app.data-change', (payload) => { console.log('The data has changed:', payload) });
Property | Type | Required | Description |
---|---|---|---|
key |
| Yes | A key for the module, which other modules can refer to. Must be unique within the manifest.
Regex: |
resource | string | The issue view background script module requires a resource when building with custom UI. | A reference to the static resources entry that the issue view background script will render. See resources for more details. |
resolver | { function: string } | Contains a function property, which references the function module that defines the configuration of resource . Can only be set if the module is using the resource property. |
Property | Type | Description |
---|---|---|
type | string | The type of the module. |
issue:id | string | The ID of the issue on which the module is rendered. |
issue:key | string | The key of the issue on which the module is rendered. |
issue:type | string | The type of the issue on which the module is rendered. |
issue:typeId | string | The ID of the type of the issue on which the module is rendered. |
project:id | string | The ID of the project where the module is rendered. |
project:key | string | The key of the project where the module is rendered. |
project:type | string | The type of the project where the module is rendered. |
Rate this page: