Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

JSON writing a username error

Martin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2023

Hi there, 

When we create delivery tickets to execute an idea, the team manager will assign a responsable on the created EPIC. I want an automation to send this assignee value back to a JDP custom field that I called: Project Manger. The custom field ID is: customfield_10475

However, It's not working right.

My script gives me the error: 

Error editing issues
OPJ-288 (data was not an array (customfield_10475))
Seams like I cannot go around that. My field type is: @ People field
Greenshot 2023-05-25 11.39.48.png

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
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.
May 25, 2023 • edited

Hi @Martin 

Please try using the accountId value, and not the displayName, to select a user in a single-select user field.  Here is the syntax for that:

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

Kind regards,
Bill

Chris Timms
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.
May 26, 2023 • edited

Hi @Bill Sheboy 

Your solution does not tackle the reported issue, which is that the field entry is not in an array. Multi-user fields need to be added as arrays via automation even if you are only trying to add a single value. The error will be the same even if Martin tries the account ID. You cannot create single select use fields in JPD, I believe.

However, you have found the page I referred to in my answer, which demos this correct syntax for adding a field value in an array, so thank you!

Regards,

-C

0 votes
Chris Timms
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.
May 25, 2023

Hi @Martin !

is your custom field a multi select field or can it only have a single value? If it’s a multi-select field, you need to format your request as an array even if you are only storing a single value. I can’t find the samples on mobile, but Jira’s smart value documentation has enough info that allowed me to solve the issue previously.

regards,

-C

TAGS
AUG Leaders

Atlassian Community Events