Skip to content

[FR] Import tool refactor #3101

Closed
Closed

Description

@matmair

Is your feature request the result of a bug?
#2341
#3098
#3097
#6321

Problem
We have several ways to do imports - we should refactor imports out.

Suggested solution
Two principles:

  • API first
  • backend-run first

Backend:

  • Switch to data-wizard
  • Refactor all import code into a seperate app
  • Clean up / limit exposed APIs from data-wizard
  • Create backend worker for django-q
  • Create frontend that consumes the new APIs to build up an import flow

Refactor code base

Unit tests:

  • E2E Tests for import flow
  • E2E for all refactored importers based on static import files that are in git

Describe alternatives you've considered
We should fix this, not sure what release to target though.

Do you want to develop this?
Yes - this will be something for the whole team I think.


Outstanding Tasks

  • Support "default values" when importing dataset
  • Allow user to navigate back to previous data steps
  • Add unit test for cleanup backup task
  • Ensure user has correct permissions before creating a new import session
  • Expose import / export functions to plugins
  • Allow plugins to define custom export fields / processes
  • Allow bulk data export action to django admin interface
  • Replace existing "BOM Import" tool with new importer
  • Replace existing "BOM export" tool with new exporter
  • Replace existing "part import" tool with new importer
  • Replace existing "purchase order import" tool with new importer
  • Remove django-import-export framework entirely
  • Allow bulk "update" via import (override current records, not create new ones)
  • Remove all custom import UI template code (html templates, legacy)
  • Check that all existing "django-import-export" models are covered by new framework
  • Show "original row data" for each row when importing data
  • Allow user to create new related model "in place"
  • Add "context specific" importers for particular tables, rather than just in the admin center
  • Improve efficiency of data import process (currently takes ~1 minute for 1,000 records)
  • Impove user interface for data import - in particular, react hook efficiency
  • Enable per-column specification of "default" values in the admin portal
  • Documentation for new data import process

Activity

  1. added
    enhancement
    import / export
    roadmap
    on May 30, 2022
  2. SchrodingersGat commented on May 30, 2022

    @SchrodingersGat
    Member

    This one feels like a high priority once we've got the current backlog of devops stuff out of the way

  3. added this to the 0.9.0 milestone on Jun 6, 2022
  4. lukasbrchl commented on Jul 4, 2022

    @lukasbrchl

    Hi @SchrodingersGat, would it please be possible to have at least the basic functionality of the import tool fixed for 0.8.0? I mean just import the parts from CSV and create orders from them as we had before. I know there is a lot of work for this, but this functionality is really important fur us. Thanks!

  5. SchrodingersGat commented on Jul 4, 2022

    @SchrodingersGat
    Member

    Hi @lukasbrchl nothing planned at this stage but maybe your company would be willing to sponsor some development time on this? Please reach out to me if this would be an option for you.

  6. modified the milestones: 0.9.0, 0.10.0 on Oct 16, 2022
  7. matmair commented on Nov 14, 2022

    @matmair
    MemberAuthor

    @SchrodingersGat this will be important for #3901 / #2789 - our current functionality is not set up to work through the API so it can not be easily decoupled from the integrated frontend

  8. SchrodingersGat commented on Nov 14, 2022

    @SchrodingersGat
    Member

    Yep, the import tool definitely needs to work via the API :)

  9. modified the milestones: 0.10.0, 1.0.0 on Jan 27, 2023
  10. matmair commented on Feb 28, 2023

    @matmair
    MemberAuthor

    Would be easier once #4304 is done as there is already a worker for celery.

  11. modified the milestones: 1.0.0, horizon on Jun 7, 2023
  12. moved this from Todo to In Progress in User Interface Redesignon Mar 21, 2024
  13. added
    Seeking Funding
    on Apr 5, 2024
  14. modified the milestones: horizon, 1.0.0 on Nov 20, 2024
  15. SchrodingersGat commented on Mar 6, 2025

    @SchrodingersGat
    Member

    @matmair are you happy to close this one out? I think that functionally it has mostly been addressed - happy to wait for #9096 to be merged first though

  16. matmair commented on Mar 6, 2025

    @matmair
    MemberAuthor

    Sure, go ahead!

  17. removed
    Seeking Funding
    on Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementimport / exportroadmap

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions