Custom Release Notes Templates

Hello everyone,

i have been started to create our own release notes template (in html) for jira, but my filtering doesnt work (see the statements below):

 

<p class="Body">The following Tickets were fixed in [ProductName] [Version]</p>
div class="DNL">
<table class="Bordered">
<tbody>
<tr>
<th class="Bordered">Ticket ID</th>
<th class="Bordered">Summary</th>
</tr>
#foreach ($issueType in $issueTypes)
#foreach ($issue in $issueType.issues)
#if ($customFieldManager.getCustomFieldObjectByName("Für welche Readme?").getValue($issue).toString().contains("Server") && $customFieldManager.getCustomFieldObject(10115) == "1")
<tr class="DNL">
<td class="Bordered">#getTicketNr($issue $customFieldManager)</td>
<td class="Bordered">#getReadmeText($issue $customFieldManager)</td>
</tr>
#end
#end
#end
</tbody>
</table>
</div>

 

 

at the if-statement it tried to set a filtering for every issue wich also have a Ticket ID.

without "&& $customFieldManager.getCustomFieldObject(10115) == "1")" i got the full list of all issues wich are marked as "Readme for Server".

Anybody has an idea where the problem is?

 

Cheers, Sascha

1 answer

1 accepted

This widget could not be displayed.

I find the anwser by myself.

Here is the result by everyone who is also interested in custom release notes

#foreach ($issueType in $issueTypes)
										#foreach ($issue in $issueType.issues)
											#if ($customFieldManager.getCustomFieldObjectByName("Für welche Readme?").getValue($issue).toString().contains("Server"))
												#set ($customFields = $customFieldManager.getCustomFieldObjects($issue.project.getLong("id"), $issue.issueType.getString("id")))
													#foreach ($customField in $customFields)
														#if ($customField.getFieldName().equals("Ticket ID"))
															#if ($customField.getValue($issue))
																<tr class="DNL">
																	<td class="Bordered">#getTicketNr($issue $customFieldManager)</td>
																	<td class="Bordered">#getReadmeText($issue $customFieldManager)</td>
																</tr>															
															#end
														#end
													#end												
											#end
										#end
									#end

Cheers, Sascha

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

286 views 5 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you