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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

135 views 4 5
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