core icon indicating copy to clipboard operation
core copied to clipboard

New calendar events on shared calendars always considered as not significant

Open p5n opened this issue 10 years ago • 18 comments

Steps to reproduce

  1. Create event from web or from thunderbird+lightning on shared calendar
  2. invite people
  3. People do not receive notification however if you do the same steps with your own calendar notification works

Commenting out return in:

  • owncloud/apps/dav/lib/caldav/schedule/imipplugin.php:schedule()

  • owncloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/IMipPlugin.php:schedule()

    fixes this issue (these files are very similar)

    if (!$iTipMessage->significantChange) { if (!$iTipMessage->scheduleStatus) { $iTipMessage->scheduleStatus = '1.0;We got the message, but it's not significant enough to warrant an email'; } //return; }

Expected behaviour

New event notification received by attendies

Actual behaviour

No notification for shared calendar

My set up

I use LDAP authentication with owncloud 9.0.1

Tested with calendar shared by SQL user with LDAP group, but it does not matter I think.

p5n avatar Apr 12 '16 14:04 p5n

Are notifications set from a not shared calendar? THX

DeepDiver1975 avatar Apr 12 '16 14:04 DeepDiver1975

Yes, it works from not shared calendar, it works if you use own shared calendar too

Also it looks like my fix is not really fix. Problem is that users receive only cancelled events from shared calendars, but not new event notifications

p5n avatar Apr 12 '16 14:04 p5n

ref https://github.com/owncloud/calendar/issues/422

georgehrke avatar Apr 14 '16 07:04 georgehrke

@georgehrke from my understanding this is a server side issue - I guess you can close owncloud/calendar#422

DeepDiver1975 avatar Apr 14 '16 12:04 DeepDiver1975

okay, thx :)

georgehrke avatar Apr 14 '16 12:04 georgehrke

Problem is in 3rdparty/sabre/vobject/lib/ITip/Broker.php in parseEvent. When you create event $userHref contains calendar owner email however creator is another user. So it never enters into "if (in_array($eventInfo['organizer'], $userHref))"

However in case of cancel method $userHref contains event creator email and it sends notification.

p5n avatar Apr 15 '16 15:04 p5n

Yes - the owner of the calendar is not the organizer and the code is not executed ...

... let's see if we can fix this ...

DeepDiver1975 avatar May 02 '16 11:05 DeepDiver1975

This is the code in question ... from my understanding $addresses should not only hold the owner but also all sharees

@evert mind wasting some brain computing cycled on this? :wink: - THX a lot!


        $addresses = $this->getAddressesForPrincipal(
            $node->getOwner()
        );

        $broker = new ITip\Broker();
        $messages = $broker->parseEvent(null, $addresses, $node->get());

DeepDiver1975 avatar May 02 '16 12:05 DeepDiver1975

We haven't fully figured out yet what to do with shared calendars and scheduling. The hard part is figuring out: "who is doing this, and what role does he/she play".

For example, if you are sharing a calendar with someone, and then also inviting that same person to an event on that shared calendar, when that person makes changes to their copy, do they act on behalf of themselves (as attendee) or as the owner of the calendar (the organizer). Deleting the event for example has a very different effect. In the first case they would simply decline the event, in the second scenario they cancel the event for everyone.

So it turns out there's very different opinions about what should happen in that case. In the end I proposed a solution that adds a new webdav property to every shared calendar that contains an email address that a CalDAV client must use as the uri that is "themselves".

The default sabre/dav implementation will likely be that when you work with a shared calendar, you act on behalf of the owner of the calendar. I have no intention of making changes before the dust on this has settled though.

So for now I think you should treat this as a known problem, but not something that can be fixed in the short term. The CalDAV answer to this for now is "don't do scheduling on shared calendars" and that's that ;)

evert avatar May 03 '16 16:05 evert

Thanks a lot @evert

DeepDiver1975 avatar May 04 '16 06:05 DeepDiver1975

Hi all, any update on this issue? Are you planning to change anything about this in some next release? We need to restore the previous behavior. Need invitation email on shared calendars. How could we do it?

FabioLapolla avatar Apr 07 '17 13:04 FabioLapolla

Hey, this issue has been closed because the label needs info is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.

ownclouders avatar Dec 13 '17 14:12 ownclouders

Hi there, this issue is still present in OC 10. Are there any plans to work on it?

toaster avatar Mar 22 '18 13:03 toaster

On OC 10.0.7 the $hrefOwner given to parseEvent is empty if the event creator/changer is not the owner of the calendar. I used this for a hack in parseEvent:

        if (empty($userHref) || in_array($eventInfo['organizer'], $userHref)) {
            return $this->parseEventForOrganizer($baseCalendar, $eventInfo, $oldEventInfo);
        } elseif ($oldCalendar) {
…

This works for me but is not nice. I didn't dive deep enough to figure out how to use the event creator instead of the calendar owner for determining the $userHref.

I guess it would break if I had other owncloud users (who are not the calendar owner) as attendees which then try to update the event but I did not check that.

toaster avatar Mar 22 '18 15:03 toaster

This issue remains on Owncloud 10.0.8.

Steps to reproduce

  • configure properly the email settings of your Owncloud instance and test it.
  • login as user1.
  • create a calendar and share it with user2 manually.
  • create an event on your "Personal" calendar.
  • invite the user2 in "more..." options (your user has a verified email) and an email will be sent.
  • do the same in the shared calendar that you created before, but no email will be sent to user2.

Expected behaviour

  • The email needs to be sent anyway (with our without shared calendars) because it is impossible to accept or reject the invitation... so for example, in the iOS Calendar App, invitees section, everyone will be with the status: no response (?)

Actual behaviour

  • the email is only sent when you invite a user in not shared calendar with that specific user.

Server configuration

  • CentOS 7 running latest Docker image of owncloud/server (Tag ID: 2e73a4f3de8c)
  • MariaDB latest Docker image (Tag ID: 2cbeee8bd9cf)
  • ownCloud version: (see ownCloud admin page) - 10.0.8.5 (stable)
  • Calendar version: (see ownCloud apps page) - 1.5.7
  • The content of config/config.php:
<?php
$CONFIG = array (
  'datadirectory' => '/mnt/data/files',
  'updatechecker' => 'false',
  'upgrade.disable-web' => 'true',
  'skipUpdateCheck' => true,
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/owncloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/owncloud/custom',
      'url' => '/custom',
      'writable' => true,
    ),
  ),
  'dbtype' => 'mysql',
  'dbhost' => 'ownsql:3306',
  'dbname' => 'owncloud',
  'dbuser' => 'root',
  'dbpassword' => '****************',
  'dbtableprefix' => 'oc_',
  'trusted_domains' =>
  array (
    0 => 'localhost',
  ),
  'passwordsalt' => '****************',
  'secret' => '****************',
  'overwrite.cli.url' => '****************',
  'version' => '10.0.8.5',
  'mysql.utf8mb4' => true,
  'logtimezone' => 'UTC',
  'installed' => true,
  'instanceid' => '****************',
  'redis' => array('host' => 'redis', 'port' => 6379),
  'filelocking.enabled' => 'true',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'loglevel' => '2',
  'default_language' => 'en',
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
);

Client configuration

  • Browser: Chrome
  • Operating system: Mac OS 10.13.4

alejandrofcarrera avatar May 11 '18 11:05 alejandrofcarrera

So for now I think you should treat this as a known problem, but not something that can be fixed in the short term. The CalDAV answer to this for now is "don't do scheduling on shared calendars" and that's that ;)

@alejandrofcarrera see above - know issue - no solution in sight ...

DeepDiver1975 avatar May 11 '18 12:05 DeepDiver1975

@DeepDiver1975 No problem. We can assume for shared calendars, there are no notifications for the members linked to this calendar. In my case, i am using the description field to put the members who need to attend. At least, it is the simplest solution. You can close the issue if there is no apparent solution except bypassing each own instance as our partner has done 👍 Thanks.

alejandrofcarrera avatar May 13 '18 09:05 alejandrofcarrera

This issue has been automatically closed.

stale[bot] avatar Sep 21 '21 00:09 stale[bot]