Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivate task lists in calendar #334

Closed
mkriegl opened this issue Mar 20, 2019 · 10 comments
Closed

Deactivate task lists in calendar #334

mkriegl opened this issue Mar 20, 2019 · 10 comments

Comments

@mkriegl
Copy link

mkriegl commented Mar 20, 2019

Hi guys,

I am using a couple of calendars. For each calendar I get a task list. Those are also been synchronized via DAVDroid. Is it possible to add a calendar without task list oder deactivate the tasklist to be not showing up and not being synchronized?

Thanks in advance .. Max

@raimund-schluessler
Copy link
Member

Please see this issue nextcloud/calendar#904 and this comment nextcloud/calendar#904 (comment)

@mkriegl
Copy link
Author

mkriegl commented Mar 20, 2019

I guess that is not exactly what I was looking for as hiding might not be the solution due to still being synchronized in DAVDroid.
Currently I got:

  • 1x personal calendar
  • 3x separate calendars (e.g. for sports, WhereAmI)
  • 3x ics calendars (holidays and office copy as read only)
  • 1x birthday calendar (created automatically from contacs)

For each calendar I get a task list even though I just need one for the personal calendar.

I just recognized, that it's possible the add calendars or task lists only in DAVDroid and it seems, that Nextcloud also only adds the selected in calendars/tasks. Therefore, I guess I will add my 3 separate calendars via DAVDroid.

For my situation now there is only two open issues:

  • ICS calendars in Nextcloud are not showing up or being synchronized in DAVDroid
  • as the birthday calendar from contacts is already in place, the task list on that cannot be elminated

@raimund-schluessler
Copy link
Member

As soon as a VCalendar supports VTODOs it will be shown in the Tasks app. Calendars created in the Calendar app will support VEVENTs and VTODOS, so they currently show up in the Tasks app (this is because the Tasks app currently does not support sharing, and this way you can share tasks lists with the Calendar app). Calendars/Lists created in the Tasks app only support VTODOs, so they don't show up in the Calendar app.

What a VCalendar supports, has to be set while creating it and it cannot be changed afterwards (the CalDAV standard forbids it for good reason).

So unless you recreate the calendars with the appropriated components list, the Nextcloud apps cannot change which calendars are shown in DAVDroid. I don't know which components DAVDroid specifies when creating a calendar/list. But if they only show up in the Calendar app or the Tasks app, then it sets VTODO for task lists and VEVENT for calendars (which is what you want, I guess).

ICS calendars in Nextcloud are not showing up or being synchronized in DAVDroid

I don't know if this is supported / should work. Anyway, this is a server issue, please report it there.

as the birthday calendar from contacts is already in place, the task list on that cannot be elminated

The birthday calendar should not be able to support VTODOs. If it shows up in the Tasks app, try to delete it and recreate it. If it still shows up, this is a server bug.

@mkriegl
Copy link
Author

mkriegl commented Mar 21, 2019

Thanks for the detailed explaination.
ICS: I found some information, that ICS is not supported by CalDAV. Workaround is to install ICSx5 on my Android device which works well.
Birthday Calendar: I only can delete the calandar; deletion in tasks is not available. I am a little afraid to delete the calendar, as the information comes from the birthdays in my contacts and I don't know how to add this calendar again

@raimund-schluessler
Copy link
Member

You can add this calendar by running

sudo -u www-data php occ dav:sync-birthday-calendar <your-user-name>

see https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#dav-commands

The birthdays will not be deleted from the contacts. If you want to be sure, create a backup first (you should have a backup in place any way ;)

@mkriegl
Copy link
Author

mkriegl commented Mar 21, 2019

Thanks for the occ command.
I just checked it, but the command also brings back again the entry in the tasks, so the tasks seems to be fixed with the calendar:

Re-enabling birthday calendar for
Start birthday calendar sync for

Backup is on a weekly basis, but thanks ;-)

Right now I got one more isse. For my personal calendars I can generate a link to download an ICS file. This is not possible for the birthday calendar. There is only a link to the birthday calendar, where I have to use username and password.
Why do I need that: I got a smart home dashboard that downloads ICS calendars (formerly from google calendar) on a daily basis. I managed it for two personal calendars, but the functions is missing for the birthday calendar as it is listed in the imported calendars - would be great to also get that calendar

@raimund-schluessler
Copy link
Member

I just checked it, but the command also brings back again the entry in the tasks, so the tasks seems to be fixed with the calendar:

You can have a look in your database, table oc_calendars. There you should find calendars with the uri contact_birthdays for every user. Have a look at the column components. For the birthday calendars it should only read VEVENT. If you also find VTODO, than something went wrong with the creation of the birthday calendars and it is a server issue. (You could, as a workaround, also change the column to read VEVENT only. This is a hack, because the CalDAV standard forbids to change the components after calendar creation. But in this case nothing bad should happen, since the calendar only holds entries of type VEVENT.) There already is an issue for that, but it didn't make any progress recently. Maybe you can report your problem there and try help to fix it: nextcloud/server#5504

For my personal calendars I can generate a link to download an ICS file.

In the calendar app, I can download an ICS file for the birthday calendar as well. I don't know, if this is what you want exactly, but I guess it is. If not, please report it in the calendar or server repository (I am not sure to which one it belongs exactly, I would try calendar first.)

@mkriegl
Copy link
Author

mkriegl commented Mar 22, 2019

Hi Raimund,
thanks for your help. I will check this evening the DB. Just my SQL skills are very limited :-) - yesterday I already managed to find the calendar uri for contatct_birthdays. I will also check the issue 5504 and post my problem if necessary.
For my ICS download, I do have the Download Button. My problem is, that I need the link to the ICS download file. This information I found from a user who posted the DAVDroid Log with duplicated entries.
.../remote.php/caldav/calendars/<user>/contact_birthdays/431f1fde-fd75-4b8c-8ba9-0854a31dd49b.ics

I only got this link, where I need to log in every time - not usable with by smart home dashboard:
.../remote.php/caldav/calendars/<user>/contact_birthdays/

Regards .. Max

@raimund-schluessler
Copy link
Member

For my ICS download, I do have the Download Button. My problem is, that I need the link to the ICS download file. This information I found from a user who posted the DAVDroid Log with duplicated entries.
.../remote.php/caldav/calendars//contact_birthdays/431f1fde-fd75-4b8c-8ba9-0854a31dd49b.ics

I am afraid, I am the wrong person to ask. Please post this issue in the calendar repo.

@mkriegl
Copy link
Author

mkriegl commented Mar 22, 2019

OK, but already thanks so far ;-)

By the way: UPDATE oc_calendars SET components="VEVENT" WHERE displayname="Contact birthdays"; solved the task list on birthday calendar issue

And I was able to make the birthday calendar as a shared caledar:
lists the shared calendars: SELECT * FROM oc_dav_shares;
add a new entry: INSERT INTO oc_dav_shares (id,principaluri,type,access,resourceid,publicuri) VALUES (<new_entry_numer>,'<principaluri_from_oc_calendars>','calendar',4,<id_from_oc_calendars>,'new_but_different_publicuri');
calendar can then be downloaded via: https://<URL>/remote.php/dav/calendars/<USER>/<publicuri>?export
it is more easy, when there is already a shared calendar in the table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants