Dashboard and Gadgets
Enterprise Jira users often need to automatically generate dashboards with gadgets to provide a consistent management-level overview of progress. These could be created either on demand or automatically in response to version or project-created events.
Some gadgets take a JQL string, but others require a saved filter, so you may also need to generate one or more saved filters at the same time as creating a dashboard. Take care that you share both the dashboard and any dependent saved filters with your target users—in the example, we share it globally.
The secret to perfecting this is (as always) to start small and work with a simple script in the Script Console. Once that's working, you can wire it to events such as version created/resolved, etc., using a Script Listener.