Monica: vCard import sets Gender to "vCard"

Created on 25 Nov 2018  路  6Comments  路  Source: monicahq/monica

Describe the bug
I imported a bunch of vCard contacts (exported from Google Contacts). All of them have their gender set to "vCard". This gender type didn't exist before the import.

Screenshots
screen shot 2018-11-25 at 1 55 01 pm
screen shot 2018-11-25 at 1 55 11 pm

Which version are you using:

Additional context

  • The Google export uses vCard format 3.0
  • According to the vCard format, Gender as a property is only supported in vCard 4.0 [1]
  • I spot-checked both (a) contacts that had _no_ gender defined, and (b) contacts that did have gender defined. Monica applied the gender of "vCard" to both.
  • Google exports gender as part of the "NOTES" property, like so:
VERSION:3.0
FN:Leonardo redacted
N:redacted;Leonardo;;;
NOTE:Gender: Male
END:VCARD

Ideal Behavior:

  1. Monica should _not_ create and set the gender "vCard" to all imported contacts.
  2. If the gender is not specified, then Monica should import the contact with no gender specified.
  3. If the gender is specified inside the NOTE property... well, personally I don't know think Monica should attempt to parse genders from notes, but I'll leave that up to the maintainers. The important piece of behavior really is (1).

Thanks!

[1] https://en.wikipedia.org/wiki/VCard

feature request

Most helpful comment

Well, this is not a bug ... it's a feature.
As the gender is not known, the special "vcard" gender is created. All contacts on Monica has a gender. You can consider the "vcard" gender as "no gender".

I think using the "NOTE" field is not what we want. VCard 3.0 has a "GENDER" field, and it's what we use now. We still need to fix the use of this field for internationalized account.

All 6 comments

Well, this is not a bug ... it's a feature.
As the gender is not known, the special "vcard" gender is created. All contacts on Monica has a gender. You can consider the "vcard" gender as "no gender".

I think using the "NOTE" field is not what we want. VCard 3.0 has a "GENDER" field, and it's what we use now. We still need to fix the use of this field for internationalized account.

@asbiin is there a reason why every contact needs a gender associated with them?

All contacts on Monica has a gender.

Why?

VCard 3.0 has a "GENDER" field, and it's what we use now.

Really? Maybe I shouldn't use wikipedia as the source of truth (lol), but it claims that Gender is only supported on 4.0 (see table under Properties):
https://en.wikipedia.org/wiki/VCard

Being a little less lazy, I think this is the RFC for vCard 4.0 (does mention gender):

https://tools.ietf.org/html/rfc6350#section-6.2.7

And these are for vCard 3.0 (do not mention gender):
https://tools.ietf.org/html/rfc2425
https://tools.ietf.org/html/rfc2426

Please correct me if I'm wrong.

Historically the gender was required because the original version of Monica used genders extensively to customize strings, like her birthday. We gave up this when we introduced more languages (locales) that would have made this customization extremely hard - if not impossible - to do.

We also currently need the gender when we indicate that someone is related to someone else in some manner (aunt, sister etc..).

But we never revisited the need for a contact to not need a gender.

The main issue #1981 will resolve this.

Was this page helpful?
0 / 5 - 0 ratings