Hi,
I am trying to use Jira Automation to schedule and send an email to myself and my team with a list of team members who logged less than 40 hours in a week.
We log our time from Jira 'issue type' and I use worklogs to track the time every Friday and reach out to people who logged less than 40 hours in the week. I am looking to reduce this manual effort and automate sending an email to myself with the list.
Suppose I have below team members who logged time in different issues which I could retrieve using a query.
Steps I followed to build the automation:
STEP 1: Used the trigger: When scheduled and added below jql query :
project = 'My projectname' and worklogDate >= "2024/02/26" and worklogDate <= "2024/03/01"
Step 2: Now I want to sum the total hours logged by each person and i want an automated email with a list like below for whoever logged less than 40 hours. I tried using below compare option in the 'if' statement
Step 3: Then ,Send email
Result I am expecting:
Hello,
Below members logged less than 40 hours:
B
C
D
E
Results I am getting:
4 separate emails for each of the 4 members and only the account ids instead of B,C,D and E.
Hi @Anj R -- Welcome to the Atlassian Community!
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
When a scheduled trigger rule uses JQL, it runs for each issue found. It is not running only against the worklog entries. You instead want one email, listing the users with less than 40 hours logged.
If each person is only logging time to one issue, this scenario is possible If they log to multiple issues, it is not possible to send one email unless you hard-code each user's information to allow grouping results.
Assuming each person is only logging time to one issue...remove the JQL from the trigger, and instead use it with the Lookup Issues action. Then use smart value, list filtering instead of the condition, to return the results which a total of the time spent less than 40. Then the displayName attribute (rather than the accountId) may be included in your email.
Here are some additional references to help you modify your rule:
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.