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

Inline changes to custom fields aren't reflected in custom greetings

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.24, 4.7.25
    • Fix Version/s: 4.7.30
    • Component/s: Core CiviCRM
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Steps to reproduce:

      1. Note the system ID of an existing custom field. In this example we'll use Most Important Issue, custom field ID=1, options: Education; Environment; Social Justice.
      2. Find any existing contact and set a value in the custom field, e.g., "Education"
      3. Edit a contact's "Addressee" field to "Customized", with the value "{contact.custom_1}" and save the contact; note that the Addressee field now says "Education".
      4. Change the value of this custom field via the appropriate inline editing or tab for the custom field group; alternatively, use the CustomValue.create API like so: 
        cv api CustomValue.create sequential=1 entity_id=N entity_table="civicrm_contact" custom_1="Env"NOTE: This repro recipe will not work if you change this field value by using the "Edit" button for the contact (i.e., by navigating to to /civicrm/contact/add?reset=1&action=update&cid=[N]); or by using the Contact.create API)
      5. Note that the Addressee field value is NOT updated to reflect the new custom field value.

       

      Quick diagnosis:

      • Looks like the CustomValue API / CustomValueTable BAO should be invoking CRM_Contact_BAO_Contact::processGreetings() if the entity_table parameter = 'civicrm_contact', but it's not.
      • Also, the inline UI for custom field groups should be sure to refresh the page data for display of greetings.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              allenshaw Allen Shaw
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: