Forums

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

Jira Automation: Convert string containing user's displayname to a user ID field

Ryan S
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!
February 9, 2023

My JSM project is emailed when a user locks themselves out of their account. The emails that we receive are not customizable, but do contain the user's full display between a set of parentheses exactly as it would appear in Jira products. I need a way to take this display name string and set that user as a requested participant on the ticket.

Here is my attempt at updating the request participants field with this user:

{
"update": {
"Request participants" : [
{
"add": {
"id":"{{issue.description.substringBetween("(",")")}}"
}
}
]
}
}

1 answer

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Champion
February 9, 2023

You can get the Atlassian ID via the search user endpoint, and then use that to set the request participant.

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