How to automate sprint report?
Asked by ankur_gupta_contractor:

Hi

I am trying Jira automation to generate sprint report for user hours and tasks based automatically when sprint ends. Have anyone know any way to automate this process?

JIRA automation, we would need the report generated to include two things: 1. how many tasks each user finished during the sprint, 2. How many hours each user spent in the sprint

Thanks


Answers:
author: Sam Harding
body: Hi [@ankur_gupta_contractor](/t5/user/viewprofilepage/user-id/5250933)   

Collating this information on a per user basis is tricky, to the point of not being possible/advisable. You can however get this information on a per worklog and issue basis to put into a report.  

For example, if you were to trigger on "Sprint Completed", then do a "Lookup Issues" with your JQL as "Sprint = {{sprint.name}}", you now have a list of all the issues which were part of that sprint.  

Then if you wanted to send or generate a report with some information about work logged or issues completed, you could use a smart value such as

```
Stats on {{sprint.name}}

{{#lookupIssues}}
Time spent on {{key}}:
{{#worklog}}{{author.displayName}}: {{timespent}}}}{{/}}
{{/}}

Complete Tasks: 
{{#lookupIssues}}{{#if(equals(status.statusCategory.key, "done"))}}
{{assignee.displayName}}: {{key}}{{/}}{{/}}
```

This will give you some information in the format

```
Stats on My Latest Sprint

Time spent on ISSUE-1:
Alice: 1h
Bob: 2h

Time spent on ISSUE-2:
Alice: 2h
Bob: 3h

Complete Tasks:
Alice: ISSUE-1
Bob: ISSUE-2
```

Unfortunately, this does mean the work logged information is split across each individual issue, but it does allow you to somewhat get the relevant information out of the sprint.

I hope that helps

Sam


author: Anthony Morais
body: Hi [@ankur_gupta_contractor](/t5/user/viewprofilepage/user-id/5250933)

Welcome to the Atlassian community!!!

I believe the best way is using eazyBI.

It is possible to export to excel.

[Here's the documentation](https://docs.eazybi.com/eazybi/learn-more/learn-eazybi-through-sample-reports/samples-jira-software/sprint-report)

Regards,

Anthony

comments: author: ankur_gupta_contractor
body: Thanks Anthony for quick reply.

Do you have any solution to automate this process through automation rules in Jira?


author: Anthony Morais
body: Unfortunately, for this eazyBI process it is not possible to integrate Jira automation.  

<br />


author: Anthony Morais
body: Hi [@ankur_gupta_contractor](/t5/user/viewprofilepage/user-id/5250933)

Could you mark it as an accepted answer?

Thanks!


author: Bill Sheboy
body: Hi [@ankur_gupta_contractor](/t5/user/viewprofilepage/user-id/5250933) -- Welcome to the Atlassian Community!

What version of Jira are you using with automation rules: Cloud or Server / Data Center?

If you are using Cloud, you could use the [lookup issues action](https://community.atlassian.com/t5/Automation-articles/New-lookup-issues-fields/ba-p/1873978), and [smart value, list filter](https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588)s, to create sections in a report for this. For this approach to work, you would need to specify each user as this cannot be done dynamically AND reported in a single email / post.

Kind regards,  
Bill