Group by sprint (iteration path)
Given a list of user stories we group stories by sprint (iteration path)
Open in playgroundTemplate
Given the following template
{{#group 'IterationPath' orderBy='$key'}} {{#each groups}} ## Sprint: {{iterationPath $key display='last' }} {{#workItems orderBy='Title'}} - {{{ field 'WorkItemType' }}} {{{ field 'Title' }}} {{/workItems}} {{/each}} {{/group}}
Work items
Given these work items were added
Id | Title | IterationPath | WorkItemType | |
---|---|---|---|---|
1 | Item 1 | Team Alpha\Sprint 36 | User Story | |
2 | Item 2 | Team Alpha\Sprint 37 | User Story | |
3 | Item 3 | Team Alpha\Sprint 37 | Bug |
Result
Bravo Notes generates the document like this:
Sprint: Sprint 36
- User Story Item 1
Sprint: Sprint 37
- User Story Item 2
- Bug Item 3