Skip to content

Commit

Permalink
Merge pull request #838 from compucorp/COMCL-167-searchkit-error
Browse files Browse the repository at this point in the history
COMCL-167: Accept multiple types argument
  • Loading branch information
erawat authored Jan 20, 2022
2 parents 7aec306 + 4c3a4d8 commit 732fb2b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CRM/Civicase/Api/Wrapper/CaseGetList.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,24 @@ private function allowSearchByCaseId(array &$apiRequest) {
$excludedCaseIds = !empty($apiRequest['params']['params']['case_id']['NOT IN']) ? $apiRequest['params']['params']['case_id']['NOT IN'] : [];
if (!in_array($input, $excludedCaseIds)) {
$apiRequest['params']['params']['case_id'] = $input;
$apiRequest['params']['params']['options'] = ['or' => [['case_id', 'contact_id.sort_name']]];
$apiRequest['params']['params']['options'] = [
'or' => [
['case_id', 'contact_id.sort_name'],
],
];
}
}

/**
* Handles request coming from Case.getlist API.
*
* @param array $apiRequest
* @param array|Civi\Api4\Generic\AbstractAction $apiRequest
* API Request.
*
* @return bool
* If request can be handled.
*/
private function canHandleTheRequest(array $apiRequest) {
private function canHandleTheRequest($apiRequest) {
return $apiRequest['entity'] == 'Case' && $apiRequest['action'] == 'getlist';
}

Expand Down

0 comments on commit 732fb2b

Please sign in to comment.