Forums

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

I want to fill out a custom field of people type

Esau Espinoza August 23, 2024

This is the JSON I use for that purpose

 

{ "fields": { "customfield_10282": { "id":"{{triggerIssue.parent.reporter.accountId}}" } } }

 

I am getting "data was not an array" error message. But when I use assignee field it works well.

 

Can someone give an hand with this?

 

2 answers

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2024

Hi @Esau Espinoza -- Welcome to the Atlassian Community!

Custom fields of People type are implemented as multiple-select, even when the single-user option was selected.  This applies to all team-managed, or other project types, using People type fields.

The solution is to use the array format for the JSON, as the error message indicates.  Here is the documentation for that format:

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-user-picker-custom-field

For example:

{
"fields": {
"customfield_10282": [
{ "id": "{{triggerIssue.parent.reporter.accountId}}" }
]
}
}

 

Kind regards,
Bill

Esau Espinoza August 26, 2024

Hi Bill, thanks for help!

 

It works!

Like Bill Sheboy likes this
0 votes
Trudy Claspill
Community Champion
August 23, 2024

Hello @Esau Espinoza 

Welcome to the Atlassian community.

Is this being used in an Automation Rule? If so, please provide screen images showing the entire Automation rule. and the details of the step where you are using this JSON code.

Also, please provide all the information from the Audit Log for the rule execution.

You have flagged your question as being related to the Jira Service Management product. Can you confirm that is accurate? Also, are you working with a Team Managed project or a Company Managed project?

Esau Espinoza August 23, 2024

Hi Trudy, 

Thanks for the help.

I attach the screenshots. It is a Team Managed project that use software project template

Captura de pantalla 2024-08-23 a la(s) 11.07.01 p. m..png

Esau Espinoza August 23, 2024

Captura de pantalla 2024-08-23 a la(s) 11.04.38 p. m..png

Esau Espinoza August 23, 2024

Captura de pantalla 2024-08-23 a la(s) 11.04.26 p. m..png

Trudy Claspill
Community Champion
August 23, 2024

Thank you for the additional information.

Please provide screen images showing the entire Automation rule.

Is this execution of this rule was it your intention that MDP-196 be the editted?

What type of issue is MDP-196?

Does it actually have a Parent issue?

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events