Batch Update via Profile does not supply data for editing when custom fields created...
authorPradeep Nayak <pradpnayak@gmail.com>
Sat, 22 Aug 2020 13:53:02 +0000 (14:53 +0100)
committerPradeep Nayak <pradpnayak@gmail.com>
Sat, 22 Aug 2020 13:53:02 +0000 (14:53 +0100)
CRM/Event/Form/Task/Batch.php

index 9a52015e42d35786af9a9454dc0119dbc03687f1..f39d72ac20d720d8b8ceff50fb7a677918fe9da1 100644 (file)
@@ -171,24 +171,22 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
               $customValue['extends_entity_column_value']
             );
           }
-          $entityColumnValueRole = $entityColumnValue[$roleId] ?? NULL;
-          $entityColumnValueEventType = in_array($eventTypeId, $entityColumnValue) ? $eventTypeId : NULL;
           if (($this->_roleCustomDataTypeID == $customValue['extends_entity_column_id']) &&
-            ($entityColumnValueRole)
+            in_array($roleId, $entityColumnValue)
           ) {
             CRM_Core_BAO_UFGroup::buildProfile($this, $field, NULL, $participantId);
           }
           elseif (($this->_eventNameCustomDataTypeID == $customValue['extends_entity_column_id']) &&
-            ($eventId == $entityColumnValueRole)
+            in_array($eventId, $entityColumnValue)
           ) {
             CRM_Core_BAO_UFGroup::buildProfile($this, $field, NULL, $participantId);
           }
           elseif ($this->_eventTypeCustomDataTypeID == $customValue['extends_entity_column_id'] &&
-            ($entityColumnValueEventType == $eventTypeId)
+            in_array($eventTypeId, $entityColumnValue)
           ) {
             CRM_Core_BAO_UFGroup::buildProfile($this, $field, NULL, $participantId);
           }
-          elseif (CRM_Utils_System::isNull($entityColumnValueRole)) {
+          elseif (CRM_Utils_System::isNull($entityColumnValue)) {
             CRM_Core_BAO_UFGroup::buildProfile($this, $field, NULL, $participantId);
           }
         }