stable

Clone or download

Read-only

Refacto - ProgramIncrementArtifactCreatorChecker becomes generic

This is part of story #21368 create mirrored iteration No expected changes. Actually, ProgramIncrementArtifactCreatorChecker is used to check if a Program Increment can be created (semantics checks in teams project, check if user can create in Program Project and Teams Project, ...). In future, the same algorithm will be used to check if an Iteration will can be created. So ProgramIncrementArtifactCreatorChecker must become generic and now is `TimeBoxCreatorChecker`. `ArtifactCreatorChecker` is now `ProgramIncrementCreatorChecker`. See these diagrams to understand why these changes: This diagram shows how it was [0]: ```mermaid classDiagram class TrackerCollectionFactory { +buildFromProgramProjectAndItsTeam() SourceTrackerCollection +buildFromTeamProjects() MilestonesTrackerCollection } class ProgramIncrementArtifactCreatorChecker{ - TrackerCollectionFactory $scale_trackers_factory -canProgramIncrementBeCreated() bool } class ArtifactCreatorChecker{ - ProgramIncrementArtifactCreatorChecker $program_increment_artifact_creator_checker -canCreateAnArtifact() bool } ``` This diagram shows what is expected in future [1]: ```mermaid classDiagram TrackerCollectionFactory <|-- ProgramIncrementTrackerCollectionFactory TrackerCollectionFactory <|-- IterationTrackerCollectionFactory TrackerCollectionFactory: +buildFromProgramProjectAndItsTeam() SourceTrackerCollection TrackerCollectionFactory: +buildFromTeamProjects() MilestonesTrackerCollection <<interface>> TrackerCollectionFactory class TimeBoxCreatorChecker{ -TrackerCollectionFactory $scale_trackers_factory -canTimeBoxBeCreated() bool } class ProgramIncrementCreatorChecker{ - TimeBoxCreatorChecker $artifact_creator_checker -canCreateAProgramIncrement() bool } class IterationCreatorChecker { - TimeBoxCreatorChecker $artifact_creator_checker -canCreateAnIteration() bool } ``` For the moment, `IterationTrackerCollectionFactory` and `IterationCreatorChecker` don't exist. They will be created in next patches. Like you can see in diagrams, before, `ArtifactCreatorChecker` called `ProgramIncrementArtifactCreatorChecker` to check that a PI can be created. Now, it's `ProgramIncrementCreatorChecker` calls `TimeBoxCreatorChecker` (formerly `ArtifactCreatorChecker`) to check that the PI can be created. In next patches, a new class `IterationArtifactChecker` will call `TimeBoxCreatorChecker` to check that an iteration will can be created too. [0]: https://mermaid.ink/svg/eyJjb2RlIjoiY2xhc3NEaWFncmFtXG4gICAgY2xhc3MgVHJhY2tlckNvbGxlY3Rpb25GYWN0b3J5IHtcbiAgICAgK2J1aWxkRnJvbVByb2dyYW1Qcm9qZWN0QW5kSXRzVGVhbSgpIFNvdXJjZVRyYWNrZXJDb2xsZWN0aW9uXG4gICAgICtidWlsZEZyb21UZWFtUHJvamVjdHMoKSBNaWxlc3RvbmVzVHJhY2tlckNvbGxlY3Rpb25cbiAgICB9XG4gICAgY2xhc3MgUHJvZ3JhbUluY3JlbWVudEFydGlmYWN0Q3JlYXRvckNoZWNrZXJ7XG4gICAgICAtIFRyYWNrZXJDb2xsZWN0aW9uRmFjdG9yeSAkc2NhbGVfdHJhY2tlcnNfZmFjdG9yeVxuICAgICAgLWNhblByb2dyYW1JbmNyZW1lbnRCZUNyZWF0ZWQoKSBib29sXG4gICAgfVxuICAgIGNsYXNzIEFydGlmYWN0Q3JlYXRvckNoZWNrZXJ7XG4gICAgICAtIFByb2dyYW1JbmNyZW1lbnRBcnRpZmFjdENyZWF0b3JDaGVja2VyICRwcm9ncmFtX2luY3JlbWVudF9hcnRpZmFjdF9jcmVhdG9yX2NoZWNrZXJcbiAgICAgIC1jYW5DcmVhdGVBbkFydGlmYWN0KCkgYm9vbFxuICAgIH1cbiIsIm1lcm1haWQiOnt9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ [1]: https://mermaid.ink/svg/eyJjb2RlIjoiY2xhc3NEaWFncmFtXG4gICAgVHJhY2tlckNvbGxlY3Rpb25GYWN0b3J5IDx8LS0gUHJvZ3JhbUluY3JlbWVudFRyYWNrZXJDb2xsZWN0aW9uRmFjdG9yeVxuICAgIFRyYWNrZXJDb2xsZWN0aW9uRmFjdG9yeSA8fC0tIEl0ZXJhdGlvblRyYWNrZXJDb2xsZWN0aW9uRmFjdG9yeVxuICAgIFRyYWNrZXJDb2xsZWN0aW9uRmFjdG9yeTogK2J1aWxkRnJvbVByb2dyYW1Qcm9qZWN0QW5kSXRzVGVhbSgpIFNvdXJjZVRyYWNrZXJDb2xsZWN0aW9uXG4gICAgVHJhY2tlckNvbGxlY3Rpb25GYWN0b3J5OiArYnVpbGRGcm9tVGVhbVByb2plY3RzKCkgTWlsZXN0b25lc1RyYWNrZXJDb2xsZWN0aW9uXG4gICAgPDxpbnRlcmZhY2U-PiBUcmFja2VyQ29sbGVjdGlvbkZhY3RvcnlcbiAgICBjbGFzcyBUaW1lQm94Q3JlYXRvckNoZWNrZXJ7XG4gICAgICAtVHJhY2tlckNvbGxlY3Rpb25GYWN0b3J5ICRzY2FsZV90cmFja2Vyc19mYWN0b3J5XG4gICAgICAtY2FuVGltZUJveEJlQ3JlYXRlZCgpIGJvb2xcbiAgICB9XG4gICAgY2xhc3MgUHJvZ3JhbUluY3JlbWVudENyZWF0b3JDaGVja2Vye1xuICAgICAgLSBUaW1lQm94Q3JlYXRvckNoZWNrZXIgJGFydGlmYWN0X2NyZWF0b3JfY2hlY2tlclxuICAgICAgLWNhbkNyZWF0ZUFQcm9ncmFtSW5jcmVtZW50KCkgYm9vbFxuICAgIH1cbiAgICBjbGFzcyBJdGVyYXRpb25DcmVhdG9yQ2hlY2tlciB7XG4gICAgICAtIFRpbWVCb3hDcmVhdG9yQ2hlY2tlciAkYXJ0aWZhY3RfY3JlYXRvcl9jaGVja2VyXG4gICAgICAtY2FuQ3JlYXRlQW5JdGVyYXRpb24oKSBib29sXG4gICAgfVxuIiwibWVybWFpZCI6e30sInVwZGF0ZUVkaXRvciI6ZmFsc2V9 Change-Id: Ic71840c21b63823e8c034245a00f84acd6945ec3

