From 6b7cb686896fe1172c984786e8e98875529ee813 Mon Sep 17 00:00:00 2001 From: Monish Deb Date: Mon, 28 Feb 2022 18:48:11 +0530 Subject: [PATCH] add grant_id select clause definition --- ext/civigrant/CRM/Grant/BAO/Query.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/civigrant/CRM/Grant/BAO/Query.php b/ext/civigrant/CRM/Grant/BAO/Query.php index 324fe7dd15..9c59f40125 100644 --- a/ext/civigrant/CRM/Grant/BAO/Query.php +++ b/ext/civigrant/CRM/Grant/BAO/Query.php @@ -69,6 +69,11 @@ class CRM_Grant_BAO_Query extends CRM_Contact_BAO_Query_Interface { $query->_tables['grant_note'] = 1; } + if (!empty($query->_returnProperties['grant_id'])) { + $query->_select['grant_id'] = "civicrm_grant.id as grant_id"; + $query->_element['grant_id'] = 1; + } + if ($query->_mode & CRM_Contact_BAO_Query::MODE_GRANT) { $query->_select['grant_amount_requested'] = 'civicrm_grant.amount_requested as grant_amount_requested'; $query->_select['grant_amount_granted'] = 'civicrm_grant.amount_granted as grant_amount_granted'; -- 2.25.1