Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14448

Conflicting phone types on primary phone number causes data loss and appearance of repeat in profile

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.4.4, 4.5
    • Fix Version/s: Unscheduled
    • Component/s: Core CiviCRM
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)

      Description

      First quick demonstration:
      1. create a profile with the following fields:

      • phone - primary - phone
      • phone - primary - fax
      • phone - primary - mobile
        2. go to your contact record and give yourself two different phone numbers, one for work phone (that you set as primary) and one for home mobile
        3. go to that profile you created and use edit mode
        4. you should see that the number is the same for all three, even though the mobile should be different and the fax should be blank
        5. edit the mobile phone to be the "right" number and delete the fax number
        6. now see that when it saves, it shows the number to be the same for all three again
        7. go over to the contact record again and see that you now have a new work mobile number, the same as the home mobile number

      People get used to creating address fields for primary locations in profiles, but unlike those, where street address - primary and city - primary belong together as part of the primary address, phone numbers are distinct. The primary phone for contact X might be Home - Mobile, while for contact Y it might be Work - Phone.

      The profile treats the primary pseudo-location like it's a single number: it displays the primary number in a primary phone field without regard to the phone type, but it saves it as that phone type. In the case above, this can cause confusion and data loss as the defaults are all the same. A donor in a hurry might see a number they recognize and be fine with it.

      Even if you have just one primary phone field in the profile, it'll load the primary one, regardless of phone type, and then save it as the phone type in the field. This can cause data loss, as the next demonstration will show.

      1. Add a field for phone-primary-phone to Supporter Profile (or whatever profile is handy that doesn't have any other phone numbers)
      2. Go to your contact record and give yourself two phone numbers: work mobile (which is primary) and work phone.
      3. Open the Supporter Profile in edit mode and see that everything looks good.
      4. Save the profile (just like you would if you were donating or signing up for an event).
      5. Go back to your contact record and see that your work phone has been overwritten by your work mobile.

      This is apparently a long-standing issue (CRM-7741 alludes to it but possibly misdiagnoses it). I don't know the best way to address it, either. The first issue could be handled by warning people when they add multiple "primary" phone fields in a profile. However, it wouldn't handle the second issue, which is potentially more serious.

      The second issue is that it's really common and desirable to have a primary phone in a profile for events and contribution pages. Moreover, people typically label it "phone", and everyone sees that and recognizes the number, not knowing that it's potentially wiping out another number for them.

      For that, maybe this would be the best solution (and the most modest):

      • if the phone type of the primary phone field in the profile matches the phone type of the contact's existing primary phone, this should be considered an edit
      • if the phone type differs, save the entered value as an additional phone number even if there is an existing number for that location and phone type (unless it's identical to that number)

      This would result in extra phone numbers, but that's better than overwriting legit phone numbers without any notice.

      More ambitious long-term alternatives include:

      • having a "primary phone" field where the user can pick the phone type
      • having a "primary" selection be exposed to the user when you have multiple phone numbers in a profile

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andrewhunt Andrew Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: