From be9261d175f6e58a6c71bedb2f461e8e463416d6 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 24 Feb 2022 19:53:35 -0500 Subject: [PATCH] APIv4 - Add fixme about filtering custom fields by sub-type --- Civi/Api4/Service/Spec/SpecGatherer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Civi/Api4/Service/Spec/SpecGatherer.php b/Civi/Api4/Service/Spec/SpecGatherer.php index e37656747f..55b517e833 100644 --- a/Civi/Api4/Service/Spec/SpecGatherer.php +++ b/Civi/Api4/Service/Spec/SpecGatherer.php @@ -44,9 +44,9 @@ class SpecGatherer { // Real entities if (strpos($entity, 'Custom_') !== 0) { - $this->addDAOFields($entity, $action, $specification, $values); + $this->addDAOFields($entity, $action, $specification); if ($includeCustom) { - $this->addCustomFields($entity, $specification, $values); + $this->addCustomFields($entity, $specification); } } // Custom pseudo-entities @@ -123,6 +123,7 @@ class SpecGatherer { else { $extends = $customInfo['extends']; } + // FIXME: filter by entity sub-type if passed in values $customFields = CustomField::get(FALSE) ->addWhere('custom_group_id.extends', 'IN', $extends) ->addWhere('custom_group_id.is_multiple', '=', '0') -- 2.25.1