stable

Clone or download

Read-only

refactor: Use Option instead of null in New changeset

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: Using Options instead of nullable should make the distinction between "empty collection" and "no submitted value" clearer. For example, if user submits only "parent" key (there is no submitted "links", we should not change the forward links. part of request #34374 Be able to explicitly add, change or remove forward and reverse links Change-Id: I55c3baf4f259f55a56beddce58b6392f40792e0e

Modified Files

Name
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueBuilder.php +20 −13 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/FieldsDataBuilder.php +10 −6 Go to diff View file
M plugins/tracker/include/REST/Artifact/PUTHandler.php +28 −12 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValue.php +52 −29 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueFormatter.php +9 −11 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/ChangesetValuesContainer.php +17 −7 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Link/ArtifactLinker.php +6 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Link/ArtifactUpdateHandler.php +11 −6 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueBuilderTest.php +6 −7 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/FieldsDataBuilderTest.php +2 −4 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/PUTHandlerTest.php +1 −3 Go to diff View file
M plugins/tracker/tests/unit/Stub/BuildFieldsDataStub.php +12 −5 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueFormatterTest.php +33 −14 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkChangesetValueTest.php +24 −17 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ChangesetValuesContainerTest.php +43 −24 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Link/ArtifactLinkerTest.php +1 −1 Go to diff View file