External Assets issue panel

The External Assets issue panel Connect module allows apps to display information about assets that have been added to an issue on the issue. If you don’t understand how Connect modules work in Jira, read About Jira modules.

Each asset added to a Jira issue renders a separate panel. For example, if two assets have been added to a Jira issue then two panels are rendered, each displaying additional information for a different asset. These panels are rendered on the sidebar of the Jira issue view.

Linked assets are fetched from the configured external asset platform custom field(s).

The screenshot below shows the panel view for a Jira issue with a single asset added to it:

Added panel

Example

1
2
{
	...
	"modules": {
		"assetPanels": [{
			"key": "my-asset-panel",
			"url": "/asset-panel?appKey={asset.appKey}&originId={asset.originId}",
			"name": {
				"value": "My Asset Panel"
			}
		}]
	}
}

Properties

key

TypeString
RequiredYes
Pattern`^[a-zA-Z0-9-]+$`
Description A key to identify this module.
This key must be unique relative to the app, 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 app's module. The URL is generated as a combination of your app key and module key.

url

TypeString
RequiredYes
FormatURL
Description This is the URL that we will call to get the <iframe> element that we will display in asset panel.
You will receive several context parameters, see the example above for example usage and below for how to use in the JavaScript API
asset.appKey The appKey set on the asset being viewed
​asset.originId The originId of the asset being viewed
​asset.field.id The custom field id of the current external asset platform field. This is useful to generate JQL queries.
​asset.field.name The field name of the current external asset platform field
​asset.field.description The field description of the current external asset platform field

name

TypeObject
RequiredYes
Value Must match the schema { "value": string }
DescriptionThe name of the module, this could be any value that will be displayed to the user in their installed modules

Panel Resource

The typical usage pattern is:

  1. Accept the asset identifying information as URL parameters (as shown in the above example).
  2. Call to your own service to find more information about the asset.
  3. You can also call AP.request to fetch data from the External Assets Platform if needed.
1
2
// Call asset API to get asset details - this could be a call to your service.
// In this example, we do it on the front-end, but of course you could do it in the back-end as well!
AP.request('/rest/assetapi/asset/${appKey}/${originId}', {
   success: (response) => {
      // asset has been loaded, render the fields
   },
   error: (response) => {
      // handle error case
   }
});

Rate this page: