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
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

382 views 0 8
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