Open Bug 1521978 Opened 7 years ago Updated 9 months ago

Allow custom properties in contacts and mailinglist (in webextensions API)

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: john, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134

Steps to reproduce:

When I try to set a property which is not part of the standard property set, I get

Type error for parameter properties (Unexpected property "X-DAV-ETAG") for contacts.update

According to
https://thunderbird-webextensions.readthedocs.io/en/latest/mailingLists.html

It is not possible to store custom properties besides name, description and nickname

Expected results:

As with the current implementation in Tb60, it should be possible to store custom properties in contacts.

For TbSync, I need to be able to store custom properties with contacts, to
a) extend the adressbook with additional fields
b) store sync related status /state information

Same is valid for mailingLists.

The part About Name, description

Bugzilla is driving me crazy. I had no intention to post comment #1. Sorry.

But I think my initial report is not clear enough:

My main request is to be able to add custom properties to a contact. If I try that at the moment I get the above error about "Unexpected property". I think this is a bug, because Geoff wrote that he switched from whitelisting to blacklisting and it should work to add custom properties.

My second request is to be able to add custom properties to a mailinglist, which is not supported at all at the moment. The MailingListNode does not have a properties object, but just 3 attributes for name, description and nickname. I would like to have a properties object as with the ContactNode, where I can add custom properties.

For the former, you can't use the hyphen character. It only accepts a to z, A to Z, 1 to 9 and underscore.

The latter would require changes to the core address book code. I won't rule out making such a change but I think it's unlikely to happen soon.

Thanks for the update.

Would you consider to add one (1) extra field to mailinglist, where we can store JSON data and thus can store our own properties?

One is just as bad as many, but after some investigating, I think this may be simpler than I first thought.

Status: UNCONFIRMED → NEW
Component: Address Book → Add-Ons: Extensions API
Ever confirmed: true
Product: MailNews Core → Thunderbird

Thanks for considering.

I have created a Pull Request at the readthedocs page to add the info about the property name restrictions.

Looks like an enhancement. Any progress?

Type: defect → enhancement
Priority: -- → P3
Severity: normal → S3

Since contacts are now stored as vcards, custom properties can be added freely.

The remaining issue is how we handle lists, as they do not support custom properties. If we decide to store lists as group vcards (like apple), we could easily store custom properties there as well.

You need to log in before you can comment on or make changes to this bug.