I want to run a post function when the update button available on an issue is pressed. How do I do that? I am not finding a way to do it. is there any way I could do it? I am already having the script running in the script runner console but do not know where to put that script.
Thanks
here are the steps I will be taking
Hi @Jamshaid ,
A postfunction would be running when you do a state transition. Since you are doing an "update" and not a state transition you can use "Script Listeners"
There you can define on what event it needs to fire the script. For you that would be the "issue updated" event. (and fine tuned with a JQL so it doesn't fire each time)
thanks @Dirk Ronsmans for the answer. Could you please show me a bit detailed sequence about how do i get there where you are mentioning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find the script listeners (you mentioned you have the scriptrunner console so I assume you have scriptrunner installed) in the options of scriptrunner.
When you go to Apps - Scriptrunner for JIRA you can see the Script Listeners:
or you can go to:
https://[yourenvironmentname].atlassian.net/plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/script-events-admin?s=com.onresolve.jira.groovy.groovyrunner__script-events-admin
There you can add a new listener
On that listener you can specify when it needs to run
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks a lot. I have got it working now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.