Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Need help !! Jira automation to send email when team members logged less than 40 hours in a week

Anj R
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 7, 2024

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.

LOG.png

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

log 2.png

 

Step 3: Then ,Send email

 

log 3.pngResult  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.

 

1 answer

0 votes
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 Leaders.
March 7, 2024

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events