We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I can't make {{#unless isLast}} work inside a nested foreach. Here is what I'm trying:
{ "release": "{{releaseDetails.releaseDefinition.name}}", "release_number": "{{releaseDetails.name}}", "date": "{{releaseDetails.modifiedOn}}", "workItems": [ {{#forEach this.workItems}} { "id": "{{this.id}}", "title": "{{lookup this.fields 'System.Title'}}", "type": "{{lookup this.fields 'System.WorkItemType'}}", "tags": "{{lookup this.fields 'System.Tags'}}", "pullRequests": [ {{#forEach this.relations}} {{#if (contains this.attributes.name 'Pull Request')}} {{#with (lookup_a_pullrequest ../../pullRequests this.url)}} { "id": "{{this.pullRequestId}}", "title": "{{this.title}}", "description": {{{json (lookup this 'description')}}}, "closedDate": "{{this.closedDate}}", "labels" : {{{json this.labels}}} }{{#unless ../../isLast}}, {{/unless}} {{/with}} {{/if}} {{/forEach}} ] }{{#unless isLast}}, {{/unless}} {{/forEach}} ] }
Ii believe it is only checking the outter forEach because the last WorkItem also does not have a comma. Am I doing something wrong ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I can't make {{#unless isLast}} work inside a nested foreach. Here is what I'm trying:
{ "release": "{{releaseDetails.releaseDefinition.name}}", "release_number": "{{releaseDetails.name}}", "date": "{{releaseDetails.modifiedOn}}", "workItems": [ {{#forEach this.workItems}} { "id": "{{this.id}}", "title": "{{lookup this.fields 'System.Title'}}", "type": "{{lookup this.fields 'System.WorkItemType'}}", "tags": "{{lookup this.fields 'System.Tags'}}", "pullRequests": [ {{#forEach this.relations}} {{#if (contains this.attributes.name 'Pull Request')}} {{#with (lookup_a_pullrequest ../../pullRequests this.url)}} { "id": "{{this.pullRequestId}}", "title": "{{this.title}}", "description": {{{json (lookup this 'description')}}}, "closedDate": "{{this.closedDate}}", "labels" : {{{json this.labels}}} }{{#unless ../../isLast}}, {{/unless}} {{/with}} {{/if}} {{/forEach}} ] }{{#unless isLast}}, {{/unless}} {{/forEach}} ] }
Ii believe it is only checking the outter forEach because the last WorkItem also does not have a comma. Am I doing something wrong ?
The text was updated successfully, but these errors were encountered: