stable

Clone or download

Read-only

GET read only fields post action

Part of story #12189 prevent field modification according to state How to test: Add the feature flag: - In forgeconfig table, add a row with name = sys_should_use_read_only_post_actions and value = 1 Forge your DB: - Get a transition id and insert a new row in plugin_tracker_workflow_transition_postactions_read_only - Get the id you just inserted, get field ids and insert new rows in plugin_tracker_workflow_transition_postactions_read_only_fields When you do a GET /tracker_workflow_transitions/{id}/actions with your transition id, you should see the new post actions in the returned json. When you delete a transition that has this new post action, the rows in DB should be deleted. When you delete a workflow (by changing its field in the UI), the new post action rows in DB should be deleted. Will be done later: - REST test. Can't do them without XML import or PUT post action Change-Id: I6ad1788de4d2d058621d45c6ce88d8e01e8b57c9

Modified Files

Name
M plugins/tracker/include/REST/v1/Workflow/PostAction/PostActionsRepresentationBuilder.php +10 −2 Go to diff View file
A plugins/tracker/include/REST/v1/Workflow/PostAction/ReadOnlyFieldsRepresentation.php +67 −0 Go to diff View file
M plugins/tracker/include/REST/v1/Workflow/TransitionsResource.class.php +0 −1 Go to diff View file
M plugins/tracker/include/Workflow/PostAction/ReadOnly/ReadOnlyDao.php +15 −2 Go to diff View file
A plugins/tracker/include/Workflow/PostAction/ReadOnly/ReadOnlyFields.php +118 −0 Go to diff View file
A plugins/tracker/include/Workflow/PostAction/ReadOnly/ReadOnlyFieldsFactory.php +146 −0 Go to diff View file
M plugins/tracker/include/Workflow/PostAction/Transition_PostActionFactory.class.php +35 −10 Go to diff View file
M plugins/tracker/include/Workflow/PostAction/Visitor.php +4 −3 Go to diff View file
M plugins/tracker/include/Workflow/Workflow_TransitionDao.class.php +47 −36 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/PostAction/ReadOnly/ReadOnlyFieldsFactoryTest.php +75 −0 Go to diff View file