Release notes custom templates- filter by status

Tal Erez October 1, 2020

Hello, 

I would like to create a custom release notes template using velocity. I already read the documentation and know how to create a new template & update the jira-config.properties accordingly in order to apply the new template.

However, i'm quite new to velocity and have quite troubles with writing the desired code.

 

I would like to create a template and filter it by status (for example, show release notes for only "Resolved", or only "Ready for installation").

Anybody has any idea for implementation of such a template?

 

Thanks in advance 

1 answer

0 votes
Tal Erez October 1, 2020

This is what I wrote so far:

 

#foreach ($issueType in $issueTypes)

    #if($issueType.issues.size() > 0)

        <h2>$textUtils.htmlEncode($issueType.name)</h2>

        <ul>

        #foreach ($issue in $issueType.issues)

        #set ($status = $issue.getStatusObject())

                #if (($status.getId() == "10002" || $status.getId() == "10004" || $status.getId() == "10005" || $status.getId() == "5" || $status.getId() == "6"))

                 <li>[<a href='$!requestContext.baseUrl/browse/$issue.key'>$issue.key</a>] - $textUtils.htmlEncode($issue.summary)</li>

                #end
         #end
        </ul>
    #end
#end

 

Am I missing something?

Suggest an answer

Log in or Sign up to answer