Problem/Motivation

It is helpful to understand which address, phone, and email are a contact's primary, but the existing "addresses", "phones" and "emails" Entity Reference fields on the Contact entity do not denote which referenced entity is the primary for each.

Steps to reproduce

Proposed resolution

Option A

  • Adopt convention that the first referenced entity (delta 0) is the primary
  • Improve Inline Entity Form UX for these fields to make clear that the first is the primary and adapts when the primary is changed (e.g. via drag and drop)
  • Add a "Make primary" button to the Inline Entity Form table for each row (except the first) that brings the given referenced entity to the top of the list

Option B

  • Improve as needed Primary Entity Reference, (which explicitly stores a primary bit with each reference) to ensure that Views, ECA, Search API, Token, etc. be able to navigate the reference as they do vanilla Entity Reference fields
  • Replace the existing "addresses", "phones" and "emails" Entity Reference fields with Primary Entity Reference fields

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork crm-3525356

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jdleonard created an issue. See original summary.

jdleonard’s picture

jdleonard’s picture

Per discussion with @bluegeek9, I begrudgingly accept Option B. Primary Entity Reference needs some more eyeballs and tests and we need to adopt it for CRM.

jdleonard’s picture

Issue tags: +CRM Beta Blocker

bluegeek9 made their first commit to this issue’s fork.

bluegeek9’s picture

Assigned: Unassigned » bluegeek9

  • bluegeek9 committed cd1e91a7 on 1.0.x
    [#3525356] feat: Denote which Address/Phone/Email is a Contact's primary
    
bluegeek9’s picture

Assigned: bluegeek9 » Unassigned
Status: Active » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging CRM as a favorite on the project page to help others discover it and show your support.
  • Review the Developer Docs for accuracy and clarity.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.