UID of imported invitation/event overwritten



  • Steps to reproduce:

    • I sent an invitation (in my case from my google calender) to my corporate account
    • on my mobile phone, I opened the ics file with android google calendar app and added it to my corporate calendar, which is backed by DAVx and connected to our corporate SOGo server

    Expected: DAVx uses the UID of the invitation for the event submitted to SOGo (338c5i55gpiv23eclrvuu7g90t@google.com in invite.ics below)
    Actual: DAVx creates a new UID and submits the event with this UID to SOGo (4bd2c384-b6d1-4aa6-b6a6-6347c7b8f3b1 in logs-excerpt.txt below)

    In consequence, any response/reply to the invitation cannot be matched to the original event.

    Received invitation (anonymized): invite.ics
    Related data from debug logs (anonymized): logs-excerpt.txt
    -> this also shows Generating file name/UID for local resource #22330

    Excerpt from debug info:

    SOFTWARE INFORMATION
    * at.bitfire.davdroid 2.6.2-gplay (321) from com.android.vending
    * com.android.providers.contacts 9.2.0.318 (90200318)
    * com.android.providers.calendar 9.0.4.305 (90004305)
    * com.android.contacts 9.3.4.310 (90304310)
    * at.tomtasche.reader 3.1.5 (114) from com.android.vending
    * com.google.android.contacts 3.14.0.282336800 (2307615) from com.android.vending
    * org.ulr.winmail 2.1 (21) from com.android.vending
    * com.android.calendar 9.1.7.322 (90107322)
    * com.google.android.calendar 2019.47.2-284533606-release (2016432390) from com.android.vending
    * com.trtf.blue 1.9.7.18 (15729) from com.android.vending
    
    [..]
    
    SYSTEM INFORMATION
    Android version: 9 (EML-L29 9.1.0.371(C432E10R1P12))
    Device: HUAWEI EML-L29 (HWEML)
    

    A similar issue has been reported in 2017, which had been fixed at that time: https://forums.bitfire.at/topic/1339/uid-field-of-new-local-event-overwritten-on-first-sync


  • developer

    Hello,

    Thanks for your report. I could reproduce the problem with your steps. After importing the .ics with Google Calendar, the UID is not in the calendar storage:

    > adb shell content query --uri content://com.android.calendar/events | grep -i "Test 6"
    Row: 60 originalAllDay=NULL, account_type=bitfire.at.davdroid, exrule=NULL, mutators=com.google.android.calendar, originalInstanceTime=NULL, allDay=1, allowedReminders=0,1,2, rrule=NULL, canOrganizerRespond=1, lastDate=1578787200000, visible=1, calendar_id=9, hasExtendedProperties=1, calendar_access_level=700, selfAttendeeStatus=0, allowedAvailability=0,1, eventColor_index=NULL, isOrganizer=0, _sync_id=NULL, calendar_color_index=NULL, _id=581, guestsCanInviteOthers=0, allowedAttendeeTypes=0,2,1,3, dtstart=1578700800000, guestsCanSeeGuests=1, sync_data9=0, sync_data8=NULL, exdate=NULL, sync_data7=NULL, sync_data6=NULL, sync_data1=NULL, description=-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~, eventTimezone=UTC, availability=0, title=Test 6, ownerAccount=pina@example.com, sync_data5=NULL, sync_data4=NULL, sync_data3=NULL, sync_data2=NULL, duration=NULL, lastSynced=0, guestsCanModify=0, cal_sync3=NULL, rdate=NULL, cal_sync2=NULL, maxReminders=5, isPrimary=1, cal_sync1={"type":"SYNC_TOKEN","value":"1578401281"}, cal_sync10=NULL, account_name=pina@example.com, cal_sync7=NULL, cal_sync6=NULL, cal_sync5=NULL, cal_sync4=NULL, calendar_color=-5592406, cal_sync9=NULL, cal_sync8=NULL, dirty=1, calendar_timezone=NULL, accessLevel=0, eventLocation=NULL, hasAlarm=0, uid2445=NULL, deleted=0, eventColor=NULL, organizer=first.last@googlemail.com, eventStatus=NULL, customAppUri=NULL, canModifyTimeZone=1, eventEndTimezone=NULL, customAppPackage=NULL, original_sync_id=NULL, hasAttendeeData=1, displayColor=-5592406, dtend=1578787200000, original_id=NULL, sync_data10=NULL, calendar_displayName=Persönlicher Kalender
    

    Note that uid2445=NULL. DAVx⁵ never gets the UID from the .ics, so it has to create an own UID and continue.

    (I have also tried aCalendar+, same result here.)

    So this is a problem of the calendar app. I’d recommend to get a calendar app with support and then asking about whether they can implement that.

    Does that help?



  • @rfc2822 This helps, thanks!

    I reported this to Google Calendar, just to have done that 😉

    I found that importing an invitation / ics file with “iCal import / export 3.2” the uid is retained as expected.
    Then the issue is only, that for the first sync the ics that DAVx sends to SOGo does not contain METHOD:REPLY (and in consequence on organizer side the attendee status is not updated). But this METHOD:REPLY is set when I accept/decline the invitation after the initial sync was done.
    Would it make sense to set METHOD:REPLY for the initial sync already if the organizer is not the attendee for that the invitation was accepted/declined?


  • developer

    @martin-grotzke said in UID of imported invitation/event overwritten:

    Then the issue is only, that for the first sync the ics that DAVx sends to SOGo does not contain METHOD:REPLY (and in consequence on organizer side the attendee status is not updated). But this METHOD:REPLY is set when I accept/decline the invitation after the initial sync was done.
    Would it make sense to set METHOD:REPLY for the initial sync already if the organizer is not the attendee for that the invitation was accepted/declined?

    DAVx⁵ never sets METHOD, because this is CalDAV Scheduling, which is not supported by DAVx⁵. The Android calendar provider doesn’t have the possibility to store the required fields for that.

    But this METHOD:REPLY is set when I accept/decline the invitation after the initial sync was done.

    I don’t understand that. Do you think DAVx⁵ sets METHOD:REPLY? It’s only possible that it keeps it as an “unknown property” when it has received it from the server.


Log in to reply
 

Similar topics