CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2024-03-12T20:00:39Zhttps://lab.civicrm.org/dev/core/-/issues/5087Links to export and import Data Segmentation saved searches2024-03-12T20:00:39ZherbdoolLinks to export and import Data Segmentation saved searchesRight now there's no easy way to export a Data Segmentation saved search. One can export the main saved search, but if it references a Data Segmentation there is no easy way to export it as well.
So the only way is to go to the API4 exp...Right now there's no easy way to export a Data Segmentation saved search. One can export the main saved search, but if it references a Data Segmentation there is no easy way to export it as well.
So the only way is to go to the API4 explorer, select Saved Segmentation, guess at the ID (since it's not visible in the UI or even the link), export to JSON and copy that. Then go to the other site and only include part of that JSON (everything in `values`) and save it.https://lab.civicrm.org/dev/core/-/issues/5083SearchKit: It's not possible to uppercase countries and states/provinces2024-03-12T13:30:39ZfrancescbassasSearchKit: It's not possible to uppercase countries and states/provincesReproduced on dmaster.demo.civicrm.org at 5.73.alpha1
![imatge](/uploads/92832dc535bb7b462cd714cc3b58dec5/imatge.png)Reproduced on dmaster.demo.civicrm.org at 5.73.alpha1
![imatge](/uploads/92832dc535bb7b462cd714cc3b58dec5/imatge.png)https://lab.civicrm.org/dev/core/-/issues/5080SearchKit: Join on contact reference in event not working if event isn't root...2024-03-12T13:29:16ZTobias Voigttobias.voigt@civiservice.deSearchKit: Join on contact reference in event not working if event isn't root entityI'm trying to create a SearchKit for participants. I have a join on the participant's events as a secondary entity. From the events I then want to join on a contact via a custom field on the event that is a contact reference - but it doe...I'm trying to create a SearchKit for participants. I have a join on the participant's events as a secondary entity. From the events I then want to join on a contact via a custom field on the event that is a contact reference - but it doesn't work.
When I have the event as the root entity everything works fine. Yet, if I start from participants I can't join on the contact reference.https://lab.civicrm.org/dev/core/-/issues/5072SearchKit: Ghost custom data2024-03-12T15:46:29ZfrancescbassasSearchKit: Ghost custom dataHow to reproduce:
1. Create a custom field for a membership type.
2. Create a membership type and fill the custom field.
3. Change the membership type for the previous membership. Membership no longer have custom field, at least at UI l...How to reproduce:
1. Create a custom field for a membership type.
2. Create a membership type and fill the custom field.
3. Change the membership type for the previous membership. Membership no longer have custom field, at least at UI level, data remains in database tables.
4. Create a SearchKit to list memberships and custom field created in step 1.
5. The SearchKit results show data for non-applicable field for the membership created in step 2.
I suspect it's applicable for custom data groups associated with other entities (contact subtypes, participants, etc)https://lab.civicrm.org/dev/core/-/issues/5009SearchKit table display: some pager settings doesn't stick2024-02-14T10:09:42ZnoahSearchKit table display: some pager settings doesn't stick![hidepager](/uploads/df0e16539b7cc4b283b277aa7b036fd6/hidepager.gif)
The screen recording shows that the "Adjustable Page Size" setting doesn't save. This is also true for "Hide Pager if One Page" and most if not all other pager settings.![hidepager](/uploads/df0e16539b7cc4b283b277aa7b036fd6/hidepager.gif)
The screen recording shows that the "Adjustable Page Size" setting doesn't save. This is also true for "Hide Pager if One Page" and most if not all other pager settings.https://lab.civicrm.org/dev/core/-/issues/5000SearchKit: Allow formatting of the totals in the footer2024-02-14T10:06:39Zsimon.hermannSearchKit: Allow formatting of the totals in the footerSearchKit allows to create a footer row, where the total of a column can be displayed. However, this total does not allow for any formatting or reproduces the formatting of the columns it sums.
It would be great if there would be either ...SearchKit allows to create a footer row, where the total of a column can be displayed. However, this total does not allow for any formatting or reproduces the formatting of the columns it sums.
It would be great if there would be either an option to choose a formatting (decimal separators, thousand separators, currencies if applicable etc) or if the total would reflect the formatting of the column it sums.https://lab.civicrm.org/dev/core/-/issues/4929SK based on DB Entity includes contacts from the trash even when not specifie...2024-02-23T15:31:51ZlottieSK based on DB Entity includes contacts from the trash even when not specified as criteria## Overview
_When DB Entity is used as the 'search for' entity, it includes contacts from the trash even if not specified in the criteria of the original SK where the DB Entity display was constructed._
_This is the original post in _[...## Overview
_When DB Entity is used as the 'search for' entity, it includes contacts from the trash even if not specified in the criteria of the original SK where the DB Entity display was constructed._
_This is the original post in _[_Mattermost_](https://chat.civicrm.org/civicrm/pl/nji7p7prsid7dkf6p7ha3qksha)_._
## Reproduction steps
1. To test this you **_need to have some deleted contacts in your trash_**.
2. **Add a new** **SK** and do not change anything in the compose window (entity Contacts, everything default).
3. **Add a DB Entity display** to the SK you created in step 1 and preview it
4. **Save the SK** and **clear the cache** (I'm finding a have to clear the cache a 2-3 times)
5. **Add a new SK**
6. As the first **search for** entity, **_choose the DB Entity_** you created in step 2 and view the results
## Current behaviour
_The results returned for the child SK based on the DB Entity are higher than the results returned for the parent (first) SK. And the table created for the SK DB Entity the same number as shown in child SK. Note the result count in each of the following images. I have two contacts in the trash._
The SK created in step 1 (the parent for the DB Entity display - _Basic Contact Search_) has 201 results.
![sk-basic-contact-search_1.png](/uploads/c39cf6e5f33df445605656635569d70c/sk-basic-contact-search_1.png)
The SK where the DB Entity (_Basic Contact Search Child)_ created in step 1 is used as the **Search for** entity has 203 results.
![sk-basic-contact-search-child-based-on-db-entity_2.png](/uploads/7b7b5f3cc961fd0d3338fd06ea7726fa/sk-basic-contact-search-child-based-on-db-entity_2.png)
If I add the following where clause to the parent SK (_Basic Contact Search)_:
``WHERE (`a`.`is_deleted` = "0")``
![sk-basic-contact-search-addwhere-trash.png](/uploads/2a894589478f15154cebea240eaccbad/sk-basic-contact-search-addwhere-trash.png){width=491 height=178}
I get the correct result in my SK (_Basic Contact Search Child_) that is based on the DB Entity. The 201 results matches the original SK (_Basic Contact Search_).
![sk-basic-contact-search-child-updated.png](/uploads/ea5ebf91d8dc36c941cfa90a6409c411/sk-basic-contact-search-child-updated.png){width=525 height=272}
## Expected behaviour
_One should not be required to add the where clause to exclude the contacts in the trash. It seems as though that should be the default behaviour._
## Environment information
* **Browser:** _Firefox 59.0.1/Chrome 78.0.3904/Safari 13_
* **CiviCRM:** _5.69.2_
* **PHP:** _8.0_
* **CMS:** _Drupal 7.99_
* **Database:** _MariaDB 10.6_
* **Web Server:** _Apache 2.4_colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4873SearchKit - Add inputMode setting to allow clauses to reference column values...2024-02-12T16:30:40ZsamuelsovSearchKit - Add inputMode setting to allow clauses to reference column values in conditionsRelated to https://github.com/civicrm/civicrm-core/pull/28112
The next step is to allow the feature of field selection for conditions :
![image](/uploads/c400052bf32ca7944a87fdae2d2d3bf6/image.png)
I believe it's already possible from...Related to https://github.com/civicrm/civicrm-core/pull/28112
The next step is to allow the feature of field selection for conditions :
![image](/uploads/c400052bf32ca7944a87fdae2d2d3bf6/image.png)
I believe it's already possible from the managed file so it's likely only a UI limitation.colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4871Afform - Reset button click does not refresh the search result table with emp...2023-12-20T19:19:39ZjitendraAfform - Reset button click does not refresh the search result table with empty filtersTo replicate:
- Create a search kit to search for contacts.
- Add a form builder with a filter input Display Name. Also enable Reset button.
- View the search form and search for display name:
![image](/uploads/61162fab96405b82341a39ddb...To replicate:
- Create a search kit to search for contacts.
- Add a form builder with a filter input Display Name. Also enable Reset button.
- View the search form and search for display name:
![image](/uploads/61162fab96405b82341a39ddb461d9d6/image.png)
- Click Reset and search again.
**Expected**: The search refreshes the table with empty displayname and returns all contacts.
**Actual**: The search does not refresh the table.
![image](/uploads/7b807b8aee9ee97d3b8c5b5c98a133aa/image.png)
Note: If i clear the textbox manually and hit search, the search is working fine.https://lab.civicrm.org/dev/core/-/issues/4854SearchKit: Update of multiselect custom field is working in non-obvious way, ...2023-12-13T09:58:58ZDetlev SieberSearchKit: Update of multiselect custom field is working in non-obvious way, which may result in data loss.## Overview
SearchKit allows to update the selected entities (especially: contacts). However, when updating a multiselect custom field, the old values are deleted when a new one is selected.
This might be how it was designed, but won'...## Overview
SearchKit allows to update the selected entities (especially: contacts). However, when updating a multiselect custom field, the old values are deleted when a new one is selected.
This might be how it was designed, but won't be (imho) the way the user would expect it to work: I would have expected to have this work such as "tagging" a contact - where one contact might get additional tags.
## Example use-case
1. Create a custom field for contacts as alphanumeric with multiselect, create at least two options.
2. Open a contact and check the multiselect with option 1.
3. Create a SearchKit where you can find the above contact.
4. Select the contact
5. Action: Update, check the multiselect with option 2
6. Result: Instead of adding option 2 to the multiselect custom field and leaving option 1 as is, option 1 is unchecked.
## Current behaviour
Instead of adding option 2 to the multiselect custom field and leaving option 1 as is, option 1 is unchecked.
This is not what a user might expect and will result in loss of data.
## Proposed behaviour
The value for option 1 should be kept and option 2 should be added.
## Comments
Perhaps it makes sense to add another action ("update add"), that will add new options.https://lab.civicrm.org/dev/core/-/issues/4840Searchkit In Place Edit might load slow.2023-12-05T22:29:38ZjaapjansmaSearchkit In Place Edit might load slow.When creating the search kit for the permissions screen of the Standalone CiviCRM.
It turned out that the data loads very slow, because all permissions are shown for every role. And the in-place-edit makes this screen loading very slow. ...When creating the search kit for the permissions screen of the Standalone CiviCRM.
It turned out that the data loads very slow, because all permissions are shown for every role. And the in-place-edit makes this screen loading very slow.
@colemanw thought the permission check within in the in-place-edit was causing this.
See this PR which adds the permissions screen to standalone CiviCRM: https://github.com/civicrm/civicrm-core/pull/28523https://lab.civicrm.org/dev/core/-/issues/4777SearchKit 'LIKE' failing2023-11-14T16:39:12Zaydunsaidan.saunders@squiffle.ukSearchKit 'LIKE' failingOverview
----------------------------------------
Some uses of 'LIKE' don't work - eg dropdown labels.
Reproduction steps
----------------------------------------
1. Create a SK search for Contacts
1. Add `WHERE` `Constituent Informatio...Overview
----------------------------------------
Some uses of 'LIKE' don't work - eg dropdown labels.
Reproduction steps
----------------------------------------
1. Create a SK search for Contacts
1. Add `WHERE` `Constituent Information: Marital Status` `Is Like` `%partner%`
1. Search
2. Expand the Query Info section
See this [dmaster link](https://dmaster.demo.civicrm.org/civicrm/admin/search#/create/Contact?params=%7B%22version%22:4,%22select%22:%5B%22id%22,%22sort_name%22,%22contact_type:label%22,%22contact_sub_type:label%22%5D,%22orderBy%22:%7B%7D,%22where%22:%5B%5B%22constituent_information.Marital_Status:name%22,%22LIKE%22,%22%25partner%25%22%5D%5D,%22groupBy%22:%5B%5D,%22join%22:%5B%5D,%22having%22:%5B%5D%7D)
Current behaviour
----------------------------------------
In API, the `where` clause is as expected:
```
"where": [
[
"constituent_information.Marital_Status:name",
"LIKE",
"%partner%"
]
],
```
But the SQL is wrong:
```
WHERE (`constituent_information_1`.`marital_status_2` LIKE "")
```
Expected behaviour
----------------------------------------
The user's intent was to find contacts where the dropdown label matches the specified pattern.
1. The intent is to search on the label, but only the name is available
2. The pattern `%partner%` does not make it into the SQL at all.
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->https://lab.civicrm.org/dev/core/-/issues/4764SearchKit: permission for entity (expenses) needed to access SearchKit as non...2023-11-29T20:01:34ZMariaVSearchKit: permission for entity (expenses) needed to access SearchKit as non-adminWhen there is a SearchKit form with entity expenses, non-admins without the permission "manage expenses" can not access SearchKit.
When I try to open SearchKit (via Search > SearchKit) without the permission I get the following error mes...When there is a SearchKit form with entity expenses, non-admins without the permission "manage expenses" can not access SearchKit.
When I try to open SearchKit (via Search > SearchKit) without the permission I get the following error message: "Civi\API\Exception\UnauthorizedException: Authorization failed in /html/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php on line 149"
This seems to be a bug and might be true for other specific entities, too.https://lab.civicrm.org/dev/core/-/issues/4762SearchUI: Manage Extensions with SK/FB2023-11-14T16:34:11Zaydunsaidan.saunders@squiffle.ukSearchUI: Manage Extensions with SK/FBIssues relating to replacing the 'Manage Extensions' page with SK/FB
Enable SearchUI extension then go to Administer > Experimental > Extensions
## Required to match current functionality:
- [ ] Way to determine whether extension ne...Issues relating to replacing the 'Manage Extensions' page with SK/FB
Enable SearchUI extension then go to Administer > Experimental > Extensions
## Required to match current functionality:
- [ ] Way to determine whether extension needs updating
- [ ] API enhancement (?) to get info.xml data
- [ ] Expandable sections - or show in pop-up?
- [ ] Metadata update to add 'Install', 'Upgrade' and 'Disable' actions
- [ ] Functionality to show not-installed extensions (ie 'Add New' tab)
## Improvements:
- [ ] Separate core/required from community extensions (could be filters or tabs)
- [ ] Better handling of extensions with local githttps://lab.civicrm.org/dev/core/-/issues/4731SearchKit/Form Builder: re-positioning menu links column in table display bre...2023-11-02T17:26:41ZtomrosenbloomSearchKit/Form Builder: re-positioning menu links column in table display breaks csv downloadTo reproduce:
1. add a Menu column to a SK table display - it will appear in the last column by default
2. move menu links column to a different position
3. create afform from this display
4. use action menu to download results to csv
5...To reproduce:
1. add a Menu column to a SK table display - it will appear in the last column by default
2. move menu links column to a different position
3. create afform from this display
4. use action menu to download results to csv
5. now check the download - the column data immediately to the right of the menu column is missing and the data in subsequent columns is shifted to the left
I guess this could be due to something not being closed off properly and corrupting the table, and in that case it could be relevant that one of my menu links is `civicrm/case-detail#/?id=[id]`
EDIT: no, don't think it's that: I removed this link and the problem persists5.68.0https://lab.civicrm.org/dev/core/-/issues/4673Proposal: SearchKit > Enable use of Extras fields (current date) in Field Tra...2023-10-05T11:51:51ZJustin657Proposal: SearchKit > Enable use of Extras fields (current date) in Field Transformations for Date Comparisons to TodayOverview
----------------------------------------
In SearchKit users/developers should be able to use the UI to add a column that does a datediff between **today** and a selected **date field** using the Field Transformation "Days betwee...Overview
----------------------------------------
In SearchKit users/developers should be able to use the UI to add a column that does a datediff between **today** and a selected **date field** using the Field Transformation "Days between two dates".
Example use-case
----------------------------------------
1. Create a new SearchKit query (saved search)
1. Add a column: Extras > Current Date
1. Open Field Transformations
1. Select "Days between two dates" before the column "Current Date"
1. On the right of that column, select from the dropdown the desired date field to compare to today.
Current behaviour
----------------------------------------
When creating queries in SearchKit, there is currently no easy way in the UI to do a datediff between the current date (CURDATE()) and a date field stored in the database.
Current workaround
----------------------------------------
We can hack our way to doing this by manually editing the SELECT clause of the query API call like this:
`"DATEDIFF(CURDATE(), birth_date) AS DATEDIFF_today_birth_date",`
You can do this directly in the "api_params" field of the saved search.
Or you can export the saved search, edit the API call, and then import the saved search using the SearchKit Import UI.
Comments
----------------------------------------
Verified this behaviour on Civi 5.65.0
See: [StackExchange Thread: How to calculate number of days to/from a date](https://civicrm.stackexchange.com/q/45654/15346)https://lab.civicrm.org/dev/core/-/issues/4637Profile Update from SearchKit doesn't work2023-10-03T20:55:03ZlarsssandergreenProfile Update from SearchKit doesn't workIf you try to use Profile Update in SK, it pops up a modal to select the profile and then just closes when you click continue. Verified this is the behaviour back to at least 5.58. Probably makes more sense to get in-place editing workin...If you try to use Profile Update in SK, it pops up a modal to select the profile and then just closes when you click continue. Verified this is the behaviour back to at least 5.58. Probably makes more sense to get in-place editing working well enough to replace Profile Update, but at least we should remove it if is broken.https://lab.civicrm.org/dev/core/-/issues/4632Keyboard UI for SearchKit in-place editing2023-10-07T08:58:11ZnoahKeyboard UI for SearchKit in-place editingOverview
----------------------------------------
As of CiviCRM 5.66, SearchKit Displays offer "in-place editing" of some fields. The user interface requires a lot of clicking.
Current behaviour
----------------------------------------
...Overview
----------------------------------------
As of CiviCRM 5.66, SearchKit Displays offer "in-place editing" of some fields. The user interface requires a lot of clicking.
Current behaviour
----------------------------------------
To "edit in place", the user must
- click on the editable field (the *resting* version of the field turns into a *single-field mini-form*)
- click within the form control to edit the field's value; depending on the form control, the keyboard may/must be used to manipulate the value
- click a green checkmark button (the value is saved via an AJAX request and the field goes back into *resting* state) or a red "x" button (the field returns to *resting* state without any changes being applied); this step may also be accomplished using the keyboard
This process must be repeated for each editable field in every row.
Goal
----------------------------------------
Make it possible to perform edits within SearchKit Displays without any use of the mouse.
Questions
----------------------------------------
### Design
- What should the UX be, specifically? I.e. which keystrokes should map to which behaviors?
- Should multiple editing modes be available? (e.g. single-field form, single-row form, whole-result set form)?
- How can the UX be accessible to users with various abilities?
Some possible design dimensions:
| from | | to |
|----------------------|-----|---------------------------------------------------------------------|
| emphasis on display | ... | emphasis on editing |
| edit one field | ... | edit many fields fluidly (office app spreadsheet-style interface) |
| civicrm-specific ux | ... | ux paradigm borrowed from elsewhere |
| one-size-fits-all ux | ... | granular control over the ux for each column in each search display |
| hard-wired ux | ... | ux can be modified by hooks/events |
Some ideas that have already been floated:
- Tab/Shift-Tab to navigate between editable fields of the existing *single-field mini-form* style (@noah in [this PR](https://github.com/civicrm/civicrm-core/pull/27638))
- Excel-like spreadsheet UI (@civiuser in [this comment](https://github.com/civicrm/civicrm-core/pull/27638#issuecomment-1736327321))
- "Edit in place" action in the Display's "Actions" menu, which would switch on editing mode for a set of rows; save via "Save all changes" button (@civiuser in [this comment](https://github.com/civicrm/civicrm-core/pull/27638#issuecomment-1736327321))
- Replicate current "profile edit" UI ((@civiuser in [this comment](https://github.com/civicrm/civicrm-core/pull/27638#issuecomment-1736327321))
- add a new row to the table (e.g. Create a new entity) inline (@colemanw in [this chat thread](https://chat.civicrm.org/civicrm/pl/u8myu3q1g3g8jxaoajz5ya5q9w))
- (overlapping discussion) adding some minimal Aria controls to new FB/SK elements where there aren't native html elements (e.g. accordions/tabs) (@nicol in [this chat thread](https://chat.civicrm.org/civicrm/pl/17ytk6g8gbb4jk4csg56hxdjia))
### Development strategy
- What is possible to implement with the least effort/least change to current code (low-hanging fruit)?
- Should we grab that low-hanging fruit even if we haven't organized a larger UX plan?
- How big should we be thinking — i.e. should this discussion extend to FormBuilder as well?https://lab.civicrm.org/dev/core/-/issues/4629Search Kit: DB Entity needs all columns to work2023-10-20T07:56:29Za.valllloveraSearch Kit: DB Entity needs all columns to workOverview
----------------------------------------
When using DB Entity you cannot delete columns, or the results will not be refreshed on the DB table
Reproduction steps
----------------------------------------
![DB_Entity_Rows](/uploa...Overview
----------------------------------------
When using DB Entity you cannot delete columns, or the results will not be refreshed on the DB table
Reproduction steps
----------------------------------------
![DB_Entity_Rows](/uploads/8ffa61cb9c3b70be840877c4505152e8/DB_Entity_Rows.gif)
Current behaviour
----------------------------------------
If you delete some columns in the DB Entity, you can Save the Search but it will not refresh the results in the DB Table.
The Api4 gets you more information about what's happening:
![image](/uploads/ec5d210a1fc5e4a952ce273f1960b7c7/image.png)
```
"info": "INSERT INTO `civicrm_sk_contacts_db_entity1` (id, sort_name)
SELECT `a`.`id` AS `id`,
`a`.`sort_name` AS `sort_name`,
`a`.`contact_type` AS `contact_type:label`,
`a`.`contact_sub_type` AS `contact_sub_type:label`
FROM civicrm_contact a
WHERE (`a`.`contact_type` = \"Individual\")
ORDER BY `a`.`sort_name` ASC
[nativecode=1136 ** Column count doesn't match value count at row 1]",
"db_error": "value count on row",
```
As you can see, the Insert above is not correct and that (I suspect) is the main reason of this behaviour.
Expected behaviour
----------------------------------------
Can alter the number of columns in the DB Entity, to only save the ones that you want on the DB Table.
Environment information
----------------------------------------
* __CiviCRM:__ _[dmaster](https://dmaster.demo.civicrm.org/civicrm/dashboard?reset=1)_ v.5.67.alpha1https://lab.civicrm.org/dev/core/-/issues/4628Search Kit: DB Entity doesn't work with Data Segment2023-10-20T07:56:10Za.valllloveraSearch Kit: DB Entity doesn't work with Data SegmentOverview
----------------------------------------
When you have fields with Data Segmentation and try to use the DB Entity, the search will never be saved in the database, it will stuck in neverending Saving status.
https://chat.civicrm...Overview
----------------------------------------
When you have fields with Data Segmentation and try to use the DB Entity, the search will never be saved in the database, it will stuck in neverending Saving status.
https://chat.civicrm.org/civicrm/pl/jkbfnoukuid38mhroyj1fer1mh
Reproduction steps
----------------------------------------
1. Create a Data Segmentation
1. Create a SK Search that includes the Data Segmentation previosly created
1. Use the DB Entity and try to Save the search while selecting the Data Segmentation field.
![SK_Db_Entity](/uploads/0dce391d884193738e5ca9f767da59ec/SK_Db_Entity.gif)
Current behaviour
----------------------------------------
When you want to save the Search, the DB Entity it enters into an infinite saving status.
![Saving_forever](/uploads/14c2f4b90e0c45176bd1a8424692df92/Saving_forever.gif)
Via api4 you can see that the table is not created in the DB.
![image](/uploads/24c59f656eb38276978c2a3b7fe00e81/image.png)
Expected behaviour
----------------------------------------
It saves the Search, create the Table in the DB and refresh the table with the content of the search.
Environment information
----------------------------------------
* __CiviCRM:__ [dmaster](https://dmaster.demo.civicrm.org/civicrm/dashboard?reset=1) v.5.67.alpha1