AzurePipelines icon indicating copy to clipboard operation
AzurePipelines copied to clipboard

Handle empty fields

Open Froostx opened this issue 3 years ago • 0 comments

I want to handle my #if that recognizes when a custom field is empty. I found in the plugin source code that there is a helper called "isEmpty", but I can't get it to work.

Here is my template:

{{#return_parents_only this.workItems this.relatedWorkItems}}
{{#if (or (contains (lookup this.fields 'System.WorkItemType') 'User Story') (contains (lookup this.fields 'System.WorkItemType') 'Feature'))}}
{{#if (isEmpty (lookup this.fields 'Custom.ReleaseNotes'))}}
emtpy
{{else}}
{{#with fields}}
* **{{{get 'System.Title' this}}}:** {{{sanitize (get 'Custom.ReleaseNotes' this)}}}
{{/with}}
{{/if}}
{{/if}}
{{/return_parents_only}}

Any ideas will be very helpful :) thx

Froostx avatar Sep 26 '22 00:09 Froostx