dev/core#1801 Fix hardcoded activity priority
authormarcineqpol <mlewandowski10@o2.pl>
Mon, 8 Jun 2020 22:26:13 +0000 (00:26 +0200)
committermarcineqpol <mlewandowski10@o2.pl>
Mon, 8 Jun 2020 22:26:13 +0000 (00:26 +0200)
CRM/Activity/Form/Activity.php

index f208f8ff6c568d4865ee41c92d110750f748b7b9..afaaffac73ac6b7a2eb3fa122a4770008d9171aa 100644 (file)
@@ -582,7 +582,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
     }
     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');