Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96938

VCard can containt REV field twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.15.6
    • PIM: Versit
    • None
    • Manjaro
    • Linux/Wayland

    Description

      I am trying to import contacts exported from Evolution using
      https://github.com/sailfishos/nemo-qml-plugin-contacts/blob/master/tools/vcardconverter/main.cpp

      and it ends us with following error:

      "Invalid count of detail type Timestamp: 2"
      "Contact failed detail constraints"
      "Error creating contact in collection: col-2 : 13"
        Unable to import contact "Linus Torvalds" error: 13
      Wrote 0 contacts
      

       

      I believe this is an issue of qt-pim, namely src/versit/qversitcontactimporter* which expects the REV field (QContactTimestamp::Type) can occur just once, but real world files may contains this field twice.

      Here is an example vcard

      BEGIN:VCARD
      VERSION:3.0
      UID:4d63377e89f8fe29
      X-URIS:http://www.google.com/profiles/1
      REV:2020-08-20T08:55:25Z
      X-GOOGLE-SYSTEM-GROUP-IDS:Contacts
      EMAIL;TYPE=OTHER:torvalds@gmail.com
      EMAIL;TYPE=OTHER:torvalds@linux.com
      REV:2020-08-20T08:55:25Z
      X-EVOLUTION-GOOGLE-ETAG:"XXc5eDVSLyt7I2A9XB9UGUwJQAY."
      FN:Marek Velát
      N:Velát;Marek;;;
      X-EVOLUTION-FILE-AS:Torvalds\, Linus
      CATEGORIES:linux,Personal
      END:VCARD 

       

      Attachments

        Activity

          People

            chrisadams Christopher Adams
            xmlich02 Jozef Mlich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: