How to convert a Multi Issue Storage Format Template
When you want to convert a deprecated Multi Issue Operation into a (Single Issue) Operation you also need to convert any Multi Issue Storage Format Templates that this operation uses.
To do this, create a new Single Issue Storage Format Template and copy the contents of the old Multi Issue Template like this:
Page Title | Page Title of Multi Issue Template |
---|---|
Body | Header of Multi Issue Template
Body of Multi Issue Template with all explicit or implicit occurrences of
Footer of Multi Issue Template |
Labels | Labels of Multi Issue Template |
The above foreach loop expects the additional issues to come from a user input with the variable name additionalIssues
. If your additional issues are coming from a JQL search you can use e.g. $issueHelper.findIssues("project = TEST")
instead of $userInput.additionalIssues
.
Example replacements
Example replacements of explicit or implicit occurrences of $issue
in the body of a Multi Issue Template:
Old | Replacement |
---|---|
${issue.key} | ${additionalIssue.key} |
$!fieldHelper.getValueAsString("summary") | $!fieldHelper.getValueAsString($additionalIssue, "summary") |
$!fieldHelper.getValueAsString($issue, "status") | $!fieldHelper.getValueAsString($additionalIssue, "status") |
$!fieldHelper.getWikiMarkupValue("description") | $!fieldHelper.getWikiMarkupValue($additionalIssue, "description") |
$issueHelper.getComments() | $issueHelper.getComments($additionalIssue) |
Example
Multi Issue Storage Format Template
Page Title | $stringUtils.left($!{issue.summary}, 230) ($!{issue.key}) |
---|---|
Header | <table class="wrapped"><colgroup><col /><col /></colgroup> <tbody> <tr> <th>Key</th> <td>$!fieldHelper.getValueAsString("key")</td></tr> <tr> <th>Reporter</th> <td>$!fieldHelper.getValue("reporter").getDisplayName()</td></tr> <tr> <th>Type</th> <td>$!fieldHelper.getValueAsString("issueType")</td></tr> <tr> <th>Status</th> <td>$!fieldHelper.getValueAsString("status")</td></tr></tbody></table> <h2>Description</h2> <p>$!fieldHelper.getWikiMarkupValue("description")</p> <h2>Additional Issues</h2> <table><colgroup><col /><col /><col /></colgroup> <tbody> <tr> <th>Key</th> <th>Summary</th> <th>Status</th></tr> |
Body | <tr> <td>${issue.key}</td> <td>$!fieldHelper.getValueAsString("summary")</td> <td>$!fieldHelper.getValueAsString($issue, "status")</td></tr> |
Footer | </tbody></table> |
Labels | $!fieldHelper.getValueAsString("labels") |
Converted into a Single Issue Storage Format Template
Page Title | $stringUtils.left($!{issue.summary}, 230) ($!{issue.key}) |
---|---|
Body | <table class="wrapped"><colgroup><col /><col /></colgroup> <tbody> <tr> <th>Key</th> <td>$!fieldHelper.getValueAsString("key")</td></tr> <tr> <th>Reporter</th> <td>$!fieldHelper.getValue("reporter").getDisplayName()</td></tr> <tr> <th>Type</th> <td>$!fieldHelper.getValueAsString("issueType")</td></tr> <tr> <th>Status</th> <td>$!fieldHelper.getValueAsString("status")</td></tr></tbody></table> <h2>Description</h2> <p>$!fieldHelper.getWikiMarkupValue("description")</p> <h2>Additional Issues</h2> <table><colgroup><col /><col /><col /></colgroup> <tbody> <tr> <th>Key</th> <th>Summary</th> <th>Status</th></tr> #foreach($additionalIssue in $userInput.additionalIssues) <tr> <td>${additionalIssue.key}</td> <td>$!fieldHelper.getValueAsString($additionalIssue, "summary")</td> <td>$!fieldHelper.getValueAsString($additionalIssue, "status")</td></tr> #end </tbody></table> |
Labels | $!fieldHelper.getValueAsString("labels") |