stable

Clone or download

Read-only

Validate Set int value post actions

Part of story #12187 configure workflow pre & post actions at target state level How to test: - Using the REST API PUT /tracker_workflow_transitions/{id}/actions You should get a 400 Bad request when you try the following: - Submitting two "set_field_value" of type "int" with the same id - Submitting two "set_field_value" of type "int" with the same field_id - Submitting a "set_field_value" of type "int" with a field_id that does not match a "int" field that is used in the tracker. - There should not be any functional change for CI Build post actions Here's a sample body: { "post_actions": [{ "id": null, "type": "set_field_value", "field_id": 8196, "field_type": "int", "value": 456 }, { "id": null, "type": "set_field_value", "field_id": 8196, "field_type": "int", "value": 123 }] } Change-Id: I7cdcd8c24298eafa3be9430889e2021e0424d5cd

Modified Files

Name
M plugins/tracker/include/REST/v1/Workflow/TransitionsResource.class.php +7 −4 Go to diff View file
M plugins/tracker/include/workflow/PostAction/Update/Internal/SetIntValueUpdater.php +11 −1 Go to diff View file
A plugins/tracker/include/workflow/PostAction/Update/Internal/SetIntValueValidator.php +111 −0 Go to diff View file
M plugins/tracker/include/workflow/PostAction/Update/PostActionCollection.php +9 −1 Go to diff View file
M plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetDateValueUpdaterTest.php +4 −16 Go to diff View file
M plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetDateValueValidatorTest.php +4 −2 Go to diff View file
M plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetIntValueUpdaterTest.php +26 −5 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/SetIntValueValidatorTest.php +143 −0 Go to diff View file
M plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/TransitionFactory.php +11 −0 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +21 −0 Go to diff View file
M plugins/tracker/site-content/tuleap-tracker.pot +15 −0 Go to diff View file