Copying values from a custom field to Request Participant ?
Asked by Touqeer Anjum:

Hi,

I'm trying to capture values from a custom field in the ticket and once ticket is created add those values to the Request Participant field.

For testing purpose I'm using a registered user and an unregistered user.

Found this link [How to add/update/remove Request Participants using Automation for Jira \| Jira \| Atlassian Documentation](https://confluence.atlassian.com/jirakb/how-to-add-update-remove-request-participants-using-automation-for-jira-1157468434.html)

And I' using the below code

    {"update": {  "Request participants": [   {{#issue.Approvers}}{"add": {"id":"{{accountId}}"}}{{^last}},{{/}}{{/}}   ] } }

But am seeing the below error.

##### *Additional fields contains invalid 'update'. You can use 'add', 'remove', 'set' or 'edit' for operations. customfield_10026* {#toc-hId--1504695555}

customfield_10026 is of Request Participant.

Any thoughts on what to do ?

Thank You


Answers:
author: Jack Brickey
body: Hi [@Touqeer Anjum](/t5/user/viewprofilepage/user-id/4561572) , it appears that you are using the exact code block from the linked article. In that article I believe they are copying from the approvers field. I would assume that you are not using that field but you have your own custom field? If that is the case, then you should replace the approvers with your custom field I believe.

comments: author: Touqeer Anjum
body: Thanks [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369)

I changed that to customfield, and now am seeing a different error.

CODE:

```
{"update": {
"Request participants": [
{{#issue.customfield_10083}}{"add": {"id":"{{accountId}}"}}{{^last}},{{/}}{{/}} 
]
} 
}
```

ERROR :
> (Field 'customfield_10026' cannot appear in both 'fields' and 'update')

I'm not sure what this error means.


author: Jack Brickey
body: Please share a screenshot of your automation rule. I will try to try and recreate/test today if I can.


author: Touqeer Anjum
body: Thanks..

In the image CC is the customfield.

![1.png](https://community.atlassian.com/t5/image/serverpage/image-id/297585i83B8EE842A0040AE/image-size/large?v=v2&px=999 "1.png")![2.png](https://community.atlassian.com/t5/image/serverpage/image-id/297586iF8F837FBBE0FC3F5/image-size/large?v=v2&px=999 "2.png")![3.png](https://community.atlassian.com/t5/image/serverpage/image-id/297587iCCB36B7A62B0469F/image-size/large?v=v2&px=999 "3.png")


author: Touqeer Anjum
body: I changed the code (as in image 3) to test it differently, still the same error..


author: Jack Brickey
body: Can you uncheck Request Participants in your Edit issue component and simply use the JSON.


author: Touqeer Anjum
body: Thanks,

Unchecked and now the error is
> Error while parsing additional fields. Not valid JSON.


author: Touqeer Anjum
body: Hi,

I changed it to Request Participant, and set it to use Smart Value which is

```
{{issue.customfield_10083}}
```

The issue with this is only works with if there is 1 value in the custom field, with multiple values it fails with the below error, even though both users are registered.

*Inactive user*

*email1@yahoo.com, email2@gmail.com*

I tested them and they both get individually without any issues.


Tags: cloud

jira-service-management

jira-service-management-cloud