Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation for Jira - Validating Issue Counts for WIP Automated Alerts

Jack Arndt
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.
April 8, 2020

Hey Gang!

I have a cool use case that I am wracking my brain to solve using Automation for Jira. I would greatly appreciate any help in solving this.

 

Use Case:

As a developer, I want to receive a slack notification whenever WIP space opens on our active sprint, so that I can pull more work and be awesome at my job.

 

Example workflow:

In Progress -> QA Review -> Product Review

 

Automation Logic (part I am having trouble with is in bold):

When a ticket transitions to the workflow step "Product Review", count the number of tickets that are in "In Progress" or "QA Review".

If there are less than 12 tickets in "In Progress" or "QA Review"

Then send a slack alert. 

3 answers

1 accepted

3 votes
Answer accepted
Dave Sausville
Contributor
September 4, 2020

As long as your result set is expected to be <= 100, try using the "Lookup Issues" action. 

  • You enter your JQL (be as precise as possible so as not to breach the 100 results limit)
issuetype in ("In Progress", "QA Review")
  • Results are returned as a smart value list named  {{lookupIssues}}
  • Then use the list size function in "Advanced Compare IF"
{{lookupIssues.size}} < 12

 

Here's a sample of how I've used something similar.  Hope this helps

IssueCount.png
  
  
Matt Hooper
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!
July 19, 2021

This is the best answer. Works great with no funny business.

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.
August 6, 2020

Hi Jack (and @yrslv )

I don't think that automation can count the number of tickets in a status at one time, but you should be able to create a running total and use that to determine whether to email or not.

So, create a custom number field and default the value to zero. 

Then use automation to increment the value of the custom field by one based on an Issue Transition trigger. 

Also create a rule to subtract the value with another Issue Transition trigger as cards move out of the status. 

Do the same with additional new custom number fields as needed. 

It's a very round about way to do it, but I think it should work for you. 

Jack Arndt
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.
August 6, 2020

thanks John, that is super helpful! :)

Like • John Funk likes this
0 votes
yrslv
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!
August 6, 2020

Jack, I have the same trouble. Did you solve your problem?

Jack Arndt
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.
August 6, 2020

No :(

Not sure if it's able to be done.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events