how to configure Jira Issues through rest api

Amal P P March 28, 2023

Hi all,
I have created one custom field in jira through this /rest/api/3/field , next I try to updated one Issue in jira by using the created custom field but it is showing this error 

Field 'customfield_10042' cannot be set. It is not on the appropriate screen, or unknown.

after creating the custom field how to configure the custom field with the Issue in Jira through API, I didn't find any API to configure the custom field give me the suggestion.
Thanks in advance!

 

1 answer

0 votes
Somnath Patil
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 Leaders.
March 28, 2023

Hey Amal,

 

You need to create context to add this field to particular project and issue types.

To create context you can use this rest :  POST /rest/api/3/field/{fieldId}/context

 

Find the below link to know more about how to pass body data  or any other information.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-contexts/#api-rest-api-3-field-fieldid-context-post

Amal P P March 29, 2023

Hi Somnath Patil,

If we create the custom field, it will automatically create one context.
I need to Create Issue with custom field.  if the custom field is already created but it is not configured to the issue, that time I'm getting this below error, 

Field 'customfield_10042' cannot be set. It is not on the appropriate screen, or unknown.

once I add the custom field to the issue I'm able to update the custom filed value
my question is how we can add the custom field to all the issue types 

Somnath Patil
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 Leaders.
March 29, 2023

Hey Amal,

 

Could you please tell what type of custom field(text, number, date) you want to update.

 

Please attach the code(if possible) so, I will get more idea about it.

Amal P P March 30, 2023

 

How can we use the Jira REST API to add a custom field to the description field of an issue, similar to how it is done manually in the Jira interface? I have already created the custom field and it is visible in Jira. However, when I try to set the value of the custom field using the REST API, I get an error message saying "Field 'customfield_10048' cannot be set. It is not on the appropriate screen or unknown." What could be causing this error and how can I fix it?

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