Address Book truncates VCARD `CATEGORIES` field
Categories
(Thunderbird :: Address Book, defect)
Tracking
(thunderbird_esr102 fixed, thunderbird106 fixed)
People
(Reporter: bugzilla, Assigned: darktrojan)
Details
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-beta+
wsmwk
:
approval-comm-esr102+
|
Details | Review |
Steps to reproduce:
I have a nextcloud address book that I sync to a few devices. I have contacts in various CATEGORIES. One contact might be a "Friends" and also in the "Sports" category and maybe even in a third one like "School" you get the idea.
Actual results:
When I interact with contacts (write a mail, for example), the contact gets changed and synced back to nextcloud. It will now have lost all but one of its CATEGORIES. The person described above will now only be in "Friends", but no longer in "Sports" or "School". The information is simply lost.
There are other changes, too, but those changes are usually just syntactic.
Expected results:
A contact should not lose information.
I also back up my contacts to a git repository. I included a typical diff of a contact-change. I did not manually change anything about that contact, I only used that one to send an email. Personal info redacted.
diff --git a/redacted_-_2c8681c7xx.vcf b/redacted_-_2c8681c7xx.vcf
index 6a527ef..81449d5 100644
--- a/redacted_-_2c8681c7xx.vcf
+++ b/redacted_-_2c8681c7xx.vcf
@@ -5,13 +5,13 @@ X-OPEN-XCHANGE-CTYPE:contact
UID:2c8681c7xx
FN:Hans Mustermann
N:Mustermann;Hans;;;
-TEL;TYPE=HOME,VOICE:+49 1234 5678
+TEL;TYPE="HOME,VOICE":+49 1234 5678
TEL;TYPE=CELL:+49 123 45 67 890
EMAIL;TYPE=HOME:mail@example.com
-ADR;TYPE=home;LABEL=street name 10\n12345 city\nprovince\nDEUTSCHLAND:;
- ;street name 10;city;province;12345;Deutschland
-CATEGORIES:Friends,Sports,School <----- THIS ONE
-BDAY:19700101
+ADR;TYPE=home;LABEL=street name 10^n12345 city^nprovince^nDEUTSCHLAND:
+ ;;street name 10;city;province;12345;Deutschland
+CATEGORIES:Friends <----- THIS ONE
+BDAY;VALUE=DATE:19700101
REV:20170907T061947Z
-END:VCARD
\ No newline at end of file
+END:VCARD
as I said, most changes are benign, but the CATEGORIES field is losing information.
| Assignee | ||
Comment 2•3 years ago
|
||
That's weird. The categories field shouldn't be changed at all since we don't do anything with it.
I think I can see what's going on here.
| Assignee | ||
Comment 3•3 years ago
|
||
If a vCard content line has multiple values (CATEGORIES and NICKNAME in vCard 4, also NOTE in vCard 3), the values appear in the parsed data structure as items 4...n.
(See https://github.com/kewisch/ical.js/blob/7fb7b51f1b36d49b576a359ee178d85e6d4b192a/lib/ical/parse.js#L291-L293 for where this happens.)
Until now we've been assuming there are only four items, so the second and subsequent values have been lost.
This patch collapses the multiple values into an array for VCardPropertyEntry, and expands them again before sending the data back to ICAL.stringify.
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/f2ab1e7387d2
Store multiple values as an array in VCardPropertyEntry. r=aleca
| Assignee | ||
Updated•3 years ago
|
Thank you for this very swift fix! Might I inquire if this could also be applied to 102.x? I'm currently losing groups on contacts every day I work with Thunderbird, I would hate for this to continue for the next few months.
Comment 6•3 years ago
|
||
(In reply to Claudius from comment #5)
Thank you for this very swift fix! Might I inquire if this could also be applied to 102.x?
- status-thunderbird_esr102 = WONTFIX, indicates patch won't be applied to version 102
- status-thunderbird_esr102 = UNAFFECtED indicates it is believed version 102 does not have the bug
- status-thunderbird_esr102 = AFFECTED indicates the patch is expected to eventually be applied to version 102 after some time on the nightly build version, then on the beta version, then applied to version 102. After a bug report is marked FIXED, it typically takes 2-4 weeks for a patch to be applied to, and shipped in, version 102
Thank you for clarifying. The "milestone 107" was what threw me off.
| Assignee | ||
Comment 8•3 years ago
|
||
Comment on attachment 9296279 [details]
Bug 1792399 - Store multiple values as an array in VCardPropertyEntry. r=#thunderbird-reviewers
[Approval Request Comment]
Regression caused by (bug #): switch to vCard storage
User impact if declined: contacts lose information when saved, even if no changes were made
Testing completed (on c-c, etc.): landed this week
Risk to taking this patch (and alternatives if risky): hopefully low, this is an edge case
Comment 9•3 years ago
|
||
Comment on attachment 9296279 [details]
Bug 1792399 - Store multiple values as an array in VCardPropertyEntry. r=#thunderbird-reviewers
[Triage Comment]
Approved for beta
Comment 10•3 years ago
|
||
| bugherder uplift | ||
Thunderbird 106.0b4:
https://hg.mozilla.org/releases/comm-beta/rev/247168c4aecd
Comment 11•3 years ago
|
||
https://github.com/jobisoft/TbSync/issues/591 has noted this is needed for avoid datalos for the tbsync addon
Comment 12•3 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #11)
https://github.com/jobisoft/TbSync/issues/591 has noted this is needed for avoid datalos for the tbsync addon
needed on v102. So, good to uplift?
| Assignee | ||
Comment 13•3 years ago
|
||
Comment on attachment 9296279 [details]
Bug 1792399 - Store multiple values as an array in VCardPropertyEntry. r=#thunderbird-reviewers
[Approval Request Comment]
Go on then. I'd prefer it to have another week, but whatever.
Comment 14•3 years ago
|
||
Comment on attachment 9296279 [details]
Bug 1792399 - Store multiple values as an array in VCardPropertyEntry. r=#thunderbird-reviewers
[Triage Comment]
Approved for esr102
Comment 15•3 years ago
|
||
| bugherder uplift | ||
Thunderbird 102.3.3:
https://hg.mozilla.org/releases/comm-esr102/rev/63256dcf0c4a
Description
•