Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 913
    • Issues 913
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #1570

Closed
Open
Opened Jan 31, 2020 by jamie@jamieDeveloper

when formatting params for deduping, we do a case sensitive check for Primary

I've run into a problem - when I call the Profile.getfields with api_action=submit and a profile_id, I get a nice list of fields in that profile, notably - the primary email field name is lowercased to email-primary.

When I fill out those fields and submit them to CRM_Contact_BAO_Contact::getDuplicateContacts I fail to find the duplicates that should be found.

It turns out that's because getDuplicateContacts calls Dedupe_Finder::formatParams which does some nice magic on primary style fields by finding them with:

preg_match('/(.*)-(primary-[\d+])$|(.*)-(\d+|Primary)$/', strtolower($key), $matches)

The capital P is what causes the problem.

I think it's safe to convert that to a lowercase check.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1570