Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to set FixVersions via api for next-gen project

Peter Duffy Obel January 7, 2021

I have been trying to set the fixVersions property of an issue. The issue is in a next-gen project. It is not an option to change that to a classic.

The version exists in the project and I can manually assign it when I go to the UI.

But whenever calling a PUT request on the issue via the API I get the following error:

[fixVersions]: Field 'fixVersions' cannot be set. It is not on the appropriate screen, or unknown.

If I add the ovrideScreenSecurity query parameter I get the following error:

[403] Only Connect add-on users with admin scope permission are allowed to override screen security.

 

 

1 answer

0 votes
Martin Bayer [MoroSystems, s.r.o.]
Community Champion
January 7, 2021

Hi @Peter Duffy Obel following request's body works for me:

{
"fields":
{"fixVersions":
[{"name":"1.0.0"}]
}
}

If you want to set more versions you can use:

{
"fields":
{"fixVersions":
[{"name":"1.0.0"}, {"name":"1.1.0"}]
}
}
Peter Duffy Obel January 7, 2021

I have tried both that and

{"update":
{"fixVersions":
["set": [{"name":"1.0.0"}, {"name":"1.1.0"}]]
}
}

 When I get the json right (I think I might be missing a bracket on the sample above since I am away from that pc) 

I get the 

Field 'fixVersions' cannot be set

Whenever I write the json wrong I get errors complaining about the json. So I am pretty sure the actual put request is correct.

Can it be the api credentials? I am using a token for an admin user

Martin Bayer [MoroSystems, s.r.o.]
Community Champion
January 7, 2021

@Peter Duffy Obel please post here your exact PUT request description. Because your request's body is not the same as mine.

Same error (as you received) occured to me when the JSON was valid but it's content was not valid for REST endpoint.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events