The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Calculation of total time spent per assignee and per issue weekly

Fidelidade JIRA Admin
February 24, 2025

Hello,automation_00.pngautomation_01.png

 

 

 

 

I intend to calculate at the end of each week, that is, Friday, the total time spent by a user on each task.

As?

1. On Friday, I want to calculate the time spent by a user on a certain task during the week and place this total in a field called "Weekly Time Spent".

2. Every Friday at midnight, this field is reset and on Monday the count starts again.

 

I'm using Automation rule to solve this challenge, but I can't get the result. Custom field is not updated.

 

I'm using two triggers:

 

1st. When: Scheduled:

 a) project = "Jira & Confluence Support"

 every 1 Days

 b) The "Weekly Time Spent" field is edited and the following calculation is made: {{issue.worklog.entries.filter(wlog -> wlog.started.isAfter(startOfWeek())).sum(wlog -> wlog.timeSpentSeconds).divide(60)}}

 

2nd. When: Work logged:

 The "Weekly Time Spent" field is edited and the following calculation is made:

 {{#=}} {{issue.worklog.entries .filter(wlog -> wlog.started.jiraDate >= startOfWeek().jiraDate) .sum(wlog -> wlog.timeSpentSeconds) }} / 60 {{/}}

 

Does anyone have any idea how I can solve this challenge?

 

Thanks,

Emanuel

 

 

 

Error message:

 

Error rendering smart-values when executing this rule:
Failed to get value for issue.worklog.entries .filter(wlog -> wlog.started.jiraDate >= startOfWeek().jiraDate) .sum(wlog -> wlog.timeSpentSeconds): {{#=}} {{issue.worklog.entries .filter(wlog -> wlog.started.jiraDate >= startOfWeek().jiraDate) .sum(wlog -> wlog.timeSpentSeconds) }} / 60 {{/}}

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Bill Sheboy
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 Champions.
February 24, 2025

Hi @Fidelidade JIRA Admin 

There is no "filter" function for smart value lists.  Here are the supported smart values and functions: https://confluence.atlassian.com/automation/jira-smart-values-lists-993924868.html

Instead you could use an iterator and smart value, list filtering: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

I recommend experimenting with just one issue, writing the results to the audit log, until you get the iteration and filtering to work as needed.

Kind regards,
Bill

0 votes
John Funk
Community Champion
October 27, 2025

Hi Fidelidade,

I am going to mark Bill's answer as accepted. Let us know if you still have questions. 

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events