Bug 415220

Summary: Custom field deletion silently fails if the field hasn't been created with KAddressbook
Product: [Applications] kaddressbook Reporter: Unknown <null>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal CC: kde-bugzilla, tokoe
Priority: NOR    
Version: 5.13.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Unknown 2019-12-15 19:24:45 UTC
SUMMARY

KAddressbook differentiates between two types of custom fields:

(1) Custom fields created by KAddressbook. These get prefixed with "X-KADDRESSBOOK-${UUID}" internally.
(2) Any other custom fields, only prefixed with "X-". These are usually created by third-party software and get imported into KAddressbook.

When trying to delete a custom field of type (2), the UI behaves just as if it would delete the field, but the HTTP PUT request will still contain said field, so a CardDav server will *not* attempt to delete it. Hence, when viewing the vCard again, the field will still be there.


STEPS TO REPRODUCE
1. Export any vCard with KAddressbook.
2. In the exported file, manually insert a custom `X-FAVORITE-COLOR` field and set it to "Blue".
3. Import your vCard and attempt to delete the `X-FAVORITE-COLOR` field by editing the contact.
4. When you delete the field and you press "Apply/OK", open the edit window again and view the list of custom fields.

OBSERVED RESULT
The `X-FAVORITE-COLOR` field is still there.

EXPECTED RESULT
The `X-FAVORITE-COLOR` field should have been deleted.


SOFTWARE/OS VERSIONS
Linux, KDE Plasma:
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.64.0
Qt Version: 5.14.0

ADDITIONAL INFORMATION
Comment 1 sourcemaker 2023-07-22 17:18:39 UTC
I can confirm this issue.