I am trying to create a report of items that have exceeded an approved testing days field. To do that I am comparing the difference between 2 dates and then comparing with another field. I have tried many different iterations of the {{#if }} but I can't see to get the if statement to run in any scenario, can someone let me know if this is possible and what syntax changes I need to make it work?
My code is below:
I am using a table like below, and I have got it looping through the items without a problem but I can't get the if statement to trigger correctly. This code is within JIRA automation Customised email object, where the content type is set to HTML.
<table> <tr> <th>Issue Key</th> <th>Instance</th> <th>Summary</th> <th>Account</th> <th>Planned Start</th> <th>Approved Days</th><th>Age (days)</th> </tr>
{{#lookupIssues}}
{{ #if(gt(Planned start.diff(Planned end).days, customfield_11661.asNumber))}}<tr><td><a href="{{url}}" style="color: #1963d1; text-decoration: none;">{{key}}</a></td><td>{{customfield_11558}}</td><td>{{summary}}</td><td>{{customfield_11491}}</td><td>{{customfield_10070.jiraDate()}}</td><td>{{customfield_11661}}</td><td>{{customfield_10070.diff(today()).days}}</td></tr>{{ /}}
{{/lookupIssues}}