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

Export custom fields of type country (regression)

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds

      Description

      Since the resolution of
      CRM-17270 - Custom country multi-select fields used in a Drupal View display the four digit ID number instead of the name of the country we note a regression on export results for custom fields of type country.

      Changes in this commit https://github.com/civicrm/civicrm-core/commit/9e39099940a94c91b9bd09aa1b241da72b0c482e affects on the data display for exports, showing only the country name of the the first row, and then showing the country id at the rest of rows.

      We have applied the attached patch to recover the functionality as a workaround. The problem is generated at CRM/Export/BAO/Export.php at the line

      $row[$field] = CRM_Core_BAO_CustomField::getDisplayValue($fieldValue, $cfID, $query->_options);
      

      when getDisplayValue function overwrites $query->options at the first iteration.

        Attachments

        1. export-country-custom-field.png
          6 kB
          Francesc Bassas i Bullich
        2. patch.txt
          1 kB
          Francesc Bassas i Bullich

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              francescbassas Francesc Bassas i Bullich
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: