Hello,
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.