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

When i tried to create a new issue with issue type "Bug" using screen/page, then it is allowed to select value for affects versions but when i tried to the same with REST API then following error message is displayed.

{"errorMessages":[],"errors":{"affectsVersions":"Field 'affectsVersions' cannot be set. It is not on the appropriate screen, or unknown."}}

 

How can i add value(s) for affects versions field while creating an issue using REST API ?

2 answers

All JIRA views are linked to a screen.

You need to go to the respective screen from Administration -> Screens

then add filed "Affected Version" to the screen and click save.

You can se the field now on your page.

 

The id of the field is actually "versions" - try using that instead.

You can get the ids of all fields in the system (both system and custom) by doing a GET on /rest/api/2/field.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

823 views 5 17
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot