unable to raise a ticket via Rest API by custom field in JIRA Edited

Hello:

I'm trying to raise a ticket in JIRA by REST API (using custom filed) but seeing below error

"Field 'customfield_1234' cannot be set. It is not on the appropriate screen

Command using for same is: 

curl -D- -u  sahotay:sahotay -X POST --data @data -H "Content-Type: application/json"  http://trilogy-02.ds.mot.com:8080/rest/api/2/issue

my data file have below contents 

{
"fields": {
"project":
{
"key": "TST"
},
"summary": "Always do right. This will gratify some people and astonish the REST.",
"description": "Creating an issue while setting custom field values",
"issuetype": {
"name": "Bug"
},
"customfield_1234": "Is anything better than text?"
}

 

Attached is the image will give information about screensJIRA_API.jpg

 

 

 

2 answers

1 accepted

1 vote
Accepted answer

Is customfield_1234 really the custom field numbered 1234?

Go to Admin -> Issues -> Fields, look for the one named customfield_1234 and hover the cursor over one of the edit options.  Does the url that appears on hovering say id=1234 in it?

 

Thanks much Nick, you really made my day 

Thanks much Nick, you really made my day 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Hipchat Cloud

Hipchat Cloud and Stride End of Life: Just over 90 days away

Earlier this year we made the difficult decision to discontinue our team messaging tools, Stride and Hipchat. The end of life date for Stride and Hipchat Cloud is quickly approaching - February 15, 2...

46 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you