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"
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.
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 jira.sh 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 jira.sh 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 jira.sh file or use the atlassian.sh file (atlassian distribution) that supports multiple adding more than one target systems. If you need further assistance, open a support issue - https://bobswift.atlassian.net/browse/JCLIP.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...
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!
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