On this page



Use case

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

Two issues in different instances can be linked if those instances are connected using App links.


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.


Configure the connection either inside the post function configuration using the by setting the following input.


Name

External Jira instance


Connection type

Choose External.


Base URL

http://JIRA_BASE_URL



Authentication

Choose Basic.

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

The following example considers connecting with an on-prem Jira 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 the action either inside the post function configuration or using the Remote actions (JWT) admin page (the link can be found in the Apps Menu)  by setting the following input:


Name

Update issue


Method

Choose PUT.


Default connection

Choose External Jira instance.


REST path


/rest/api/2/issue/{issueIdOrKey}



Parameters

issueIdOrKey

It is the key or ID of the issue in the external Jira instance we want to update. In this case we consider it to be the first linked issue.

toString(nthElement(linkedIssues(), 1))



Body data

It is the Action body required for making the REST call.

The body data deferes based on the platform (cloud or on-prem). In any case, the provided input is for the sake of the use-case. Please make sure to use realistic data of an existing user in the external instance.

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

{"update": {
        "assignee": [
            {
                "set": {
                "id": "USER_ID",
                "displayName":"USER_DISPLAY_NAME",
                "name": "USER_NAME"
                }
            }
        ]
     }
 }

In case of communicating to a cloud external Jira instance you should provided 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.


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.


Storing results


Select the field to be set.

Choose New comment.


Set the value.

Choose Response status.










Related use cases




JWT feature

Workflow function

Execute remote action

Label





Status
Tech review

Style guide