stable

Clone or download

Read-only

Be able to update forward links

Part of story #24970 [modal] select type for links How to test: - Enable the feature flag: $ tuleap config-set feature_flag_allow_reverse_links 1 - Make a PUT request to an existing artifact (e.g 120) with the following payload: ``` { "values": [{ "field_id": 543, "all_links": [ {"id": 11, "direction": "reverse", "type": ""}, {"id": 151, "direction": "forward", "type": "_is_child"} ] }] } ``` The artifact 120 should have artifact 11 as reverse link The artifact 120 should have artifact 151 as forward link Since the behaviours of the route must not change , some reverse links with particular type such as `_mirrored_links` are ignored. In that case, no error is returned because it would break the current behaviours of other service such as Program Management (see REST test). Change-Id: I0d688405d38b26764c266fc1eb1549fa1b396f5c

Modified Files

Name
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/AllLinkPayloadParser.php +17 −0 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueBuilder.php +12 −1 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/RESTForwardLinkProxy.php +27 −2 Go to diff View file
M plugins/tracker/include/REST/Artifact/PUTHandler.php +19 −22 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +2 −9 Go to diff View file
D plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/AllLinksToLinksKeyValuesConverter.php +0 −55 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Link/ArtifactUpdateHandler.php +30 −5 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Link/HandleUpdateArtifact.php +15 −0 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/ArtifactLink/RESTForwardLinkProxyTest.php +40 −0 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/PUTHandlerTest.php +54 −34 Go to diff View file
M plugins/tracker/tests/unit/Stub/HandleUpdateArtifactStub.php +25 −2 Go to diff View file
D plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/AllLinksToLinksKeyValuesConverterTest.php +0 −63 Go to diff View file
R plugins/tracker/tests/unit/Tracker/Artifact/Link/ArtifactFromRestUpdaterTest.php Go to diff View file