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

Cannot see Date of Death to existing contacts #813

Closed
JC5 opened this issue Jan 2, 2019 · 34 comments
Closed

Cannot see Date of Death to existing contacts #813

JC5 opened this issue Jan 2, 2019 · 34 comments
Labels
3. to review Waiting for reviews blocked Waiting for a fix on one of our dependencies bug Something isn't working
Milestone

Comments

@JC5
Copy link

JC5 commented Jan 2, 2019

Describe the bug

I cannot add the "Date of death" to any of my contacts.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any contact
  2. Click on 'Choose property type' under 'Add new property'.

Expected behavior
I see Date of Death

Actual behavior
It's not there.

Screenshots

Server configuration

Operating system: Linux
Web server: Apache
Database: MySQL
PHP version: 7.2
Nextcloud version: 15.0.0
Contacts version: 3.0.1
Updated from an older Nextcloud or fresh install: Updated from 14

Signing status:

No errors have been found.

List of activated apps:

Enabled:
  - accessibility: 1.1.0
  - activity: 2.8.2
  - calendar: 1.6.4
  - cloud_federation_api: 0.1.0
  - comments: 1.5.0
  - contacts: 3.0.1
  - dav: 1.8.0
  - encryption: 2.3.0
  - federatedfilesharing: 1.5.0
  - federation: 1.5.0
  - files: 1.10.0
  - files_pdfviewer: 1.4.0
  - files_sharing: 1.7.0
  - files_texteditor: 2.7.0
  - files_trashbin: 1.5.0
  - files_versions: 1.8.0
  - files_videoplayer: 1.4.0
  - firstrunwizard: 2.4.0
  - gallery: 18.2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.3.0
  - nextcloud_announcements: 1.4.0
  - notifications: 2.3.0
  - oauth2: 1.3.0
  - password_policy: 1.5.0
  - provisioning_api: 1.5.0
  - serverinfo: 1.5.0
  - sharebymail: 1.5.0
  - support: 1.0.0
  - survey_client: 1.3.0
  - systemtags: 1.5.0
  - theming: 1.6.0
  - twofactor_backupcodes: 1.4.1
  - twofactor_totp: 2.1.0
  - updatenotification: 1.5.0
  - workflowengine: 1.5.0
Disabled:
  - admin_audit
  - files_external
  - user_external
  - user_ldap

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #781 (Can not add "Date of Death" to contacts), #452 (Can't add new contact), #580 (Unable to add, remove or change contact entries), #507 (Contact could not be saved if both birthday and date of birth given), and #794 (Birthday, Date of Death, Anniversary save wrong date).

@lachlan-00

This comment has been minimized.

@skjnldsv skjnldsv added the needs info Not enough information provided label Jan 3, 2019
@skjnldsv
Copy link
Member

skjnldsv commented Jan 3, 2019

@JC5 Thanks for your report!

Unfortunately I cannot reproduce your bug. I can add the date of death properly here.
Any error in your browser's console? (Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread.)

How to access your browser console (Click to expand)

Chrome

  • Press either CTRL + SHIFT + J to open the “console” tab of the Developer Tools.
  • Alternative method:
    1. Press either CTRL + SHIFT + I or F12 to open the Developer Tools.
    2. Click the “console” tab.

Safari

  • Press CMD + ALT + I to open the Web Inspector.
  • See Chrome’s step 2. (Chrome and Safari have pretty much identical dev tools.)

IE9

  1. Press F12 to open the developer tools.
  2. Click the “console” tab.

Firefox

  • Press CTRL + SHIFT + K to open the Web console (COMMAND + SHIFT + K on Macs).
  • or, if Firebug is installed (recommended):
    1. Press F12 to open Firebug.
    2. Click on the “console” tab.

Opera

  1. Press CTRL + SHIFT + I to open Dragonfly.
  2. Click on the “console” tab.

@JC5
Copy link
Author

JC5 commented Jan 3, 2019

I can add the field to a contact who hasn't yet has the DoD. But a contact that has the DoD already, I get this:

TypeError: "t.localValue.toJSDate is not a function"