Modified Files

Name
M plugins/program_management/adr/glossary.md +1 −0 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/CreateProgramIncrementsTask.php +3 −3 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/TaskBuilder.php +2 −2 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/CreationCheck/RequiredFieldChecker.php +3 −3 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/CreationCheck/SemanticChecker.php +2 −2 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/CreationCheck/StatusSemanticChecker.php +3 −3 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/CreationCheck/WorkflowChecker.php +11 −11 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/ProgramIncrementsCreator.php +3 −3 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/CreationCheck/CheckRequiredField.php +2 −2 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/CreationCheck/CheckSemantic.php +2 −2 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/CreationCheck/CheckStatus.php +2 −2 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/CreationCheck/CheckWorkflow.php +2 −2 Go to diff View file
R plugins/program_management/include/Domain/Program/Backlog/CreationCheck/ArtifactCreatorChecker.php Go to diff View file
R plugins/program_management/include/Domain/Program/Backlog/CreationCheck/ProgramIncrementArtifactCreatorChecker.php Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/PlanningHasNoProgramIncrementException.php +2 −2 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/ProgramIncrementCollectionFactory.php +111 −0 Go to diff View file
R plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/Team/ProgramIncrementsTrackerCollection.php Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/TrackerCollectionFactory.php +8 −60 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/TrackerRetrievalException.php +27 −0 Go to diff View file
R plugins/program_management/include/Domain/Program/PlanningConfiguration/PlanningFotFoundException.php Go to diff View file
M plugins/program_management/include/Domain/Program/PlanningConfiguration/TopPlanningNotFoundInProjectException.php +1 −1 Go to diff View file
M plugins/program_management/include/Domain/TrackerNotFoundException.php +2 −2 Go to diff View file
M plugins/program_management/include/program_managementPlugin.php +8 −8 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/CreateProgramIncrementsTaskTest.php +2 −2 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/CreationCheck/RequiredFieldCheckerTest.php +3 −3 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/CreationCheck/SemanticCheckerTest.php +7 −7 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/CreationCheck/StatusSemanticCheckerTest.php +3 −3 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/CreationCheck/WorkflowCheckerTest.php +5 −5 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/ProgramIncrementsCreatorTest.php +3 −3 Go to diff View file
R plugins/program_management/tests/unit/Domain/Program/Backlog/CreationCheck/ArtifactCreatorCheckerTest.php Go to diff View file
R plugins/program_management/tests/unit/Domain/Program/Backlog/CreationCheck/ProgramIncrementArtifactCreatorCheckerTest.php Go to diff View file
R plugins/program_management/tests/unit/Domain/Program/Backlog/TrackerCollectionFactoryTest.php Go to diff View file
R plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Team/ProgramIncrementsTrackerCollectionTest.php Go to diff View file