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

dev/membership#10 fix incorrect validation error saying Start date must be the same or later than Member since #13734

Merged
merged 1 commit into from
Mar 1, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Feb 28, 2019

Overview

"Start date must be the same or later than Member since" triggered when dates are the same

Before

-> new membership
-> set start_date to match join_date (don't change join_date field - problem is with default 'now'
-> validation error on save

After

no error

Technical Details

This problem is because both dates exclude time but the default setting includes it - leading to a
comparison of a datetime with a date+midnight time

Comments

https://lab.civicrm.org/dev/membership/issues/10

…st be the same or later than Member since

This problem is because both dates exclude time but the default setting includes it - leading to a
comparison of a datetime with a date+midnight time
@civibot
Copy link

civibot bot commented Feb 28, 2019

(Standard links)

@civibot civibot bot added the 5.11 label Feb 28, 2019
@seamuslee001
Copy link
Contributor

is there a test that covers this? @eileenmcnaughton

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 I doubt it - it's very formy.

@monishdeb
Copy link
Member

I think it won't be an issue because the join date is not a timestamp field but a date field. Neither we are showing the time part in UI or saving it in DB. Plus we are setting it on default not something on submission or interanl BAO fns. So I am approving this PR

@eileenmcnaughton
Copy link
Contributor Author

Merging based on @monishdeb approval

@eileenmcnaughton eileenmcnaughton merged commit f33592e into civicrm:5.11 Mar 1, 2019
@eileenmcnaughton eileenmcnaughton deleted the mem branch March 1, 2019 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants