Forums

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

api to create issues with multi-select database picker custom field

jfei_zhu February 4, 2020

I use scriptrunner to create a multi-select database picker custom field.

Thorught API, I can see the metadata for this filed:

"customfield_14353": {
"required": true,
"schema": {
"type": "any",
"custom": "com.onresolve.jira.groovy.groovyrunner:multiple-database-picker-cf",
"customId": 14353
},
"name": "abc",
"fieldId": "customfield_14353",
"hasDefaultValue": false,
"operations": [
"set"
]
}

And I created one issue manually, I can get the issue's field:

"customfield_14353": [            
"xyz",
"abcx"],

 It looks like a list of string.

But when I use API to create an issue:

"customfield_14353": [
"xyz",
"abcx"]

It complains  

{    "errorMessages": [],    "errors": {        "customfield_14353""Operation value must be a string"    }}

2 answers

0 votes
jfei_zhu February 17, 2020

Thanks, @PD Sheehan . I still can't figure out this issue. I have sent a help request to scriptrunner. I will post their response here.

Emre Y_ Okur April 27, 2020

Same issue here. Have you found a solution for this, @jfei_zhu ?

jfei_zhu May 1, 2020

no. I asked the ScriptRunner support desk. It's a bug.

0 votes
PD Sheehan
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.
February 4, 2020

I don't have direct knowledge of this scenario, but you can try to examine requests in the chrome developer panel when creating your issue from the UI. You might get some clues as to how the payload is formatted for those multi-select database fields

jfei_zhu February 17, 2020

Thanks, @Peter-Dave_Sheehan . I still can't figure out this issue. I have sent a help request to scriptrunner. I will post their response here.

Suggest an answer

Log in or Sign up to answer