Newly created events will not show up in the Script Listener Event drop down field until you restart JIRA. After restarting they appear.
Steps to Reproduce:
- Go to 'Events' and create a new event.
- Go to Script Listeners and look for your event in the Events field, it doesn't show up.
- Restart JIRA and try to make a listener again, the event will be there.
(NB. Contrast this with the 'Generate events' built-in script, whose drop-down of events appears always to be fully in-sync with JIRA.)
Currently it is not possible to have ScriptRunner functions listen for custom events in Jira Cloud as Atlassian only allow cloud app developers to listen for and respond to system events.