SearchKit - Fix missing transformations in UI
authorcolemanw <coleman@civicrm.org>
Tue, 16 Jan 2024 12:28:00 +0000 (07:28 -0500)
committercolemanw <coleman@civicrm.org>
Tue, 16 Jan 2024 12:28:00 +0000 (07:28 -0500)
This regressed during e3ad1ff86b89539d5f6718cb155cdd59c8a07f37

ext/search_kit/ang/crmSearchAdmin/crmSearchFunction.component.js

index 25e472b5b396040465159130b244fb2f7115f75c..754e25c92429272e3e77b226d9967adcbcc1df37 100644 (file)
         if (ctrl.expr && ctrl.fieldArg) {
           if (ctrl.mode !== 'groupBy' && ctrl.crmSearchAdmin.canAggregate(ctrl.expr)) {
             allowedTypes.push('aggregate');
-          } else {
+          }
+          if (ctrl.mode === 'groupBy' || !ctrl.crmSearchAdmin.mustAggregate(ctrl.expr)) {
             allowedTypes.push('comparison', 'string');
             if (_.includes(['Integer', 'Float', 'Date', 'Timestamp', 'Money'], ctrl.fieldArg.field.data_type)) {
               allowedTypes.push('math');