input values for customfield_22133

Dominik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 7, 2024

Hi, I am trying to create a request to jira, from my service written in Java. When I create the request and send it from postman, it goes thru, but the customfield_22133 (Impact on) has the following structure. 

        "customfield_22133": [
            {"value0": "Customer"},
            {"value1": "Partner"},
            {"value2": "Internal"}
        ]

the description from jira for that field is as follows: 
{
"id": "customfield_22133",
"name": "Impact On",
"custom": true,
"orderable": true,
"navigable": true,
"searchable": true,
"clauseNames": [
"cf[22133]",
"Impact On"
],
"schema": {
"type": "array",
"items": "option",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes",
"customId": 22133
}
},

When I am trying to achieve the required result, I chose the approach of creating a ArrayList<HashMap<String, Object>> however, I received the following error: 

Caused by: org.codehaus.jettison.json.JSONException: Cannot generate value - unknown type for me: class java.util.HashMap
at com.atlassian.jira.rest.client.internal.json.gen.ComplexIssueInputFieldValueJsonGenerator.generateFieldValueForJson(ComplexIssueInputFieldValueJsonGenerator.java:58) ~[jira-rest-java-client-core-5.2.2.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.gen.ComplexIssueInputFieldValueJsonGenerator.generateFieldValueForJson(ComplexIssueInputFieldValueJsonGenerator.java:50) ~[jira-rest-java-client-core-5.2.2.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.gen.IssueInputJsonGenerator.generate(IssueInputJsonGenerator.java:43) ~[jira-rest-java-client-core-5.2.2.jar!/:na]
at com.atlassian.jira.rest.client.internal.json.gen.IssueInputJsonGenerator.generate(IssueInputJsonGenerator.java:31) ~[jira-rest-java-client-core-5.2.2.jar!/:na]

is there some other approach, or other Map, that I could use? 

Thank you in advance.

1 answer

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 7, 2024

Hey @Dominik ,

Welcome to the Atlassian Community!

For a developer question like this I would recommend you ask it in the Developer Community at https://community.developer.atlassian.com as that's where most App Developers are and they will be better suited to answer these type of questions.

Cheers,
Peter

Dominik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 7, 2024

Hey Peter, Thanks for your suggestion. I will try to post it there as well :) 

Like Peter Van de Voorde likes this

Suggest an answer

Log in or Sign up to answer