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

getPrimaryLocationType() returns primary location type based on email address, not address

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.2
    • Fix Version/s: 4.3.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Was having an issue where a contacts primary location was being overridden after a profile was submitted that had fields from multiple location types (eg. work and home). After some investigation I found that the SQL in getPrimaryLocationType() looks first at the primary locaiton type in the email table, not the address table. Is there a reason for this?

      I've attached a patch which solved the issue for me.

        Attachments

          Activity

            People

            • Assignee:
              kiran.jagtap Kiran Jagtap
              Reporter:
              spac SpAc
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: