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

Rahul Sahotay June 12, 2017

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
Answer accepted
Nic Brough -Adaptavist-
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 12, 2017

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?

 

Rahul Sahotay June 12, 2017

Thanks much Nick, you really made my day 

0 votes
Rahul Sahotay June 12, 2017

Thanks much Nick, you really made my day 

Suggest an answer

Log in or Sign up to answer