From 013d0f03a1470dbf9b4f1a9667f9d10531c050da Mon Sep 17 00:00:00 2001 From: marcineqpol Date: Tue, 9 Jun 2020 00:26:13 +0200 Subject: [PATCH] dev/core#1801 Fix hardcoded activity priority --- CRM/Activity/Form/Activity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Activity/Form/Activity.php b/CRM/Activity/Form/Activity.php index f208f8ff6c56..afaaffac73ac 100644 --- a/CRM/Activity/Form/Activity.php +++ b/CRM/Activity/Form/Activity.php @@ -582,7 +582,7 @@ public function setDefaultValues() { } if (empty($defaults['priority_id'])) { $priority = CRM_Core_PseudoConstant::get('CRM_Activity_DAO_Activity', 'priority_id'); - $defaults['priority_id'] = array_search('Normal', $priority); + $defaults['priority_id'] = CRM_Core_PseudoConstant::getKey('CRM_Activity_DAO_Activity', 'priority_id', 'Normal'); } if (empty($defaults['status_id'])) { $defaults['status_id'] = CRM_Core_OptionGroup::getDefaultValue('activity_status');