Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • CiviCRM Core CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 1k
    • Issues 1k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • DevelopmentDevelopment
  • CiviCRM CoreCiviCRM Core
  • Issues
  • #2656

Search-kit - declaring joins breaks deduping

@colemanw added code to searchkit to support being able to add a pseudojoin in search - in our case it was a join to another table with a list of kanji that are common Japanese family names and we can now find Japanese people whose name fields are likely transposed through the search kit UI

The mechanism is a hook that adds additional 'links' to a DAO and defining the pseudolink in there in order to 'tell search kit about it'

However, it turns out this causes a problem deduping - the dedupe code calls

CRM_Core_DAO::getReferencesToContactTable();

and assumes all the returned fields are references to the contact id field. With the fix above that is not the case and it attempts to do weird things to the pseudojoined tables.

We could alter the dedupe code - but I'm wondering if there are other affected edge cases we need to think about. The change log is one possibility but it still seems to be working on our site

@colemanw @totten thoughts about whether we fix this as a dedupe problem or whether we should refine the add-links--joins-to-search-kit 'feature' to not leak - I am putting up a test to demonstrate the failure

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking