How to update an issue in one JIRA instance using CLI when a transition occurs in another

Overview

There will be a scenario where you want to update an issue in one JIRA instance while transitioning a different issue in a different JIRA instance. You can achieve this, using Run CLI. 

Step-by-step guide

By adding the CLI action post function to the intended workflow, you can update the issue on the target instance while transitioning from one state to the other.


Detailed steps Description
1

Login as JIRA Admin and click  > Issues.

2Under the Workflows section, select the intended workflow and click the Edit link.

3

Select the transition during which you want to create the issues. Select the Post Functions option.

4

Click Add post function.

5Select CLI action from the available options.

6

Add this CLI action.



Action:

--action run --common "--project TEST" --server "http://XXXX.com" --user XXXX --password XXXX

Data:
 -a updateIssue --issue %original_key% --type "%issueType%" --summary "%summary%" --priority %priority


7Clic Add to add the values.
8Click Publish.


Before implementing the functionality in the production environment, ensure the mentioned post function is tested in your non-production environment.