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

Events that start in the second half of the month might not get displayed in the next month #7848

Open
charlag opened this issue Nov 1, 2024 · 0 comments · May be fixed by #7881
Open

Events that start in the second half of the month might not get displayed in the next month #7848

charlag opened this issue Nov 1, 2024 · 0 comments · May be fixed by #7881
Assignees
Labels
bug broken functionality, usability problems, unexpected errors topic: calendar

Comments

@charlag
Copy link
Contributor

charlag commented Nov 1, 2024

Describe the bug
IDs for calendar events are based on event start timestamp randomized by up to 15 days in either direction.

Calendar events longer than 15 days are considered "long" events and are loaded differently.

When we load "short" events for a given month we load with IDs that are based on start/end of the month +/- 15 days out into previous/next month, to include events with randomized IDs.

CalendarFacade#updateEventMap will only put events on days in the target month, no matter when events start or end. That is, if we are calling updateEventMap() for November it will only add November days to the map, even for events that start e.g. in October.

That means that in some cases events that overflow into the next month will be displayed. However, if the randomized ID is based on timestamp that is older than "15th of the previous month" then it will not be included and won't be displayed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to calendar
  2. Create an event in the second half of the month that ends in the next month. It must be shorter than 15 days.
  3. Get (un)lucky with ID assignment so that randomized ID will use the timestamp in the first half of the month. You can modify generateEventElementId() to make it deterministic.
  4. Log out/in again to reload the calendar.
  5. Check events in the next month. If you've been (un)lucky the event won't be there.
    Expected behavior
    Events that end in the next month are always displayed in the latter month.

Sample data
Unlucky event id ["LoCcwbJ--7-1","MTcyODc5MDc3ODIzNA"]
Month start 1730415600000 Fri Nov 01 00:00:00 CET 2024
Month end 1733007600000 Sun Dec 01 00:00:00 CET 2024
Start id for loading month's events: MTcyOTAzMzIwMDAwMA 1729033200000 Wed Oct 16 01:00:00 CEST 2024
End id for loading month's events: MTczNDM5MDAwMDAwMA 1734390000000 Tue Dec 17 00:00:00 CET 2024

Notes

  • The event will only be cut if it ends after the first week of the month.
@charlag charlag added bug broken functionality, usability problems, unexpected errors topic: calendar labels Nov 1, 2024
@murilopereirame murilopereirame self-assigned this Nov 6, 2024
@murilopereirame murilopereirame linked a pull request Nov 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug broken functionality, usability problems, unexpected errors topic: calendar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants