SearchKit - Fix saving created/modified fields
authorcolemanw <coleman@civicrm.org>
Fri, 9 Jun 2023 01:28:10 +0000 (21:28 -0400)
committercolemanw <coleman@civicrm.org>
Fri, 9 Jun 2023 01:28:10 +0000 (21:28 -0400)
Don't select created/modified id or date fields when loading SavedSearch so they don't get sent back
as values. The BAO will then be free to auto-fill them.

ext/search_kit/ang/crmSearchAdmin.module.js

index 08fc3704fe879b07ad1cf0fa9c0b0a8427541f39..6e2bfe0b1e20b5919d998eaa6ed43671490194f6 100644 (file)
@@ -28,7 +28,7 @@
           savedSearch: function($route, crmApi4) {
             var params = $route.current.params;
             return crmApi4('SavedSearch', 'get', {
-              select: ['*', 'GROUP_CONCAT(DISTINCT entity_tag.tag_id) AS tag_id'],
+              select: ['id', 'name', 'label', 'description', 'api_entity', 'api_params', 'expires_date', 'GROUP_CONCAT(DISTINCT entity_tag.tag_id) AS tag_id'],
               where: [['id', '=', params.id]],
               join: [
                 ['EntityTag AS entity_tag', 'LEFT', ['entity_tag.entity_table', '=', '"civicrm_saved_search"'], ['id', '=', 'entity_tag.entity_id']],