Replies: 1 comment 2 replies
-
You use the {{#if isFirst}} construct inside the loop e.g {{#forEach pullRequests}}
{{/forEach}} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I got most of this working
{{#each_with_sort_by_field this.workItems "Custom.ReleaseNotesSection"}}
{{lookup this.fields 'Custom.ReleaseNotesSection'}}
{{this.id}} {{lookup this.fields 'Custom.ReleaseNotesTitle'}} :{{{lookup this.fields 'Custom.ReleaseNotes'}}}
{{/each_with_sort_by_field}}
So this gets all work items sorted by Custom.ReleaseNotesSection
So should be like
AP
Bug 1
Bug 2
Bug 2
AR
Bug 4
Bug 5
Problem is I'm getting this:
AP
Bug 1
AP
Bug 2
AP
Bug 2
AR
Bug 4
AR
Bug 5
I only need the heading the first time it occurs. normally I'd do something like store the current heading and then have an if clause that only displays it if it's different OR nested loops, get all work items sorted and if first then have another loop where ReleaseNotesSection is same as current heading
Anyone got any ideas how to do this with handlebars
Beta Was this translation helpful? Give feedback.
All reactions