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

[master] 494 import equipment #898

Merged
merged 1 commit into from
Sep 12, 2014
Merged

[master] 494 import equipment #898

merged 1 commit into from
Sep 12, 2014

Conversation

orenyk
Copy link
Contributor

@orenyk orenyk commented Aug 5, 2014

resolves #494 on master. This is simply a cherry-picked commit of the merge of #897, I'm not sure if any changes have to be made for it to work on master. Moreover, since we're likely to include a refactoring of the import functionality in a future version, I'm wondering if it makes sense to merge this into master at all. Thoughts?

@orenyk orenyk mentioned this pull request Aug 5, 2014
@orenyk
Copy link
Contributor Author

orenyk commented Aug 24, 2014

I think it makes sense to pull this in simply to keep the two versions on par with one another in terms of features (e.g. if we don't refactor the equipment import functionality until 4.3, we can deploy 4.1 without a loss of functionality).

@orenyk
Copy link
Contributor Author

orenyk commented Sep 5, 2014

This needs to be tested with some dummy CSVs (there were files in the original branch, see commit 3138f9f) and the most recent version of master should probably be merged in for safety. Once the functionality has been verified we can merge this in.

@coollog
Copy link
Contributor

coollog commented Sep 12, 2014

I tried to do Import Equipment on a categories CSV that had the following content:

name,max_per_user,max_checkout_length,max_renewal_times,max_renewal_length,renewal_days_before_due,sort_order
Test Cat1,1,14,1,7,3,47
Test Cat2,2,7,2,7,,
Test Cat3,3,,,,,99

And I got the following error:

categorieserror

@orenyk
Copy link
Contributor Author

orenyk commented Sep 12, 2014

Did you run the database migration first?

@coollog
Copy link
Contributor

coollog commented Sep 12, 2014

Yea I just did "rake db:migrate && rake db:drop && rake db:create && rake db:schema:load && rake db:seed minimal=true && rails s" and the same error occurs.

@orenyk
Copy link
Contributor Author

orenyk commented Sep 12, 2014

That's super weird. I just ran rake db:drop && rake db:create && rake db:migrate && rake db:seed minimal=true && rails s and copied your test CSV from above and it worked fine. When you run the migration it should update your db/schema.rb so that your subsequent call of rake db:schema:load uses an up-to-date schema, so I'm not sure what's going on. Ultimately, it looks like your database isn't adding the csv_import column to the Categories table, but I'm not sure why. If we can debug this quickly then great, otherwise we'll try it on one other system and, assuming no issues, chalk it up to local system weirdness? Thanks regardless!

@orenyk
Copy link
Contributor Author

orenyk commented Sep 12, 2014

Worked in a second development environment, I'm going to pull this in.

orenyk added a commit that referenced this pull request Sep 12, 2014
@orenyk orenyk merged commit 01daefd into master Sep 12, 2014
@orenyk orenyk deleted the 494_import_equip_master branch September 12, 2014 21:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import Equipment Structure
3 participants