nextcloud / nextcloud/contacts
check validity and syntax of contact entries
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 642
- Forks
- 220
- Avg merge
- 14h 39m
- Merged PRs (30d)
- 51
Description
Expected behavior
Nextcloud/The Contacts app should contain a function to check the validity and syntax of all contact record data and should correct wrong entries.
Current behavior
Nextcloud/The contacts app doesn't contain a function to check the validity and syntax of all contact record data yet. By manually checking existing contact records I found the following list of possible entry which should be corrected:
-
entries which contain masked commas, should be corrected:
e.g.TEL;TYPE=WORK\,FAX:+49 ...->TEL;TYPE=WORK,FAX:+49 ... -
entries which contain upper case line breaks should be corrected:
e.g.NOTE:Line1\NLine2\NLine3->NOTE:Line1\nLine2\nLine3 -
entries which contain lowercase labels should be converted to uppercase:
e.g.EMAIL;TYPE=work,pref:...->EMAIL;TYPE=WORK,PREF:... -
abandoned multi-line entries which are missing a reference to an other entry should be deleted:
e.g.ITEM1.X-ABADR:deoriginally was linked toITEM1.ADR;TYPE=WORK,PREF:;;My street 3;My City ...which doesn't exist anymore. -
entries which are not originally used by the Contacts app but exist in a record, like e.g.:
X-CONTACTSYNC-RELATED;TYPE=sweetheart:Marry Joe->X-CONTACTSYNC-RELATED;TYPE=SWEETHEART:Marry Joe
Steps to reproduce
- Check your Nextcloud contact records, which might have been created with previous versions of the Contacts app (<1.5.3) and which have been synchronized with Android and iPhones over a long period if time. You will find many of strange formatted entries in it which are causing strange field labels in one or the other contacts database (Nextcloud, Android, iPhone, etc.)
Environment
Server Configuration
OS: Linux 3.2.84
Web server: Apache2 2.4.25
Database: MariaDB 5.5.54
PHP version: 5.6.29
Nextcloud version: 11.0.1
Contacts app version: 1.5.3
Client Configuration
Browser: Mozilla Firefox 51.0.1
Operating system: Windows 7
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or code entry points. Start by locating the contact-record parsing and synchronization entry points, then identify how existing vCard data is validated and stored. Done should include a defined validation and correction function covering the listed malformed entries, with tests for each case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100