Full logs:


JQMIGRATE: Migrate is installed, version 1.4.0 core.js:7:542
New search handler registered search.js:67:4
Connected to dav! 
Object { rootUrl: "https://cloud.example.com/remote.php/dav/", advertisedFeatures: (17) […], currentUserPrincipal: {…}, principalCollections: (4) […], calendarHomes: [], addressBookHomes: (1) […], parser: {…}, _isConnected: true, _request: {…} }
contacts.js:84:29413
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0
Source Map URL: contacts.js.map[Learn More]
TypeError: "t.localValue.toJSDate is not a function"
	Ve https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:84:7224
	_render https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:33038
	r https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61459
	get https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16189
	Le https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16114
	mount https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61475
	mount https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61337
	init https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:22739
	f https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:49595
	f https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:49484
	Qr https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:54008
	_update https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:32123
	r https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61449
	get https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16189
	Le https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16114
	mount https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61475
	mount https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61337
	init https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:22739
	f https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:49595
	f https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:49484
	b https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:51074
	O https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:52970
	O https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:52441
	O https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:52291
	Qr https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:54055
	_update https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:32106
	r https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:61449
	get https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:16189
	run https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:17080
	ke https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:15191
	Jt https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:11476
	Wt https://cloud.example.com/apps/contacts/js/contacts.js?v=c5676072-0:7:10982
contacts.js:7:10862

The DoD is not visible and I can't add it.

@skjnldsv skjnldsv added this to the 3.0.2 milestone Jan 3, 2019
@skjnldsv
Copy link
Member

skjnldsv commented Jan 3, 2019

Thanks, I will investigate!

@skjnldsv skjnldsv modified the milestones: 3.0.2, next Jan 21, 2019
@skjnldsv
Copy link
Member

skjnldsv commented Feb 1, 2019

Hello @JC5
Can you still reproduce the issue on 3.0.3?
If so I'll need to provide you a better debug release so I can get more detailed informations :)

@JC5
Copy link
Author

JC5 commented Feb 1, 2019

I'll check at home, but have to upgrade first as well. 👍

@JC5
Copy link
Author

JC5 commented Feb 2, 2019

OK, I am still getting this problem. For contacts that have a birthday, I cannot add a Date of Death.

Screenshots: https://imgur.com/a/p9iBbcZ

Error in console:

TypeError: "t.localValue.toJSDate is not a function" (contacts.js:7:10964)

	Bn https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:177:7559
	_render https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:32915
	r https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61336
	get https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16291
	Pe https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16216
	mount https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61352
	mount https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61214
	init https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:22841
	p https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:49472
	p https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:49361
	Kr https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:53885
	_update https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:32000
	r https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61326
	get https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16291
	Pe https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16216
	mount https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61352
	mount https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61214
	init https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:22841
	p https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:49472
	p https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:49361
	A https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:50951
	C https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:52847
	C https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:52318
	C https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:52168
	Kr https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:53932
	_update https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:31983
	r https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:61326
	get https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:16291
	run https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:17182
	Ee https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:15293
	Jt https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:11578
	Wt https://cloud.example.com/apps/contacts/js/contacts.js?v=0a3c5ae0-0:7:11084


I am not sure what you would like to know from the installation itself, and I find the bug template to be a pain in the butt. So just the basics: PHP 7.2, Nextcloud 15.0.2, Contacts 3.0.3, Firefox 65.0 on macOS Mojave. Let me know how I can help!

@skjnldsv
Copy link
Member

skjnldsv commented Feb 3, 2019

@JC5 Thanks! I'm guessing one of your contact have an improper value. :)
I'll create a custom contacts release so you can have better debug on the console. Do you have access to your apps folder?

@JC5
Copy link
Author

JC5 commented Feb 3, 2019

Yes, I do. Just let me know what I need to do.

@skjnldsv
Copy link
Member

skjnldsv commented Feb 4, 2019

With the help of #912 I can now see the issue.
@JC5 can you paste the vcf file here? (you can edit the sensitive values)

