FossifyOrg / Calendar

A simple calendar with events, customizable widgets and no ads.
https://www.fossify.org
GNU General Public License v3.0
590 stars 48 forks source link

Inadvertently creating duplicate birthday events when importing birthdays from contacts #206

Closed vivident4004 closed 2 months ago

vivident4004 commented 2 months ago

Checklist

Affected app version

1.0.3

Affected Android/Custom ROM version

Android 14

Affected device model

All

How did you install the app?

GitHub releases

Steps to reproduce the bug

  1. Go to app's main menu
  2. Tap on "add birthdays from contacts"

Expected behavior

The event for the birtdays would be added only once, and the duplicates would not be added or would be merged. So, if one taps n times the import button at any n moments, there should still be only one event of each birthday for every contact.

Actual behavior

For every contact there are n events created (with n taps on the import button), and there is not a way, or a button, or a setting to automatically merge all birthdays for all contacts for every year in the calendar.

Screenshots/Screen recordings

No response

Additional information

The only way to solve this is to delete the birthdays event tab completely and re-import all the birthdays, which is slightly inconvenient. It would be nice if there was a simple check to prevent this behaviour from happening. Also, I haven't tried with anniversaries or other types of events, but I suspect the behaviour might be the same.

Aga-C commented 2 months ago

Add contact birthdays should prevent duplicates from being created. I tested it right now, and no duplicate entries have been created.

Where do you store your contacts? Do you modify contacts in any way between imports?

Also, please provide your specific device model.

vivident4004 commented 2 months ago

I've now retested the app and indeed, no duplicates appear. I recently moved all of my data to another phone, and on the previous phone I was using SimpleMobileTools' Calendar, and I imported all the events through a .ics backup on the new Fossify Calendar, so I guess there was a mismatch and the new app didn't properly recognize the birthday events. Now, after deleting the birthdays tab and re-importing them, no duplicates appear. I even tried adding a new birthday to a contact, and after tapping again on Add contact birthdays, it gets automatically imported with no duplicates.

My bad, I should've tested it more thoroughly. Should I cancel this bug report?

The only bug now, if we can classify it as that, is after removing the birthday from a contact (in this case, the contact I modified for the test) it is not automatically removed from the calendar, even after tapping again on Add contact birthdays.

I have the stock contacts app on a Pixel 8.

Aga-C commented 2 months ago

after removing the birthday from a contact (in this case, the contact I modified for the test) it is not automatically removed from the calendar, even after tapping again on Add contact birthdays

There's already a similar issue: https://github.com/FossifyOrg/Calendar/issues/194, so we are aware that this synchronization needs a refinement.