Hi! I have scoured the internet for a fix to this.
I am using Jira Automate to populate an email with contents from a JQL Query, that returns all the issues that are basically not completed.
The query works perfectly when interrogating in the Advanced Issue Search but does not populate the email.
-----------------
(assignee = currentUser()) AND ("status" = "To Do" OR status = "In Progress" OR status = "Waiting for response" OR status = "In QA" OR status = "Blocked")
------------------
When I try this one it works perfectly with my automation rule and populates the email perfectly.
--------------------------
((assignee = thisismyuserid12345678) AND ("status" = "To Do" OR status = "In Progress" OR status = "Waiting for response" OR status = "In QA" OR status = "Blocked"))
-----------------------------
So I know it is something to do with the currentUser value .
Both rules return the exact same issues / number of issues - the bottom one is the only one that successfully populates the email with the contents I need.
Any ideas?
Thanks :)
Hi Alex - Welcome to the Atlassian Community!
What is the trigger that causes the automation rule to fire? And who is the rule run as?
Thank you John!
The trigger is a manual trigger for all users who are logged in.
The rule works perfectly when this is used:
((assignee = thisismyuserid12345678) AND ("status" = "To Do" OR status = "In Progress" OR status = "Waiting for response" OR status = "In QA" OR status = "Blocked"))
but returns no values in the email when this is used:
(assignee = currentUser()) AND ("status" = "To Do" OR status = "In Progress" OR status = "Waiting for response" OR status = "In QA" OR status = "Blocked")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, I think it is getting confused as to who the actual user is when the rule is fired, meaning the Actor. So even if Alex fires the manual trigger, it might run as the Actor of Automation for Jira. Does that make sense?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks John -- do you know a workaround for this, so that when one of my teams manually triggers this rule, it will run that JQL search and look for all issues assigned to whoever ran the rule?
Potentially a userid equivalent for assignee = currentUser()?
Thanks for taking the time out to help on this one. I feel like there is a solution staring me in the face but as I've been trying to solve this for so long, I'm getting nowhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't know of a way to do that right off the top of my head. Other than hard coding the assignee like you have it and create a separate rule for each person. How many people are there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, minimum 30 people. And I'd like it to be triggered manually from the rule exception drop down so whoever triggers the automation runs the JQL applicable to themselves
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey John,
Yes it would need to be a manual thing because not everyone would need / want to do it.
And for context, It'll be a JQL statement that looks up a load of issues and edits them (changes sprint, updates fields etc) when triggered - but only the issues based on who triggered the rule. Hence the above JQL.
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.