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 without birthyear #9849

Closed
tobiasKaminsky opened this issue Jun 13, 2018 · 16 comments · Fixed by #11832
Closed

Birthday without birthyear #9849

tobiasKaminsky opened this issue Jun 13, 2018 · 16 comments · Fixed by #11832
Assignees
Milestone

Comments

@tobiasKaminsky
Copy link
Member

From nextcloud/calendar#842: should be opened on server.

Some apps, e.g. contacts on samsung allow to store the birthday without birthyear (in case you do not know how old somebody is).
These contacts are synced fine to NC, but the dates are not shown in the birthday calendar.
Those dates should be shown, e.g. with in a given date range (1970-2030).

@MorrisJobke
Copy link
Member

Duplicate of #4287 - please read what others write 😉

@MorrisJobke
Copy link
Member

Also ref #3084

@tobiasKaminsky
Copy link
Member Author

Well, #4287 states that these dates are not synced, which in my case is not true, as they are synced.
#3084 says that they are shown with *1604, which is also not true in my case.

In my case those fields get synced to NC server, but the "birthday calendar" does not use the date and thus no calendar event is shown.

@MorrisJobke
Copy link
Member

Well, #4287 states that these dates are not synced, which in my case is not true, as they are synced.
#3084 says that they are shown with *1604, which is also not true in my case.

This is how Apple sets it.

In my case those fields get synced to NC server, but the "birthday calendar" does not use the date and thus no calendar event is shown.

Ah - okay, but then #4287 seems to be fixed, or am I wrong?

cc @georgehrke

@MorrisJobke MorrisJobke reopened this Jun 13, 2018
@georgehrke
Copy link
Member

I'm not aware that #4287 was fixed yet.

@tobiasKaminsky Can you please create a dummy contact, add a birthday without year, export it and post it here? :)

@tessus
Copy link

tessus commented Jun 13, 2018

@tobiasKaminsky

Well, #4287 states that these dates are not synced, which in my case is not true, as they are synced.

The problem is that these dates are synced but removed (or removed and synced) and lost forever.
The operative keyword here is lost forever.

@georgehrke unfortunately it still hasn't been fixed. I lost all my bithdays w/o a year and I then started to use the notes field for birthdays w/o a year.

@tobiasKaminsky
Copy link
Member Author

@georgehrke this is a contact synced from Samsung S9 (with their default contacts app) via davdroid to a NC server (server & contacs on master branch):

BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.1.2//EN
UID:8ccc7b7f-19ee-4f9c-9a70-ab78cfc9ac0c
FN:Test
N:;Test;;;
EMAIL;TYPE=home:dummy@test.de
BDAY;X-APPLE-OMIT-YEAR=1604:1604-03-31
REV:20180614T054800Z
END:VCARD

The corresponding birthday calendar is this

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.1.2//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20180614T054802Z
DTSTART;VALUE=DATE:19000331
DTEND;VALUE=DATE:19000401
UID:8ccc7b7f-19ee-4f9c-9a70-ab78cfc9ac0c
RRULE:FREQ=YEARLY
SUMMARY:Test *
TRANSP:TRANSPARENT
BEGIN:VALARM
TRIGGER;VALUE=DURATION:-PT0M
ACTION:DISPLAY
DESCRIPTION:Test *
END:VALARM
END:VEVENT
END:VCALENDAR

This is shown correctly on Thunderbird, but not on Samsung S9 nor on OnePlus3.

@rfc2822
Copy link
Contributor

rfc2822 commented Jun 14, 2018

@tobiasKaminsky Android can't process recurring events starting before 1902 because of 32-bit limitations. The given event starts in 1900.

@georgehrke
Copy link
Member

Ok, so one work around I can imagine here:
Inside the BirthdayEventGenerator, check if the property X-APPLE-OMIT-YEAR equals the actually used year, if yes generate events without a year starting in 1970.

@tobiasKaminsky
Copy link
Member Author

@georgehrke
I would assume that always 1604 is used, so it should be checked agaist 1604 and not against the actually used year.
And then it should be sufficient to use something after 1902 as starting year.

If you can create a patch, I am happy to test it :-)

@tessus
Copy link

tessus commented Jun 14, 2018

@georgehrke I might have been wrong with my last comment that it hasn't been fixed yet.

Well, at least the data loss has been fixed. I just entered a birthday without a year (June, 20th) on my Google Pixel and it was synced to my nextcloud (12.0.9) as:

BDAY:--0620

Behold, even after a few times syncing, the field is still there. Yippiiee!!!!!!

The Contacts app shows this birthday 1604-06-20, which is a bit weird, since the vcard does not contain X-APPLE-OMIT-YEAR.

I believe this now has to be followed up in the contacts issue tracker to

  • correctly show vcard fields that look like BDAY:--0620 and BDAY;X-APPLE-OMIT-YEAR=1604:1604-06-20
  • allow to enter a birthday without a year in the date picker

@tobiasKaminsky
Copy link
Member Author

@georgehrke any news here? Can I help you with something?

@georgehrke georgehrke self-assigned this Jul 5, 2018
@georgehrke georgehrke added this to the Nextcloud 14 milestone Jul 5, 2018
@tobiasKaminsky
Copy link
Member Author

@georgehrke maybe we can talk about this on hackweek? :-)

@MorrisJobke
Copy link
Member

Move to 15

@georgehrke
Copy link
Member

bug, not a feature -> 14.0.1

@georgehrke
Copy link
Member

Work in progress PR: #11832

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants