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

Jira Automation – notify when count of individually assigned issues in the Backlog 'is less than'

Shaurya.Sisodia June 18, 2023

Greetings,

I am trying to create an automation that is scheduled to notify the Product Owner when the count of issues assigned to individuals in Jira Backlog goes below, let's say 2. 

This is what I have tried so far. 

I am using Advance Compare Condition.

image.png

 

Thanks in advance,

~ s

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 19, 2023

Hello @Shaurya.Sisodia 

{{lookupIssues.size}} works only when you have used the Lookup Issues action. It doesn't work for getting you the number of issues returned in a JQL that is part of a Schedule trigger.

Do you want to send one email per assignee, or do you want to send one email that lists all the assignees that have less than the specified number of issues?

Shaurya.Sisodia June 19, 2023

Hi Trudy,

Thank you for your help.

I would be completely OK with one email per assignee.

I may have to rethink the Rule that I am applying. Could be something else instead of Scheduled. Thoughts?

 

Cheers,

Shaurya

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 19, 2023

You can still run the rule on a schedule with the Schedule trigger. You just need to not enter a JQL in the trigger itself.

You can then use the Lookup Issues action to execute the same JQL you were using in the trigger BUT for just one user at a time. Then use a condition to check if the lookupIssues.size value is less than your cutoff, and then send the email.

Follow that with another Lookup Issues action to execute the JQL for another one of the users. Check the size of the results, and send the email.

Repeat for each Assignee.

Screen Shot 2023-06-19 at 2.48.15 PM.png

 

Screen Shot 2023-06-19 at 2.50.32 PM.png

 

Screen Shot 2023-06-19 at 2.51.58 PM.png

Add the step to send the email. Then copy/repeat steps 1, 2, & 3 changing the JQL each time for a different Assignee.

Screen Shot 2023-06-19 at 2.53.04 PM.png

Shaurya.Sisodia June 19, 2023

This worked - thanks Trudy!

Out of curiosity to your earlier option: Is there a way to send one email that lists all the Assignees that have less than the specified number of issues??

 

Thanks in advance,

Shaurya

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 20, 2023

I believe that there is but I haven't worked out the details.

Shaurya.Sisodia June 28, 2023

Hello again @Trudy Claspill@John Funk

I tried another approach to parse through the individuals in the team with less than x number of Issues in the Jira Backlog; this time using Advanced branching (via New branch component) in the following manner:

image.png

 

Within the Advance branching, have used Smart Value with .distinct as show in the picture to define a variable varAssignee

image.png

And then within each of the distinct user, have applied a condition to send the email to the PO if the count of Issues for each individual is less than 2.

 

YET, I am not getting any result! The rule has execute as a "success" but only partially, i.e. without any action being performed from within the Advance branching. :( Please see below:

image.png

 

Can either/both of you please guide on what's that I am not configuring correctly and/or how to do it? 

 

Thanks,

Shaurya

Like Trudy Claspill likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 29, 2023

The {{lookupIssues.size}} value is not being recalculated inside the branch based on the distinct Assignee value. It is still reflecting the size of the result set from the original Lookup Issues action.

You could add another Lookup Issues action inside the branch to lookup issues based on the distinct Assignee. That will generate a new lookupIsssues result set for each distinct assignee. Insert the new Lookup Issue action inside the branch and before the condition where you check the size. Use the same JQL you used in the first Lookup Issues action, but change the Assignee comparison to use just the {{varAssignee}} variable.

 

Screen Shot 2023-06-29 at 8.00.10 AM.png

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 18, 2023

Hi Shaurya - Welcome to the Atlassian Community!

Can you share the JQL you are using in the Scheduled part of the rule? 

Also, what is not working? 

Shaurya.Sisodia June 19, 2023

Hi John,

Thank you for your help.

I am basically focussing on Story issue type for selected individuals all belonging to a particular team (in this case "Evaluate" which is determined by what we have in the Component field of each issue) within our project on Jira:

issuetype in (Story) AND component in (Evaluate) AND assignee in (635ee908fc0cc7a600af9cdf, 63d0940169c7ae3958d19a6c, 6327bc7da84c7f79c38306bc, 712020:e04daca5-6a33-46a5-9943-70d120bc20e1, 63993209914b350865d20a3a, 5e4b505c3011ed0c8f8ac78f, 63155f13d8850343ef593d4b, 6294320d9c88e7006fb41ba0) AND status not in (Withdrawn, Done) AND Sprint is EMPTY ORDER BY assignee ASC

The above JQL has already been validated and does give me what I expect to see.

 

Is my 'is less than' comparison with a number value ("2") in the Advance Compare Condition the reason my Scheduled isn't working? Can I actually make such a comparison:

image.png 

Cheers,

Shaurya

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 19, 2023

Yes, that is your problem. You can only have one value in the First Value field - so just {{lookupIssue.size}}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events