nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.74k stars 4k forks source link

Expose tasks with dates as events in subscribed calendar #38036

Open Adspectus opened 1 year ago

Adspectus commented 1 year ago

Remark: The link to issue template as shown in Contributing.md is throwing a 404 error.

Steps to reproduce

  1. Create a calendar with tasks or a task list with the task app.
  2. Add calendar entries and tasks which are shown in Nextclouds calendar app
  3. Export the calendar and copy the subscription link
  4. Import/Subscribe to the calendar in a third party app (here: Fastmail and iOS calendar app and Google calendar)

Expected behaviour

The calendar entries and the tasks should appear in the subscribed calendar

Actual behaviour

The calendar entries appear but the tasks are not shown

Server configuration

Operating system: Linux 5.4.0-144-generic nextcloud/tasks#161-Ubuntu SMP Fri Feb 3 14:49:04 UTC 2023 x86_64

Web server: nginx/1.18.0 (fpm-fcgi)

Database: mysql 10.5.19

PHP version: 8.0.28

Nextcloud version: (see Nextcloud admin page) 25.0.5 - 25.0.5.1

Tasks version: (see Nextcloud apps page) 0.14.5

Updated from an older Nextcloud or fresh install: Fresh install

Signing status: ???

No errors have been found.

List of activated apps:

 - activity: 2.17.0
 - calendar: 4.3.3
 - circles: 25.0.0
 - cloud_federation_api: 1.8.0
 - comments: 1.15.0
 - contacts: 5.2.0
 - contactsinteraction: 1.6.0
 - dashboard: 7.5.0
 - dav: 1.24.0
 - deck: 1.8.3
 - federatedfilesharing: 1.15.0
 - federation: 1.15.0
 - files: 1.20.1
 - files_pdfviewer: 2.6.0
 - files_rightclick: 1.4.0
 - files_sharing: 1.17.0
 - files_trashbin: 1.15.0
 - files_versions: 1.18.0
 - firstrunwizard: 2.14.0
 - groupfolders: 13.1.2
 - logreader: 2.10.0
 - lookup_server_connector: 1.13.0
 - nextcloud_announcements: 1.14.0
 - notifications: 2.13.1
 - notify_push: 0.6.2
 - oauth2: 1.13.0
 - password_policy: 1.15.0
 - photos: 2.0.1
 - privacy: 1.9.0
 - provisioning_api: 1.15.0
 - recommendations: 1.4.0
 - related_resources: 1.0.4
 - settings: 1.7.0
 - sharebymail: 1.15.0
 - support: 1.8.0
 - survey_client: 1.13.0
 - systemtags: 1.15.0
 - tasks: 0.14.5
 - text: 3.6.0
 - theming: 2.0.1
 - twofactor_backupcodes: 1.14.0
 - twofactor_totp: 7.0.0
 - updatenotification: 1.15.0
 - user_status: 1.5.0
 - viewer: 1.9.0
 - weather_status: 1.5.0
 - workflowengine: 2.7.0

Nextcloud configuration:

{
    "skeletondirectory": "\/var\/www\/html\/themes\/hetzner\/skeleton",
    "simpleSignUpLink.shown": false,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "appstoreurl": "https:\/\/apps.your-storageshare.de",
    "apps_paths": [
        {
            "path": "\/var\/www\/html\/apps",
            "url": "\/apps",
            "writable": false
        },
        {
            "path": "\/var\/www\/html\/custom_apps",
            "url": "\/custom_apps",
            "writable": true
        }
    ],
    "files_external_allow_create_new_local": false,
    "loglevel": 2,
    "log_type": "syslog",
    "updatechecker": false,
    "updater.server.url": "https:\/\/updates.your-storageshare.de",
    "updater.release.channel": "stable",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "25.0.5.1",
    "overwrite.cli.url": "https:\/\/nx37009.your-storageshare.de",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "default_language": "de",
    "default_locale": "de",
    "default_phone_region": "DE",
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "syslog_tag": "nextcloud-nx37009",
    "upgrade.disable-web": true,
    "theme": "hetzner",
    "templatedirectory": "\/var\/www\/html\/core\/skeleton\/Templates\/",
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\Krita",
        "OC\\Preview\\HEIC"
    ],
    "activity_expire_days": "31",
    "bulkupload.enabled": false,
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": "6379",
        "timeout": "1.5",
        "dbindex": "0"
    },
    "filelocking.enabled": true,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "trusted_domains": [
        "nx37009.your-storageshare.de",
        "cloud.uwe-gehring.de"
    ],
    "maintenance": false,
    "twofactor_enforced": "true",
    "twofactor_enforced_groups": [],
    "twofactor_enforced_excluded_groups": []
}

