Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation - Sprint completion report using Sprint completed trigger

Bharathi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2025

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.

2 answers

1 vote
Marc -Devoteam-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2025

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.

Bharathi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2025

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.

 

Bharathi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2025

Automation_Log.png

Marc -Devoteam-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2025

Hi @Bharathi 

I have this information from Adaptavist (deveoper of scriptrunner) they confirm that the enhanced JQL functions can only be run on the enhanced search page and not in native JQL due to how the JQL functions are run.

To use it  in automation, you can reference the Jira filter anywhere where you have native JQL using the JQL query of filter = "<name of saved filter>"

This will allow you to use the results of the enhanced search filter inside a Jira automation or the script console to run the actions you need to run.

So you can't use the JQL features offer by scriptrunner directly in an automation.

Like Christos Markoulatos likes this
0 votes
Christos Markoulatos
Community Champion
November 17, 2025

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)

Bharathi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2025

Hi @Christos Markoulatos,

Thanks for the reduction. Missed to notice the link. Adding a screenshot of the audit log including variables for board & sprint ID.

Automation_Log.png

Christos Markoulatos
Community Champion
November 17, 2025

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events