@j-ed the DEATHDATE on your contact have a colon instead of a semi-colon:
https://tools.ietf.org/html/rfc6350#section-6.2.5
https://tools.ietf.org/html/rfc6474#section-2.3
DEATHDATE;19531015T231000Z vs DEATHDATE:19900615T000000

EDIT: the library we're using seems to be misbehaving. Issue reported here: kewisch/ical.js#379

@skjnldsv skjnldsv added blocked Waiting for a fix on one of our dependencies and removed needs info Not enough information provided labels Feb 4, 2019
@skjnldsv skjnldsv removed this from the next milestone Feb 4, 2019
@JC5
Copy link
Author

JC5 commented Feb 4, 2019

This is the full card, as I've downloaded it from Nextcloud.

BEGIN:VCARD
VERSION:3.0
FN:James Cole
N:Cole;James;;;
BDAY;VALUE=DATE:19511101
ITEM1.X-ABDATE:20120413
ITEM1.X-ABLABEL:Overlijden
UID:bla-bla-bla
DEATHDATE:20120413
REV:20181118T172308Z
CATEGORIES:Overigen
END:VCARD

This is the original from Google. As you can see, I fixed the date of birth in the meantime.

BEGIN:VCARD
VERSION:3.0
FN:James Cole
N:Cole;James;;;
BDAY:--1101
item1.X-ABDATE:20120413
item1.X-ABLabel:Overlijden
END:VCARD

@j-ed
Copy link

j-ed commented Feb 4, 2019

The Google format seems to be the same as on an iPhone, except that the date stamp is formatted differently. I wouldn't have been thought that standards could be interpreted in so many different ways.

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iPhone OS 12.1//EN
N:Death; Dean;;;
FN:Dean Death 
BDAY:1980-01-01
item1.X-ABDATE;type=pref:2000-04-30
item1.X-ABLabel:Todestag
END:VCARD

@skjnldsv
Copy link
Member

skjnldsv commented Feb 4, 2019

@JC5 this confirm that this is the same bug!
Thanks for your help!

@skjnldsv
Copy link
Member

skjnldsv commented Feb 4, 2019

@j-ed the contact you paste properly display the deathdate on your iOS device? 🤔

@j-ed
Copy link

j-ed commented Feb 4, 2019

Oh no, sorry for the confusion. I added that layout only because I want to show the similarity of the Google and iPhone format in this case, so that you can cover both in one go. If I create a contact record in Nextcloud and sync it to an iPhone 12.x, none of the two fields birth and death date are shown.

This how the record looks like after it has been created in Nextcloud:

grafik

This is what is being displayed on the iPhone if I access the contact (both dates are missing):

grafik
Whereas both date fields are correctly displayed on an Android device.

@skjnldsv
Copy link
Member

skjnldsv commented Feb 4, 2019

@j-ed okay, what does an iOS created vcf file looks like on nextcloud?
Can you past one here?

@JC5
Copy link
Author

JC5 commented Feb 4, 2019

Here is the card generated by my phone for the contact I shared. I sync with nextcloud only.

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iPhone OS 12.1.3//EN
N:Cole;James;;;
FN: James  Cole
BDAY:1951-11-01
item1.X-ABDATE;type=pref:2012-04-13
item1.X-ABLabel:Overlijden
END:VCARD

@j-ed
Copy link

j-ed commented Feb 4, 2019

@skjnldsv Here we go. This is a contact I've created on the iOS device:

20190204_iphone_contact
This is the vcf-file of the contact created on the iOS device:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iPhone OS 12.1//EN
N:Death-IOS;Dirk;;;
FN: Dirk  Death-IOS 
BDAY:1973-01-01
item1.X-ABDATE;type=pref:2018-05-05
item1.X-ABLabel:Todestag
END:VCARD

This is how the sync'ed contact in Nextcloud looks like (death date is missing)

20190204_nc_synced_from_iphone

