nextcloud / nextcloud/contacts

Import of a vCard version 4.0 doesn't interpret the phone number correctly

Open
#4,357 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: contacts V4
Dominant language
JavaScript
Stars
642
Forks
220
Avg merge
14h 39m
Merged PRs (30d)
51

Description

Describe the bug

According to RFC 6350, the telephone item for version 4 of a vCard is specified as follows:

TEL;VALUE=uri;TYPE=home:tel:+33-01-23-45-67

However, when importing such an item in Nextcloud 30, the contact gets created with the telephone value of:

tel:+33-01-23-45-67

In my opinion, the "tel:" part needs to be stripped from the value while importing. It is just a hint of what type of URI the value is represented as.

Steps to reproduce
  1. Take a V4 vCard containing a telephone number in RFC conform format
  2. Import the card into an address book
  3. Open Contacts
  4. Select the newly imported contact
  5. notice the "Phone" section shows the wrong value prefixed by "tel:", in edit mode too
Expected behavior

The URI value should be correctly interpreted and the "tel:" prefix removed.

Actual behavior

The prefix "tel:" is treated as part of the phone number itself.

Contact version

7.0.0

Operating system

Rocky Linux 8

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database

MySQL

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the report; start by locating the vCard 4.0 import entry point and reproduce the RFC 6350 TEL example. Done means the imported phone value is shown without the tel: prefix, including in edit mode, with a regression test if the import tests are found.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.