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

mirek paszkowski November 1, 2017

A number of custom fields have been created but an error is returned when trying to create a JIRA issue and setting a custom field.

request body:

{    "fields": { 
         "project":       {           "key": "UCO"       },
         "summary": "111 - with custom fields",
         "description": "Create issue with team custom field",
         "issuetype": {          "name": "Bug"       },
         "customfield_10012" : "Top Gear12" ,
         "customfield_10010" : "Top Gear10"    }
}

Error response:

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

 

Searching on this error shows that the field has to be added to the screen - but which screen?

How do I find out what screen to add the custom field to?

 

I can get field for screens using REST

/rest/api/2/screens/{screenId}/availableFields

 

but what value of screenId corresponds to which screen?

putting in a value of 1, 2, or 3 returns information but what screen is it for?

 

 

 

 

8 answers

5 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 1, 2017

Hi Mirek,

since you are creating an issue, I assume, you have to add the custom fields to your issue creation screen. 

Have a look at your project settings and there on the screens:

( http://<your jira url>/plugins/servlet/project-config/<projectkey>/screens )

Then open the screen that is used for creating an issue. Look at the URL. There you can see the screenId.

In that form, you can also add your custom fields to the screen. 

Aaldrich Enting April 11, 2018

I was also having the same problem, after following @Thomas Schlegel's suggestion, I added the custom fields to the screen and it worked.

Like Andrey likes this
NareshBusireddy April 13, 2018

Hi @Thomas Schlegel, I've followed your steps above, but not able to see the customfield(I'm using a single line text field) that has been added to the issue create screen through rest call as below.

/rest/api/2/screens/18311/availableFields

But the same can be shown in screen fields, through browser. Any thoughts on this one.

Like Charles Johnson likes this
yaogang xu April 30, 2019

Hi @Thomas Schlegel , I met the same issue when I call create issue api in my code, the error 'It is not on the appropriate screen, or unknown.' But when test api with the same parameters in postman, it is succeed, so I don't think is the field doesn't add to screen causes the error, do you know the reason?

Like # people like this
Marco Antonio Parra August 6, 2020

Thank you u save to me Thomas  I was triying to solve this per hours , Thank you @Thomas Schlegel 

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 7, 2020

That’s great, thank you, @Marco Antonio Parra 

1 vote
Helen Craig May 31, 2023

Thanks, I was having issues with my JIRA Automation not being able to set a Request Type for a Service Desk issue. The URL above didn't work but this method did:

  • Service Desk project settings
  • Issue type 
  • Look at screen in the issue type line and click on it
  • Get to an Issues Config Screen Scheme
  • Click the screen name
  • Get to config screen
  • Add the field that you need - in my case Request type. This is a weird screen as there's no save button.
  • Try the automation again - in my case it worked.
1 vote
mirek paszkowski November 1, 2017

yes, I thought that was the case.

Our product creates a JIRA project via REST API and should not need user to login to JIRA to find out screen id.

We need to find out the screen id via REST but I'm not seeing any way to do that - one possiblity is to send request for fields for tabs on screen:

rest/api/2/screens/10003/tabs/10103/fields

by iterating over screenId and tabId until we find the expected fields on the create/view/edit screen/tab. (I assume both start at 10000?) but that does not seem ideal.

mirek paszkowski November 2, 2017

iterating over screen ids to find screen with matching fields won't work if there is more than 1 project.

The default (DEF) project and any other projects will each have a create/view/edit issue screen so won't be able to tell which is the screen in question.  (as already stated above)

0 votes
oneumyvakin August 23, 2018

I've got this issue when tried to set same field values which filed already has.

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.
August 23, 2018

You need the field on the edit screen to be able to set it.  Your REST command has sent it, but the field is not there to edit.

Like Catalin Tigau likes this
0 votes
mirek paszkowski November 2, 2017

just a thought, could JQL be used to get list of screens?  (... but according to documentation this is for searching JIRA issues only)

 

If so, can an example be posted?

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 2, 2017

no, JQL is for issues only

0 votes
mirek paszkowski November 1, 2017

Almost got all parts to solve the puzzle :)

Using the url above, the create/edit/update screen is 10003

Is this guaranteed to be the same for all Jira instances?

I would like to get the screen  id using the REST API instead of via browser and  above url - is that possible?

Alexey Matveev
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.
November 1, 2017

It depends how you move your settings from one instance to another. If you move via database or jira backup/restore then it will be the same. If you do it manually or use plugins then you never can be sure that id's will be the same. They can be the same and They can be not the same.

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 1, 2017

No, the screen id is not the same for all Jira instances. It also depends on the project, you are adding an issue to. Different projects might use different create screens.

As far as I know, there's no way to get the id of the create screen for a project using rest.  There's an open issue for that functionality:

https://jira.atlassian.com/browse/JRASERVER-40440

There you can find some discussions about this.

0 votes
mirek paszkowski November 1, 2017

@Thomas - thanks for quick response - certainly points me in the direction to investigate. :)

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 1, 2017

You're welcome, @mirek paszkowski

If you later think, one or both of our answers were right, please accept it / them  as solution.

Answers to solved questions can be found more easy by other users who might have the same problem in the future. 

Thank you.

Like Dave Liao likes this
0 votes
Alexey Matveev
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.
November 1, 2017

Hello,

It must be on the create screen. But you can disable this verification by the following statement:

IssueInputParameters issueInputParameters = 
     new IssueInputParametersImpl();
//Set to skip screen check 
issueInputParameters.setSkipScreenCheck(true);

 

Bhupesh Nagda July 2, 2018

Is there a parameter which can be used inside JSON body to skip this check?

 

Thanks,

Bhupesh

Asha Kumari September 13, 2018

I have tried the below in the API request but still the issue persists:

.queryString("overrideScreenSecurity", true)

Yatish Madhav
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.
July 7, 2020

Thanks for all the posts here all. Is it possible to do this screen check skip on API calls to create an issue? I.e. the POST /rest/api/2/issue ?

What I want to do is clone an issue by getting and then setting the values of all the fields ... and it is a real problem if the fields need to be manually added (even if by the API) to the screens, esp if the issues will be created on variable projects.

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.
August 7, 2020

No, the api respects the UI settings.

Suggest an answer

Log in or Sign up to answer