stable

Clone or download

Read-only

Separate formatting from data objects

part of story #21368 create mirrored iteration How to test: No functional change expected in program increments or iterations replication. You can do non-regression with cypress tests for program increments. Notes: The "toFieldsDataArray()" method was strongly coupled with the Trackers API, it was made for this purpose. Domain objects should not be tied to other plugins, exactly as they should not be tied to REST JSON representation or Presenters. Therefore, formatting is moved to the Adapters namespace where it is called by the ArtifactCreator and ChangesetAdder. This allows us to "publish" the contents of MirroredTimeboxChangesetValues, which lets us test them more deeply in Processor tests. Processor tests are kind of integration tests, they test that the Changesets produced at the end of the chain are built with the correct data. Change-Id: I56038ee33a963dd65701504e6b3d60a9cda6df63

Modified Files

Name
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/ArtifactCreatorAdapter.php +7 −4 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/ChangesetAdder.php +5 −3 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/IterationCreationProcessorBuilder.php +8 −1 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/IterationsCreator.php +5 −1 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementCreationProcessorBuilder.php +8 −1 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementUpdateProcessorBuilder.php +7 −0 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementsCreator.php +5 −1 Go to diff View file
A plugins/program_management/include/Adapter/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ArtifactLinkTypeProxy.php +46 −0 Go to diff View file
A plugins/program_management/include/Adapter/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ArtifactLinkValueFormatter.php +45 −0 Go to diff View file
A plugins/program_management/include/Adapter/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ChangesetValuesFormatter.php +56 −0 Go to diff View file
A plugins/program_management/include/Adapter/Program/Backlog/ProgramIncrement/Source/Changeset/Values/DescriptionValueFormatter.php +39 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/MirroredTimeboxChangeset.php +2 −4 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/MirroredTimeboxChangesetValues.php +14 −29 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/MirroredTimeboxFirstChangeset.php +2 −2 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/ProgramIncrementUpdateProcessor.php +0 −2 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ArtifactLinkType.php +34 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ArtifactLinkValue.php +9 −30 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/Source/Changeset/Values/DescriptionValue.php +1 −12 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/ArtifactCreatorAdapterTest.php +8 −3 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/ChangesetAdderTest.php +7 −2 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/IterationsCreatorTest.php +1 −1 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementCreationProcessorTest.php +94 −9 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementsCreatorTest.php +1 −1 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/CreationCheck/RequiredFieldCheckerTest.php +10 −15 Go to diff View file
A plugins/program_management/tests/unit/Adapter/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ArtifactLinkTypeProxyTest.php +34 −0 Go to diff View file
A plugins/program_management/tests/unit/Adapter/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ArtifactLinkValueFormatterTest.php +60 −0 Go to diff View file
A plugins/program_management/tests/unit/Adapter/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ChangesetValuesFormatterTest.php +100 −0 Go to diff View file
A plugins/program_management/tests/unit/Adapter/Program/Backlog/ProgramIncrement/Source/Changeset/Values/DescriptionValueFormatterTest.php +50 −0 Go to diff View file
M plugins/program_management/tests/unit/Builder/MirroredTimeboxChangesetBuilder.php +1 −4 Go to diff View file
A plugins/program_management/tests/unit/Builder/MirroredTimeboxChangesetValuesBuilder.php +75 −0 Go to diff View file
M plugins/program_management/tests/unit/Builder/MirroredTimeboxFirstChangesetBuilder.php +6 −2 Go to diff View file
M plugins/program_management/tests/unit/Builder/SynchronizedFieldReferencesBuilder.php +11 −0 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/IterationCreationProcessorTest.php +86 −9 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/MirroredTimeboxChangesetTest.php +1 −3 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/MirroredTimeboxChangesetValuesTest.php +53 −61 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/MirroredTimeboxFirstChangesetTest.php +9 −4 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/ProgramIncrementUpdateProcessorTest.php +81 −19 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Source/Changeset/Values/ArtifactLinkValueTest.php +11 −19 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Source/Changeset/Values/DescriptionValueTest.php +3 −5 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Source/Changeset/Values/MappedStatusValueTest.php +5 −1 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Source/Changeset/Values/SourceTimeboxChangesetValuesTest.php +2 −2 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Source/Changeset/Values/SynchronizedFieldFromProgramAndTeamTrackersCollectionTest.php +22 −42 Go to diff View file
M plugins/program_management/tests/unit/Stub/GatherFieldValuesStub.php +0 −5 Go to diff View file
M plugins/program_management/tests/unit/Stub/MapStatusByValueStub.php +20 −11 Go to diff View file