Retrieve the assets of an issue in Jira cloud

Use case

In this use case we will get the assets (formerly insight objects) of a Jira Cloud issue and write the respective object labels to a custom text field.

Prerequisites

For this use case we need a custom action for executing the get assets operation. It should be executed for a Jira Cloud instance.

Create a connection

Configure the connection either inside the post function configuration or using the Remote actions page in the Manage apps administration by setting the following input.

Name

Atlassian API

Connection type

Choose External.

Base URL

https://api.atlassian.com

Authentication

Choose Basic authentication and provide an email as the username and an API token as password.

Create an action

Create the action either inside the post function configuration or using the Remote actions page in the Manage apps administration by setting the following input.

Name

Get assets

Method

Choose GET.

Default connection

Choose Atlassian API.

REST path

/jsm/assets/workspace/{workspaceId}/v1/aql/objects?{qlQuery}

The values used below are created for the example only. Please provide real input from your instance for making the use case realistic.

Parameters

workspaceId
The workspaceId is used to identify your individual instance of Insight. It is retrieved through the following endpoint: https://SITE_NAME.atlassian.net/rest/servicedeskapi/insight/workspace.
qlQuery
The qlQuery parameter holds an AQL (Asset Query Language) expression and determines which objects should be fetched. For the sake of the example we set the issue key as ISSUE-1.

object HAVING connectedTickets(key = ISSUE-1)

🛠️ Configuration

Add the Execute remote action post function to the desired transition or create a new transition and choose the Expert mode.

Select action

Choose the previous created action which we named Get assets.

Select connection

It is automatically preselected with the default connection value of the selected action.

Update issue fields (optional)

Other default options like Response body, Response status or Set field value manually are available in any mode in the post function.

Select the field to be set.

Choose the text custom field to hold the object entry labels.

Set the value manually by using the following parser expression:

%{action.response.objectEntries[*].label}

This parser expression uses the field code Action response details and JMESPath in order to get the information from the response.

Use case Workflow function
Get attributes of Assets objects

Execute remote action

Create Confluence page with links to issues

Execute remote action

Automatically log work on a Jira issue

Execute remote action

Create an overview page for a software release

Execute remote action

Clone issue in external instance

Execute remote action

Create a component to group issues related to UI design

Execute remote action

Notify the reporter of an issue about its status by a Telegram message

Execute remote action

Set the assignee of an external issue same as the transitioned issue

Execute remote action

Transition an external Jira ticket based on the linked internal one

Execute remote action

Create a comment on an external Jira ticket

Execute remote action

Automatically link an issue to an external one

Execute remote action

Create a personal space for a new employee

Execute remote action

Get Hubspot contact information

Execute remote action

Link a Jira issue with the corresponding release ticket

Execute remote action

Get Checklist

Execute remote action

Create a new employee account during an onboarding process

Execute remote action

Read the information from a Trello card

Execute remote action

Set Checklist

Execute remote action

Create an external project for a new employee during an onboarding process

Execute remote action

Automatically create a version when starting the release

Execute remote action

Translate the description

Execute remote action

Retrieve the assets of an issue in Jira cloud

Execute remote action