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:
HI @Bharathi
Where are you storing the board id and sprint name, when using sprint completed.
Are you storing these values in variables?
You would need to do this.
Hi @Marc -Devoteam-, I had created a variable for storing sprint id using {{sprint.id}}. Was unable to fetch the board id using a smart value. Using the variables/direct values for board ID and sprint name, the lookup issues search found no issues.
Edited to add: Created variables for Sprint and Board IDs and passed then through the lookup but the search resulted in no values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bharathi
Can u paste a photo of the audit log. We don't have access in your instance, Also this is a public forum so its better not to post links from your instance. (i will reduct it from the post)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reduction. Missed to notice the link. Adding a screenshot of the audit log including variables for board & sprint ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bharathi
Thanks for the pic. My guess is that the ScriptRunner’s Enhanced Search functions like issueFunction in addedAfterSprintStart don't work reliably inside Jira automation, im not sure though. i tagged the post scriptrunner so that someone from the dcriptrunner team to see it. Also i believe u can make the whole thing in scriptrunner and not in automation and it should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.