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

Add to calendar: Incorrect end date for activities spanning whole day(s) #1083

Closed
SilasPeters opened this issue Jan 17, 2024 · 4 comments · Fixed by #1084
Closed

Add to calendar: Incorrect end date for activities spanning whole day(s) #1083

SilasPeters opened this issue Jan 17, 2024 · 4 comments · Fixed by #1084
Labels

Comments

@SilasPeters
Copy link
Member

Current Behaviour

When clicking on the link to add an activity to your calendar, (and when the activity spans over multiple days,) and when no specific end time is specified for the final day (assuming koala stored the activity as lasting the whole day), the timestamp filled in your agenda is 00:00 on the start of the final day.

The consequence is, that when an activity is from 1-3 Jan, but no end time is specified (just 3 Jan), then the agenda displays the activity only on 1-2 Jan, as it ends at 3 Jan 0:00.

Expected Behaviour

The timestamp of 3 Jan is 23:59, or even better, the calendar knows 'whole days' are specified and no timestamps have to be supplied.

Notes

I believe the bug is that we specify no timestamp, but also not that the activity spans over whole days - without specific timestamps.

This bug might also influence activities which do not span over multiple days, but just do not have a specific end time

@SilasPeters
Copy link
Member Author

@stickyPiston can koala distinguish activities lasting whole days from activities lasting until a specific point in time? If so, this is a better alternative than setting the end-time to 23:59, when dealing with activities with no specific times.

This is an example of how I would expect such events to be present in the calendar:
Screenshot of 'Whole day' option in google calendar

This can be achieved by changing the dates field to have UTC dates without time (so 20240213 instead of 20240213T123040Z)

@SilasPeters SilasPeters reopened this Jan 19, 2024
@stickyPiston
Copy link
Member

Hmm... that's interesting. Koala saves the start and end time separately and either or both can be nil. So for the case that both are nil I see no problem, though we might need to test to see if it handles the case that only one is nil (or disregard that situation altogether)

@SilasPeters
Copy link
Member Author

SilasPeters commented Jan 27, 2024

I tried combining null timestamps, and these are the results:

Both timestamps
Start date: 20240212T173000Z, end date: 20240212T210000Z
Test result

No start timestamp
Start date: 20240212, end date: 20240212T210000Z
Test result

No end timestamp
Start date: 20240212T173000Z, end date: 20240212
Test result

Neither timestamps
Start date: 20240212, end date: 20240212
Test result

I guess this can be summarised as:

If no timestamp is given, it is defaulted to 00:00. However, if the start date does not have a timestamp, the event is considered to last whole days (and the timestamp of the end date is discarded).

Thus my suggestion is to 1) disallow one timestamp to be unspecified if another is specified, and that 2) if no timestamps were specified, then no timestamps are included in the generated link, and if there were timestamps specified, then we would just copy them over into the link.

This way, if you specify times then the times are included. If you don't then the event will be marked as lasting whole day(s). This matches the intuition of leaving the timestamp fields blank.

@SilasPeters
Copy link
Member Author

This was closed by #1084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants