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

Some array type custom fields need special handling - how can that be determined from REST metadata?

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
July 27, 2015

Most of the standard custom fields that JIRA ships have meta data that says they are arrays with string values. That normally means you need to provide a JSON array of option ids. Cascade select is a odd case even though it reports the same schema but needs to be handled differently. It has historically been an odd case wink.  

The trouble is for an arbitrary custom field that reports meta data as "array" and with items of "string" there doesn't seem to be a way to know the format or content of the data that is expected to set the value of the field. Am I missing something here? One would assume meta data would give you enough information to determine that, but it doesn't. Providing an array of values results in an error. How does one create a representation of data for an arbitrary custom field that represents itself as accepting array values but does not? Also, what indication is there that it needs option ids instead of regular strings? This seems like an omission from the metadata available.

For instance, the agile custom fields look like arrays, but don't accept array values:

schema": {
"type": "array",
"items": "string",
"custom": "com.pyxis.greenhopper.jira:gh-epic-link",
"customId": 11261
},

customfield_11261": "ZAGILE-1",

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
September 11, 2015

I opened this issue ACJIRA-568.

TAGS
AUG Leaders

Atlassian Community Events