Skip to content

How to filter work items returned by type #1294

Answered by rfennell
oranjutanj asked this question in Q&A
Discussion options

You must be logged in to vote

You should be able to do it all within the template, no extra extension needed. Something like

|ID|Title|Type|State|Area Path|
|--|--|--|--|--|
{{#forEach this.workItems}} 
{{#if (eq (lookup this.fields 'System.WorkItemType') 'Bug')}}
| [**{{this.id}}**]({{lookup this._links.html 'href'}}) | {{lookup this.fields 'System.Title'}} | {{lookup this.fields 'System.WorkItemType'}} | {{lookup this.fields 'System.State'}} | {{lookup this.fields 'System.AreaPath'}} |
{{/if}}
{{/forEach}}

The comparison is done using one of the helper functions I include

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oranjutanj
Comment options

Answer selected by oranjutanj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment