*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2016
- * $Id$
- *
*/
class CRM_Report_Form_Contact_CurrentEmployer extends CRM_Report_Form {
+ /**
+ * This report has not been optimised for group filtering.
+ *
+ * The functionality for group filtering has been improved but not
+ * all reports have been adjusted to take care of it. This report has not
+ * and will run an inefficient query until fixed.
+ *
+ * CRM-19170
+ *
+ * @var bool
+ */
+ protected $groupFilterNotOptimised = TRUE;
+
protected $_summary = NULL;
protected $_customGroupExtends = array(
public $_drilldownReport = array('contact/detail' => 'Link to Detail Report');
/**
+ * Class constructor.
*/
public function __construct() {
$this->_absoluteUrl, $this->_id, $this->_drilldownReport
);
$rows[$rowNum]['civicrm_employer_organization_name_link'] = $url;
+ $rows[$rowNum]['civicrm_employer_organization_name_hover'] = ts('View Contact Detail Report for this contact');
$entryFound = TRUE;
}
}
}
- //handle gender
- if (array_key_exists('civicrm_contact_gender_id', $row)) {
- if ($value = $row['civicrm_contact_gender_id']) {
- $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');
- $rows[$rowNum]['civicrm_contact_gender_id'] = $gender[$value];
- }
- $entryFound = TRUE;
- }
+ // Handle ID to label conversion for contact fields
+ $entryFound = $this->alterDisplayContactFields($row, $rows, $rowNum, 'contact/currentEmployer', 'View Contact Detail') ? TRUE : $entryFound;
// display birthday in the configured custom format
if (array_key_exists('civicrm_contact_birth_date', $row)) {
}
// convert employee name to links
- if (array_key_exists('civicrm_contact_display_name', $row) &&
+ if (array_key_exists('civicrm_contact_sort_name', $row) &&
array_key_exists('civicrm_contact_id', $row)
) {
$url = CRM_Report_Utils_Report::getNextUrl('contact/detail',
'reset=1&force=1&id_op=eq&id_value=' . $row['civicrm_contact_id'],
$this->_absoluteUrl, $this->_id, $this->_drilldownReport
);
- $rows[$rowNum]['civicrm_contact_display_name_link'] = $url;
+ $rows[$rowNum]['civicrm_contact_sort_name_link'] = $url;
+ $rows[$rowNum]['civicrm_contact_sort_name_hover'] = ts('View Contact Detail Report for this contact');
$entryFound = TRUE;
}