Forums

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

how to add a user tagged in a ticket comment to a ticket observer?

Tancrède Taillade August 18, 2022

how to add a user tagged in a ticket comment to a ticket observer?

4 answers

0 votes
Tancrède Taillade August 24, 2022

it's ok thank you ; you can close this issue

0 votes
Tancrède Taillade August 18, 2022

Hello Mark ; thank you for you answer, it works. But the field that i want to update doesn't work ; my json looks good : 

{
"update": {
"customField_10087": [
{
"add": "{{varMention}}"
}
]
}
}

Mark Segall
Community Champion
August 18, 2022

What type of field are you using for observer?

Tancrède Taillade August 19, 2022

it's a "user field" named "request participant"

Mark Segall
Community Champion
August 19, 2022

Looks like you're close.  In your add section, you should call out accountID.  It should look something like this:

{
"update":{
"customfield_10087":[
{
"add":{
"accountId":"{{varMention}}"
}
}
]
}
}
Ben Radlinski
Contributor
May 3, 2024

Hi Mark, sorry to reopen the post, but I'm trying to get this to work in Data Center. The user wants to be able to tag a user in a comment (Agent ticket, not Portal) and add them at as a Participant. I point out that the option to select a Participant is right there, but they would like this to be an option.
I've got the ID for the request participant field in the format about and the automation set up just like yours below. However, when a comment is added and a user is flagged, the Automation log says "the following issue did not match the condition".  This is a JSM project, if that makes a difference. Thank you.

 

chrome_EiqPwDI4p7.png

chrome_ripS9JYewh.png

0 votes
Tancrède Taillade August 18, 2022

hello, thank you it works for "the watcher" 

but we use an other field tha wther besause the watcher is not used to find an issue in the client dashboard ; and we can't ad the watcher on the issue

0 votes
Mark Segall
Community Champion
August 18, 2022

Hi @Tancrède Taillade and welcome to the community!

You can use automation for this:

2022-08-18_06-47-47.jpg

 

This rule tries to find the @mention and stores the account ID as a variable. If the variable returns a string then it adds the watcher.

For copy/paste, here are the specifics:

Variable

{{comment.body.match("(?<=\[~accountid:)(.*?)(?=\])")}}

Advanced Compare

{{varMention.length}}

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