On this page

Use case

In this use case we will automatically set the assignee of the external issue by putting the same value as in the transitioned issue. Afterwards, we set the description of the issue to the status of the operation response.

Prerequisites

For this use case we need a Connection communicating to the external Jira instance and an Action for executing the update Jira issue operation.

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

External Jira instance

Connection type

Choose External.

Base URL

http://JIRA_BASE_URL

Authentication

Choose Basic.

In a Jira Cloud instance the username is set using the email of the user you want to be authenticated with. The password is an API token.

The following example considers connecting with a Jira on-prem instance. The input is for the sake of the use-case. Please make sure to use realistic data of an existing user.

Set username.

admin

Set password.

admin_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

Update issue

Method

Choose PUT.

Default connection

Choose External Jira instance.

REST path


/rest/api/2/issue/{issueKey}


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

Parameters

issueKey

It is the key or ID of the issue in the external Jira instance we want to update. Since there is no automatic way of grabbing the external linked issues we will set it manually as ISSUE-1. 

ISSUE-1

Action body

This is the JSON body required for executing the REST call. We use a field code to get the current assignee.

The body data differs based on the platform (cloud or on-prem).

In case of communicating to an external Jira on-prem instance, you should provide the data as follows:

{"update": {
        "assignee": [
            {
                "set": {
                "name": "%{issue.assignee}"
                }
            }
        ]
     }
 }

In case of communicating to an external Jira Cloud instance, you should provide the data as follows: 

{"update": {
        "assignee": [
            {
                "set": {
                "accountId": "%{issue.assignee}"
                }
            }
        ]
     }
 }

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 Update issue.

Select connection

The default connection of the selected action should be preselected, which is the External Jira instance.

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 Description.

Set the value.

Choose Response status.






Related use cases


If you still have questions, feel free to refer to our support team.