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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to fill custom field value while creating a issue through REST API

Anshul Mittal
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!
Apr 14, 2023
"customfield_123": {
"required": true,
"schema": {
"type": "option",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:select",
"customId": 123
"name": "Field_123",
"key": "customfield_123",
"hasDefaultValue": false,
"operations": [
"allowedValues": [
"self": "",
"value": "abc",
"id": "1"
"self": "",
"value": "pqr",
"id": "2"

I want to fill above field while creating issue using REST API in spring.

IssueInputBuilder issueBuilder = new IssueInputBuilder(projectKey, issueType, issueSummary);
issueBuilder.setFieldValue("customfield_123", 1L);

issueBuilder.setFieldValue("customfield_123", "1");

issueBuilder.setFieldValue("customfield_123", "abc");

I have used above variations and all giving the same error below.

Caused by: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={customfield_123=Specify a valid 'id' or 'name' for Field_123}, errorMessages=[]}]}

What should be approach here? 

1 answer

0 votes
Bill Sheboy
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.
Apr 15, 2023

Hi @Anshul Mittal -- Welcome to the Atlassian Community!

First thing, you might also want to look in the developer community for questions like this one:

Back to your question...and I have not tried this to verify...

That second parameter to setFieldValue() can be a ComplexIssueInputFieldValue, and so you would need to compose it as needed.  Your custom field appears to be a single select field and so you would need to provide either the id or name attribute for selection.

Kind regards,

Suggest an answer

Log in or Sign up to answer