stable

Clone or download

Read-only

Handle forward links for rest creation

part of story #24970 [modal] select type for links How to test: Enable the feature_flag with $ tuleap config-set feature_flag_allow_reverse_links 1 In POST artifacts you can now provide `all_links` key At this moment route only supports forward links creation Example of payload: ``` { "tracker": { "id": 15 }, "values": [ { "field_id": 416, "all_links": [{"id": 29, "direction": "forward", "type" :""}, {"id": 30, "direction": "reverse", "type": "_is_child"}] } ] } ``` Change-Id: Ie2df34b6c7088c2e3a58320addb91c9204e346e7

Modified Files

Name
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/AllLinkPayloadParser.php +2 −2 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueBuilder.php +11 −64 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkInitialChangesetValueBuilder.php +27 −25 Go to diff View file
A plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/ValidArtifactLinkPayloadBuilder.php +75 −0 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/FieldsDataBuilder.php +1 −1 Go to diff View file
M plugins/tracker/tests/rest/Artifacts/LinkedArtifactsTest.php +51 −0 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/ArtifactLink/AllLinkPayloadParserTest.php +1 −1 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueBuilderTest.php +0 −36 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkInitialChangesetValueBuilderTest.php +39 −30 Go to diff View file
A plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/ArtifactLink/ValidArtifactLinkPayloadBuilderTest.php +71 −0 Go to diff View file