Forums

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

Add @mentioned users as Request Participants

Shahbal Ehsan August 27, 2025

I want to create a Jira automation rule. In my project, the whole team is added. My goal is that whenever someone @mentions a person in a comment, that person should automatically be added as a request participant. I have tried creating this rule multiple times, but it keeps failing. Can anybody guide me on how to set this up properly?

1 answer

1 vote
Benjamin Črnjak
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.
August 27, 2025

Hi @Shahbal Ehsan , 

first of all, welcome to the Atlassian community! 😊

I made a test automation rule, and I managed to do what you want using regex.
image.pngimage.pngimage.png

 

Here is regex to use:
{{comment.body.replaceAll("[^\[]*\[~accountid:([^\]]+)\][^\[]*", "$1,").replaceAll(",$", "")}}


in the image below, you can see first log action is full comment body without any editing, and the second log action is after regex is applied. You only get account ids.

After that just add this to variable and use variable in edit fields action to add participants.
image.png

 

Hope this helps.

Regards,

Benjamin

Shahbal Ehsan August 27, 2025

I’ve tried multiple times to create this rule, but it keeps failing. Could you please check it again?1.jpg2.jpg

Benjamin Črnjak
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.
August 27, 2025

@Shahbal Ehsan , could you send me a screenshot of create variable action?

because, as I can see in your logs, first log displays whole comment body, and the second one (with regex) clearly works as it displays only accID.


So maybe you made a typo somewhere within create variable action?

here is regex once again:

{{comment.body.replaceAll("[^\[]*\[~accountid:([^\]]+)\][^\[]*", "$1,").replaceAll(",$", "")}}

 

image.png

Shahbal Ehsan August 27, 2025

a3.jpga4.jpga6.jpgI created a new rule again — it successfully ran, but the user is still not being added as a request participant. I’ve attached the full rule screenshot for your reference so you can review it. Could you please take a look and guide me on what might be missing?

If you are available can we connect on teams for just 5 minutes ?

 

team id: sehsan@avanceon.ae

11.jpg22.jpgA1.jpga2.jpg

Benjamin Črnjak
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.
August 27, 2025

I see the problem from the images attached. You made a typo when you were using variable in edit work item action.

look at the image:

image.png

you misspelled variable name when using it in edit work item action: accountID(remove "s" a the end) and try again, it should run well.

 

Regards,

Benjamin

Shahbal Ehsan August 27, 2025

It’s still not working. After removing the ‘s’, the process seems to be stuck and continues searching without completing.

N.jpg

If you are available can we connect on teams for just 5 minutes ?

team id: sehsan@avanceon.ae

Benjamin Črnjak
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.
August 27, 2025

to use variable within actions, use {{}} as they mark smart value.
so you should paste {{accountID}} in that field.

after that it should work.

br,

Benjamin

Benjamin Črnjak
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.
August 27, 2025

@Shahbal Ehsan 
I hope you managed to solve the problem. 
If the problem is solved, please mark this thread as closed. 😊

Regards,

Benjamin

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events