Scriptrunner - How to associate a script when an issue transitions from one state to other?

I want to fire a custom script when issue changes its state from say "to-do" to "in process".

I am able to create a new event listener, and fire that script on issue"create" event, but not on above event, the way I want it.

I tried adding custom events, but was not able to do so properly either :(

Is there a tutorial or documentation that I am not able to search, on how to do this?

1 answer

This widget could not be displayed.

Hey Madhura,

It sounds like to me that a custom workflow function would work best for you. We have some information on those in our documentation here. Specifically, I think that you'd be best off using a scripted custom post-function. I'll give you a quick rundown of the process:

  • Edit desired workflow
  • Click to diagram view (not necessary but helps with visualization)
  • Click on the transition that you would like to add the post function to
  • A pop-up menu will appear to the right side of the screen. Click the 'post-function' link.
  • Then choose to add a new post function.
  • From here you select a scripted post-function and then you are able to choose from a selection of built-in functions or to make a custom one.
  • After adding the function, ensure that it is appropriately placed in the order of execution and publish your workflow.

Another possibility would be to create a listener that fires on a Generic Event and then check to see if the status was changed and what it was changed to etc... However, the first option I provided is the most straight-forward.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

529 views 3 19
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