Add tasks to existing calendar

Hi there, I’d like to add tasks to an existing calendar. Is that possible or do I have to create a new calendar with task functionality?

Thanks for your hints!

Any clues? I have the same problem…

If you have access to the database, adjust the field components in the table oc_calendars of the according calendar from VEVENT to VEVENT,VTODO

3 Likes

How can I do this when using Nextcloud AIO?

I had the same issue and here is how I did it.

Be aware that I do not have any knowledge about the internals of nextcloud nor any experience with postgres. So I do not know whether this is the proper way to do it. But it worked for me.

  • Connect to database container: docker exec -it nextcloud-aio-database bash
  • Connect to database on postgres server: psql --username nextcloud --dbname nextcloud_database
  • Inspect calendar table: SELECT * FROM oc_calendars;
  • Update entry: UPDATE oc_calendars SET components = 'VEVENT,VTODO' WHERE id = REPLACE_BY_ID_OF_TARGET_ENTRY;
  • Verify changes: SELECT * FROM oc_calendar;
  • Quit from postgres server: \q
  • Exit from container: exit
1 Like

If you host your AIO on Ubuntu or Debian, then the easiest way to get database console access is with the nc-sql script.

Once installed, (It detects your nextclloud on its own) you only have to run

nc-sql

and you get an sql Prompt. No need for a password, since the script reads it from the nextcloud config.

hth.


Much and good luck,
ernolf

1 Like

This was super helpful! Thank you!

Just a small typo, a ‘s’ after calendar is missing:
SELECT * FROM oc_calendars;

Ah thanks, I fixed it