Server: 'Contacts Birthdays' showing up as task list

Created on 21 Jun 2017  路  16Comments  路  Source: nextcloud/server

Steps to reproduce

When using contacts and calendar, the 'Contacts Birthday' calendar is created.

Expected behaviour

Should not be shown as task list.

Actual behaviour

Is shown as task list, see https://github.com/nextcloud/tasks/issues/88

Server configuration

Operating system: Ubuntu 17.04

Web server: Apache

Database: MySQL

PHP version: PHP 7

Nextcloud version: 12.0.0.29

Updated from an older Nextcloud/ownCloud or fresh install: Fresh install

Where did you install Nextcloud from: Nextcloud.com

3. to review enhancement dav

Most helpful comment

We already fixed that as Morris pointed out, but I鈥檓 not sure whether we added a repair step for it. Will check tomorrow when I鈥檓 back home

All 16 comments

+1

This should be handled in the tasks app, because this is just a normal calendar. And we can't do anything "clever" on the server side to list it in half of the requests and in the other half (tasks) not.

This should be handled in the tasks app, because this is just a normal calendar. And we can't do anything "clever" on the server side to list it in half of the requests and in the other half (tasks) not.

That is not really true. The tasks app only shows calendars which have the VTODO option set. See here: https://github.com/nextcloud/tasks/blob/master/js/app/services/calendarservice.js#L109-L122

So the birthday calendar should only be VEVENT and not VTODO. This is what https://github.com/nextcloud/server/commit/6eb1bc55ab24cf1cfae5995d5fbb976120df32d5 was about. If the birthday calendar also holds VTODO this is a server bug, because Tasks app cannot do anything against that.

@andreasjacobsen93 Could you please check whether or not your birthday calendar is VEVENT or also VEVENT,VTODO ?

Thanks for the explanation. Didn't knew that. Sorry for the noise.

@georgehrke @rullzer Mind to have a quick look into it?

Looks like we already set this properly: https://github.com/nextcloud/server/blob/f57a3aa81b27cdc7fbf4595deca9022384aacc91/apps/dav/lib/CalDAV/BirthdayService.php#L119

Could it be that the calendar was updated to also hold the VTODO?

Would be good if @andreasjacobsen93 could confirm if the calendar holds VTODO (which I really think).

I just checked my Nextcloud 12 installation and the contact_birthdays calendars had components set to VEVENT,VTODO.
Running a simple MySQL query solved this problem:

update oc_calendars set components="VEVENT" where displayname="Contact birthdays";

So yeah, this is a server issue.

@georgehrke shall we take position here?
Either close it or set it as to develop? :)

We already fixed that as Morris pointed out, but I鈥檓 not sure whether we added a repair step for it. Will check tomorrow when I鈥檓 back home

I just checked my Nextcloud 12 installation and the contact_birthdays calendars had components set to VEVENT,VTODO.
Running a simple MySQL query solved this problem:

update oc_calendars set components="VEVENT" where displayname="Contact birthdays";

So yeah, this is a server issue.

Thanks for this fix!
Nextcloud 16 still seem to add VTODO to birthday calendars.

@0xbb Can you describe your setup a bit more? Is it a fresh install or did you upgrade from a previous version of Nextcloud?

New contact's birthday calendars are created with VEVENT only: https://github.com/nextcloud/server/blob/3a6d8174a92734a3cc4be476163f4a98ca4d3f81/apps/dav/lib/CalDAV/BirthdayService.php#L147

and there is a repair step to fix existing birthday calendars:
https://github.com/nextcloud/server/blob/3a6d8174a92734a3cc4be476163f4a98ca4d3f81/apps/dav/lib/Migration/FixBirthdayCalendarComponent.php#L57

Ah, never mind. Found the issue

Thank you!

Was this page helpful?
0 / 5 - 0 ratings