Hi all,
I try to add a fix version(new version which is not exist yet) to jira issue.
$json = '{ "update" : {"fixVersions" : [ {"add" : {"name" : "TEST-123"}}] } }'
Invoke-RestMethod -Uri https://jira.xxx.lan/rest/api/2/issue/ISSUE-911 -Method PUT -Headers $headers -ContentType "application/json" -Body $json
It works if the version "TEST-123" is already exist. But if it is not, I am getting 400 error (bad request).
Could you help, please?
Hello,
Check first if the version exists with GET /rest/api/2/project/{projectIdOrKey}/versions
If not, then create it with POST /rest/api/2/version
Then use your Rest call
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.