From 58bcc9aeb958aeeada6bfb7dba69ae0f21e78068 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 14 Feb 2020 16:55:08 +1300 Subject: [PATCH] dev/core#1551 regression fix Now that mailing_id is defined as field metadata the form main metadata fn is trying to handle it, However the form is casting it to the wrong array format -https://github.com/civicrm/civicrm-core/blob/86f20cc17dde028977130f84feaf3b1d760ca57d/CRM/Contact/Form/Search.php#L649 We could fix this & rip it out of Mailing_BAO_Query::where but there is still a gap in that there is no pseudoconstant recorded for the field so the qill doesn't work & there is a gap in pre-parsing for the form 'IN' Hence this seems like a good approach to remove the regression in the immediate term --- CRM/Contact/BAO/Query.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 0f0a1644db22..58a5087dd31f 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1791,6 +1791,10 @@ public function whereClauseSingle(&$values, $isForcePrimaryOnly = FALSE) { (substr($values[0], 0, 10) === 'financial_') || (substr($values[0], 0, 8) === 'payment_') || (substr($values[0], 0, 11) === 'membership_') + // temporary fix for regression https://lab.civicrm.org/dev/core/issues/1551 + // ideally the metadata would allow this field to be parsed below & the special handling would not + // be needed. + || $values[0] === 'mailing_id' ) { return; }