Templates

Grouping items

Lists of work items can be grouped by almost any work item field.

Let's say we want to group all work items by priority in ascending order (priorities 1,2,3,4).

In the example below note that we first use the #group helper to yield a list of groups and then iterate over the groups using the #each helper.

When using custom fields make sure to use the fully qualified field name.

{{#group 'Priority' orderBy='Priority'}} 

{{#eachGroup}}

## Priority {{$key}}

{{#workItems}}
- {{{ field 'Title' }}}
{{/workItems}}

{{/eachGroup}}

{{/group}}

This will result in a document like this

Priority 1

  • Work item A
  • Work item B

Priority 2

  • Work item C
  • Work item D
Previous
Syntax reference