From d4e614adeced5cccacf2651cfd8258eed456e22b Mon Sep 17 00:00:00 2001 From: Sudha Bisht Date: Mon, 18 May 2015 15:10:29 +0530 Subject: [PATCH] Fix for pledge api --- CRM/Pledge/BAO/Query.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CRM/Pledge/BAO/Query.php b/CRM/Pledge/BAO/Query.php index 51a0a6d47d..cd52b7d4c7 100644 --- a/CRM/Pledge/BAO/Query.php +++ b/CRM/Pledge/BAO/Query.php @@ -416,6 +416,14 @@ class CRM_Pledge_BAO_Query { ); CRM_Campaign_BAO_Query::componentSearchClause($campParams, $query); return; + + case 'pledge_contact_id': + $name = str_replace('pledge_', '', $name); + $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_pledge.$name", $op, $value, 'Integer'); + list($op, $value) = CRM_Contact_BAO_Query::buildQillForFieldValue('CRM_Pledge_DAO_Pledge', $name, $value, $op); + $query->_qill[$grouping][] = ts('Contact ID %1 %2', array(1 => $op, 2 => $value)); + $query->_tables['civicrm_pledge'] = $query->_whereTables['civicrm_pledge'] = 1; + return; } } -- 2.25.1