Versions Compared

Key

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

Q: How to write a template for a scheduled notification that will be sending out issues that are beyond their due date. The notifications should be sent to assignees of the issues

A: Provide a CRON expression that specifies how often the notifications should be sent and add the following Group By:  fields.assignee.emailAddress This will ensure that issues will be grouped by assignees.

Assign remaining notification fields as following:


Email addressEmail subject:

Code Block
titleEmail Address
linenumberstrue
#foreach ($issue in $issues)
   $!issue.fields.assignee.emailAddress
#end
Code Block
titleEmail subject
linenumberstrue
#foreach ($issue in $issues)
   #if ($velocityCount == 1)
      Daily digest of issues in progress and past due
   #end
#end

...

Code Block
titleMessage template
linenumberstrue
Issues that have past due date <br/><br/>

<table border=1>
    <tr>
       <th>key</th>
       <th>summary</th>
       <th>assignee email</th> 
    </tr>
    #foreach ($issue in $issues)
       #if ($issue.fields.duedate and $jirassimo.isAfter($issue.fields.duedate, $context.today))   
          <tr>
             <td>$issue.key</td>
             <td>$issue.fields.summary</td>
             <td>$!issue.fields.assignee.emailAddress </td>
          </tr>
       #end
    #end
</table>


<br/><br/>
Issues that are In Progress<br/><br/>
<table border=1>
    <tr>
       <th>key</th>
       <th>summary</th>
       <th>assignee email</th> 
    </tr>
    #foreach ($issue in $issues)   
       #if ($issue.fields.status.name == "In Progress" and $issue.fields.duedate and !$jirassimo.isAfter($issue.fields.duedate, $context.today))   
          <tr>
             <td>$issue.key</td>
             <td>$issue.fields.summary</td>
             <td>$!issue.fields.assignee.emailAddress </td>
          </tr>
       #end
    #end
</table>