Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Birthday import for contacts may not work #45

Closed
levfa opened this issue Jan 6, 2021 · 4 comments
Closed

Birthday import for contacts may not work #45

levfa opened this issue Jan 6, 2021 · 4 comments

Comments

@levfa
Copy link

levfa commented Jan 6, 2021

As a nextcloud user I wanted to port my contacts from "Google Contacts".

Some contacts ended up without the birthday field in the user interface and also the calendar app did not show their birthdays. For other contacts, the port of the birthday field worked.

Preliminary research makes me assume, that this behavior might be related to the missing year of birth. For contacts with a year of birth, things seemed to work. For contacts with only day and month of birth, there seems to be a problem. Although, I only went through few contacts to back this hypothesis.

Just thought, I leave this here as a possible issue. Thanks for writing this software, anyway =).

@julien-nc
Copy link
Member

Hi, thanks for the bug report. There are 2 types of birthdays in VCard format: date and text. When you set an incomplete date in google contacts, it actually sets a text birthday.

Nextcloud Contacts does not support text birthdays. That leaves us with 2 options:

  • ignore text birthdays coming from google (that's what's currently done)
  • add it in the contact data as text anyway, then "invalid date" is displayed in Nextcloud Contacts. It will probably mess with birthdays calendar...
    What do you think?

julien-nc pushed a commit that referenced this issue Jan 6, 2021
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@levfa
Copy link
Author

levfa commented Jan 6, 2021

Hi,
thanks for the clarification. I think, I understand the problem. I don't have an opinion right now, on how to tackle it from the technical side. Here are some things that might or might not help (keep in mind that I have little experience in this topic):

I speculate, there are chances to pass the "text dates without a year" from Google to Nextcloud doing a proper conversion to a date format first for the following reasons:

  • The vCard-Format seems to support dates without a year [Link]. This might be based on ISO 8601 [Link] - I did not look further.
  • The Nextcloud Contatcs App seems to support dates without a year [Link].
  • The Nextcloud CardDAV Server seems to support dates without a year [Link].
  • The Nextcloud CalDAV Server, which seems to provide the birthday calendar, does support some sort of "unknown year", see [Link] around line 223ff.

Although, this might not address all "text date issues".

julien-nc pushed a commit that referenced this issue Jan 6, 2021
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@julien-nc
Copy link
Member

You're very right, it is possible to add incomplete birthdays! Best thing is it is simple to get from Google API response. If it was entered correctly on google side (with the format corresponding to user's locale, then the API provides month and day attributes instead of a raw text (that would be impossible to parse not knowing the locale).

This app now uses the standard way to omit the year in the created VCard. It is displayed correctly in Contacts. Yay!
v0.1.5-3-nightly is out. It would be great if you could try it.

@levfa
Copy link
Author

levfa commented Jan 6, 2021

I did superficial testing with one contact. It worked. Thank you.

@levfa levfa closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants