You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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

A:

1) Provide a CRON expression that specifies how often the notifications should be sent


2) specify condition that your issues should match again in JQL rule like this:

project in (YOUR_PROJECT_KEY) and or duedate > now()


3) add the following Group By:

 fields.assignee.emailAddress 

This will ensure that issues will be grouped by assignees.


4) Assign remaining notification fields as following:


Email Address
#foreach ($issue in $issues)
   $!issue.fields.assignee.emailAddress
#end
Email subject
#foreach ($issue in $issues)
   #if ($velocityCount == 1)
      Daily digest of issues In progress, To Do and In Review with past due
   #end
#end
Message template
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($context.today, $issue.fields.duedate))   
          <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($context.today, $issue.fields.duedate))   
          <tr>
             <td>$issue.key</td>
             <td>$issue.fields.summary</td>
             <td>$!issue.fields.assignee.emailAddress </td>
          </tr>
       #end
    #end
</table>