Condition based fire event

Arpit Doshi April 17, 2014

In a JIRA workflow transition postfunction, I want to fire event based on condition.

for example, if Condition 'A' is true -> Fire event 'a' and if condition 'B' is true -> fire event 'b'.

6 answers

1 vote
Boris Georgiev _Appfire_
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 17, 2014

@Jamie Echlin has answered a simular question already here - https://answers.atlassian.com/questions/167757/groovy-sript-runner-multi-select-using-contains

1 vote
Boris Georgiev _Appfire_
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 17, 2014

Script runner has post-function which will fire event only if condition is true, so it might work for you

https://jamieechlin.atlassian.net/wiki/display/GRV/Script+Runner

https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner


JamieA
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 17, 2014

Yes... you would just use this post-function twice with different conditions, and firing different events.

Arpit Doshi April 20, 2014

Hi,

I simply used script from here with priority condition https://jamieechlin.atlassian.net/wiki/display/GRV/Post+Functions#PostFunctions-Firinganeventtobeprocessedbymaillistener

It doesn't work. We are using a instance which is pretty old version i.e 3.13. Will it work with this version ??

0 votes
Arpit Doshi April 20, 2014

Hi,

I simply used script from here with priority conditionhttps://jamieechlin.atlassian.net/wiki/display/GRV/Post+Functions#PostFunctions-Firinganeventtobeprocessedbymaillistener

It doesn't work. We are using a instance which is pretty old version i.e 3.13. Will it work with this version ??

JamieA
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 21, 2014

It should work but unless you can provide more information than "it doesn't work", ie log output, you are not going to get much help.

But personally, I would not fire up a 3.13 instance to try to debug this myself.

0 votes
Boris Georgiev _Appfire_
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 20, 2014
0 votes
Arpit Doshi April 20, 2014

Sorry, my mistake. I mean Cascade select list and not multiselect. I want to check for values in first list and second list seperately and based on that want to fire different events.

0 votes
Arpit Doshi April 17, 2014

Thanks. I have a custom field which is of type multiselect. How can I check condition for values of first select list and second select list in above example ?

Suggest an answer

Log in or Sign up to answer