stable

Clone or download

Read-only

refactor: introduce ChangeForwardLinksCommand

How to test: - No functional change in the REST API PUT /artifacts/{id}. You can still add, change or remove both forward and reverse links. You can still set a parent through the "parent" key and set forward links through the "links" key. - No functional change when linking artifacts: Planning cards in sprints, creating a TTM campaign for a release, Solving inconsistencies in Backlog overview pane still work. Notes: The complexity of ArtifactUpdateHandler is made worse at this step (two loops instead of one), but a next step will introduce a "Command" object for reverse links. It will simplify it. part of request #34374 Be able to explicitly add, change or remove forward and reverse links Change-Id: I2e12b61e1cac9c98c15c48f36e5e9b72496116d7

Modified Files

Name
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueBuilder.php +14 −8 Go to diff View file
M plugins/tracker/include/REST/Artifact/PUTHandler.php +3 −3 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/ChangeForwardLinksCommand.php +100 −0 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/ChangeForwardLinksCommandFormatter.php +75 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/CollectionOfForwardLinks.php +11 −16 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValue.php +12 −82 Go to diff View file
D plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueFormatter.php +0 −55 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/ChangesetValuesContainer.php +7 −5 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Link/ArtifactLinker.php +14 −8 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Link/ArtifactUpdateHandler.php +74 −15 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueBuilderTest.php +30 −24 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/FieldsDataBuilderTest.php +2 −1 Go to diff View file
R plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueFormatterTest.php Go to diff View file
A plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/ChangeForwardLinksCommandTest.php +190 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/CollectionOfForwardLinksTest.php +91 −27 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueTest.php +20 −62 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ChangesetValuesContainerTest.php +8 −10 Go to diff View file