From ef9dd0d7e85beefb100007def0c0d0c2419b9c9e Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Tue, 21 Jun 2022 14:47:38 +0100 Subject: [PATCH] Fixed fatal error on update multiple case --- CRM/Case/Form/Task/Batch.php | 27 +++++++++++++++++++++++++++ CRM/Case/Form/Task/PickProfile.php | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/CRM/Case/Form/Task/Batch.php b/CRM/Case/Form/Task/Batch.php index ed0d9e050c..2425a1eaa7 100644 --- a/CRM/Case/Form/Task/Batch.php +++ b/CRM/Case/Form/Task/Batch.php @@ -30,6 +30,33 @@ class CRM_Case_Form_Task_Batch extends CRM_Core_Form_Task_Batch { */ public static $entityShortname = 'case'; + /** + * Get the name of the table for the relevant entity. + * + * @return string + */ + public function getTableName() { + return $this::$tableName; + } + + /** + * Get the query mode (eg. CRM_Core_BAO_Query::MODE_CASE) + * + * @return int + */ + public function getQueryMode() { + return CRM_Contact_BAO_Query::MODE_CASE; + } + + /** + * Get the group by clause for the component. + * + * @return string + */ + public function getEntityAliasField() { + return $this::$entityShortname . '_id'; + } + /** * Process the form after the input has been submitted and validated. * diff --git a/CRM/Case/Form/Task/PickProfile.php b/CRM/Case/Form/Task/PickProfile.php index 4c9acd0650..e69efc7804 100644 --- a/CRM/Case/Form/Task/PickProfile.php +++ b/CRM/Case/Form/Task/PickProfile.php @@ -33,4 +33,31 @@ class CRM_Case_Form_Task_PickProfile extends CRM_Core_Form_Task_PickProfile { */ public static $entityShortname = 'case'; + /** + * Get the name of the table for the relevant entity. + * + * @return string + */ + public function getTableName() { + return $this::$tableName; + } + + /** + * Get the query mode (eg. CRM_Core_BAO_Query::MODE_CASE) + * + * @return int + */ + public function getQueryMode() { + return CRM_Contact_BAO_Query::MODE_CASE; + } + + /** + * Get the group by clause for the component. + * + * @return string + */ + public function getEntityAliasField() { + return $this::$entityShortname . '_id'; + } + } -- 2.25.1