The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Cancelling action in scriprunner escallation service

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 Champions.
April 4, 2019

I have some conditions too complex to try to apply via JQL.

Is there some attribute I could set using the "Additional issue actions" code to cancel/prevent the action from occurring as expected?

Right now, I'm setting the action as "None" and I've completely coded my own action handling, but I'd prefer a simpler solution.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
April 4, 2019

No sooner asked then answered .... 

I had actually been thinking for a  few days about that, then realized that I could probably just throw an exception.

And yup, sure enough, that works

throw new Exception("Skipping this action")
0 votes
Ben Poulson
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 Champions.
April 5, 2019

Could just include something like 

return "Cancelling action"

Edit: Just saw that you answered it yourself- leaving my answer for anyone who will stumble across this thread in the future 

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 Champions.
April 5, 2019

I don't think this works:

2019-04-05 10_33_57-Escalation Services.png2019-04-05 10_35_22-Escalation Services.png

Ben Poulson
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 Champions.
April 5, 2019

Good call- I forgot that it only cancels out of the rest of the script, not the action (I pretty much only use escalation services for scripts). Your way is definitely better