•  
      story #35094 have "calendar" events attached to tracker email notification
    Summary
    Empty
    have "calendar" events attached to tracker email notification

    I can book them in my calendar

    Overview

    When there is a timeframe associated to a tracker (hence to artifacts), the email notifications associated to artifacts should contains the needed information so the event can be added to a calendar (outlook, google cal, etc).

    It's close to what is proposed when you book a train or a medical appointment.

    In order to to work, the tracker must have the following pre-conditions:

    • Have the title semantic and title must not be empty
    • Have the timeframe semantic and the timeframe must be valid:
      • end of time frame must exist
      • end of time frame must be greater of equal to beginning of timeframe
    • At notification level, there is a configuration option to toggle the "event in notification" feature. This feature is off by default for existing trackers but on by default for new trackers from Tuleap official templates.

    The feature should come with extensive logging for sys admin troubleshooting needs.

    Behavior

    Event content

    • When there is a Description semantic, the description is added as Calendart Event description (permissions apply)
    • The owner of the event should be $PLATFORM_NAME - $PROJECT_NAME & associated email is platform's noreply

    Cancellation of events

    When start date & end date is cleared, it means that the event is canceled

    Events with hours information

    • when start date & end date are used and both fields are "datetime", the event is sent with hour information. Otherwise the event duration is day long.
    • when start date is a datetime and end date is computed with a duration, the event last duration x 24h
    • when event is a date time, the associated timezone is the timezone of the server

    Events with Yes/No/Maybe

    It's not possible to add Yes/No/Maybe options on events in this context because it will generate an email response sent to the event organizer (here noreply). This is called METHOD:REQUEST in ics jargon.

    Update of events

    Update of events is not supported.

    According to the RFC, the only way to support the update of events is with REQUEST type of events:

    3.2.2.1. Rescheduling an Event The "REQUEST" method may be used to reschedule an event. A rescheduled event involves a change to the existing event in terms of its time or recurrence intervals and possibly the location or description. If the recipient CUA of a "REQUEST" method finds that the "UID" property value already exists on the calendar but that the "SEQUENCE" (or "DTSTAMP") property value in the "REQUEST" method is greater than the value for the existing event, then the "REQUEST" method describes a rescheduling of the event.

    Granted that we cannot set REQUEST (see upper reason), it's therefore not possible to issue event's update.

    Permissions

    When notifications are configured to not check permissions, the calendar event is associated to the notification email even if the recipient is not supposed to have access to the timeframe information.

    Impact on templates

    Project & tracker templates are not modified yet. We should let some time to the feature to see how it behaves in the wild before pushing it everywhere.

    Mockups

    • Configure the option in tracker notifications

    Scenario

    Different Timezone

    • Bob is located at Paris (Timezone Europe/Paris)
    • Alice is located at New York (Timezone America/NY)
    • Bob creates an artifact with start date 2023-11-14 10:00 -> 2023-11-14 11:00 (for his timezone, hence Paris time)
    • Bob receive an event that last between 2023-11-14 10:00 and 2023-11-14 11:00 (Paris time)
    • Alice receive an event that last between 2023-11-14 04:00 and 2023-11-14 05:00 (NY time)
    • Alice modify the artifact to set end date to 2023-11-14 06:00 (NY Time)
    • Bob receive an event that last between 2023-11-14 10:00 and 2023-11-14 12:00 (Paris time)
    • Alice receive an event that last between 2023-11-14 04:00 and 2023-11-14 06:00 (NY time)

    Start date time + duration

    Tracker is using start date as date time + duration.

    • Bob creates an event that start 2023-11-28 at 10:00 with a duration of 2 days
    • The received event last from 2023-11-28 at 10:00 to 2023-11-30 at 10:00
    Empty
    Empty
    Status
    Trackers
    Done
    Development
    • [ ] Does it involves User Interface? 
    • [ ] Are there any mockups?
    • [ ] Are permissions checked?
    • [ ] Does it need Javascript development?
    • [ ] Does it need a forge upgrade bucket?
    • [ ] Does it need to execute things in system events?
    • [ ] Does it impact project creation (templates)?
    • [ ] Is it exploratory?
    Empty
    Details
    #35094
    Manuel Vacelet (vaceletm)
    2023-12-07 10:50
    2023-11-02 15:41
    35587

    References
    Referencing story #35094

    Artifact Tracker v5

    rel #32660 15.3

    Git commit

    tuleap/tuleap/stable

    feat: introduce calendar event config daf8704f7b
    refactor: s/TimePeriod/DatePeriod e2eb1a3390
    feat: Check presence of semantic title during notif 4857a4fce6
    feat: Check permissions for title semantic e422eb8add
    feat: Check emptyness of the title 6b161cd890
    refactor: Use NeverThrow to extract title b8a7e4ff69
    refactor: timeframe must be base on changeset 795b1bf0cf
    feat: XML Import/Export calendar event config 919f550998
    feat: Check timeframe before building calendar event 8d10f9a397
    refactoring: Extract retrieval of the event summary c32bc4da01
    refactor: Extract building of calendar event data a2a8d507d8
    feat: Bypass perm check when getting DatePeriod for CalendarEventData 3cc2c2bf6a
    feat: Send calendar event alongside notif f6b896bf2c
    feat: Introduce calendar event config 9a2fd47dfc
    feat: deactivate calendar events from UI 7fee160d37
    Decrease some usages of Mocks object for timeframe ArtifactChangesets fed16b51fa
    feat: warning if no semantic for calendar event 189afa4390
    feat: Change event method to cancel when start and end date equals zero ad17fe23cf
    feat: calendar events can be activated via web UI 57d87ff16b
    Move remaining files from `date` to `Date` namespace 006cd82c9f
    feat: Do not reset semantics if calendar events e73409f68e
    refactor: merge notification and notifications folders 9cde05af5b
    Add e2e tests on attachment feature ab2ae4faf7
    fix: CalendarEventDataBuilder should check timeframe fields are set to zero b98c60baac
    test: adjust tests since feature is now implemented 3b06dbd51a
    feat: reject calendar event XML import if no semantics 04cd8f036a
    feat: description in event 10ee144dd3
    fix: remove METHOD:REQUEST 1a3b47b802
    feat: Add organizer to event 0a661dca7c
    feat: no calendar event when timeframe implied 5145aeaa79
    feat: Add more log for complex condition isAllSetToZero 9b3632637e
    feat: No calendar event config when timeframed is implied 0b1426fd16
    chore: fix translation issues in main tracker po 576b61d485
    feat: Event based on datetime if date field display hours 08dc41a30d
    feat: no inherited timeframe when calendar events are used 407007f633
    feat: Prevent XML import of calendar event if inherited 842ee47788
    feat: Display time in duration end date 579367e98b

    Follow-ups

    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes