So I'm trying to automate workflow transitions depending on if tests pass/fail in Test Management for JIRA. I'm reading the ScriptRunner docs on Test Management for JIRA. The link is as follows "JQL query that fails if the issue has any outstanding non-passing tests"
I browse the different scripts available and the first one I see that relates to anything in the doc is 'Fast-track transition an issue'. The screenshot provided in the documentation doesn't match what I actually see when I click through to it (so I don't know if I'm in the wrong place!). Can someone help show me how to actually try this out?
For workflow options, you'll want to go to your workflow editor.
Find the transition that you want to have special automation then depending on what you are trying to do, go to either the condition, validators or postfunctions.
Then click the add button. In the list, you will see 1 item that says scriptrunner.
When you select that and go to the next screen, you will see all the options you saw in the documentation.
Now, all that said ... if you want to automatically transition an issue after a test has been executed in the Test Management, that's not currently possible. The test management doesn't generate any system event that scriptrunner can be made aware of to trigger the transition.
If there was a "test passed" event in the dropdown from your screenshot, then the Fast Track transition listener would be the place to go. But that's not yet the case.
Then told me at Summit 2 weeks ago that this is somewhere on the roadmap.
In the meantime, you either have to trigger manually and show/hide transition buttons using the link you included. Or have a complex script that runs at some interval, find all the issues with tests that are passed or failed that are in a given status and trigger the transition. But that's fairly advanced scripting.
Thanks for your reply Peter. You mentioned that there is no way to listen to test pass/fail events, if that is the case then it sounds like the tool may not work for what we want to achieve.
Am I right in saying that whatever I do in Test Management, it will have to be separate to JIRA? It sounds like I have to potentially manage two tools individually - manually transitioning JIRA issues and also checking Test Management each time to see the progress.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is correct. At least for now. I know this is an area that they are working on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.