Counting Amount of Issues in Specified Status

Raymond Jenks March 4, 2021

Hello,
I am trying to automate a part of my Next-Gen project and have been struggling to get this one output to print properly. My automation successfully runs a check every morning to see if there are any new tasks created in a specified status called Under Investigation and returns a message to our Microsoft Teams channel. 
The issue is that in the statement sent to our Teams channel I want it to return the number of issues in that specific status. I have attempted several iterations of {{issue.status.name.size}} or .count or .value to no avail. If you could please point me in the right direction as to what syntax I need to perform this print out and why that would be great.

Thanks.

2 answers

1 accepted

1 vote
Answer accepted
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 4, 2021

Hi @Raymond Jenks  -- Welcome to the Atlassian Community!

Are you using an automation rule to do this? If so, you could try something like this:

  • Trigger: scheduled once per day (perhaps at a specifc time using a CRON expression)
  • Action: Lookup Issues with JQL to find issues in your status
  • Action: send a message to your MS Teams channel with the count: {{lookupIssues.size|0}}

That last part handles a default of zero when there are no issues in the status.

Best regards,

Bill

Raymond Jenks March 4, 2021

That worked, thanks Bill! I'm not sure why {{lookupIssues.size}} doesn't work with the JQL search built into the Schedule component but I'll take it.

Like Bill Sheboy likes this
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 4, 2021

I am glad to hear that worked for you.

When you use the Scheduled trigger with JQL that helps when you need to process each item one-by-one, such as for editing.  Lookup Issues is when you need the set for non-edit stuff, like counting or reporting.

Like John Funk likes this
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.
March 4, 2021

Hi @Raymond Jenks  - Welcome to the Atlassian Community!

It might be because it is a Next-gen project and not all Automation functionality works with them. 

Can you try the same notice on a Classic Software project to see if it works? 

Raymond Jenks March 4, 2021

I just attempted the same syntaxes mentioned above on a Classic Project and still none of them worked. I'm certain the syntax I've chosen to get this output is incorrect. I just need to be pointed in the right direction on that.

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.
March 4, 2021

Can you share a screen shot of the rule with the details for the syntax?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events