stable

Clone or download

Read-only

Enforce checks on IterationIdentifier::fromId

part of story #21368 create mirrored iteration How to test: Run `tuleap config-set feature_flag_program_management_display_iteration 1` to enable iterations Make sure your redis worker is running 1. Assuming you have already run tests for this story, you should have rows in the plugin_program_management_pending_iterations table. If not, see section 2 below. Trigger manually a redis message with the following steps: - Enter a bash shell on the redis container: $ docker exec -it tuleap_redis_1 bash - Enter the redis cli in interactive mode: # redis-cli - Push a message to the events list > LPUSH 'app_user_events' '{"event_name":"tuleap.program_management.iteration.creation","payload":{"artifact_id":6260,"user_id":110},"_enqueue_ts":1628157233.0802,"_queued_total":0}' Here, "artifact_id" must be the id of an Iteration with a matching row in the database table. "user_id" must be the id of your user and match the same row in the database table. "_enqueue_ts" represents the timestamp at which the message is pushed. You can get one here [0], make sure to select "$get_as_float" = true. - You should see a log message in /var/log/tuleap/program_management_syslog : [debug] Processing iteration creation with iteration #6260 for user #110 2. If you have no pre-existing rows in the database table, follow these steps: - Edit a Program Increment artifact and add one or more artifact links with _is_child type to Iteration artifacts. For each iteration, Tuleap will write a new row in the database table and push a message to redis (like above). 3. If you change the Iteration tracker in Program Management Administration and then trigger a message from redis, the corresponding database row will be deleted. Change-Id: Icbb95463123021e65eefcb63d5e44d391c70d875

Modified Files

Name
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/PendingIterationCreationDAO.php +11 −1 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/Iteration/IterationsDAO.php +10 −1 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/DeletePendingIterations.php +28 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/IterationCreation.php +19 −3 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/IterationCreationEventHandler.php +33 −11 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/AsynchronousCreation/StoredIterationNoLongerValidException.php +44 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/Iteration/IterationIdentifier.php +12 −2 Go to diff View file
A plugins/program_management/include/Domain/Program/Backlog/Iteration/VerifyIsIteration.php +28 −0 Go to diff View file
M plugins/program_management/include/program_managementPlugin.php +12 −5 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/AsynchronousCreation/LastChangesetRetrieverTest.php +9 −1 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/ChangesetIdentifierTest.php +9 −1 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/IterationCreationEventHandlerTest.php +24 −2 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/IterationCreationTest.php +36 −7 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/Iteration/IterationIdentifierTest.php +40 −4 Go to diff View file
A plugins/program_management/tests/unit/Stub/VerifyIsIterationStub.php +50 −0 Go to diff View file