Hello all,
I’d like to propose a small automation of the way we list upgrades in release notes.
How we do currently
In a release note (e.g., 16.3.0-rc-1 release note), the Upgrades
section is maintained manually and is a list of ${dependencyName} ${dependencyVersion}
items, wrapping in links to the correspinding jira issues.
For instance:
The sources being:
* [[dompurify 3.1.0>>https://jira.xwiki.org/browse/XWIKI-22014]]
* [[guava 33.1.0-jre>>https://jira.xwiki.org/browse/XCOMMONS-2973]]
* [[plexus archiver 4.9.2>>https://jira.xwiki.org/browse/XCOMMONS-2971]]
And each listed issue has a Documentation in Release Notes:
filled with a link to the HUpgrades
anchor of the release note
Proposal
Option 1: using the Jira macro
Replace the manually maintained list of issues with a jira macro.
Example for the 16.3.0 release:
{{jira url="https://jira.xwiki.org" source="jql" style="list"}}
project in (XWIKI, XCOMMONS, XRENDERING) AND issuetype = Task AND fixVersion in (16.3.0, 16.3.0-rc-1) AND component = "Dependency Upgrades"
{{/jira}}
Giving the following result:
- The issues id are explicitly mentioned
- The sentences are changed to
Upgrade to ${dependencyName} ${dependencyVersion}
- The links are crossed since the issues are closed (note: if this is the only blocking point, it is easy to define a custom css style to remove the default
text-decoration-line: line-through;
for thedel
elements wrapping the links content)
Option 2: Using the jira scripting extension
Reading https://extensions.xwiki.org/xwiki/bin/view/Extension/JIRA%20Module, it seems possible to have an even finer control of the rendering with something like the code below (thanks @vmassol for the suggestion).
But, my first attempts are not successful and the call to getJiraRestClient
returns an empty value.
{{velocity}}
#set ($client = $services.jira.getJiraRestClient('clientId'))
#set ($pm = $services.jira.getNullProgressMonitor())
#foreach ($basicIssue in $client.getSearchClient().searchJql('jira search query', $pm).getIssues())
* [[${description}>>${issue link}]]
#end
{{/velocity}}
Conclusion
Do you thinks automating this listing is interesting?
Then, do you think option 1 is good enough or should I keep investigating option 2?
Thanks
Note: this proposal is only about generating the list automatically, the rest of the process is not changed. For instance, we’d keep maintaining the Documentation in Release Notes:
field in the issues.