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

This widget could not be displayed.

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 

This widget could not be displayed.

Thanks much Nick, you really made my day 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 4 hours ago in Featured Groups

Hi! I'm Cameron Deatsch, Head of Server at Atlassian and I'm hosting an AMA next week.

Hey team! I'm Cameron Deatsch, Head of Server at Atlassian. I'll be hosting an AMA over in our Questions section of the Community next Monday, so shoot me your questions, upvote others' question...

22 views 0 2
View post

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