Versions Compared

Key

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

...

The following listing demonstrates how to show both - whole change history and all the comments added to an issue:

 



 

#foreach ($issue in $issues)
    <p>
        $issue.key - $issue.fields.summary <br/>
        Changes: <br/>
        <table border="1">
            <tr>
                <th><b>User</b></th>
                <th><b>When</b></th>
                <th><b>Field</b></th>
                <th><b>Old value</b></th>
                <th><b>New value</b></th>
            </tr>
            #foreach ($history in $issue.changelog.histories)              
                    #foreach ($item in $history.items)
                        <tr>
                            <td>$!history.author.displayName</td>
                            <td>$jirassimo.formatDate($!history.created, "yyyy-MM-dd HH:mm:ss")</td>
                            <td>$!item.field</td>
                            <td>$!item.fromString</td>
                            <td>$!item.toString</td>
                        </tr>
                    #end               
            #end
        </table>
 

        Comments: <br/>
        <table border="1">
            <tr>
                <th><b>User</b></th>
                <th><b>When</b></th>
                <th><b>Comment</b></th>
            </tr>
            #foreach ($comment in $issue.fields.comment.comments)
                    <tr>
                        <td>$comment.author.name</td>
                        <td>$jirassimo.formatDate($comment.created, "yyyy-MM-dd HH:mm:ss")</td>
                        <td>$!comment.
renderedBody<
bodyHTML</td>
                    </tr>
            #end
        </table>
    </p>
#end