Skip to content

Refactor importing csv controller actions

Jarka Košanová requested to merge 293651-import-improvements into master

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:

  1. Go to a project -> Issues ( -> Requirements for requirements import)
  2. Click import requirements
  3. 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.

Related to #293651 (closed)

Edited by Jarka Košanová

Merge request reports