nextcloud / nextcloud/server

[Bug]: unified search: "person" from Contacts is ignored

Open
#63,042 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 34-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

Unified Search permits to select a "Person", and Contacts exposes an integration to list all contacts in the menu. This is useful (is supposed to be useful) in particular for Mail, but just doesn't work.

Steps to reproduce
  1. have both Contacts and Mail apps
  2. have some actual email and related contacts
  3. open the Unified Search, and select as "Person" one of the contacts related to mails
  4. do a search
Expected behavior

I obtain emails having the selected person in from, to or cc.

Nextcloud Server version

34

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.4

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps
Enabled:
  - contacts: 8.8.0-dev.0
  - contactsinteraction: 1.15.0
  - dav: 1.39.0
Nextcloud Signing status

Nextcloud Logs
{
    "ocs": {
        "meta": {
            "status": "failure",
            "statuscode": 400,
            "message": ""
        },
        "data": "User f9497589-8cf1-4c78-9499-0dad0aeec270 not found"
    }
}
Additional info

OC\Search\FilterFactory handles all "person" as local Users, trying to retrieve them from IUserManager.

My guess is that it is missing some level of integration between Contacts and SearchComposer: contacts are listed among selectable people in the UI, but are not retrieved back while building the SearchQuery.

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 OC\Search\FilterFactory and SearchComposer, then reproduce the problem with Contacts and Mail enabled and a contact linked to an email. Trace how the selected “person” value is handled when building the SearchQuery. Done means selecting a Contacts person returns matching Mail messages in from, to, or cc without the user-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.