Generate Events

Use the Generate Events built-in script to force ScriptRunner to fire an event to be consumed by a listener.

For example, you have set up automation to improve your service desk process using a listener. This listener consumes all subsequent new Issue Created events, but does not take into account issues created before automation. You want all issues to be aligned, and for all existing issues to go through the new automation process. Use Generate Events to fire an Issue Created event for existing issues, allowing them to be picked up by the listener and passed through automation.

  1. From ScriptRunner, navigate to the Built-in Scripts tab and click Generate Events.

  2. In Event, select the event you want ScriptRunner to fire. For example, if the listener you are trying to activate is listening for an Issue Created event, select the Issue Created option.

  3. Enter a Filter ID. All issues affected will have an event generated.

    OR

  4. Enter a Project ID. All issues in this project have an event generated.

    Only saved JQL filters show up in Filter ID. For more information on how to create and save custom filters, see Saving Your Search as a Filter.

  5. Click Run to fire the selected event for all issues returned by the set filters. The number of issues affected displays under Results.