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

Fix age from export customer info #177

Merged
merged 2 commits into from Jul 15, 2022
Merged

Fix age from export customer info #177

merged 2 commits into from Jul 15, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jul 15, 2022

Questions Answers
Description? When downloading my GDPR Personal data to PDF or CSV, I can see that the age displayed is not correct.It is my current age + 1.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Fixes PrestaShop/PrestaShop#29074.
How to test? See issue

Copy link
Contributor

@PrestaEdit PrestaEdit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could manage to get it directly without makind rounding after.

Like this inside the query : SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) AS age

@ghost
Copy link
Author

ghost commented Jul 15, 2022

You are right @PrestaEdit , if we take a very close date the floor does not work either.
There are years with 366 days
I will correct

My test i put 18/07/2022 return 22 years

@florine2623 florine2623 self-assigned this Jul 15, 2022
Copy link
Contributor

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @okom3pom ,

Thanks for the PR.

Tested on PS 1.7.8.x, 8.0.x, develop.
Tested with multiple dates:

  • current year
  • date of the day
  • date after the current day
  • date before the current day
  • previous date with ages > 3 figures

Looking good to me.
It is QA ✅

@ghost
Copy link
Author

ghost commented Jul 15, 2022

Thank @PrestaEdit to

@jolelievre jolelievre merged commit bf1ab22 into PrestaShop:dev Jul 15, 2022
@jolelievre
Copy link
Contributor

Thanks @okom3pom and @florine2623

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.

[psgdpr] FO - Customer account - age is incorrect in export
5 participants