I'm attempting to organize my Release Notes template so that it looks something like this:
Component
OR
Bug
Improvement
...
Is this possible? I know you can get all the Issues from an IssueType - but is there any way to say 'component.issueType.issues', or even 'issuetype.component.issues'.
If you have a suggestion for another direction that would be great as well.
Thanks!
Community moderators have prevented the ability to post new answers.
The code below works for me (Jira 4.4). It's of course not the cleanest way, so feel free to refactor in the next answers.
## GET COMPONENTS FOR THE CURRENT PROJECT #set ($components = []) #foreach ($issueType in $issueTypes) #if ($issueType.issues.size() > 0) #foreach($issue in $issueType.issues) #if ($issue.componentObjects.size() > 0) #foreach($component in $issue.componentObjects) #if ($components.contains($component.name) == false) #set( $echoOf = $components.add($component.name)) #end #end #end #end #end #end ## ## #foreach ($component in $components) <h3>$component</h3> <ul> #foreach ($issueType in $issueTypes) #if($issueType.issues.size() > 0) #set ($tmpIssuesArray = []) #foreach ($issue in $issueType.issues) #if ($issue.componentObjects.size() > 0) #foreach($issuecomponent in $issue.componentObjects) #if ($issuecomponent.name == $component) #set( $echoOf = $tmpIssuesArray.add($issue)) #end #end #end #end #if ($tmpIssuesArray.size() > 0) <li> <h4>$textUtils.htmlEncode($issueType.name)</h4> <ul> #foreach ($issue in $tmpIssuesArray) <li>[<a href='$requestContext.canonicalBaseUrl/browse/$issue.key'>$issue.key</a>] - $textUtils.htmlEncode($issue.summary)</li> #end </ul> </li> #end #end #end </ul> #end
This worked great for me in Jira 7. Exactly what I was looking for. All I had to do was replace the < and > notation with < and > respectivly. Thanks @[deleted]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was not able to get this to work for our JIRA v.6.4.6 instance. I followed the instructions to "Add a new custom style for Jira release notes" and added header formatting from the Text release notes but this component report shows a blank page. Has anyone confirmed that the above template works, or does is it missing something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Apply agile practices
Transform how you manage your work with agile practices, including kanban and scrum frameworks.
Learning Path
Configure agile boards for Jira projects
Learn how to create and configure agile Jira boards so you can plan, prioritize, and estimate upcoming work.
Jira Essentials with Agile Mindset
Suitable for beginners, this live instructor-led full-day course will set up your whole team to understand how to use Jira with an agile methodology.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.