Issue Summary
When a user with a non-super admin role is trying to create a KeyResult via API POST, the error 400: "Cannot create Key Result. Value for parentType is invalid" is thrown.
Steps to Reproduce
- Create (or use existing) non-super user role that has every permission enabled
- Assign the user the role created/chosen in step 1
- Generate and/or copy the user's API 2.0 token
- Login to Jira Align with that user
- Create a Portfolio Objective: 'MyObjective' and note the id (e.g. 3627)
- Add to 'MyObjective' a key result (for example one of type score)
- Use the API token to make a GET call to the objectives/milestones endpoint to retrieve the objective created in step 5.
- Use the id (e.g. 3627) of the objective as the parentId in the key result of the POST body request made to the keyresults endpoint.
For example:{ "parentId": 3627, "parentType": 44, "baselineValue": 1, "targetValue": 2, "type": 2, "description": "test score key result", "weight": 20, "createDate": "2023-09-04T07:34:53Z", "ownerId": "661802", "score": null, "isScoreOveridden": null, "scoreOverrides": [], "valueUpdates": [], "targetDate": "2023-09-26T00:00:00Z" }
Expected Results
The KeyResult is created by the POST request as it can be created in the UI using the same user.
We should be able to do the same operation via API as in the UI.
Actual Results
"Cannot create Key Result. Value for parentType is invalid."
Workaround
It is possible to make the request using an API Token from a user with a 'Super Admin' role (roleId:9) assigned. That is currently the only known workaround at the moment.
- resolves
-
ALIGNSP-20641 Loading...