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
This is my automation to add multiple mentioned users in a comment to the "Mentioned users" field
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
1. Trigger: When a new comment is added
2. Take action: Create variable
2.1 Variable name* (required): addMentionedUsers
2.2 Smart value* (required):
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
method in jira cloud?
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.
You can follow the scenarios presented in this page : 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
Matching totally your need.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your JSON should work.
The format with the square bracket is used for DC for sure.
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.