-
Notifications
You must be signed in to change notification settings - Fork 125
Fix: sync the correct timestamp in repeating event exceptions #766
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
Conversation
naveensingh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found two bugs:
- Converting an all-day instance to a timed event leads to invalid exceptions (duplicates) on the server. You should test your changes, especially when removing any existing logic.
- Moving an instance from Date A to Date B hides the original Date B instance (this seems to be happening in-app only).
app/src/main/kotlin/org/fossify/calendar/helpers/CalDAVHelper.kt
Outdated
Show resolved
Hide resolved
|
I simplified the solution, keeping the existing logic. I was able to move a single occurrence and changing it from all-day to timed event without errors in the emulator (and the event was synced successfully). I wasn't able to reproduce the error you mention in point 2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to move a single occurrence and changing it from all-day to timed event without errors in the emulator (and the event was synced successfully).
There's another bug related to that now. Steps:
- Create a daily repeating all-day event starting on 2025-09-28.
- Edit the occurrence on 2025-09-30 and keep it all-day, but change the title.
- Sync and check server (or other calendar apps). Notice that the occurrence on 2025-09-29 has disappeared due to an incorrect exception, and 2025-09-30 shows duplicates.
You may need to change your timezone to reproduce this. I think we need to drop the !event.getIsAllDay() check and always shift the time when the parent is all-day, but I haven't thought about it, so more investigation will be needed.
I wasn't able to reproduce the error you mention in point 2.
Here are the steps:
- Create a daily repeating event starting on 2025-09-14.
- Move the occurrence on 2025-09-17 to 2025-09-18 (change the title to distinguish it).
- Sync and compare events on the server with Fossify Calendar. You'll notice that there's only one event on 2025-09-18 instead of two (one original and the one we moved from 2025-09-17) in Fossify Calendar.
This will also need more investigation. It's probably a local DB exception that's causing the original instance on 2025-09-18 to disappear.
… repetition exception db update method
|
Ok, I was able to reproduce and fix issue number 2 (event occurrence disappearing when another occurrence was moved on the same day). There was a method which did just that ( Still I am unable to reproduce the first issue you mentioned in your last comment, I also set a different TZ on the emulator (and it is also different from the one I have on my calendar) |
# Conflicts: # CHANGELOG.md
|
Ok, I think I fixed it! I was not following your instructions closely, I created the repeating event for just N repetitions, and in that case the error did not show. I did a more torough testing this time 😅 It looks like the original timestamp needs to match the parent being all-day or timed (regardless of the new event form). I tested these cases:
|
|
I'll check this soon.
Have you also tested these changes with local events? |
I did not, but I just did now and it works for all cases mentioned above ✅ I also checked for tasks |
naveensingh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found one more bug:
Move an instance to some other date ➜ Edit the moved instance again ➜ Refresh ➜ Original instance disappears
… occurrence is not specified
# Conflicts: # CHANGELOG.md
naveensingh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May the source be with you.

Type of change(s)
What changed and why
Before & after preview
Closes the following issue(s)
Checklist
CHANGELOG.md(if applicable).