CLI - transition a linked issue (using a dynamic issue key)

Peter Bengov Community Champion Jun 21, 2015

Hey guys,

I'm using the Run CLI Actions in JIRA and would like to create a Post Function that uses CLI to transition a linked issue. I can't use the static issue key like in examples (--issue "ZLINKS-1").

Is there a way to do this dynamically? Maybe something like:

--action transitionIssue --issue "%linkIssue%" --transition "Start Progress"



1 answer

1 accepted

Yes, it has to be an issue key available from a substitution variable. In your case with linked issues, I recommend making a JQL search the retrieves the issues that need to be transitioned. For instances, use the linkedIssues() jql function (or similar ones available from add-ons). Put this on the jql parameter of on the runFromIssueList action with the transitionIssue action as the common action. This will run the transition for each issue returned.

If the issues being transitioned are on the local JIRA instance, you could also use the JQL support available on the Transition issues post function from Update on Transition for JIRA. Multiple issues are handled using jql_result_list in the Multiple issues field as described in: How to update multiple issues.

Peter Bengov Community Champion Jun 21, 2015

Thanks for the quick reply, Bob. I want to set this to work on a remote system, is there something special that should be set to make this happen? In my Action section, the --server is set to my remote instance (and it is configured as well in my file). The use case is: query via JQL, like you've explained, if there is a issue link to a remote system and then transition that remote system link (not the local issue). Summary of what I have: JQL query: issue in linkedIssues(%original_key%,"is cloned by") Product: JIRA Action: --action run --common "--project %project%" --server <remote system> --user <username> --password >password> Data: --action runFromIssueList --common "--action transitionIssue --issue %jql_result_1% --transition ""Start Progress"" " Also, how can I set both a remote and local instance? Currently is set to remote system and works good (can create issues into it), but I'd like to do some local functions too.

1. So are you saying in doesn't work as you have configured it? If so, look in your application server log for errors. 2. If you have more than one system to do the action on, then create another post function. Similarly, on the command line, you either need another customize file or use the file (atlassian distribution) that supports multiple adding more than one target systems. If you need further assistance, open a support issue -

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,230 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you