Trying to create a sprint completion report using Jira automation with calculated values for Added/Removed/Completed/Incomplete issue count and story points. On creating it using a manual trigger, the automation works perfect and email is getting triggered with all calculated values. But it doesn't work as expected using a sprint completed trigger. The automation is configured like below:
When: Sprint completed In <Board>
Then: Lookup issues Search for issues using JQL: issueFunction in addedAfterSprintStart(<Board ID>,'Sprint ABC')
And: Create variable Create smart value variable
Variable name: AddedIssues
Smart value: {{#lookupIssues}} <tr> <td>{{key}}</td> <td>{{summary}}</td> <td> {{"Story Points"}} </td></tr> {{/lookupIssues}}
And: Create variable Create smart value variable
Variable name: AddedStoryPoints
Smart value: {{lookupIssues."Story Points". sum}}
And: Create variable Create smart value variable
Variable name: AddedStoryCount
Smart value: {{lookupIssues.size}}
.... Similar lookup and variable creation for Completed/Removed/Incomplete
And: Send email
On using sprint completed trigger, the lookup issues section shows this info in the audit log:
Action details:
<Reducted>
A search during custom value definition found no issues.
This is happening even after providing the direct values for the board ID and sprint name instead of the smart values. The same JQL is fetching the right list of issues when viewed in issue search. Not sure where its going wrong or what is being missed here. Need advise.