Hello everyone,
I wanted to ask for confirmation about a problem I'm having:
Through automation, I update a custom Email field by entering an email address that is generally already present in the project's Customers (portal access) or is a Jira user.
Now, in the automation, I would also like to be able to enter request participants, and since there may already be some present, I thought I would do an update via JSON using the account ID, as when I try to use “Copy from Work Items” and add the email previously written in a variable, it sometimes overwrites the request participants already present.
So I thought I would retrieve the accountID via web request, but it doesn't work.
E.g.:
rest/api/3/user/search?query={{issue.customfield_156.urlEncode}}
If I try to run the string directly in the browser, entering the email address works and displays it.
E.g.
rest/api/3/user/search?query=email@email.com
How can I do this? Any advice on how to handle this case?
Thank you
Hi @FrancoB!
You don’t need to make a web request for this. You can get the accountId from the custom field directly using:
{{customfield.accountId}}
And you’re right, if you set the Request participants field directly, it will be overwritten.
To avoid that, use the Advanced field update section instead, like this:
{
"update": {
"customfield_10038": [
{
"add": { "accountId": "{{responsavelLamina}}" }
}
]
}
}
Where:
customfield_10038 → the ID of your Request participants field
{{responsavelLamina}} → the accountId you extracted in the previous step
Hi @Deivid Araujo ,
could you kindly show me an example on how to use {{customfield.accountId}} to retrieve the id of a Customers user (portal access).
thanks
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.