Sort a structure manually, or by using an expression to sort by assignee and key.
Remove manual sorting if not required. Customise sorting by editing the expression.
By default the generator sorts on all levels but can be configured to sort on a single level.
The script is compatible with Structure for Jira 4.1 +.
Remember: This script requires Structure for Jira by ALM Works.