Affects Version/s: 4.7.19
Fix Version/s: 4.7.21
Versioning Impact:Patch (backwards-compatible bug fixes)
Funding Source:Contributed Code
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.