Unable to extract sum of user worklogs for previous week using Jira automation

admin641 June 18, 2024

Hi,

I am trying to setup a Jira automation rule to send up a notification to the Jira users in my instance if they have not logged a certain number of hours for a week. This notification willl serve its purpose as a reminder so that the assignees can go and complete their missing time entries for the previous week.

I have managed to setup the Jira automation rule upto some extent and I am stuck with the part where I need to extract the user's worklog sum for the past week and compare it against the defined value. 

Appreciate it if someone can help me out here. I will list down what I have managed to build up so far.


Variables:

{{issueAssignee}} > {{#lookupIssues.assignee.distinct}} {{displayName}} {{/}}

{{sumOfWorklogs}} > {{lookupIssues.worklog.timeSpentSeconds.sum()}}

rulePart-3.png

rulePart-2.pngrulePart-1.png

 

1 answer

0 votes
Wojciech Wardaszko [HeroCoders]
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.
June 19, 2024

Hi @admin641

Welcome to the community.

I must tell you that your design has a fundamental flaw - you're looking for issues to which the user is assigned and then summing up time spent on that issue, but there's no guarantee that all worklogs in scope were added by the current assignee.

The problem you're trying to solve here - sending automated emails when worklogs from a user do not meet a required quota of TotalTimeSpentSeconds in a given time period, is one of the reasons there are so many time-tracking and reporting apps in the Atlassian Marketplace. There is a lot at play here, and Automation is not the best tool when the level of complexity and data obscurity reaches Jira worklog levels.

It is not impossible to achieve what you need, but you must build the whole logic behind it with multiple requests to Jira API and factor in multiple possible cases.

I strongly recommend considering one of the apps, especially our Clockwork Pro. It has the feature of Outliers Filter and messaging, which does exactly what you're trying to achieve.

If you have any questions, feel free to reach me or my colleagues through our service portal .

Cheers!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events