Skip to content

Remove duplicate from the search suggestion list #3839

@MizukiTemma

Description

@MizukiTemma

Describe the Bug

A case was found where a search keyword is suggested more than once.

Steps to Reproduce

  1. Create a new contact
  2. Give to the field "Name" the same name with the selected location (ex: select a location "Test-ort", put "Test-ort" to the "name" field of the contact form)
  3. Save
  4. Go to the contact list
  5. Type in the search findow "Test"
  6. See two suggstions for "Test-ort"

Expected Behavior

"Test-ort" is suggested only once

Actual Behavior

Twice suggested

Screenshot

Image

Additional Information

This is because we search for both name of contact objects and that of location objects. Because there is a contact with name "Test-ort" (which is containing "Test"), "Test-ort" is added to the suggestion list. There is also a location with name "Test-ort". Here occurs another match, the keyword "Test-ort" is again added to the suggestion list. Now we have two "Test-ort" in the suggestion list.

There may be another model which can experience the same duplication. Check not only for contact, but also for other models.

Traceback

Related Issues

Summary of discussion and updates to the description

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions