nextcloud / nextcloud/contacts

set preferred e-mail address

Open
#3,848 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement
Dominant language
JavaScript
Stars
642
Forks
220
Avg merge
14h 39m
Merged PRs (30d)
51

Description

The database table oc_cards_properties has a field preferred, but it is unclear to me, what it is used for?
There is no setting in the frontend that can select a preferred address.

MariaDB [nextcloud]> describe oc_cards_properties;
+---------------+---------------------+------+-----+---------+----------------+
| Field         | Type                | Null | Key | Default | Extra          |
+---------------+---------------------+------+-----+---------+----------------+
| id            | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| addressbookid | bigint(20)          | NO   | MUL | 0       |                |
| cardid        | bigint(20) unsigned | NO   | MUL | 0       |                |
| name          | varchar(64)         | YES  | MUL | NULL    |                |
| value         | varchar(255)        | YES  | MUL | NULL    |                |
| preferred     | int(11)             | NO   |     | 1       |                |
+---------------+---------------------+------+-----+---------+----------------+

Most contact entries have a 0, but very few rather old entries have a 1 there. Was there a setting in earlier versions?

If there are multiple mail addresses per contact card, it would be awesome to be able to set a preferred address over the others.

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

Start with the oc_cards_properties table and trace how its preferred field is read or written by the contacts app. The issue names no source files or tests, so first establish the existing behavior and agree on whether the frontend should select a preferred email; done would require that behavior to be specified and covered by validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mariadb
Domain
database, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.