Page MenuHomePhorge

exceptions in recurrences with mixed all day and non all day appointments not working as expected
Closed, ResolvedPublic

Description

Hi,

there seems to be a bug with exceptions in recurring appointments. If the exception and the rest of the recurring appointments are differing in the "all day" appointment type the exception is silently ignored by kolab.

Example:

    • using the roundcube web interface
    • create an recurring all day appointment starting on Monday, recurring 3 times every day
    • edit an appearance and change it to last from 01:00 pm to 02:00 pm and remve the "all day" tag
    • make sure you edit only the current occurrence
    • press save
    • the occurrence still stays as a all day occurrence, completely ignoring the time set
    • expected result: the edited occurrence should last from 1pm to 2pm
  1. Example:
    • using the roundcube web interface
    • create an recurring appointment starting on Monday from 1:00 pm to 2:00 pm, recurring 3 times every day
    • edit an appearance and change it to become a "all day" event by setting the "all day" tag
    • make sure you edit only the current occurrence
    • press save
    • the occurrence still stays as an event lasting from 1:00pm to 2:00pm, completely ignoring the all day tag
    • expected result: the edited occurrence should become an all day appointment
  2. Example:
    • using thunderbird as a client accessing the calendar via the iRony calendar URL
    • create an recurring appointment starting on Monday from 1:00 pm to 2:00 pm, recurring daily until Wednesday
    • edit an appearance and make sure you edit just this occurrence
    • set the all day tag
    • press save and close
    • the appointment will now last from 1am to 2am and NOT be an all day appointment
    • expected result: the edited occurrence should become an all day appointment

This behavior may be observed in Kolab 3.4 / Kolab 16 and Kolab Winterfell on CentOS 7. The used thunderbird version is 45.4.0.

Kolab 3.4: 
  pykolab-0.7.10-4.el7.kolab_3.4.noarch
  roundcubemail-plugin-calendar-3.2.7-11.el7.kolab_3.4.noarch
  roundcubemail-1.1.6-4.15.el7.kolab_3.4.noarch
  iRony-0.3.0-3.1.el7.kolab_3.4.noarch

Kolab 16:
  pykolab-0.8.5-1.2.el7.kolab_16.noarch
  roundcubemail-1.2.2-1.2.el7.kolab_16.noarch
  roundcubemail-plugin-calendar-3.3-1.11.el7.kolab_16.noarch
  iRony-0.4-1.20.el7.kolab_16.noarch

Kolab Winterfell:
 pykolab-0.8.5-2.1.el7.kolab_wf.noarch
 roundcubemail-1.2.2-2.2.el7.kolab_wf.noarch
 roundcubemail-plugin-calendar-3.3-40.3.el7.kolab_wf.noarch
 iRony-0.4-5.4.el7.kolab_wf.noarch

Kind Regards,
Jürgen

Details

Ticket Type
Task

Event Timeline

machniak subscribed.

I can confirm this. There are at least two issues here:

  1. allday flag for exceptions is forced to be the same as main event. This can be fixed with this:
-- a/plugins/libkolab/lib/kolab_format_event.php
+++ b/plugins/libkolab/lib/kolab_format_event.php
@@ -291,7 +291,9 @@ class kolab_format_event extends kolab_format_xcal
         }
 
         // preserve this property for date serialization
-        $exception['allday'] = $master['allday'];
+        if (!isset($exception['allday'])) {
+            $exception['allday'] = $master['allday'];
+        }
 
         return $exception;
     }
@@ -304,7 +306,7 @@ class kolab_format_event extends kolab_format_xcal
         // Note: If an exception has no attendees it means there's "no attendees
         // for this occurrence", not "attendees are the same as in the event" (#5300)
 
-        $forbidden    = array('exceptions', 'attendees');
+        $forbidden    = array('exceptions', 'attendees', 'allday');
         $is_recurring = !empty($master['recurrence']);
 
         foreach ($master as $prop => $value) {
  1. Above patch will cause such event exceptions to be displayed properly, but there are issues when you edit them. It's because RECURRENCE-ID (and internal _instance property) is generated inconsistently. Once it's a date and once a date-time. This causes redundant <vevent> entries in the object. I don't have a patch for this yet.
machniak claimed this task.