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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
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