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 ?
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.