Assign triggerer user to a custom user picker field

rodrigogiraudo
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!
July 7, 2023

Hello team! 

I have a Project that for the stories we have a couple of custom fields, one is a user picker called "Developer", that is different to the default assigned field.

I want to create an automation, but when I set the new action to edit issue and select the Develoepr field there is no option to select the user that triggered the event.

how can I do that?

 

1 answer

3 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 7, 2023

You can use the advanced option that allows you to specify the JSON code to set the field to the user that triggered it. Something like this will do it:

{ 
"fields": {
"customfield_xxxxx": {
"id": "{{initiator.accountId}}"
}
}
}

Just set the custom field to the Id of your developer field. 

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 7, 2023

Also check out the documentation for smart values, it has more examples on how you can add/edit/delete values from a field using the JSON function.

Like # people like this
rodrigogiraudo
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!
July 7, 2023

Thank! you are my hero! 

I finally manage to make it work with:

{
"fields": {
"customfield_XXXXX": { "name": "{{initiator.name}}" }
}
}
Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events