stable

Clone or download

Read-only

Update PUT .../actions to handle "set int field" and "set float field" post actions

Part of story #12187 configure workflow pre & post actions at target state level How to test: - Call PUT /tracker_workflow_transitions/:id/actions with Api Explorer with body { "post_actions": [ { "id": null, "type": "set_field_value", "field_type": "int", "field_id": 44, "value": 3 }, { "id": null, "type": "set_field_value", "field_type": "float", "field_id": 45, "value": 1.23 } ] } --> 200 --> 2 new "set int value" and "set float value" post actions were created with given values --> All other actions where removed - Try with invalid inputs ("field_id" not provided, null or with wrong format, same with "value") --> 400 with a precise message Change-Id: I2174aed93e7c11704337095fa1b4bcd28fa7dea2

Modified Files

Name
A plugins/tracker/include/REST/v1/Workflow/PostAction/Update/SetFloatValueJsonParser.php +78 −0 Go to diff View file
A plugins/tracker/include/REST/v1/Workflow/PostAction/Update/SetIntValueJsonParser.php +78 −0 Go to diff View file
M plugins/tracker/include/REST/v1/Workflow/TransitionsResource.class.php +36 −2 Go to diff View file
A plugins/tracker/include/workflow/PostAction/Update/Internal/SetFloatValueRepository.php +145 −0 Go to diff View file
A plugins/tracker/include/workflow/PostAction/Update/Internal/SetFloatValueUpdater.php +58 −0 Go to diff View file
A plugins/tracker/include/workflow/PostAction/Update/Internal/SetIntValueRepository.php +144 −0 Go to diff View file
A plugins/tracker/include/workflow/PostAction/Update/Internal/SetIntValueUpdater.php +58 −0 Go to diff View file
M plugins/tracker/include/workflow/PostAction/Update/PostActionCollection.php +20 −0 Go to diff View file
A plugins/tracker/phpunit/REST/v1/Workflow/PostAction/Update/SetFloatValueJsonParserTest.php +204 −0 Go to diff View file
A plugins/tracker/phpunit/REST/v1/Workflow/PostAction/Update/SetIntValueJsonParserTest.php +205 −0 Go to diff View file
M plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/CIBuildUpdaterTest.php +2 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetDateValueUpdaterTest.php +122 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetFloatValueRepositoryTest.php +175 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetFloatValueUpdaterTest.php +122 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetIntValueRepositoryTest.php +175 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetIntValueUpdaterTest.php +122 −0 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +8 −1 Go to diff View file
M plugins/tracker/site-content/tuleap-tracker.pot +6 −0 Go to diff View file