This is the vcf-file of the sync'ed contact exported from Nextcloud:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iOS 12.1//EN
N:Death-IOS;Dirk;;;
FN:Death-IOS Dirk
BDAY;value=date:1973-01-01
item1.X-ABDATE;type=pref:2018-05-05
item1.X-ABLabel:Todestag
REV:2019-02-04T13:41:51Z
UID:F439C9CE-A43D-4BDD-89D1-4438ECB074FC
END:VCARD

@JC5
Copy link
Author

JC5 commented Feb 10, 2019

I'm seeing similar things. The Totestag you have is some kind of a custom event. I was able to create cards with a multiple of those using Google Contacts:

item1.X-ABDATE:20130311
item1.X-ABLabel:Overlijden
item2.X-ABDATE:20170312
item2.X-ABLabel:Some event

I am getting the impression that the date format (xxxx-xx-xx or xxxxxxxx) does not matter much. In either case, this card will give the "t.localValue.toJSDate is not a function" error:

VERSION:3.0
REV:2019-02-10T08:19:09Z
N;CHARSET=utf-8:Cole;James;;;
FN;CHARSET=utf-8:James Cole
CATEGORIES;CHARSET=utf-8:Overigen
BDAY:19000101
DEATHDATE:20130101
ITEM1.X-ABDATE:20130101
ITEM1.X-ABLABEL:Overlijden
NOTE;CHARSET=utf-8:
UID:e22d13db-db8e-44d7-ad71-2b42bf5e1980
END:VCARD

Note that the date formats can be both 2013-01-01 and 20130101. The error occurs in both instances.

Creating a NEW card with a birthday and a death day can be downloaded from nextcloud in this format:

screenshot 2019-02-10 at 09 27 45

BEGIN:VCARD
VERSION:3.0
REV:20190210T063921Z
N;CHARSET=utf-8:Test;Test;;;
FN;CHARSET=utf-8:Test Test
NOTE;CHARSET=utf-8:
UID:b0feecee-3932-4b24-bdb2-7fb639022d74
BDAY;VALUE=DATE-AND-OR-TIME:2014-01-01T09:26:45
DEATHDATE;VALUE=DATE-AND-OR-TIME:2019-02-14T00:00:00
END:VCARD

So first I tried pushing this:

BDAY;VALUE=DATE-AND-OR-TIME:19001111
DEATHDATE;VALUE=DATE-AND-OR-TIME:20130311

That gives interesting results:

screenshot 2019-02-10 at 09 31 09

Adding dashes seems to help!

BDAY;VALUE=DATE-AND-OR-TIME:1900-11-11
DEATHDATE;VALUE=DATE-AND-OR-TIME:2013-03-11

screenshot 2019-02-10 at 09 32 21

The best way to satisfy both iOS and Nextcloud is this format:

BDAY;VALUE=DATE-AND-OR-TIME:1900-11-11
DEATHDATE;VALUE=DATE-AND-OR-TIME:2013-03-11
ITEM1.X-ABDATE:2013-03-11
ITEM1.X-ABLABEL:Overlijden

This fixes the problem in Nextcloud, and allows iPhone to show the custom event "Overlijden".

@skjnldsv
Copy link
Member

skjnldsv commented Mar 4, 2019

Okay, i'm very confused now.
What is the issue in the end?

Is it just a compatibility issue because iOS uses ABDATE properties?
Or is it a formatting issue because nextcloud doesn't write the date with dashes?

Or ware we still only on the DEATHDATE;19531015T231000Z vs DEATHDATE:19900615T000000 issue?

@j-ed
Copy link

j-ed commented Mar 11, 2019

After updating the Contacts app to v3.0.4 the situation has slightly changed. The birthday is now displayed in the web gui, but not the death date anymore. On an iPhone the death date is now displayed as a normal date. In my test account the following details are listed. Surprisingly the date field has been stored twice:

ybcu9b.X-ABDATE;TYPE=pref:2013-07-26
ybcu9b.X-ABLabel:
PRODID:-//NTBAB//Android//ContactSync//9.0//166
DEATHDATE:2013-07-26

@skjnldsv
Copy link
Member

Okay, so to recap a bit, because this is confusing now 😝
Adding a death date to a contact dioes not change anything in your ui,, correct? Is this the only issue left?

