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

Related Fields don't populate for relationships with contact type "All Contacts" when mapping an export

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.19
    • Fix Version/s: 4.7.21
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Replicated on demo site with 4.7.19.

      Steps to replicate:

      1) Create a relationship type with "Contact Type A" and/or "Contact Type B" set to "All Contacts"

      2) Add this relationship to at least one contact and search them up

      3) Select contact(s) with your relationship and choose Actions->Export Contacts

      4) Choose "Select Fields for Export" and click continue

      5) Choose your relationship to get related fields by picking a contact type, and picking your test relationship name under the "- related contact info -" bar

      You will see that no related fields come up, as they do with relationships where the contact type is defined. If you try to export this way, you'll get a DB error.

      Seems to be happening because when Contact Type A / B are set to "All Contacts", they're just not set. It seems like that may be a feature, rather than a bug, and it may not make sense to change - my thought is to instead add a sort of 'default' for all contacts related field mapping e.g. "If we don't know what type of contact fields to present, just present them all and let the user choose the fields they expect to work".

      Looking for a bit of feedback on that idea. I will create a PR to show an example.

      Thoughts?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Elilisseck Eli Lisseck
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: