Refactor importing csv controller actions
What does this MR do and why?
This MR changes IssuesController and RequirementsController actions import_csv
.
Before this change jobs were enqueued directly from the controller which is against our abstraction guidelines.
This MR adds new services for preparing csv imports and these services are called directly from the controllers. The services contain calling of UploadService
and enqueueing jobs, both calls were done in controllers before.
How to set up and validate locally
This MR does not change the user-facing behavior, but you can test the functionality of importing issues and requirements:
- Go to a project -> Issues ( -> Requirements for requirements import)
- Click import requirements
- Check with a valid (csv) file, you should see a success message and new requirements after reload of the page (it may take few seconds/minutes)
Valid csv file: sample.csv
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #293651 (closed)
Edited by Jarka Košanová