Get excpetion change status from Post Function



We need that when we change sub-task status, its Story status changes.

I wrote a post function (using  script runner) on a transition.

The story has validators on its transitions.

When I change sub-task's status and the validator blocks the change of the Story status (tried to be done by the post function), I get exception message.

The exception prevents the status change of the Sub-task itself too (I just need to display message but not to block the status change of the current issue (Sub-task)).

  1. I added try block surround the post function code, but It does not catch the exception
  2. The exception message is different from the message I get if I try to change the Story status manually.

In case the validators don't block the change of the Story, it works fine.


How can I handle the exception?

Is there other way to change status of related issue in case of status change (Sub-task -> Story, Story -> Epic)? a way that does not block the caller issue status and enable me to provide meaningful message.


Thanks in advance,


1 answer

There are two main issues:

  1. Action produces an exception which is not caught by try-catch block (in the code I do transition which is blocked by validator - it causes exception that is not caught, and stop everything - see the next point)
  2. The post function blocks the current action (what is expected from pre-function, not post function) - post function on sub-task transition => exception in the code stops the transition and the subtask left in the previous status.


We appreciate your help

Please advice

Nic Brough [Adaptavist]

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

992 views 5 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot