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

Updating existing email address location type using REST API doesn't work as expected

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.0.2
    • Fix Version/s: 4.0.4
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Assume we already have a contact with ID 4 and an email address of jsmith@example.com and a location type of Home.

      According to the docs listed at http://wiki.civicrm.org/confluence/display/CRMDOC40/REST+interface, to do an update of this email address we would execute this GET command in the browser:

      http://url/to/civicrm/extern/rest.php?q=civicrm/contact/add&contact_id=4&email[1][email]=jdoe@example.org&email[1][location_type_id]=2

      After executing this GET we should expect to see jdoe@example.com as a work email address, instead of jsmith@example.com as a home email address.

      The real results are showing both jsmith@example.com as a Home email and jdoe@example.com as a Work email.

      If you use the GUI to edit this contact now, you'll only see jsmith@example.com unless you click to add an email. When you do that, you'll now see jdoe@example.com with a Work email address and then a 3rd field to add what correctly should be the 3rd email address.

        Attachments

          Activity

            People

            • Assignee:
              xavier xavier dutoit
              Reporter:
              benicely Brian E. Nicely
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: