Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create automate workflow transitions for ScriptRunner / Test Management for JIRA?

Phil April 25, 2019
  • Jira v8.0.1
  • ScriptRunner 5.5.3.1-jira8 
  • Test Management for JIRA 6.2.0

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?

螢幕截圖 2019-04-25 13.06.57.png

1 answer

1 accepted

0 votes
Answer accepted
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 26, 2019

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.

Phil April 29, 2019

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.

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 29, 2019

That is correct. At least for now. I know this is an area that they are working on.

Like Phil likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events