Hello,
I am writing an Jira Automation to send and Email with the sum of Time Spent logged in Sub-tasks.
I can see the correct values using smart value {{aggregatetimespent}} but it comes in seconds.
I just need to divide it by 3600 to have these values in hours, but the expression below only returns the round number and I would like the decimal number.
{{aggregatetimespent.divide(3600)}}
Expected: 15300 / 3600 = 4.25
Actual result: 15300 / 3600 = 4
Any suggestion?
Here is the complete code:
<h1>Weekly Report</h1>
<h3>
Total of {{lookupIssues.size}} issues Resolved this week.
</h3>
<h3>
Velocity = {{lookupIssues.Story Points.sum}} Story Points
</h3>
<h3>
Time Spent = {{lookupIssues.timetracking.timespentseconds.sum.divide(3600)}} hours. (sem round)
</h3>
<table border="0" cellpadding = "3" cellspacing = "1">
<tr>
<th>Ticket Id</th>
<th>Status</th>
<th>Issue Type</th>
<th>Summary</th>
<th>Resolved date</th>
<th>Story Points</th>
<th>Time Spent</th>
</tr>
{{#lookupIssues}}
<tr>
<td><a href="{{url}}">{{key}}</a></td>
<td>{{status.name}}</td>
<td>{{issueType.name}}</td>
<td>{{summary}}</td>
<td>{{resolved.mediumDate}}</td>
<td>{{Story Points}}</td>
<td>{{aggregatetimespent.divide(3600)}}</td>
</tr>
{{/}}
</table>