ScriptRunner is an app by Adaptavist which allows the use of Groovy scripts to automate workflows, update fields and perform other actions in Jira. It also allows users to expand functionality of other apps–including Structure--using their APIs.
In the following pages, we have assembled some popular use-cases of Structure and ScriptRunner working together, along with links to the appropriate scripts in the Adaptavist Library.
- Creating (multiple) New Structures Programmatically
- Creating Generators with ScriptRunner - This script can be used to create new generators in a structure.
Updating a field (ex. label) when checking all issues against a JQL query - This script will update a field (in this case Labels) for all issues that pass a certain JQL query.
- Automatically Remove Issues Based on JQL Query - This script will remove issues that do not satisfy a certain JQL query from a specific manually-built structure.
- Show All Structure Boards and Corresponding Item Counts - This script will show you the list of structures which exist in the instance and how many items were added to them manually. The result will be shown below the console.
- Bulk Change Owners of Structures and Generators - This script will bulk change the owner of structures from one user to another. This can be useful when one user account is being archived/removed and their structures need to be preserved.
- Show work logged per user and issue for a structure - This script will create a table showing users, each issue they logged work on and how many hours were logged for each particular issue.