Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: Checking if user is existing request participant before adding

Steve Rhodes
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 28, 2025

I have a strange "bug" with my JSM automation. It fails to pass the JQL condition which is looking for the last person to comment in the request participants field, unless there is already a value (anyone) in the Request Participants field. It basically fails the condition if RP is empty. Its checking like so:

 "Request participants" not in ({{issue.comments.last.author.accountId}})

and looks like this in the automation:

Screenshot 2025-03-28 at 17.17.23.png

Screenshot 2025-03-28 at 17.18.03.png

 

The audit log suggests that the issue didnt match the JQL (the actor is Automation for Jira and it runs everything else, and there is no issue level security).

JQL Condition 28/03/2025, 16:26:37
Collapse
The following issues did not match the condition:
SUPPORT-12345
  • the issue didn't match the specified JQL (most likely)
  • the chosen rule actor doesn't have permissions (or issue security level permissions) to view the issue
  • the issue was deleted or wasn't indexed by Jira yet (in rare circumstances)

We recommend using the 'Issue fields condition' for more consistent results.

 

As I mentioned above, if there is already a user in the Request Participants field, then this works and passes the JQL. Am I missing something here?

 

(My workaround in the automation is to temporarily add a service account as RP, pass the JQL condition and then remove it after, which is hella clunky).

 

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2025

Hi @Steve Rhodes 

Have you tried adding a check if the Request Participants field is empty also in the condition:

"Request participants" NOT IN ( {{issue.comments.last.author.accountId}} )
OR "Request participants" IS EMPTY

Kind regards,
Bill

Steve Rhodes
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
yesterday at 3:38 AM

Thanks for the reply Bill. That worked. I feel a bit of a fool for not trying this myself earlier. It should just work with the NOT IN operator but forcing it to pass by checking to see if its empty of course works too.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer