Issue Summary
Doing a PATCH or a PUT request to rest/align/api/2/Epics/EpicId endpoint to add a link to a work item will return the error :
"Cannot update epic with id EpicId. Cannot update links. Id shouldn't be empty."
Steps to Reproduce
Make a PATCH request to rest/align/api/2/Epics/EpicId endpoint with the following body:
[ { "op": "add", "path": "/links/0", "value": { "name": "linkymclinkface", "link": "somelink.com" } } ]
OR
Make a PUT request to rest/align/api/2/Epics/EpicId endpoint with the following body:
{ "title": "TestLink4Epic", "ownerId": "<ownerId>", "description": "TestLink4Epic", "primaryProgramId": <programId>, "state": 1, "type": 1, "links": [ { "name": "linkymclinkface", "link": "somelink.com" } ] }
Expected Results
PATCH method operations should work with additional links
The add operation should return an error if a linkId is provided
Actual Results
The error "Cannot update epic with id EpicId. Cannot update links. Id shouldn't be empty." is returned.
Workaround
Specify an id (made up) in the request of the body.
For example for the PATCH request:
[ { "op": "add", "path": "/links/0", "value": { "id": 100, "name": "linkymclinkface", "link": "somelink.com" } } ]
It will result in a 204 code and the link created.
Note: If you GET the work item content, you will see that the response body may contain a different id (than the one specified unless it corresponds to the next one in the database).
- resolves
-
ALIGNSP-14190 Loading...
-
ALIGNSP-15762 Loading...