stable

Clone or download

Read-only

Select frozen fields in PUT REST route

This is part of story #12189 prevent field modification according to state A new mandatory key 'field_ids' must be provided in the json content for frozen fields action in PUT tracker_workflow_transitions/:id/actions This attribute is an array of integer, that must not be empty. Only used fields in the tracker can be provided, or a 400 is raised and nothing is done. The selected field ids are not yet saved in database. You still need to defined the feature flag to be able to defined frozen field action in REST. Change-Id: I74ec892ef81f211f719cac945e1a59450ea12805

Modified Files

Name
M plugins/tracker/include/REST/v1/Workflow/PostAction/Update/FrozenFieldsJsonParser.php +40 −1 Go to diff View file
M plugins/tracker/include/REST/v1/Workflow/TransitionsResource.class.php +3 −1 Go to diff View file
M plugins/tracker/include/Workflow/PostAction/Update/FrozenFields.php +25 −2 Go to diff View file
M plugins/tracker/include/Workflow/PostAction/Update/Internal/FrozenFieldsUpdater.php +19 −2 Go to diff View file
A plugins/tracker/include/Workflow/PostAction/Update/Internal/FrozenFieldsValidator.php +92 −0 Go to diff View file
M plugins/tracker/include/Workflow/PostAction/Update/PostActionCollection.php +11 −1 Go to diff View file
M plugins/tracker/phpunit/REST/v1/Workflow/PostAction/Update/FrozenFieldsJsonParserTest.php +125 −0 Go to diff View file
M plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/FrozenFieldsUpdaterTest.php +33 −5 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/Internal/FrozenFieldsValidatorTest.php +117 −0 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +23 −0 Go to diff View file
M plugins/tracker/tests/rest/TrackerBase.php +20 −0 Go to diff View file
M plugins/tracker/tests/rest/Workflows/SimpleModeTest.php +7 −1 Go to diff View file
M plugins/tracker/tests/rest/Workflows/TrackerWorkflowTransitionsTest.php +7 −1 Go to diff View file