The additional feature to choose whether or not to search primary details only (introduced somewhere in Civi 4.7) has an undesirable effect on case exports - with the preference set to 'no'.
As an example, if I run an advanced search for all ongoing cases of a certain type and try to export some of their information:
- If you turn OFF search primary details only and export by case (not by contact) individual information like primary email or primary phone (provided the contact has more than one email/phone) it will export multiple rows per case. It ignores the fact that I asked it to export ONLY the primary email/phone etc and exports all the phone/emails the contact has.
- Any other location chosen, 'home', 'other', etc is respected. Outputs one line, or if there is more than one home item, it exports additional lines but only for that location.
- If I turn back ON the export works as you'd expect, one line per contact with the primary email/phone listed.
- Exporting by contact has no issues with search primary details only turned off.
(Civi 5.5.3, Drupal 7.61, verified this behavior happens on the demo.)
While I know turning off search primary details 'fixes' the export issue. We were looking to use this feature to better search contacts with multiple phones/email. Can someone point me in a direction to what file might be controlling the case export