Skip to content

Commit

Permalink
COMCL-706: Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Shahrukh committed Aug 8, 2024
1 parent fba0f7e commit 44e9918
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions CRM/Civicase/Hook/BuildForm/EnableCaseCategoryIconField.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public function run(CRM_Core_Form &$form, $formName) {
* returns TRUE or FALSE.
*/
private function shouldRun(CRM_Core_Form $form, $formName) {
$optionGroupName = $form->getVar('_gName');
return $formName == 'CRM_Admin_Form_Options' && $optionGroupName == 'case_type_categories';
return $formName == 'CRM_Admin_Form_Options' && $form->getVar('_gName') == 'case_type_categories';
}

}
2 changes: 1 addition & 1 deletion CRM/Civicase/Service/CaseCategoryCustomDataType.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function delete($caseTypeCategoryName) {
return;
}

CRM_Core_BAO_OptionValue::del($result['values'][0]['id']);
CRM_Core_BAO_OptionValue::deleteRecord(['id' => $result['values'][0]['id']]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion CRM/Civicase/Service/CaseCategoryCustomFieldExtends.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function delete($entityValue) {
return;
}

CRM_Core_BAO_OptionValue::del($result['values'][0]['id']);
CRM_Core_BAO_OptionValue::deleteRecord(['id' => $result['values'][0]['id']]);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ private function runHook(string $subject, string $body, array $cases, array $con
$this->form->_contactIds = [];
$this->form->_toContactEmails = [];
$this->form->_contactDetails = [];
foreach ($contacts as $contact) {
foreach ($contacts as $k => $contact) {
$this->form->_contactIds[] = $contact['id'];
$this->form->_toContactEmails[] = $contact['email'];
$this->form->_toContactEmails[] = $k . '::' . $contact['email'];
$this->form->_contactDetails[$contact['id']] = [
'email' => $contact['email'],
'contact_id' => $contact['id'],
Expand Down

0 comments on commit 44e9918

Please sign in to comment.