nextcloud / server

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

E-mail reminder is synced as alarm reminder from aCalendar to Nextcloud #27402

Closed formwandler closed 3 years ago

formwandler commented 3 years ago

When I create a calendar item in aCalendar on Android device and add an e-mail reminder to it, the e-mail reminder becomes a regular alarm reminder in Nextcloud Calendar after syncing with DAVx5. So, e-mail is not sent.

All other sync options work so far.

If I add both, e-mail and alarm reminder, in aCalendar both become just alarm reminders in Nextcloud Calendar.

The opposite way works: If I add an item in Nextcloud Calendar with e-mail reminder, it is transferred to aCalendar successfully as e-mail reminder. But once I edit this item in aCalendar, the sync back fails to keep it as e-mail reminder.

Well, it could also be problem of aCalendar, but that app is almost know as stable.

Steps to reproduce

  1. Create a new calendar item in aCalendar on Android
  2. Add an e-mail reminder
  3. Sync with Nextcloud
  4. Check reminders in Nextcloud calendar item: It will be an alarm reminder (not e-mail reminder).

Expected behaviour

An e-mail reminder will be synced to Nextcloud as e-mail reminder.

Actual behaviour

An e-mail reminder is synced to Nextcloud as alarm reminder.

Calendar app

Calendar app version: 2.2.2

CalDAV-clients used: DAVx5

Client configuration

Browser: Firefox

Operating system: openSUSE Tumbleweed (Nextcloud), Android 11 on smartphone

Server configuration

Operating system: openSUSE Tumbleweed

Web server: Apache

Database: MariaDB

PHP version: 7.4.19

Nextcloud Version: 21.0.2 and 22.0.0 beta 3

Updated from an older installed version or fresh install: Updated

tcitworld commented 3 years ago

Does aCalendar allows you to export the event as ICS directly? Please anonymize and post the file so we can have a look at it.

Regular android calendar + DAVx⁵ doesn't have the issue, so I'm inclined to think it's an aCalendar issue.

formwandler commented 3 years ago

Thanks for the quick response.

Yes, aCalendar allows to export as ICS, via CalShare and as some debug data. See export below.

Regarding ICS and CalShare export: There is no VALARM item in the ICS file at all. So I am wondering how Nextcloud can add an alarm here. Or aCalendar does not export the alarm info. The debug file contains hasAlarm = 1. And both, aCalendar and Nextcloud shows the alarm.

When export a new item from Nextcloud, it contains ACTION:EMAIL properly. And I can re-import it, the e-mail reminder remains. So, from regular ex- and import, Nextcloud is fine.

Well, if you have no other idea, it seems in deed an aCalendar problem.

ICS file after sync:

BEGIN:VCALENDAR VERSION:2.0 PRODID:aCalendar CALSCALE:GREGORIAN METHOD:PUBLISH BEGIN:VEVENT SUMMARY:Test DTSTART:20210605T160000Z DTEND:20210605T170000Z UID:813fcc9c-6972-43db-9096-db043c0bd23a.ics DTSTAMP:20210605T144400Z END:VEVENT END:VCALENDAR

Debug info after sync:

Device: Google Pixel 4a (5G) OS: R App: aCalendar+ 2.5.2 _id = 1106 _sync_id = 813fcc9c-6972-43db-9096-db043c0bd23a.ics accessLevel = 0 account_name = name@example.org (Nextcloud) account_type = bitfire.at.davdroid allDay = 0 allowedAttendeeTypes = 0,2,1,3 allowedAvailability = 0,1 allowedReminders = 0,1,2 availability = 0 cal_sync1 = {"type":"SYNC_TOKEN","value":"http:\/\/sabre.io\/ns\/sync\/192"} cal_sync10 = isNull cal_sync2 = isNull cal_sync3 = isNull cal_sync4 = isNull cal_sync5 = isNull cal_sync6 = isNull cal_sync7 = isNull cal_sync8 = isNull cal_sync9 = isNull calendar_access_level = 700 calendar_color = -2514176 calendar_color_index = isNull calendar_displayName = Kalender Name calendar_id = 11 calendar_timezone = isNull canModifyTimeZone = 1 canOrganizerRespond = 1 customAppPackage = isNull customAppUri = isNull deleted = 0 description = dirty = 0 displayColor = -2514176 dtend = 1622912400000 dtstart = 1622908800000 duration = isNull eventColor = isNull eventColor_index = isNull eventEndTimezone = isNull eventLocation = eventStatus = 1 eventTimezone = Europe/Berlin exdate = isNull exrule = isNull guestsCanInviteOthers = 1 guestsCanModify = 0 guestsCanSeeGuests = 1 hasAlarm = 1 hasAttendeeData = 0 hasExtendedProperties = 0 isOrganizer = 1 isPrimary = 1 lastDate = 1622912400000 lastSynced = 0 maxReminders = 5 mutators = isNull organizer = name@example.org (Nextcloud) original_id = isNull original_sync_id = isNull originalAllDay = isNull originalInstanceTime = isNull ownerAccount = name@example.org (Nextcloud) rdate = isNull rrule = isNull selfAttendeeStatus = 0 sync_data1 = 8698bcec9b179defd0a88796d47dce07 sync_data10 = isNull sync_data2 = 1 sync_data3 = 0 sync_data4 = isNull sync_data5 = isNull sync_data6 = isNull sync_data7 = isNull sync_data8 = isNull sync_data9 = isNull title = Test uid2445 = 813fcc9c-6972-43db-9096-db043c0bd23a visible = 1 EXTENDED PROPERTIES 0 NO ATTENDEES