Surprisingly the date field has been stored twice

What do you mean by that?

@j-ed
Copy link

j-ed commented Mar 11, 2019

Originally the contact record only contained a birth and a death date field. Due to the fact that the death date field seems not to be used on all environments and the date format is different on an iPhone (ybcu9b.X-...), the date record has now been duplicated and exists twice.
Nevertheless both fields are not displayed in the web gui. Eventually it would be a good idea to add a default date field which can be used to display these kind of abandoned entries?! This would allow to change their type/label afterwards. Currently it is not possible to add e.g. a death date because the app seems the existing entry but doesn't display it.

@skjnldsv
Copy link
Member

Currently it is not possible to add e.g. a death date because the app seems the existing entry but doesn't display it.

that's what I don't get. If I add a date of death it properly appear on mine! 🤷‍♀️
Peek 11-03-2019 11-01

@j-ed
Copy link

j-ed commented Mar 11, 2019

@skjnldsv Yes, that's what you get if you add the field to a new record and what is still working.
Unfortunately I'm now having contacts in my database which contain the following entries and
although the death date field exists, it is not displayed anymore.

ybcu9b.X-ABDATE;TYPE=pref:2013-07-26
ybcu9b.X-ABLabel:
PRODID:-//NTBAB//Android//ContactSync//9.0//166
DEATHDATE:2013-07-26

I can confirm that I can fix the problem by deleting and manually recreating the record, but
importing a vcf card with a death date didn't work as expected. It is imported but the death date
field is not displayed in the gui. I have just tested it with the following vcf file:

BEGIN:VCARD
VERSION:3.0
FN:Frau Thea Test
CATEGORIES:Privat
BDAY:1935-07-21
DEATHDATE:2014-04-26
N:Test;Thea;;Frau;
END:VCARD

@skjnldsv
Copy link
Member

skjnldsv commented Mar 11, 2019

Now I get it! Sorry for that! :)
The ICAL library does not understand the date format. I tried to go around it 🤔 Let's see!

Fix is in #988

@skjnldsv skjnldsv added the 3. to review Waiting for reviews label Mar 11, 2019
@skjnldsv skjnldsv added this to the next milestone Mar 11, 2019
@skjnldsv skjnldsv changed the title Cannot add Date of Death to existing contacts Cannot see Date of Death to existing contacts Mar 11, 2019
@j-ed
Copy link

j-ed commented Mar 11, 2019

Can I download the modified package somewhere or do I have to wait for the nightly build?

@skjnldsv
Copy link
Member

Oups sorry! Here:
contacts.tar.gz

@j-ed
Copy link

j-ed commented Mar 11, 2019

I can confirm that the death date is correctly displayed again after installing the new version.
After importing the mentioned vcf file the death date is also displayed again.

@skjnldsv
Copy link
Member

@j-ed awesome! Thanks :)

@raoulbhatia
Copy link
Contributor

I had the same issue. The contacts.tar.gz you provided above worked.

Problematic VCF DEATHDATE property:

DEATHDATE:20170321

New DEATHDATE property as inserted by the new contacts app.

DEATHDATE;VALUE=DATE:20100321

Would there be any way to auto-correct such dates?

@caugner
Copy link

caugner commented Apr 7, 2019

@raoulbhatia I think a check could fix the invalid data. Something like this:

export default {
	name: 'deathdate without value property',
	run: contact => {
		return contact.vCard.hasProperty('deathdate')
			&& !contact.vCard.getFirstProperty('deathdate').hasProperty('value');
	},
	fix: contact => {
		contact.vCard.addPropertyWithValue('value', 'date');
		return true;
	}
}

@skjnldsv
Copy link
Member

skjnldsv commented Apr 7, 2019

Well, the value is not forced according to the rfc and might works on others vcard utilities. So I'm not sure we want to fix them if they're not really incompatible nor invalid! 🤔
@caugner any thoughts?

@skjnldsv skjnldsv modified the milestones: next, 3.1.0 Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews blocked Waiting for a fix on one of our dependencies bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants