Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In addition to common variables you have access to following variables within your velocity template.

You can use following template as a starting point for your own templates. This template first groups each issue by corresponding Component Version and within this group it groups issues by their type again. For each issue issue key (as link) and summary is listed.

Code Block
#disable_html_escaping()

##Text is escaped twice so that the characters generated in the text area display properly escaped (JRA-12184)
#macro (doubleEncode $html)
  $textUtils.htmlEncode($textUtils.htmlEncode($html))
#end

<title>$textUtils.htmlEncode($action.getText('release.notes.html.title', $project, $bundle.bundleName))</title>
<body>

#foreach ($cv in $bundleReleaseNotes)
  #if ($cv.issueTypes.size() > 0)
    <h2>$cv.componentName #if($cv.versionName) - $cv.versionName$#end</h2>
    #foreach ($issueType in $cv.issueTypes)
        #if($issueType.issues.size() > 0)
            <h3>$textUtils.htmlEncode($issueType.name)</h3>
            <ul>
            #foreach ($issue in $issueType.issues)
                <li>[<a href='$requestContext.canonicalBaseUrl/browse/$issue.key'>$issue.key</a>] - $textUtils.htmlEncode($issue.summary)</li>
            #end
            </ul>
        #end
    #end
  #end
#end


<a name="editarea"></a>
<h2>$action.getText('release.notes.edit.copy')</h2>
<p>$action.getText('release.notes.description')</p>

<textarea rows="40" cols="120" id="editcopy">

#doubleEncode($action.getText('release.notes.heading', $project, $bundle.name))

#foreach ($cv in $bundleReleaseNotes)
  $cv.componentName #if($cv.versionName) - $cv.versionName$#end
  #if ($cv.issueTypes.size() >0)
    #foreach ($issueType in $cv.issueTypes)
        #if($issueType.issues.size() > 0)
          <h3>#doubleEncode($issueType.name)</h3>
          <ul>
          #foreach ($issue in $issueType.issues)
            <li>[<a href='$!requestContext.canonicalBaseUrl/browse/$issue.key'>$issue.key</a>] - #doubleEncode($issue.summary)</li>
          #end
          </ul>
        #end
    #end
  #end
#end
</textarea>

</body>