-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Community resource importer #918
base: main
Are you sure you want to change the base?
Conversation
This creates a new CommunityResourceImporter class which can be used to import CSV data and create CommunityResource objects and it's associated relationships. At the moment this only creates the primary class and sets the name property. There is still a lot more work to do, but what exists works and IT HAS TESTS!!!
… for the community resource importer
This adds the location and service area models to the community resource being imported.
When importing CommunityResource records, some rows in the dataset will have repeating Organization or Community Resource information. When this happens we want to re-use the existing objects in the database and update them accordingly. Specifically, instead of duplicating a CommunityResource the importer will update it to include the new tag and description.
…resources were concatenated properly. tests passing. created a rake task to import the community resources. downloaded the csv from the spreadsheet and added it into the db/seeds/public_template_csvs. when running the rake task got 'validation failed: name cannot be blank' and the community resources were not created. need to explore what is occurring with that error
Co-authored-by: maebeale <[email protected]> Co-authored-by: connieh1 <[email protected]>
Hi! @maebeale I'll try and take a look at this over the weekend |
organization: organization | ||
) | ||
|
||
resource.tag_list.add(row["category_name"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to iterate because category name is a comma separated list --Mae
|
||
resource.tag_list.add(row["category_name"]) | ||
|
||
resource.location = Location.create! do |location| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the organization already exists and has a location, do not create a new location.
…otentcy Co-authored-by: maebeale <[email protected]> Co-authored-by: exbinary <[email protected]>
997187b
to
5cca2be
Compare
Why
What
How
Testing
Next Steps
Outstanding Questions, Concerns and Other Notes
Accessibility
Security
Meta
Pre-Merge Checklist