Giter VIP home page Giter VIP logo

Comments (7)

yurabakhtin avatar yurabakhtin commented on August 29, 2024 1

@dantefromhell Ok, thanks, I have extened the list of fields.
@luke- PR #449.

from calendar.

luke- avatar luke- commented on August 29, 2024

@yurabakhtin Can you please take a look into this?

from calendar.

yurabakhtin avatar yurabakhtin commented on August 29, 2024

According to this Google Calendar Help article the SEQ field must be increased in the updated ICS to trigger updating an event.

@dantefromhell Do you mean we should increase the column calendar_entry.sequence on each updating of the Calendar Entry?
Maybe the field UID with value like humhub-calendar_event-b23ed8b8-f26a-4950-842d-c45aba009898 should be used for update event.

from calendar.

dantefromhell avatar dantefromhell commented on August 29, 2024

@yurabakhtin

Maybe the field UID with value like humhub-calendar_event-b23ed8b8-f26a-4950-842d-c45aba009898 should be used for update event.

I was trying to find the sentence in RFC5545 which talks about this, but somehow wasn't able to.

TL;DR from reading more (non-official e.g. [1]) documentation:
The UID field must remain fixed throughout the lifetime of a calendar event.

Do you mean we should increase the column calendar_entry.sequence on each updating of the Calendar Entry?

RFC5545 is pretty precise how the SEQ field is supposed to work:
https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.4

TL;DR: It starts with SEQ=0 and will be incremented on every change to the event.
From my incomplete understanding of the code, yes this should be implemented as calendar_entry.sequence + 1

[1] https://devguide.calconnect.org/Data-Model/Simple-Event/#:~:text=An%20ics%20file%20is%20a,contains%20one%20or%20more%20events.&text=Then%20BEGIN%20and%20END%20of,one%20VCALENDAR%20object%20per%20file.

FYI I found a nice ICS validator tool in case that is helpful https://icalendar.org/validator.html#results

from calendar.

yurabakhtin avatar yurabakhtin commented on August 29, 2024

RFC5545 is pretty precise how the SEQ field is supposed to work: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.4

TL;DR: It starts with SEQ=0 and will be incremented on every change to the event. From my incomplete understanding of the code, yes this should be implemented as calendar_entry.sequence + 1

@dantefromhell Thank you for the info, yes, you are right.

I have found and tested this code https://github.com/humhub/calendar/blob/master/models/forms/CalendarEntryForm.php#L515-L519:

$incrementSequence = $this->original->getStartDateTime() != $this->entry->getStartDateTime();
$incrementSequence = $incrementSequence || $this->original->getEndDateTime() != $this->entry->getEndDateTime();
$incrementSequence = $incrementSequence || $this->original->getRrule() !== $this->entry->getRrule();
$incrementSequence = $incrementSequence || $this->original->getExdate() !== $this->entry->getExdate();
$incrementSequence = $incrementSequence || $this->original->getEventStatus() !== $this->entry->getEventStatus();

It means the column sequence is increased only when one of the field is updated.

Do you want to extend the list, for example, should we increase the sequence when a title or a description or some other field?

from calendar.

dantefromhell avatar dantefromhell commented on August 29, 2024

Do you want to extend the list, for example, should we increase the sequence when a title or a description or some other field?

Reading the RFCs my answer is yes. I propose that end-user calendars (e.g. Google) should be able to detect any event changes correctly, which I guess translates into updating SEQ for any change to a field that gets exported in the ICS file.

Or maybe it's easier to just update the SEQ field internally on any event changes without needing to list fields explicitly? 🤔

from calendar.

luke- avatar luke- commented on August 29, 2024

@yurabakhtin @dantefromhell Thanks, I've just merged the PR

from calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.