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 want to count the number of open issues and then add that to a comment telling people where they are in the queue.
So far in my automation I have
Trigger - Manually triggered (this is just for testing I will change it to "Issue created" later)
Then: Lookup issues. Search for issues using JQL "resolution = Unresolved AND Status != Pending".
(I have clicked "Validate issues" and it correctly says "9 issues found")
And: Create variable. Variable name "OpenIssueNumber". Smart value "{{OpenIssueNumber.count}}"
And: add comment to issue: "Hi, there are {{OpenIssueNumber}} open requests ahead of yours."
I would expect this to add a comment saying "Hi, there are 9 open requests ahead of yours." But instead it is saying "Hi, there are open requests ahead of yours."
Where am I going wrong?
Hello @Will Fieldsend
It looks like you are using the wrong smart value. You can access your results with {{lookupIssues}} and the incorrect count option. You need to use size to get the number of items in the result.
There is no need to create a separate variable here but if you want you need to change the smart value to {{lookupIssues.size}}
Otherwise, just add a comment with: "Hi, there are {{lookupIssues.size}} open requests ahead of yours."
@Paul Wiggers YOU LEGEND!
I can't tell you how annoyed I was yesterday at not being able to solve this. I even tried asking ChatGPT which was next to useless. I should have come here in the first place. Thank you so much, this is why I love communities.
Thank
Will
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good to hear it helped.
And yes, the community is great. It brought me a lot!
Enjoy the rest of your day.
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.