diff --git a/CRM/Case/Info.php b/CRM/Case/Info.php index a3702fe9f2b3..dfd4ef86bdba 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::getLabel('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'), ),