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
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 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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.