The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Fields Additon in POST REST API

Sanchita Raut
January 27, 2022

Tried to add a customField in my POST REST API to create an Issue but not able to create an issue.

This is my JSON object for POST

 

{
"fields": {
"project":
{
"key": "SD"
},
"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_11452" : "Value that we're putting into a Free Text Field."
}
}
Getting this as a response message 
{
"errorMessages": [],
"errors": {
"customfield_11452": "Field 'customfield_11452' cannot be set. It is not on the appropriate screen, or unknown."
}
}
I m not able to figure out exactly where the error lies and why I am facing this issue 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Roberto Miasack
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 Champions.
January 27, 2022

@Sanchita Raut hello!

 

Welcome to Community!

 

I suggest that you can search about API in this documentation. I'm already submitting the issue creation page.

 

Creating an issue examples

 

i hope i can help you.

 

Kind Regards

Sanchita Raut
January 27, 2022

Thanks Robert,

 

But I am following the same documentation already and my Create Issue is working properly I can see the Issue on the board when my API is executed but this is not working for Create Issue with Custom Fields . Do I have to add anything in myproject ?

Roberto Miasack
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 Champions.
January 27, 2022

@Sanchita Raut

 

Right! As I understand the error, the field is missing on the Jira screen. Please follow these steps:

 

These are the steps to add the field in the project screens:

 

1.png2.png3.png4.png

 

Let me know if you can.

 

Kind Regards

Sanchita Raut
January 27, 2022

I followed the above steps and added a new field named "severity" to my screen of Issues but when  I make a post request through an API from Postman I still get the same error 

Req:

{
"fields": {
"project":
{
"key": "STAR"
},
"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"
},
"severity" : "Value that we're putting into a Free Text Field."
}
}
Res:
{
"errorMessages": [],
"errors": {
"severity": "Field 'severity' cannot be set. It is not on the appropriate screen, or unknown."
}
}
Roberto Miasack
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 Champions.
January 28, 2022

Its the same error for a field Severity. You need add this field on the screen too.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events