Group by area path and work item type
Given a list of user stories we group stories by area path and then by work item type.
Open in playgroundTemplate
Given the following template
{{#group 'AreaPath' orderBy='$key'}} {{#each groups}} ## Area Path: {{$key}} {{#group 'WorkItemType'}} {{#each groups}} ### Type: {{$key}} {{#workItems orderBy='Title'}} - {{{ field 'Title' }}} {{/workItems}} {{/each}} {{/group}} {{/each}} {{/group}}
Work items
Given these work items were added
Id | Title | AreaPath | WorkItemType | |
---|---|---|---|---|
1 | Item 1 | Backend | User Story | |
2 | Item 2 | Frontend | User Story | |
3 | Item 3 | Frontend | Bug |
Result
Bravo Notes generates the document like this:
Area Path: Backend
Type: User Story
- Item 1
Area Path: Frontend
Type: User Story
- Item 2
Type: Bug
- Item 3