Conditional syntax for custom fields #970
-
Hi. I created a custom field and would like to filter the work items by it. Can you help me with the If syntax? I tried the following, but got an error. {{#forEach workItems}} {{#if {{lookup this.fields 'Custom.AddtoReleaseNotes'}} == true}} ##{{this.id}} {{lookup this.fields 'System.Title'}} Type: {{lookup this.fields 'System.WorkItemType'}} {{{lookup this.fields 'Custom.AddtoReleaseNotes'}}} {{/if}} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't think there is an out the box string comparator in Handlebars see this post So, off the top of my head, you can use something like the following using one of the handlebar helpers
This is based on a past issue #710 and I know it works (though that was comparing tag fields, it is the same ide) I am sure you could swap the
for
But I have not tested that |
Beta Was this translation helpful? Give feedback.
I don't think there is an out the box string comparator in Handlebars see this post
So, off the top of my head, you can use something like the following using one of the handlebar helpers
This is based on a past issue #710 and I know it works (though that was comparing tag field…