Are you using external storage, if yes which one: local/smb/sftp/... no

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... no

Client configuration

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0

CalDAV-clients: Fastmail iOS Calendar app Google calendar

raimund-schluessler commented 1 year ago

I noticed this is well, but had to time to dig further yet. However, I saw that tasks with at status set, e.g. 'Needs action' do show up, and that tasks created on iOS have this status set directly after creation.

However, this is a server issue, as the Tasks app is not involved in the sync process.

Adspectus commented 1 year ago

I can not confirm this. No matter which status set or any other setting - the task is not shown in an exported calendar. I have also tested this with .ics file export and import with the same result - no task is shown in calendar. When I look into the generated .ics file, the entries look quite different from "events" created in the calendar.

I do not have any insights in the technical details but I doubt that pointing to server issue won't help. I am quite sure that if I would create an issue there, it would be closed with pointing to as a tasks issue, since events created in the calendar are working well.

So, where should we go from here?

raimund-schluessler commented 1 year ago

So, I tested this again with Nextcloud server 26.0.1 and Tasks 0.14.5. With this combination it works fine in both directions. A task created with the Tasks app shows up on iOS 16.4.1 and vice versa. Thunderbird works as well. I cannot test this with Nextcloud 25 anymore, because I don't have an environment at hand and downgrading would be a mess.

So I propose that you test this with Nextcloud 26.0.1 again.

I have also tested this with .ics file export and import with the same result - no task is shown in calendar. When I look into the generated .ics file, the entries look quite different from "events" created in the calendar.

What do you mean with that? Could you maybe show a redacted version of these ICS files?

Adspectus commented 1 year ago

I fear there is a misunderstanding about the issue. It is not about adding an account on iOS and using the app "Reminders" or however its called in english, this is working for me too. The issue is about the subscription link in ICS format and adding this URL into a calendar app: https://NEXTCLOUD/remote.php/dav/public-calendars/HASH?export.

This is also possible with other tasks application, i.e. Toodledo. When I compare the generated ICS from Toodledo with that of the Tasks app in Nextcloud (resp. the calendar app where the tasks needs to appear to make that working), one can see that all tasks with a date are wrapped into a "VEVENT" in the ICS by Toodledo (tasks without a date are marked as VTODO), while in the ICS by Nextcloud, all tasks are wrapped into a "VTODO", regardless whether they have a date on it or not. However, tasks marked as VTODO are not included into the calendar of any app I tested with, not even in the iOS calendar app.

raimund-schluessler commented 1 year ago

Ok, now I understand. You want the tasks to be shown as VEVENT in the subscription, so that calendar apps that don't natively show VTODOs properly just see events and show them anyway.

This is definitely a server feature. The Tasks app is absolutely not involved in this, as the CalDAV server providing the subscribed calendars is entirely located in the Nextcloud server.

Furthermore, what you ask for is to implement a new feature. The current behavior of the server to expose tasks as VTODOs is absolutely correct and not a bug.

However, I am not really sure it's a desired behavior of Nextcloud server to kind of violate the CalDAV spec and show tasks as events just to deal with clients that lack a feature. VEVENT supports different properties than VTODO and mapping one to the other doesn't always match for a 100%. Anyway, if you could show such a wrapped VTODO exported from e.g. Toodledo, it would be a good reference.

@nextcloud/calendar I move this issue to Nextcloud server, since it belongs there. But I tend to close it as not planned, since in my opinion it violates the specification. Comments are welcome here!

However, tasks marked as VTODO are not included into the calendar of any app I tested with, not even in the iOS calendar app.

They are shown in the Nextcloud Calendar app, if you active this feature. It was implemented a while back.

tcitworld commented 1 year ago

Agreed, we shouldn't transform data when it's up to the calendar clients to handle VTODO themselves. Apps that already support it would lose the added value from VTODO (for instance, PERCENT-COMPLETE or DUE).

Adspectus commented 1 year ago

Anyway, if you could show such a wrapped VTODO exported from e.g. Toodledo, it would be a good reference.

I uploaded an obfuscated file which is the result when creating a subscription link in Toodledo. As you can see, tasks with a date are VEVENT, other tasks VTODO.

ical_combo.txt

But I understand the problem and your remarks. It seems I have got accustomed to the way Toodledo export its data which might be non-standard. The only possible solution would be an export/subscription option directly from the tasks app, which uses the VEVENT but I assume this is not commonly wanted.

m-mohr commented 4 months ago

It seems not uncommon that clients don't understand VTODO, it seems there are a couple of well-known and popular clients in the list: Fastmail, iOS Calendar app, Google calendar. Is this something that could be solved with a config option? I'd love to see the tasks in Google Calendar, but can't, which is pretty cumbersome.