return [CRM_Utils_Array::value($op, $qillOperators, $op), ''];
}
- if ($fieldName == 'activity_type_id') {
- $pseudoOptions = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE);
- }
- elseif ($fieldName == 'country_id') {
+ // @todo - if the right BAO is passed in special handling for the below
+ // fields should not be required. testQillOptions.
+ if ($fieldName == 'country_id') {
$pseudoOptions = CRM_Core_PseudoConstant::country();
}
elseif ($fieldName == 'county_id') {
]);
}
+ /**
+ * Test the options are handled for the qill.
+ */
+ public function testQillOptions() {
+ $qill = CRM_Contact_BAO_Query::buildQillForFieldValue('CRM_Activity_BAO_Activity', 'activity_type_id', 2, '=');
+ $this->assertEquals(['=', 'Phone Call'], $qill);
+
+ $qill = CRM_Contact_BAO_Query::buildQillForFieldValue('CRM_Activity_BAO_Activity', 'priority_id', 2, '=');
+ $this->assertEquals(['=', 'Normal'], $qill);
+ }
+
}