stable

Clone or download

Read-only

refactor: Use Option instead of null in Initial changeset

How to test: - No functional change in the REST API POST /artifacts. You can still create a new artifact with a parent through the "parent" ket and set forward links through the "links" key. You can still set forward and reverse links through the "all_links" key. Notes: Using Options instead of nullable should make it easier to tell when a value is submitted or not. For example, user can omit the "parent" key, or there could be no artifact links field in the tracker (hence no value for artifact link field in the changeset values). part of request #34374 Be able to explicitly add, change or remove forward and reverse links Change-Id: I47a1e39c798d90d4e6b9d27974239238217876bc

Modified Files

Name
M plugins/tracker/include/REST/Artifact/ArtifactCreator.class.php +17 −7 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkInitialChangesetValueBuilder.php +8 −5 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/FieldsDataBuilder.php +8 −5 Go to diff View file
M plugins/tracker/include/REST/Artifact/ChangesetValue/FieldsDataFromValuesByFieldBuilder.php +12 −5 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkInitialChangesetValue.php +17 −6 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkInitialChangesetValueFormatter.php +10 −5 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ChangesetValue/InitialChangesetValuesContainer.php +19 −7 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementFloatFieldBuilder.php +2 −2 Go to diff View file
A plugins/tracker/tests/unit/Builders/TrackerFormElementIntFieldBuilder.php +61 −0 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementListFieldBuilder.php +23 −13 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementStringFieldBuilder.php +2 −2 Go to diff View file
M plugins/tracker/tests/unit/Builders/TrackerFormElementTextFieldBuilder.php +2 −2 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkInitialChangesetValueBuilderTest.php +7 −4 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/FieldsDataBuilderTest.php +11 −61 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ChangesetValue/FieldsDataFromValuesByFieldBuilderTest.php +76 −121 Go to diff View file
M plugins/tracker/tests/unit/Stub/BuildFieldDataFromValuesByFieldStub.php +16 −7 Go to diff View file
M plugins/tracker/tests/unit/Stub/BuildFieldsDataStub.php +13 −7 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkInitialChangesetValueFormatterTest.php +6 −4 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/ArtifactLink/NewArtifactLinkInitialChangesetValueTest.php +2 −1 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/ChangesetValue/InitialChangesetValuesContainerTest.php +31 −20 Go to diff View file