stable

Clone or download

Read-only

Verify Add payload for patch PI REST route

Part of story #20111 change features priority How to test: - call PATCH /api/v1/program_increment/$id/content with a payload like this: { "add": [{"id": <feature_id>}] } - if the given <feature_id> does not exist (for example 0), you will get a 400 error - if the given id belongs to an artifact that is not part of the Program (for example a User Story ID in a Team), then you will get a 400 error - if the given id belongs to an artifact that is not a Feature (for example another tracker like Activity, that is not part of the program's Plan), then you will get a 400 error - The following payload with more than one "feature objects" should be rejected with an error { "add": [{"id": <feature_id>}, {"id": <other_feature_id>}] } - The following payload should be accepted but will lead to error 501 (Not implemented) for now. Later we will add reordering, and it's valid to reorder features without adding a new feature at the same time: { "add": [] } All other valid payloads should lead to error 501 (Not implemented) for now Change-Id: Iddaac063a1cbd17d499ff52547aa3c097814bcd2

Modified Files

Name
M plugins/program_management/include/Adapter/Program/Plan/PlanDao.php +17 −1 Go to diff View file
M plugins/program_management/include/Program/Backlog/ProgramIncrement/Content/ContentChange.php +4 −7 Go to diff View file
M plugins/program_management/include/Program/Backlog/ProgramIncrement/Content/ContentModifier.php +32 −1 Go to diff View file
M plugins/program_management/include/Program/Backlog/ProgramIncrement/Content/ModifyContent.php +2 −0 Go to diff View file
A plugins/program_management/include/Program/Plan/FeatureCannotBePlannedInProgramIncrementException.php +33 −0 Go to diff View file
A plugins/program_management/include/Program/Plan/VerifyCanBePlannedInProgramIncrement.php +28 −0 Go to diff View file
M plugins/program_management/include/REST/v1/ProgramIncrementContentPatchRepresentation.php +1 −1 Go to diff View file
M plugins/program_management/include/REST/v1/ProgramIncrementResource.php +7 −5 Go to diff View file
M plugins/program_management/tests/unit/Program/Backlog/ProgramIncrement/Content/ContentModifierTest.php +56 −4 Go to diff View file