I have added another new feature to my Cross Platform release note generator. Now, when using Handlebars based templates you can optionally get the parent or child work items for any work item associated with build/release

To enable the feature, as it is off by default, you need to set the  getParentsAndChildren: true parameter for the task, either in YAML or in the handlebars section of the configuration.

This will add an extra array that the template can access relatedWorkItems. This contains all the work items associated with the build/release plus their direct parents and children. This can then be accessed in the template

{{#forEach this.workItems}}

{{#if isFirst}}### WorkItems {{/if}}

\* \*\*{{this.id}}\*\*  {{lookup this.fields 'System.Title'}}

\- \*\*WIT\*\* {{lookup this.fields 'System.WorkItemType'}} 

\- \*\*Tags\*\* {{lookup this.fields 'System.Tags'}}

\- \*\*Assigned\*\* {{#with (lookup this.fields 'System.AssignedTo')}} {{displayName}} {{/with}}

\- \*\*Description\*\* {{{lookup this.fields 'System.Description'}}}

\- \*\*Parents\*\*

{{#forEach this.relations}}

{{#if (contains this.attributes.name 'Parent')}}

{{#with (lookup\_a\_work\_item ../../relatedWorkItems  this.url)}}

      - {{this.id}} - {{lookup this.fields 'System.Title'}} 

{{/with}}

{{/if}}

{{/forEach}} 

\- \*\*Children\*\*

{{#forEach this.relations}}

{{#if (contains this.attributes.name 'Child')}}

{{#with (lookup\_a\_work\_item ../../relatedWorkItems  this.url)}}

      - {{this.id}} - {{lookup this.fields 'System.Title'}} 

{{/with}}

{{/if}}

{{/forEach}} 

{{/forEach}} 

This is a complex way to present the extra work items, but very flexible.

Hope people find the new feature useful.