diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index 3d099d009473..09cc395e5bd7 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -579,7 +579,7 @@ public static function getCases($allCases = TRUE, $userID = NULL, $type = 'upcom $condition .= " AND case_relationship.contact_id_b = {$userID} "; } if ($type == 'upcoming' || $type == 'any') { - $closedId = CRM_Core_OptionGroup::getValue('case_status', 'Closed', 'name'); + $closedId = CRM_Core_PseudoConstant::getKey('CRM_Case_BAO_Case', 'case_status_id', 'Closed'); $condition .= " AND civicrm_case.status_id != $closedId"; } diff --git a/CRM/Case/Info.php b/CRM/Case/Info.php index a3702fe9f2b3..21ef6a32e620 100644 --- a/CRM/Case/Info.php +++ b/CRM/Case/Info.php @@ -212,15 +212,12 @@ public function creatNewShortcut(&$shortCuts) { if (CRM_Core_Permission::check('access all cases and activities') || CRM_Core_Permission::check('add cases') ) { - $atype = CRM_Core_OptionGroup::getValue('activity_type', - 'Open Case', - 'name' - ); - if ($atype) { + $activityType = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Open Case'); + if ($activityType) { $shortCuts = array_merge($shortCuts, array( array( 'path' => 'civicrm/case/add', - 'query' => "reset=1&action=add&atype=$atype&context=standalone", + 'query' => "reset=1&action=add&atype={$activityType}&context=standalone", 'ref' => 'new-case', 'title' => ts('Case'), ),