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

CRM-19124 update birth_date to be consistent at point of hook (use da… #9847

Merged
merged 3 commits into from
Mar 2, 2017

Conversation

eileenmcnaughton
Copy link
Contributor

…tepicker)

@eileenmcnaughton eileenmcnaughton force-pushed the cust_date_birth branch 2 times, most recently from a815caa to aa24aae Compare February 16, 2017 12:05
@JKingsnorth
Copy link
Contributor

Currently this creates an inconsistent output in the 'pre' hook for the 'Individual' object - details in JIRA.

@eileenmcnaughton eileenmcnaughton force-pushed the cust_date_birth branch 5 times, most recently from 80fe542 to 1c05dad Compare February 27, 2017 02:34
In the end I opted to leave the date handling in smarty & have not unravelled our custom
version of strftime formatting
@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 @JKingsnorth I think I've finally cracked it. I managed to push the formatting down into smarty in a consistent way by assigning smarty_view_format. It's a little weird & magical still, but now consistent with between custom & core dates. If the date is a format that does not include day then it will choose a setting that doesn't.

The hook format should be OK on pre hook now...

@eileenmcnaughton
Copy link
Contributor Author

I believe CRM-15948 is also fixed in this

@seamuslee001
Copy link
Contributor

ok so

Pre Hook - API from drush

"birth_date":"19911102000000"

Post Hook - API from drush

"birth_date":"19911102000000",

Pre hook contact summary inline update

birth_date":"1991-11-01"

Post hook contact summary inline update

"birth_date":"19911101000000",

Pre Hook Contact Edit screen

birth_date":"1991-11-02"

Post Hook Contact Edit Screen

birth_date":"19911102000000",

@seamuslee001
Copy link
Contributor

I didn't test updating via Import but i think that gives a pretty good coverage. Pre hook still seems a bit all over the shop, However we do have 2 formats now on Pre which is all right. Post hook looks pretty stable now

@eileenmcnaughton
Copy link
Contributor Author

I think it is a reduction on formats anyway :-)

You think this is good to merge?

@eileenmcnaughton
Copy link
Contributor Author

NB the key thing in my mind is getting rid of custom formats - there are still 2 formats but none of them look like 04/05/2017 which could be 4 May or 5 April....

@eileenmcnaughton
Copy link
Contributor Author

Also note this should affect profile pages too

@seamuslee001
Copy link
Contributor

given this appears to be an improvement and a reduction down to 2 formats in the hook output. I think we should merge this as an improvement

@eileenmcnaughton eileenmcnaughton merged commit 54c0544 into civicrm:master Mar 2, 2017
@eileenmcnaughton
Copy link
Contributor Author

thanks @seamuslee001

@eileenmcnaughton eileenmcnaughton deleted the cust_date_birth branch March 2, 2017 21:09
monishdeb pushed a commit to monishdeb/civicrm-core that referenced this pull request May 2, 2017
CRM-19124 update birth_date to be consistent at point of hook (use da…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants