Hi ,
I have a custom listener while is doing some action. But I want to this to run only on a particular transition of a status.
Is there any way I can define as such. I am using All Issue events now which is not working
Firing a custom event from a listener is already a built in feature.
you can try
https://confluence.atlassian.com/adminjiraserver071/adding-a-custom-event-802592793.html#Addingacustomevent-addcustomeventAddingacustomevent
Go the Script Listeners page {baseurl}/plugins/servlet/scriptrunner/admin/listeners and click "Fire an event when condition is true."
HI @Sid
I have already a Generic event to be fired.
My problem is that my listener is being called on any transition for a status. So I wanted to restrict it
Hi @Vineela Durbha, you can create a new Event in the administration event page, add it to the transition you want instead of "Generic event", and in your listener, search for that event and add it.
That should do the work.
Regards.
Hello @Vineela Durbha
Just to add to the answers already provided, if you add a new custom event and fire that event in the post-function of your transition. Then you might have a hard time trying to find the new event in the list of events in the Script runner's listener section
Please see the open issues
https://community.atlassian.com/t5/Marketplace-Apps-questions/Custom-event-missing-from-Events/qaq-p/701208
https://community.atlassian.com/t5/Adaptavist-questions/Custom-Event-not-showing-up-in-Script-Runner-Listener/qaq-p/914453
Sometimes the instance needs to be restarted and re-indexed for the new event to be available in the event list in the custom listener.
Hi @Alejandro Suárez García
May be I confused you guys with my question.
Actually I am trying to run this only for a transition name.
Lets say I have a status called "Created" and I have "Update","Reject" transitions on that status, I wanted to run it only for Update not for Reject.
I have added "All Issue Events" under my listener
It looks like you're new here. Sign in or register to get started.