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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.