Proposal: SearchKit Templates
Background
Olly is working on a new Extension called SearchKit Reports which is a collection of SavedSearches. The idea is to reproduce most of CiviReport using SearchKit, and people can then use those packaged searches to get a jump-start on building their own searches.
Since these searches are intended to be used as templates, why not actually make them templates.
Rationale
I think this would benefit the SK UI because because so far, the "Packaged Searches" tab contains stuff the average user shouldn't mess with unless they know what they're doing; searches like "Administer Custom Fields" provide critical functionality to various CiviCRM screens that could potentially be broken if messed with.
Now the SearchKit Reports extension is introducing a bunch of packaged searches with the opposite intention. They provide no functionality out of the box and we want the user to mess with them & experiment as much as they want. We also want to encourage a workflow where they don't directly edit the packaged version but save a copy.
Design
I'm thinking that SavedSearchTemplates would:
- Appear on their own tab in SearchKit
- Not be runnable outside the SearchKit Admin UI - clicking on one would pull up a new pre-configured search (the same as clicking the "Clone" button on a SavedSearch)
- Stored in their own table
civicrm_saved_search_template
- Can be created, updated & packaged like regular saved searches
To point 3, I thought about adding an is_template
column like we do in the civicrm_event
table, and then thought about what a PITA that column is, and is it really so hard to create a new table? No, not hard at all.