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

ICS events show as 'free' in calendar clients #113

Closed
fabiodrg opened this issue Mar 27, 2022 · 2 comments · Fixed by #114
Closed

ICS events show as 'free' in calendar clients #113

fabiodrg opened this issue Mar 27, 2022 · 2 comments · Fixed by #114
Assignees
Labels
enhancement New feature or request
Projects

Comments

@fabiodrg
Copy link
Collaborator

fabiodrg commented Mar 27, 2022

All events generated via ics.js show as 'Free' in calendar clients and I think it is quite correct. It could be a configurable option of course, but I think by default all events associated to timetables and exams should appear as 'Busy'. A bill deadline is more a reminder, thus that should be fine to show as 'Free' (in my opinion). I guess it would be nice to tweak the default per extractor-basis and let the user customise if he needs to.

After reading the standard and inspecting the code, the problem is the lib adding a TRANSP field on VEVENT: https://github.com/nwcell/ics.js/blob/dfec67f37a3c267b3f97dd229c9b6a3521222794/ics.js#L187.

Time Transparency is the characteristic of an event that determines whether it appears to consume time on a calendar. Events that consume actual time for the individual or resource associated with the calendar SHOULD be recorded as OPAQUE, allowing them to be detected by free/busy time searches. Other events, which do not take up the individual's (or resource's) time SHOULD be recorded as TRANSPARENT, making them invisible to free/ busy time searches. - https://icalendar.org/iCalendar-RFC-5545/3-8-2-7-time-transparency.html

I guess we cannot easily override this behaviour... The lib is no longer maintained either. Should we fork it? Consider using another lib?

@fabiodrg fabiodrg added enhancement New feature or request help wanted Extra attention is needed labels Mar 27, 2022
@fabiodrg fabiodrg added this to To do in v4.2 Mar 28, 2022
@fabiodrg
Copy link
Collaborator Author

Nvm. We have the lib locally within the project. I think it is fine to to extend the addEvent to support a status that is either 'BUSY' or 'FREE' and set the 'TRANSP' accordingly.

One additional idea. Add a addSigEvent in ics.js that supports the new CalEvent class?

@fabiodrg fabiodrg self-assigned this Mar 28, 2022
@fabiodrg fabiodrg removed the help wanted Extra attention is needed label Mar 28, 2022
@fabiodrg fabiodrg moved this from To do to In progress in v4.2 Mar 28, 2022
@fabiodrg
Copy link
Collaborator Author

One more thing. The ics.js lib is setting the events class as public. This parameter is optional and I think we should remove it. When the events are imported to a calender service, if CLASS is omitted, then the default for that event is used, which resembles the behaviour of going to Google Calendar and add an event manually.

fabiodrg added a commit that referenced this issue Mar 28, 2022
* Introduce an enumerator to represent calendar status. Afaik, only two
  exist, but should make the code more readable as the notion of status
will be used in multiple places (extractors, ics.js, options page, ...)
* Add the atribute to the class CalendarEvent
fabiodrg added a commit that referenced this issue Mar 28, 2022
the 'structure' object. Make events status configurable per extractor.
(#113)

* Every event extractor has configurable title and descriptions formats,
  as well as the flag for 'isHTML' and default event status. As an
attempt to ensure all 'EventExtractor' implementations have these
properties, an auxiliar function is added to generate the common part,
while enabling different defaults per extractor
* This commit also makes the event status configurable per extractor, so
  that some extractors set events as busy, but others can set it as free
fabiodrg added a commit that referenced this issue Mar 28, 2022
visibility should default to the client calendar settings (#113)
@fabiodrg fabiodrg linked a pull request Mar 28, 2022 that will close this issue
fabiodrg added a commit that referenced this issue Mar 29, 2022
* Introduce an enumerator to represent calendar status. Afaik, only two
  exist, but should make the code more readable as the notion of status
will be used in multiple places (extractors, ics.js, options page, ...)
* Add the atribute to the class CalendarEvent
fabiodrg added a commit that referenced this issue Mar 29, 2022
the 'structure' object. Make events status configurable per extractor.
(#113)

* Every event extractor has configurable title and descriptions formats,
  as well as the flag for 'isHTML' and default event status. As an
attempt to ensure all 'EventExtractor' implementations have these
properties, an auxiliar function is added to generate the common part,
while enabling different defaults per extractor
* This commit also makes the event status configurable per extractor, so
  that some extractors set events as busy, but others can set it as free
fabiodrg added a commit that referenced this issue Mar 29, 2022
visibility should default to the client calendar settings (#113)
fabiodrg added a commit that referenced this issue Mar 29, 2022
* Introduce an enumerator to represent calendar status. Afaik, only two
  exist, but should make the code more readable as the notion of status
will be used in multiple places (extractors, ics.js, options page, ...)
* Add the atribute to the class CalendarEvent
fabiodrg added a commit that referenced this issue Mar 29, 2022
the 'structure' object. Make events status configurable per extractor.
(#113)

* Every event extractor has configurable title and descriptions formats,
  as well as the flag for 'isHTML' and default event status. As an
attempt to ensure all 'EventExtractor' implementations have these
properties, an auxiliar function is added to generate the common part,
while enabling different defaults per extractor
* This commit also makes the event status configurable per extractor, so
  that some extractors set events as busy, but others can set it as free
fabiodrg added a commit that referenced this issue Mar 29, 2022
visibility should default to the client calendar settings (#113)
@fabiodrg fabiodrg moved this from In progress to Done in v4.2 Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
v4.2
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant