Skip to content
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

Contribution import - tests & fixes on dates, amount #23688

Merged
merged 2 commits into from
Jun 5, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Contribution import - tests & fixes on dates, amount

Before

Testing on contributions covered the validate function - but not the full process of submitted the form

After

Testing is more complete & would have picked up previous breakage

Technical Details

In the process of writing a test I found the money validation is a bit alarming in that it was not rejecting dates where the thousand separator was AFTER the decimal separator - meaning that 12.000,45 was being converted to 1200045 rather than rejected. I added opt in validation to the rule with some commentary about how that feels too conservative so we might re-address in future

Comments

@civibot
Copy link

civibot bot commented Jun 4, 2022

(Standard links)

@civibot civibot bot added the master label Jun 4, 2022
@eileenmcnaughton eileenmcnaughton force-pushed the import_cont_tests branch 4 times, most recently from 6990696 to 51c0df5 Compare June 4, 2022 04:38
Fixes inconsistent  amount handling - these
are issues that I found through writing unit tests to cover them
The money handling was permitting amounts where the
decimal separator was before the thousand. On the dates
there was a format being handled for some fields
but not others
@seamuslee001
Copy link
Contributor

This seems fine to me and has unit tests to support it

@seamuslee001 seamuslee001 merged commit 2e04078 into civicrm:master Jun 5, 2022
@seamuslee001 seamuslee001 deleted the import_cont_tests branch June 5, 2022 22:52
@eileenmcnaughton
Copy link
Contributor Author

thanks @seamuslee001

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

Successfully merging this pull request may close these issues.

2 participants