nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
954 stars 233 forks source link

Check import ics for VTODOs and filter Calendars accordingly #2572

Open Matthias84 opened 3 years ago

Matthias84 commented 3 years ago

Steps to reproduce

  1. Split big .ics files of a old NC export (to workaround #2570)
  2. Start importing the first files, which runs fine
  3. Notice that the importer doesn't list the desired calendar for the last two files anymore

I compared the files, but they look fine so far (VCALENDAR surrounding items, VEVENT and VTODO items). I also tried the first files, which looks good. Changing filename doesn't solve the issue. Reimporting the original big file, doesn't also work anymore. Logout and new session doesn't helped as well.

Expected behaviour

Like all the other files, I wan't to import it to the same calendar so far.

Actual behaviour

I can't pick the right (existing) calendar, to add more items to this calendar. (no browser console messages appear, explaining why the item is removed from the list) Bildschirmfoto vom 2020-09-09 21-01-51

Calendar app

Calendar app version: 2.0.4

CalDAV-clients used: -

Client configuration

Browser: Firefox 80

Operating system: Linux Mint 20

Server configuration

Operating system: CentOS

Web server: Nginx

Database: MariaDB

PHP version: (e.g. 7.0.3)

Nextcloud Version: 19.0.2

Updated from an older installed version or fresh install: fresh

georgehrke commented 3 years ago

I compared the files, but they look fine so far (VCALENDAR surrounding items, VEVENT and VTODO items).

If you check the database (oc_calendars), does the component type field for the calendar contain VTODO or just VEVENT? It only offers calendars if all contained component types are supported by the calendar.

Matthias84 commented 3 years ago

Thanks for the hint! I used your tip from https://github.com/nextcloud/calendar/issues/2571#issuecomment-689786917 to force a detection of both types and it worked fine.

How about to explain the user this auto-behaviour? (e.g. disable list item / textfield if detection was triggered / let user choose the supported types manually before import, ...)

tdoerschel commented 2 years ago

Hi, i also stumbled over this issue: any new calender that is created via the webinterface has no VTODO (no task list). Therefore, if I try to import from ics file that has both tasks and events, I cannot import it to the existing (within-nextcloud-created) calender.

Solution: When creating a new calender from webinterface, also create a task list for it (VEVENT and VTODO).

P.S. When creating a new task list, a new calender is automatially generated. So, it should just work the other way as well. However, I still cannot import a ics file to a new calender from tasks (although it should have both fields)

All tested on NC 22.20, calender 2.3.4 and tasks 0.14.2 with PHP8.0-FPM, mysql 10.3.31

tcitworld commented 2 years ago

any new calender that is created via the webinterface has no VTODO (no task list).

You can create it that way, but not from the import modal indeed. image

miaulalala commented 3 weeks ago

Suggested solution

Check a file that is being imported before we start the process for the different types. If the file contains VTODOs only show calendars that support VTODO and also let the user know that this is the case so this information isn't inaccessible.

I would also like to see the supported component types somewhere, so users know what types are supported for each calendar.