Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Organizing Issues and Issue Types by Component in Release Notes Template

I'm attempting to organize my Release Notes template so that it looks something like this:

Component

  • Bug
    • Issue 1
    • Issue 2...

  • Improvement
    • Issue 1
    • Issue 2...

  • Task/SOP
    • Issue 1
    • Issue 2...

  • Sub-task
    • Issue 1
    • Issue 2...

OR

Bug

  • Component A
    • Issue 1
    • Issue 2...
  • Component B
    • Issue 1...

Improvement

  • Component A
    • Issue 1
    • Issue 2...

...


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!

2 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 &lt; and &gt; notation with < and > respectivly. Thanks @Krzysztof Serok

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?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Agile

Join us LIVE: Atlassian & Experts Talk Research & Insights @ Scale

Hello all! What have you learned from your customers lately? Our live-streamed series continues by exploring CX, UX, and the power of research & insights at scale with Leisa Reichelt, Head of R...

248 views 3 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you