New features for my Azure DevOps Release Notes Extension
Over the past couple of weeks, I have shipped three user-requested features for my Azure DevOps Release Notes Extension
Generate multiple documents in a single run
You can now specify multiple templates and output files. This allows a single instance of the task to generate multiple release note documents with different formats/content.
This is useful when the generation of the dataset is slow, but you need a variety of document formats for different consumers.
To use this feature you just need to specify comma-separated template and output file names.
1 - task: XplatGenerateReleaseNotes@3
2 displayName: 'Release notes with multiple templates'
3 inputs:
4 templatefile: '$(System.DefaultWorkingDirectory)/template1.md,$(System.DefaultWorkingDirectory)/template2.md'
5 outputfile: '$(System.DefaultWorkingDirectory)/out1.md, $(System.DefaultWorkingDirectory)/out2.md'
6 outputVariableName: 'outputvar'
7 templateLocation: 'File'
Notes
- The number of template and output files listed must match.
- The pipeline output variable is set to the contents generated from the first template listed
Select Work Items using a query
There is now a new parameter where you can provide the WHERE part of a WIQL query. This allows work items to be returned completely separately to the current build/release based on the query.
1 - task: richardfennellBM.BM-VSTS-XplatGenerateReleaseNotes-DEV1.XplatGenerate-Release-Notes.XplatGenerateReleaseNotes@3
2 inputs:
3 wiqlWhereClause: '[System.TeamProject] = "MyProject" and [System.WorkItemType] = "Product Backlog Item"'
Notes
- You cannot use
@project
,@currentiteration
or@me
variables in the WHERE clause, but@today
is ok. - To work out the WHERE clause I recommend using the WIQL Editor extension
The results of this WIQL are available in a new independent Handlebars template array queryWorkItems
. By independent I mean it is completely separate from all the other WI arrays generated from build associations.
This array can be used in the same way as the other work items arrays
1# WIQL list of WI ({{queryWorkItems.length}})
2{{#forEach queryWorkItems}}
3 * **{{this.id}}** {{lookup this.fields 'System.Title'}}
4{{/forEach}}
Manually associated Work Items
It has recently been found that if you manually associate work items with a build, that these work items are not listed using the API calls my task previously used. Hence, they don't appear in release notes.
If you have this form of association there is now a new option to enable them to be detected. To enable it use the new parameter checkForManuallyLinkedWI
1 - task: XplatGenerateReleaseNotes@3
2 displayName: 'Release notes with multiple templates'
3 inputs:
4 checkForManuallyLinkedWI: true
If this parameter is set to true, extra calls will be made to add these WI into the main work item array.