Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Refactor import functionality #899

Open
orenyk opened this issue Aug 5, 2014 · 5 comments
Open

Refactor import functionality #899

orenyk opened this issue Aug 5, 2014 · 5 comments

Comments

@orenyk
Copy link
Contributor

orenyk commented Aug 5, 2014

We currently have a lot of duplicated code between our import equipment functionality (#494) and our import users functionality (#6), this should be abstracted out into a generic import library that can be applied to various models / resources. See #897 for @dgoerger's comments as well.

@orenyk orenyk added this to the 4.2 milestone Aug 5, 2014
@orenyk orenyk removed the 0 - Backlog label Sep 3, 2014
@orenyk
Copy link
Contributor Author

orenyk commented Sep 5, 2014

This should include tests for both generic import functionality as well as user and equipment imports specifically.

@orenyk orenyk modified the milestones: Wish List, 4.2 Sep 5, 2014
@orenyk
Copy link
Contributor Author

orenyk commented Sep 29, 2014

We also need to write controller tests for all of the import controllers (see #404).

@orenyk
Copy link
Contributor Author

orenyk commented Feb 9, 2015

Note that we should have a general ImportController and more straightforward routes (/import/users and /import/equipment, see #1141)

@orenyk orenyk modified the milestones: 5.2.0, Wish List Feb 9, 2015
@orenyk orenyk added pri: 2 and removed pri: 1 labels Feb 15, 2015
@orenyk orenyk modified the milestones: API/client, 5.2.0 Feb 15, 2015
This was referenced Feb 16, 2015
@orenyk
Copy link
Contributor Author

orenyk commented Feb 17, 2015

I think we'll do most of this as a module that will be included in the relevant classes; we'll have methods for checking the CSV keys and other stuff, as well as methods for returning the correct error messages. One change we should make is ideally not enforcing the order of CSV columns. Since we're simply assigning attributes using a Hash, we shouldn't care about order (although we can validate that all column headings are unique).

@esoterik
Copy link
Collaborator

esoterik commented Feb 2, 2016

This should also include importing a combined import/export page, as discussed in #1340

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants