bbalet / jorani

Leave and Overtime Management System
http://jorani.org/
GNU Affero General Public License v3.0
389 stars 276 forks source link

Fix ical #316

Open filug opened 3 years ago

filug commented 3 years ago

This MR is changing the way how 'full day' leaves are represented in ICS calendars.

Instead of "hardcoded" 0:00→23:59 duration, now DTSTART & DTEND fields can use Date (instead of DateTime) notation which gives ical clients possibility to show events/leaves as 'full day' event.

Here you can see the difference

Old visualization

image

New visualization

image

This original visualization was (at least for me) extremely annoying. When I wanted to mix two types of calendars: one with my appointments and second with all leaves in my company (so 'global' or 'my subordinates' calendar) generated view was like this

image

In case when more than one coworker was listed situation was even worst.

About VTIMEZONE

ICS content returned by jorani to the clients were tested by my on https://icalendar.org/validator.html page and this validator complains about missing VTIMEZONE entries. Therefore, this ICAL element were added as well. This part of code was borrowed from https://gist.github.com/thomascube/47ff7d530244c669825736b10877a200 and only slightly aligned with the rest of jorani software.

bbalet commented 3 years ago

Hi,

Thanks for this PR. Did you test it with Google Calendar and Outlook? In a previous PR the solution was only working with MacOS' client See https://github.com/bbalet/jorani/pull/218

filug commented 3 years ago

Hi,

Thanks for this PR. Did you test it with Google Calendar and Outlook?

My Jorani instance is working in intranet only, therefore Google Calendar was tested like this:

  1. Download ICS file ('global' calendar) and save it in ics file,
  2. import ics file to Google Calendar

seems to work, see below.

Jorani configuration

image

Google calendar

image

and last event details

image

My Jorani instance is working in intranet, therefore I have no possibility to subscribe this calendar to Google Calendar. That's the reason why ICS file were exported/imported manually.

Outlook was not tested (yet), as I'm Linux guy, I have limited access to Windows workstations and Outlook as well. Will try to test it asap (up to 3 days I think).

Moreover: Calendar was tested with Thunderbird (where it seems to work, see my previous screenshots).

In a previous PR the solution was only working with MacOS' client See #218

Here you have much more changes, so I agree I should to be tested carefully. BTW: I have no access to MacOS at all, so I'm not capable to test my changes on this platform.

filug commented 3 years ago

@bbalet here you can see Outlook test result

Configuration at Jorani side

image

and outlook calendar

image (3)

It seems to work as well.

bbalet commented 3 years ago

Looks good to me. Thank you for the comprehensive tests. I'll check a bit and merge.