Forums

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

Auto add user(s) to the Request Participant field when the user(s) is/are mentioned in a comment

Tran Ngoc Duc February 1, 2024

Hello, Can anyone advise how to configure the automation to add multiple users to the Request Participants field when they are mentioned in a comment by any one?

Our setting: We configured a Security Scheme that restrict user's access to the ticket. In details, only the following users can access and view the ticket

- Admin

- Reporter

- Approver

- Executor

- Request Participant

 

This leads to an issue that if the Executor needs someone else's help to proceed the ticket, they will mention that person(s) in a comment. And then the Admin has to add the mentioned person to the Executor or Participant manually, so that mentioned user(s) will be able to access the ticket, read comments.

 

Therefore, I want to configure an automation that add any users who are mentioned in a comment. I have found this article and tried Scenario 6 but it does not work

 https://confluence.atlassian.com/automationkb/automation-for-jira-how-to-update-the-request-participants-or-a-multi-user-picker-field-from-the-content-of-other-fields-1216971334.html#AutomationforJiraHowtoupdatetheRequestParticipantsoramultiuserpickerfieldfromthecontentofotherfields-Scenario6-AdduserstotheRequestParticipantsfieldfromacommentswhereuserswerementioned

4 answers

1 accepted

1 vote
Answer accepted
Tran Ngoc Duc August 27, 2025

This is my automation to add multiple mentioned users in a comment to the "Mentioned users" field

mentioned users.png

0 votes
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?

Tran Ngoc Duc August 27, 2025

Hi @Shahbal Ehsan , I managed to configure the automation to add mentioned users to a temporaty field named "Mentioned users", and then copy "Mentioned Users" field to the "Request Participants" field. I have to split it into 2 automations because the 1st automation will overwrite the current users in "Mentioned users" field

This is my automation to add multiple mentioned users in a comment to the "Mentioned users" field

mentioned users.png

 

1. Trigger: When a new comment is added

2. Take action: Create variable

   2.1 Variable name* (required): addMentionedUsers

   2.2 Smart value* (required):

variable.png

3. IF: Add a condition: {{smart values}} condition

   {{addMentionedUsers}} DOES NOT EQUAL "Empty"

4. Then add action: Edit work item field

    4.1 Selected field = "Mentioned Users"

   4.2 Value = {{addMentionedUsers}}

From this point, I also want to send an email notification to the mentioned users (The system already has this noti but because I don't allow everyone access to the ticket therefore some new users might not receive notification in the 1st time they were mentioned in a comment and added to the ticket)

5. Add action: Re-fetch work item data

6. Send email to: Mentioned users

 

I hope this is helpful to you.

Shahbal Ehsan August 27, 2025

I have created the rule as you explained, and the rule was successful (as you can see in the screenshot), but after mentioning, the user is still not showing up in the Request Participants field.3.jpg2025-08-27_13-43-17.jpgww.jpg

Tran Ngoc Duc August 27, 2025

"Request Participants" seems like a special field to me, I have to create another field named "Participants" with the same function. Could you try follow my method? add mentioned users to a field and then copy users from that field to the Request Participant?

0 votes
Scott Goodman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 11, 2025

method in jira cloud?

 

Tran Ngoc Duc April 13, 2025

Yes, it is. The problem has been solved.

0 votes
Cyrille Martin
Community Champion
February 1, 2024
Tran Ngoc Duc February 1, 2024

Hi @Cyrille Martin , thank you for looking into my issue. I already followed that article and tried the scenario 6, as I mentioned in my post, but it does not work.

 

In Scenario 6, I don't understand the JSON in Additional fields, so I copy the content to my automation. I created a test ticket and these are what I have done to test:

- Created a test ticket

- From portal, reporter mentioned user A ==> User A was auto added to the Participant

- From Jira project (not portal), user A mentioned user B in the comment

==> Expected result: User B was auto added to the Participant

==> Actual result: User B was not added to the Participant. Admin had to add user B manually

 

Cyrille Martin
Community Champion
February 1, 2024

The JSON is splitting the comment by the character separating the user mentions. In the exemple - ; and ,

If in your case you just have one user mentioned, you can remove the split function and then you will have the user mentioned

Tran Ngoc Duc February 1, 2024

Oh, thank you, this is my updated JSON

 

{
"update": {
"Participants": [
{{#issue.comment.last.body.substringAfterLast("[~").substringBeforeLast("]")}}{"add": {"name":"{{.}}"}}{{^last}},{{/}}{{/}}
]
}
}

 

If the comment is: "I do not have permission to grant access. Hi @Cyrille Martin , could you help?" 

Then will the JSON work? I am not sure if the user's name mentioned is in this format [~julien1]

Cyrille Martin
Community Champion
February 1, 2024

Your JSON should work.

The format with the square bracket is used for DC for sure.

Suggest an answer

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

Atlassian Community Events