Want to add a condition on a trigger

Seb August 2, 2018

Hi,

Is it possible to add a condition on a trigger in a JIRA workflow?

My case:

In my workflow, I want to move from a status to another one when the user make a pull request (everything OK so far) but I want to do that only if my custom field is equal to a specific value (that I don't know how to do it)

As the documentation specify you can't use conditions and validator when using triggers and in the trigger window, I can't see anything about condition for trigger.

Someone has an idea?

 

thank you

1 answer

1 accepted

0 votes
Answer accepted
Mark Markov
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.
August 4, 2018

Hello @Seb

As documentation says  you cant use conditions and validators during trigger transition. Only possible workaroud that comes to my mind is to create fast track listener that will checks your condition and if not transition it back to source status.

Seb August 7, 2018

Hi Mark,

 

I tested it and it works with the fast-track.

I assumed that post-functions were not executed neither for triggers, but they are.

Thank you for your help 

Rowan van Rooij
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 8, 2019

@Mark Markov or @Seb 
I have this same issue, but I don't really understand the fast-track thing. I can't find it as a post-function? I'm on JIRA version 7.9.2.

I don't want the story to move from "In progress" to "Resolved" with the trigger I set-up from merging a pull request. But there are still sub-tasks open (the validator).

Any more detailed information the post function I should use?

Mark Markov
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.
July 11, 2019

Hello @Rowan van Rooij 

Fast-track transition it's Scriptrunner Plugin functionality

More detailed info here.

Rowan_van_Rooij
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 11, 2019

Ah, that's great! I got that one.

Now I only got to find the expression to test if the ticket has open subtasks. I know how to do that in JQL, but now how to do that in the expression for the plugin (is that groovy?)

Suggest an answer

Log in or Sign up to answer