tcitworld commented 3 years ago

Yeah, there's not much more that we can do here. Nextcloud doesn't add reminders automatically, so they're probably sent (but not correctly) even though they're not exported.

Thanks for having an in-depth look anyway!

formwandler commented 3 years ago

Hi @tcitworld , I contacted aCalendar Support. I asked them to check whether they set the right ACTION value.

But I think Nextcloud is not out here yet. Since I made another test. When I create an calendar item with the regular Google calendar app, e-mail reminders are also not synced to Nextcloud as such. Same issue than with aCalendar. But when I add item with Google app towards Google cal server, the e-mail reminder works. So,from my perspective the problem is not the calendar app.

That means, I cannot verify that

Regular android calendar + DAVx⁵ doesn't have the issue

From my perspective you should please check if Nextcloud really works with that respect. Or alternatively DAVx5 has a problem.

Thanks, Ralf.

tcitworld commented 3 years ago

I just successfully tested that synching a new event containing an email reminder from the Google Calendar app, through DAVx⁵ correctly syncs to Nextcloud with the reminder.

I have DAVx⁵ 3.3.11, if it helps. Try inspecting DAVx⁵'s debug logs as well?

Just to be sure it's not Nextcloud's calendar UI that hides the email reminders I would also export the file on Nextcloud's side and check for VALARMs.

formwandler commented 3 years ago

Strange, I also have DAVx⁵ 3.3.11 installed. When opening the item in Google Calendar app, it shows "alarm as e-mail".

But export from Nextcloud is following (reflecting display in UI):

BEGIN:VALARM TRIGGER:-PT10M ACTION:DISPLAY DESCRIPTION:Test 3 END:VALARM

I will check to get info from DAVx⁵ debug log.

formwandler commented 3 years ago

Well, DAVx⁵ debug log shows for both apps (aCalendar and Google) ACTION:DISPLAY.

But damn, I found the problem: Account name is not an email address; changing EMAIL reminder to DISPLAY. So, the DAVx⁵ account is bad. Maybe since I added a description as (Nextcloud) to the account name to differ DAV servers.

Item added with aCalendar:

[AndroidEvent] Read event reminder from calender provider PARAMETER #0 = method=2 minutes=5 title=Test 4 hasAlarm=1 [AndroidEvent] Read event reminder from calender provider [AndroidEvent] Account name is not an email address; changing EMAIL reminder to DISPLAY BEGIN:VALARM TRIGGER:-PT5M ACTION:DISPLAY DESCRIPTION:Test 4 END:VALARM

Item added with Google App:

[AndroidEvent] Read event reminder from calender provider PARAMETER #0 = method=2 minutes=10 title=Test Google App hasAlarm=1 [AndroidEvent] Account name is not an email address; changing EMAIL reminder to DISPLAY BEGIN:VALARM TRIGGER:-PT10M ACTION:DISPLAY DESCRIPTION:Test Google App END:VALARM

Thanks for your help so far.

tcitworld commented 3 years ago

So, the DAVx⁵ account is bad. Maybe since I added a description as (Nextcloud) to the account name to differ DAV servers.

Yup, it should be your Nextcloud email address.

Would be nice for DAVx⁵ to provide a setting for this instead of using the account name.

formwandler commented 3 years ago

Yeah, after renaming the DAVx⁵ account name to a pure e-mail address, it works! Yes, it should either be configurable in DAVx⁵ or it should at least warn about it when defining the account name.

Thanks for your support and help.

formwandler commented 3 years ago

I sent an improvement suggestion to DAVx⁵ team.