stable

Clone or download

Read-only

Improve REST PATCH project/$id/program_backlog to reorder program backlog elements

This is part of story #20111 change features priority How to test: - Have at least 2 elements in program backlog - Use REST route PATCh project/$id/program_backlog to order elements. [0] - Return to program backlog and refresh |=> Elements are moved - You can use "order" key with "add" key: - Have a feature that is not in top backlog and not in PI - Use REST route [1] + Go to program backlog and refresh - Feature exists and is good placed [0] Example payload: { "add": [], "remove": [], "order": { "ids": [ $feature_id_to_move ], "direction": "before", "compared_to": $sibling_feature }, } [1] Example payload: { "add": [{ "id": $feature_id_to_move }], "remove": [], "remove_from_program_increment_to_add_to_the_backlog": true, "order": { "ids": [ $feature_id_to_move ], "direction": "before", "compared_to": $existing_feature }, } Change-Id: I7e3268e6dbd0dac630fd0c9b9d1c6c79c0429a38

Modified Files

Name
M plugins/program_management/include/Adapter/Program/Feature/FeaturesDao.php +3 −1 Go to diff View file
M plugins/program_management/include/Program/Backlog/TopBacklog/TopBacklogUpdater.php +3 −14 Go to diff View file
M plugins/program_management/include/REST/v1/BacklogPatchRepresentation.php +5 −0 Go to diff View file
M plugins/program_management/include/REST/v1/ProjectResource.php +24 −2 Go to diff View file
A plugins/program_management/include/REST/v1/Rank/FeaturesRankOrderer.php +69 −0 Go to diff View file
A plugins/program_management/include/REST/v1/TopBacklogElementToOrderInvolvedInChangeRepresentation.php +47 −0 Go to diff View file
M plugins/program_management/tests/rest/_fixtures/program_program_management/project.xml +1 −1 Go to diff View file
M plugins/program_management/tests/rest/v1/ProjectResourceTest.php +94 −8 Go to diff View file
M plugins/program_management/tests/unit/Program/Backlog/TopBacklog/TopBacklogUpdaterTest.php +2 −24 Go to diff View file
A plugins/program_management/tests/unit/REST/v1/Rank/FeaturesRankOrdererTest.php +69 −0 Go to diff View file