How can I count issues in a specific column and use it in the automation?

Vitalii Iermolenko February 11, 2021

I want to create an automation rule based on the number of issues in the specific column (perhaps, with the power of smart values or JQL).

Is there anyone who can help me with this issue?

3 answers

0 votes
wwalser
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2021

There isn't much information in your question that helps someone who wants to be helpful.

What do you want to trigger the automation?

What are the conditions that must apply for an issue to be in the column that you're interested in?

What is the goal of the automation rule?

Vitalii Iermolenko February 12, 2021

I meant just count the number of issues with some status. And then use this number for automation rule, like if the number of issues with specific Status less/greater than X - send some message/email.

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.
February 12, 2021

Hi @Vitalii Iermolenko 

You may not need to preserve the count to do this with an automation rule, particularly if your board is simple and the number of status values is smaller.  Instead you could try:

  • Trigger: scheduled every X time units (e.g. once per day)
  • Action: lookup issues with JQL for the status of interest (or multiple statuses if you are mapped to the column that way. 
  • Condition: if the count in the lookup issues is less/greater than than X.  You may find the count with {{lookupIssues.size}}
  • Action: send the message/email

However, if you are actively using your board this alerting may be unnecessary; you may just set the min/max WIP limits for a column (under Board Settings > Columns), and the board will highlight when outside of those boundaries.

Best regards,

Bill

Like Trudy Claspill likes this
wwalser
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2021

I believe Bill's JQL approach is probably what you're after.

Columns in a board are generally JQL based in some capacity as well. So writing a JQL filter for a specified project and status should be fairly straight forward. Then counting the number of issues found is a simple smart value. {{lookupIssues.size}}

Note that the lookup issues action will max out at 100 issues. 

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.
February 11, 2021

Hi Vitalii - Welcome to the Atlassian Community!

The board should already show you the number of cards in a column. What is it that you are trying to do with that number? 

Vitalii Iermolenko February 12, 2021

Yes, it shows. But I need to use that number in the automation rule

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.
February 12, 2021

In that case, I would create a custom number field in Jira set the default to 0.

Then I would increment it by 1 each time an issue transitioned into that status using an Automation Rule. See the smart values and guidance here:

https://support.atlassian.com/jira-software-cloud/docs/use-smart-values-to-insert-numerical-values/

Then as each issue transitions out, I would have another rule that decreases the value by one 

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.
February 13, 2021

Can you provide a little more information as to what you are wanting to do with the value once you get it?

0 votes
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.
February 11, 2021

Hello @Vitalii Iermolenko 

Welcome to the community.

I don't think there is a way to identify the 'column' an issue is in via Automation.

The columns on boards are just a way to visualize the grouping of issues by Status. And an issue can appear on multiple boards in different columns (based on the mapping of Statuses to columns, per board).

You would need to instead look at creating automation based on the number of issues in the Statuses that are mapped to the specific column.

Vitalii Iermolenko February 12, 2021

Yes, my mistake. I meant just count the number of issues with some status. And then use this number for automation rules, like if the number greater than X - send some message/email.

Suggest an answer

Log in or Sign up to answer