-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
4978 rework donation site import #5079
base: main
Are you sure you want to change the base?
4978 rework donation site import #5079
Conversation
…8' into rework_donation_site_import_#4978
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.
Hi @someykoku
Thanks for this! I've done some functionality testing. This basically works well, but we need some tweaks (see above as well.) When those are addressed, I'll pass it on for final technical review.
Donation Site 2,456 Donation Site Way,Jane Smith,[email protected],234-567-8901 | ||
Donation Site 3,789 Donation Site Way,Bob Johnson,[email protected],345-678-9012 | ||
Donation Site 3,789 Donation Site Way,Bob Johnson,[email protected],345-678-9012 |
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.
Let's not give them a duplicated donation site as an example that they should follow. (please remove the second Donation site 3 or change it up)
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 is still not right -- I expect you're using the same file to do your manual testing? The template should show something that would actually import cleanly.
app/models/donation_site.rb
Outdated
@@ -22,7 +22,8 @@ class DonationSite < ApplicationRecord | |||
|
|||
belongs_to :organization | |||
|
|||
validates :name, :address, presence: true | |||
validates :name, :address, :phone, presence: true |
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.
Phone is not mandatory -- this is breaking bin/setup and a lot of the sites in production have no contact information.
spec/models/donation_site_spec.rb
Outdated
it { should validate_presence_of(:address) } | ||
it { should validate_length_of(:contact_name).is_at_least(3) } |
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.
Note that contact name is allowed to be blank.
…ank, phone is not mandatory, fixed tests
…8' into rework_donation_site_import_#4978
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.
@someykoku I thought I had already tested this, but this aspect is now failing on my local:
I tried uploading a file containing this:
name,address,contact_name,email,phone
Donation Site 1,123 Donation Site Way,John Doe,[email protected],123-456-7890
Donation Site 2,456 Donation Site Way,Jane Smith,[email protected],234-567-8901
Donation Site 3,789 Donation Site Way,Bobby Johnson,[email protected],345-678-9012
Donation Site 4,,,,
Donation Site 4,,,,
Donation Site 5,The fifth thing,,,
It imported the first three only. It should display an error when it tries to import the second Donation Site 4, and it should import Donation Site 5.
Hey Cielf, I will try to fix it, that's strange.
чт, 13 мар. 2025 г. в 19:08, CL Fisher ***@***.***>:
… ***@***.**** requested changes on this pull request.
@someykoku <https://github.com/someykoku> I thought I had already tested
this, but this aspect is now failing on my local:
I tried uploading a file containing this:
name,address,contact_name,email,phone
Donation Site 1,123 Donation Site Way,John ***@***.***
,123-456-7890
Donation Site 2,456 Donation Site Way,Jane ***@***.***
,234-567-8901
Donation Site 3,789 Donation Site Way,Bobby ***@***.***
,345-678-9012
Donation Site 4,,,,
Donation Site 4,,,,
Donation Site 5,The fifth thing,,,
It imported the first three only. It should display an error when it tries
to import the second Donation Site 4, and it should import Donation Site 5.
—
Reply to this email directly, view it on GitHub
<#5079 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUZY5PAZDK4CNIMGVSJU7DL2UHCRVAVCNFSM6AAAAABYRSFPM2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMOBSHE3TQMJWGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…8' into rework_donation_site_import_#4978
There was some code in importable.rb that was rejecting parsing, if some of the values were nil |
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.
Hey @someykoku -- the actual function of importing is working as expected now - but we still need to clean up the template. Thanks!
When we get that, I'll pass it on to the senior tech folk for further input.
Donation Site 2,456 Donation Site Way,Jane Smith,[email protected],234-567-8901 | ||
Donation Site 3,789 Donation Site Way,Bob Johnson,[email protected],345-678-9012 | ||
Donation Site 3,789 Donation Site Way,Bob Johnson,[email protected],345-678-9012 |
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 is still not right -- I expect you're using the same file to do your manual testing? The template should show something that would actually import cleanly.
Resolves #4978
Description
Type of change
How Has This Been Tested?
Screenshots