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

Age incorrect for private contacts from Fossify Contacts who are born before 1970 #196

Open
7 tasks done
genodeftest opened this issue Mar 30, 2024 · 3 comments · May be fixed by #224
Open
7 tasks done

Age incorrect for private contacts from Fossify Contacts who are born before 1970 #196

genodeftest opened this issue Mar 30, 2024 · 3 comments · May be fixed by #224
Labels
bug Something is not working

Comments

@genodeftest
Copy link

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

1.0.3

Affected Android/Custom ROM version

Android 13, patchlevel 2024-01-05 (FP4.TP29.C.0101.20240121)

Affected device model

Fairphone 4

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

Precondition: In Fossify Contacts, have SettingsShow private contacts to Fossify Dialer, Fossify SMS Messenger and Fossify Calendar enabled.

  1. In Fossify Contacts, create a contact in Phone Storage (not visible by other apps)
  2. Fill in a birthday before 1970-01-01
  3. Save the contact
  4. Open Fossify Calendar. It will immediately import the added contact
  5. In Fossify Calendar, navigate to the contact's birthday anniversary (e.g. 2024-04-14 if the contact was born in 1962-04-14)

Expected behavior

Show the real age of the contact at their birthday anniversary. For a contact born on 1962-04-14, that would be 62 years on 2024-04-14.

Actual behavior

For every person born before 1970, the age is calculated as if they were born in 1970 (on the same day). I.e., the person born on 1962-04-14 would be shown age 54 on 2024-04-14, as if it were born on 1970-04-14.

Screenshots/Screen recordings

Contact:
Fossify Contacts

Calendar date (2024-04-14):
Fossify Calendar

Additional information

This issue had been reported against Simple Calendar before (SimpleMobileTools/Simple-Calendar/#1812), where @Aga-C gave a hint to the probable cause for this issue:

The problem is only with private contacts from Simple Contacts […]. It seems to be related to this fragment of code in MainActivity:

                    if (date.year < 70) {
                        date.year = 70
                    }

Fossify Calendar inherited this code in app/src/main/kotlin/org/fossify/calendar/activities/MainActivity.kt.

@genodeftest genodeftest added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Mar 30, 2024
@Aga-C Aga-C removed the needs triage Issue is not yet ready for PR authors to take up label Mar 30, 2024
@Daemanon
Copy link

Hello, me and @Yaassiihh will work on this

@nofishonfriday
Copy link

@Daemanon Are you still planning to work on it?
To me it looks like simply removing the three lines in the opening post will fix it, but maybe I'm wrong?

@Daemanon
Copy link

@nofishonfriday yes but we still haven't started it, we will probably next week, sorry for the inconvenience

@Daemanon Daemanon linked a pull request May 2, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants