jira-client
jira-client copied to clipboard
Multiselect update error
I am attempting to update the custom_field configured below: ``` "customfield_13177": { "required": false, "schema": { "type": "array", "items": "string", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:multiselect", "customId": 13177 }, "name": "My Custom Field", "hasDefaultValue": false, "operations": [ "add", "set", "remove" ], "allowedValues": [ { "self": "https://jira-dev1.datalogix.com/rest/api/2/customFieldOption/17780", "value": "YouTube", "id": "Value1" }, { "self": "https://jira-dev1.datalogix.com/rest/api/2/customFieldOption/17781", "value": "Value2", "id": "17781" } ] },
I'm attempting to update this field with this syntax:
newIssue.update()
.field("customfield_13177", new ArrayList() {{
add("Value2");
}})
.execute()
Which returns this error:
`net.rcarz.jiraclient.RestException: 400 Bad Request: {"errorMessages":[],"errors":{"Media Partner":"expected Object"}}`
Am i doing this wrong?
the toJson method seems to be imcompatible with a custom field where type == "array" and items == "string"
The error makes sens as the accepted values are not string but objects but the admin in jira does seem to allow us to configure that field differently.
jira-client does handle arrays of strings, but there's special handling for multiselect fields made in d85076dd0f9c2ca4affe796393af4168957751cf. Maybe the API changed?
@stevegore Any ideas?
I'm seeing the same thing too