Patch #33337
closedClean-up workflows controller
Description
Hello
Here is a patch which aims to refactor the WorkflowsController.
The patch does not change the behavior of the application, but use smaller methods and clearer code. The routes are also updated.
My goal was to use a specific action for each route, and do not use a same method for different purposes (so avoid checking if the request-method is "post" inside actions).
Hope this may help.
Files
Updated by Marius BĂLTEANU over 3 years ago
- File 0001-Clean-up-workflows-controller.patch added
- File 0002-Fix-route-name.patch added
- Target version set to Candidate for next major release
Thanks Vincent for the patch, I tried it yesterday and it looks great from my point of view.
I'm attaching a rebased version of the initial patch and a second patch that fixes to route name (workflows_permissions_path
should be permissions_workflows_path
). All the tests pass (https://gitlab.com/redmine-org/redmine/-/commit/4ef4ea5047323756a3241eea660e11a383ea7711) with both patches.
I'm going to review the tests in the following days.
Updated by Marius BĂLTEANU over 3 years ago
- File deleted (
0001-Clean-up-workflows-controller.patch)
Updated by Marius BĂLTEANU over 3 years ago
- File deleted (
0002-Fix-route-name.patch)
Updated by Marius BĂLTEANU over 3 years ago
- File 0002-Fix-route-name.patch 0002-Fix-route-name.patch added
- File 0001-Clean-up-workflows-controller.patch 0001-Clean-up-workflows-controller.patch added
- Assignee deleted (
Marius BĂLTEANU) - Target version changed from Candidate for next major release to 5.0.0
Update the patches for current trunk, the tests still pass.
Setting target to 5.0.0, I think it's a nice refactoring.
Updated by Go MAEDA over 3 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
Committed the patch. Thank you for your contribution.
Updated by Go MAEDA over 3 years ago
- Subject changed from Clean-up Workflows Controller to Clean-up workflows controller
Updated by Vincent Robert over 3 years ago
Thank you for updating and committing this patch.