This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement /api/workitem/:ID/relationships/links (#525)
This change will introduce the endpoint `/api/workitems/:ID/relationships/links` for work item links that lives under the work item endpoint and automatically filters work item links associated with the work item on the backend. You can also use this endpoint as you would use the `/api/workitemlinks/` endpoint. Also, this change will introduce the `included` top-level JSONAPI element for responses of `/api/workitemlinks/` that return work item links or arrays of work item links. Currently this `included` element will contain only objects of type work item link type. Currently the UI has to do the filtering of links on a particular work item. This should be no longer needed. == Checks In the WorkItemRelationshipsLinksController we perform the following checks for the listed actions. === Create action * We check that the current work item (:id) does exist. * Check that the source ID of the link is the same as the current work item ID (:id). * If no source is specified we pre-fill the source field of the payload with the current work item ID from the URL. This is for convenience. === Delete action * We check that the work item (:linkid) does exist. * Check that the source ID of the link to be deleted is the same as the current work item ID (:id). === List action * No checks are done === Show action * We check that the work item (:linkid) does exist. * Check that the source ID or target ID of the link to be shown is the same as the current work item ID (:id). === Update action * We check that the work item (:linkid) does exist. * Check that the source ID of the link to be updated is the same as the current work item ID (:id). * Check that the source ID of the update payload is the same as the current work item ID (:id). Related to #307
- Loading branch information
1 parent
90158fd
commit 3d7da8c
Showing
12 changed files
with
1,078 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.