Date: Thu, 28 Mar 2024 15:28:22 -0400 (EDT) Message-ID: <1520054122.3753.1711654102592@wiki.jirassimo.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3752_1184754501.1711654102559" ------=_Part_3752_1184754501.1711654102559 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Problem: Your Raley notification is sendin= g all of the comments related to an issue, but comments are sorted in ascen= ding order, i.e. from oldest to newest. How to reverse the order so, that t= he newest comments come first and the oldest would be in the end of the lis= t?
Solution: Reversing of the order is done by applying so= me Velocity tricks. Here's a working example that you can use in your notif= ication.
<b>= ;Comment History:</b><br> #if ($issue.fields.comment.comments.size()) <table border=3D"0" cellspacing=3D"10"> #set($max =3D $issue.fields.comment.comments.size() - 1) #foreach($i in [ $max .. 0 ]) #set ($comment =3D $issue.fields.comment.comments.get($i) ) =20 <tr> <td valign=3D"top"><b>$comment.author.displayName</= b></td> <td valign=3D"top" nowrap>$jirassimo.formatDate($comment.cre= ated, "yyyy-MM-dd HH:mm:ss")</td> <td>$!comment.body</td> </tr> #end =20 </table> #end