Adding custom fields to issues in a project with REST API

Maulik Panchal May 11, 2022

I have created a few custom fields using an API call.
These fields were created successfully and I can view them on my Jira dashboard in Issues > Custom Fields.

When I call another API to create an issue within a project, I want to assign values to these custom fields.
I was able to get the custom field ID from Jira eg. customfield_10082

When I now call the API to add an issue with a structure like this -

{
"fields": {
"project":
{
"key": "ProjectKey"
},
"summary": "This is a Test Issue ",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Test Description"
}
]
}
]
},
"customfield_10082": [{"key":"This is my custom field"}],
"issuetype": {
"name": "Task"
}
}
}

I get an error that says -
"Field 'customfield_10082' cannot be set. It is not on the appropriate screen, or unknown."

When I edit this field on Jira, I added it to all the 3 available screens -
Default Screen
Workflow Screen
Resolve Issue Screen

However, even after adding it to the 3 screens, I get the above error and I am unable to add the custom field to my issue.

I have seen some older threads on the same issue where it was mentioned that it was not possible to add these custom fields to a screen / project.

Eg. Here 

Is there any way in which I can achieve this?

I have created the custom fields previously, I now want to create an issue, and while creating it, add values to these custom fields in the issue.

Any help is appreciated.

Thanks !!

2 answers

1 vote
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2022

Hi @Maulik Panchal ,

The screens are a „ordered display list“ of fields. Those screens can then also be added to screen schemes which define which screen appears on a special operation (view, create, edit).

Could you confirm that you can see the field when you create a new issue manually within jira?

Best
Stefan

0 votes
Deepak Rai
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2022

@Maulik Panchal 

This custom id might be already exist if you can try with some other Id. I think that will work. I am creating from Postman and I am able to successfully achieve this activity.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events