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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Jira Automation get count of issues with current issue label.


I need a condition to execute rule.

So I need a query like this:

createdDate>'-1d' AND summary ~ KEYWORD AND label = {{triggerIssueLabel}} 

count less than 5. Then execute else do nothing.


However I cannot write a query like this.

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall Community Leader Mar 02, 2022

Hi @İsmail Özçelik - I'm not sure of the trigger, but I was able to accomplish this with a couple actions:

  1. Issue Lookup: I used this to execute the query and get the issues matching the query
  2. Create Variable: {{issueLookup.size}} gave me the number of issues that matched the query (I called it issueCount)

From there you could use an If/Else condition with the newly created variable {{issueCount}}

Hope this helps.

Hi @Mark Segall ,

Thanks for answer. But still I cannot get the label from issue and use it inside query.

Mark Segall Community Leader Mar 02, 2022

Can I get a screenshot of your rule?  It would help to have more context around the trigger and actions.


@Mark Segall ,

This is my test rule. I try to add label condition.

Thank you this clears things up for me. So, you'll want something like this in your JQL:

createdDate>'-1d' AND summary ~ ACIL AND labels = {{triggerIssue.labels}}

Thanks, some smart values gave error before so I don't think it. 

Mark Segall Community Leader Mar 02, 2022

sorry - My query had an error.  I fixed it.  Should be {{triggerIssue.labels}}

Also - Note that if there's any possibility your issues will have multiple labels, you probably want to go with "IN" instead:

labels IN ({{triggerIssue.labels}})

Ok, I try 4 times, get all error :) I will continue.

Following up in a new question at  Nulling a clause when count is zero (

A related problem I have is:

((labels in ({{triggerissue.labels}}) OR otherclause)

If there are any labels I want them to expand, e.g. 

labels in (label-1) or otherclause

But if labels are empty I don't want:

labels in () or otherclause

I just want:



Suggest an answer

Log in or Sign up to answer

Atlassian Community Events