stable

Clone or download

Read-only

PUT /tracker_workflow_transitions/id/actions

Part of story #12187 configure workflow pre & post actions at target state level How to test: - Create a workflow transition - Call PUT /tracker_workflow_transitions/:id/actions with Api Explorer with body {"post_actions": [{"id": null, "type": "run_job", "job_url": "http://example.test"}]} --> 200 - GET /tracker_workflow_transitions/:id/actions --> Only one CI build action with corresponding attributes - Note the id of the action {"post_actions": [{"id": ${noted_action_id}, "type": "run_job", "job_url": "http://updated-example.test"}]} --> 200 - Get actions --> Action is updated {"post_actions": []} --> 200 - GET actions --> CI build action is removed when not authenticated --> 401 when invalid post_action json (like {"post_actions": ["invalid"]}) --> 400 when post_action with unknown type given --> 400 when CI build action given without job_url --> 400 Change-Id: I29e003b54e6f4d14e7656d71fe48299a065aa217

Modified Files

Name
A plugins/tracker/include/REST/v1/Workflow/PostAction/Update/CIBuildJsonParser.php +60 −0 Go to diff View file
A plugins/tracker/include/REST/v1/Workflow/PostAction/Update/PostActionCollectionJsonParser.php +82 −0 Go to diff View file
A plugins/tracker/include/REST/v1/Workflow/PostAction/Update/PostActionUpdateJsonParser.php +39 −0 Go to diff View file
A plugins/tracker/include/REST/v1/Workflow/PostActionsPUTRepresentation.php +30 −0 Go to diff View file
M plugins/tracker/include/REST/v1/Workflow/TransitionsResource.class.php +92 −4 Go to diff View file
A plugins/tracker/phpunit/REST/v1/Workflow/PostAction/Update/CIBuildJsonParserTest.php +123 −0 Go to diff View file
A plugins/tracker/phpunit/REST/v1/Workflow/PostAction/Update/PostActionCollectionJsonParserTest.php +106 −0 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +18 −1 Go to diff View file
M plugins/tracker/site-content/tuleap-tracker.pot +17 −0 Go to diff View file
M plugins/tracker/tests/rest/Workflows/TrackerWorkflowTransitionsTest.php +27 −0 Go to diff View file