Forums

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

How do I set custom field values without receiving 400 bad request errors?

Eric Keefe
September 3, 2020

I am using an java issueInputBuilder for a tool that automatically submits issues. I'm able to set the summary, reporter, etc..., and then create the issue, but cannot set custom fields. I have looped through the meta data and verified I have the correct ids of the fields.

I have tried two ways:

final IssueInput requestTypeUpdater = new IssueInputBuilder()
.setFieldValue(SUPPORT_REQUEST_TYPE_ID, "Value")
.build();

then calling:

issueRestClient.updateIssue(issueKey, requestTypeUpdater).get(5, TimeUnit.SECONDS);

after having created the issue and claimed it.

I have also tried setting it during creation (ie the builder has info about other stuff). Depending on the field I get one of two errors:

"customfield_21640=Field 'customfield_21640' cannot be set. It is not on the appropriate screen, or unknown."

"customfield_22840=Could not find valid 'id' or 'value' in the Parent Option object."

Is there a way around these errors?

1 answer

0 votes
Eric Keefe
September 3, 2020

Here is full info on the second field, from looping through the meta data.

Field{id=customfield_21640, name=Customer Request Type, fieldType=CUSTOM, orderable=true, navigable=true, searchable=true, schema=FieldSchema{type=sd-customerrequesttype, items=null, system=null, custom=com.atlassian.servicedesk:vp-origin, customId=21640}}

Eric Keefe
September 3, 2020

that wasn't an answer...meant to be additional info for the case.

Suggest an answer

Log in or Sign up to answer