You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm trying to figure out which smart values I can use to get the # of tickets in a certain filter that have priority low, medium, high.
In the atlassian documentation it says this is possible with the ".size" but I can't get that to work.
These smart value keep returning 0. Any ideas?
Hi @Julia
First, a disclaimer: I am using Jira Cloud and not Server / Data Center, so I cannot verify this suggestion.
Your Jira version has bulk operations on {{issues}} for a branch or scheduled trigger, and I believe this will work, where you may change the priority names for your own:
{{issues.priority.name.match("(Highest)").split(",").size|0}}
What this is doing is...
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am glad to learn that worked for you! The same technique works for Jira Cloud with Lookup Issues, and it is quite handy for reporting emails send by automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Julia
Can you provide the full content of your automation rule, and a link to the document you are referencing when you get information about ".size"? That will help us provide answers relevant to your context.
The "size" property is relevant to have a list of items. There may be other ways to handle this but I would try using the Lookup Issue action to get a list of issues in a given priority and then use {{lookupIssues.size}} to get the number of issues in that list. If you are trying to get the counts for multiple lists into another single action (like Send Mail) you would need to assign the {{lookupIssues.size}} value for each Lookup Issues action to a separate variable, I think, as each LookupIssues action would overwrite the results of the previous action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://confluence.atlassian.com/automation/jira-smart-values-issues-993924860.html
The entire context is this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that additional information.
In this scenario you can't use "size" to get a count of a subset of the issues returned by your JQL. You can get a count of all the issues returned by the JQL or a count of the Comments associated to an issue in the list, but not a count of a subset of issues in the results.
You could create multiple scheduled rules, each with a JQL that retrieves the issues for a specific priority, and use {{issues.size}} in a Send Mail action to get the count for issues for that one priority.
Alternately you can do as I suggested before and create multiple Lookup Issues actions, each with a JQL that gets issues for one priority, and collect the size of each result set in a unique variable. Then include all those variables in your Send Mail action. In that scenario you would not have the JQL as part of the Trigger.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is your solution possible on Jira Server? I think that may be only available for cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, I apologize. I did not notice that your post was tagged for Jira Server. The Lookup Issues action is not available there, but there is a change request for it.
https://jira.atlassian.com/browse/JIRAAUTOSERVER-53
I think then in your scenario you would need to run the JQL per priority in separate rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.