Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-12-26T05:03:25Zhttps://lab.civicrm.org/dev/core/-/issues/3217[Feature] Please give us the option to disable subtotals for Soft Credit Cont...2023-12-26T05:03:25Zswebervna[Feature] Please give us the option to disable subtotals for Soft Credit Contribution ReportsCurrently, Soft Credit Contribution Reports always output subtotal: ![image](https://lab.civicrm.org/dev/mail/uploads/39254fd8a1be8b42d9889da4230d91d0/image.png)
I think it would be nice to disable this as an option, so we can remove th...Currently, Soft Credit Contribution Reports always output subtotal: ![image](https://lab.civicrm.org/dev/mail/uploads/39254fd8a1be8b42d9889da4230d91d0/image.png)
I think it would be nice to disable this as an option, so we can remove the subtotal if we don't need them.https://lab.civicrm.org/dev/core/-/issues/3216dev/report#53: search on relationship and case (2)2023-12-25T05:03:31Zeileendev/report#53: search on relationship and case (2)Unfortunately we had to revert https://github.com/civicrm/civicrm-core/pull/20002 since it was too complicated to fix the regression it causes in time for the release otherwise
Overview
When doing an advanced search with case parameters...Unfortunately we had to revert https://github.com/civicrm/civicrm-core/pull/20002 since it was too complicated to fix the regression it causes in time for the release otherwise
Overview
When doing an advanced search with case parameters set and displaying related contacts. Gives all clients of all the found cases which have this relationship. What we would expect is that related contact is linked to the found cases.
Steps to reproduce
Preparation:
Create a contact Contact A
Create another contact Contact B
Create a third contact Contact C
Create a case of type Housing Support for Contact A
On the case assign the role Benefit specialist is to Contact B
Create a second case of type Adult day care referral
On the case assign the role Benefit specialist is to Contact C
Searching:
Go to advanced search
Click on View contact as related contact
Select Benefit Specialist as relationship type
Go to tab cases and select Housing Support as case type
Expected results
I expected to see only Contact B as that one has a relationship on the case Housing Support.
Actual results
I see both Contact B and Contact C.
Comments
See also the discussion of a similar related topic: https://lab.civicrm.org/dev/report/-/issues/53jaapjansmajaapjansmahttps://lab.civicrm.org/dev/core/-/issues/3213When using Form Builder and "Accessible on front-end of website", how do I di...2023-12-24T05:03:21Zjustinfreeman (Agileware)When using Form Builder and "Accessible on front-end of website", how do I disable the CiviCRM styling for this front-end page?When using Form Builder and "Accessible on front-end of website", how do I disable the CiviCRM styling for this front-end page?
I understand that the CiviCRM CSS can be disabled entirely on the website. But I just want to **disable the ...When using Form Builder and "Accessible on front-end of website", how do I disable the CiviCRM styling for this front-end page?
I understand that the CiviCRM CSS can be disabled entirely on the website. But I just want to **disable the CiviCRM styling specifically for one or more Form Builder front-end pages**.https://lab.civicrm.org/dev/core/-/issues/3211Country and State criteria disappear when editing smart group2023-12-23T05:03:23Zm robimorgan@palantetech.coopCountry and State criteria disappear when editing smart groupSteps to replicate:
* Run advanced search with Country + State (I used United States + Texas)
* Create smart group with the results
* View contacts in smart group, select "Edit Smart Group Criteria"
* United States + Texas are not popula...Steps to replicate:
* Run advanced search with Country + State (I used United States + Texas)
* Create smart group with the results
* View contacts in smart group, select "Edit Smart Group Criteria"
* United States + Texas are not populated on the search form.
Notes
* Replicated on wpmaster and dmaster
* Noticed the issue in a Wordpress site on 5.19.4
* The issue is also affecting existing smart groups.
* The groups themselves remain functional.
* Other address and other search criteria are saved. Just the country, and fields that depend on the country to be populated, are cleared.https://lab.civicrm.org/dev/core/-/issues/3210Report Listing improved UX2023-12-23T05:03:22ZJonGoldReport Listing improved UXWhen you go to **Reports menu » X Reports**, where `X` is anything, you get the report listing page (`CRM_Report_Page_InstanceList`). This page hard-codes the order the reports appear in.
* First by component
* Second by the weight o...When you go to **Reports menu » X Reports**, where `X` is anything, you get the report listing page (`CRM_Report_Page_InstanceList`). This page hard-codes the order the reports appear in.
* First by component
* Second by the weight of the report template ID in the `report_template` option value list
* Third alphabetized by title.
The second sort criterium is the problematic one. I propose we sort by component, then alphabetically.
I assume the original thinking was, "Let's keep all the Contribution Summary reports together, all the Contribution Detail reports", etc. However, I think this isn't an ideal UX:
* Users don't know (or care about) the order of report templates in the option value list.
* Reports can be sorted any number of ways: By user, department, workflow - but those are unlikely to map to report templates.
* This is all especially true in an era where there's many report extensions that provide overlapping reports with core (Extended Reports, Reports Plus, Pivot Reports). I think it makes more sense not to sort by report type.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3209Contribution Details Statistics are multiplied under many circumstances2023-12-22T05:03:25ZJonGoldContribution Details Statistics are multiplied under many circumstancesThis bug was previously identified and fixed as core#655, but the fix only addresses the rows and not the statistics.
In addition to contribution detail rows getting multiplied by soft credits, they can be multipled by any one-to-many `...This bug was previously identified and fixed as core#655, but the fix only addresses the rows and not the statistics.
In addition to contribution detail rows getting multiplied by soft credits, they can be multipled by any one-to-many `JOIN` to the contribution table. Soft credits are one example, but it can also be to a contact's multi-record contact field group, or if you pick a field (like "Credit Card Type") that lives in the financial transaction tables ([first reported on SE](https://civicrm.stackexchange.com/a/28791/12) by @KarinG).
Given that the statistics don't concern itself with any data that's not in `civicrm_contribution`, we can replace the flawed (and potentially CPU-intensive) original query with a list of contribution IDs and only use `FROM civicrm_contribution`.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3206Cannot save a copy of a report without the "administer reports" permission2023-12-21T05:03:20ZbgmCannot save a copy of a report without the "administer reports" permissionTo reproduce:
* Create a user with the following permissions
* access CiviReport
* access Report Criteria
* save Report Criteria
* Go to an existing report (or a template)
* Refresh the results
* Under Actions, click "save as"
Re...To reproduce:
* Create a user with the following permissions
* access CiviReport
* access Report Criteria
* save Report Criteria
* Go to an existing report (or a template)
* Refresh the results
* Under Actions, click "save as"
Result: javascript error: "TypeError: $refresh_field.html() is undefined"
![report-saveas-2021-08-05_14-45](/uploads/fe812c8f50c77c51a5a010987cd9b86d/report-saveas-2021-08-05_14-45.png)https://lab.civicrm.org/dev/core/-/issues/3205Search Kit terminology and help2022-04-22T18:13:08ZJoeMurraySearch Kit terminology and helpI hope this is the right project for feedback on Search Kit.
In the recent demo that we were all very excited about (great progress and functionality!!), there were one or two things that struck me as not as good in terms of usability.
...I hope this is the right project for feedback on Search Kit.
In the recent demo that we were all very excited about (great progress and functionality!!), there were one or two things that struck me as not as good in terms of usability.
There is wonderful support for creating very complex queries. Most of the UI terminology is based on the SQL clauses. There were, however, a few places where a different term was introduced, perhaps in an effort to make it more user friendly for non-programmers. So while there is a WHERE term in the interface, instead of HAVING there are FILTERs. I think the primary UI should just stick to standard SQL throughout, rather than only 95% of the time. Attempts to make it less technical or more understandable by changing away from SQL could be done in mouseover or other documentation.
Adding an explanation for each of these elements, maybe with some samples or links to samples, would be a great way to turn tech savvy non-developers into power users of this tool.
@dtarrant had a useful idea for documentation for join options he shared with me yesterday, and may post here. It's based on what MS Access presents to its users, who can be tech savvy but not programmers, similar to the target users of Search Kit:
![Image_Pasted_at_2021-2-10_17-47](/uploads/5ea62735afb38d711f956c3ca64a13ca/Image_Pasted_at_2021-2-10_17-47.png)colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/3203When using the Search Kit and Form Builder to implement a front-end Search Li...2023-12-20T05:03:24Zjustinfreeman (Agileware)When using the Search Kit and Form Builder to implement a front-end Search Listing, how do include a Reset button to clear the search criteria?When using the Search Kit and Form Builder to implement a front-end Search Listing, how do include a Reset button to clear the search criteria?
Ideally, this button would be displayed AFTER the Search button.
![Screenshot_20211112_1744...When using the Search Kit and Form Builder to implement a front-end Search Listing, how do include a Reset button to clear the search criteria?
Ideally, this button would be displayed AFTER the Search button.
![Screenshot_20211112_174423](/uploads/a065207345c884f41eae014ae25e1a8d/Screenshot_20211112_174423.png)https://lab.civicrm.org/dev/core/-/issues/3202In membership detail report the join date field has a different output date f...2023-11-10T00:08:12ZDaveDIn membership detail report the join date field has a different output date format than the other date fieldsCan reproduce on dmaster.demo.
On the membership details report in the columns tab select join date as a field. When you run the report the join date column has a different date format than the start/end date. It seems to always be yyyy...Can reproduce on dmaster.demo.
On the membership details report in the columns tab select join date as a field. When you run the report the join date column has a different date format than the start/end date. It seems to always be yyyy-mm-dd.
Doesn't seem to be a recent issue.5.69.0https://lab.civicrm.org/dev/core/-/issues/3200Contributions search result summary not correct2023-12-19T05:03:24ZhfarooqContributions search result summary not correctCMS: Drupal 7.69
CiviCRM: 5.21.3
If contributions with status complete and for "Contributions OR Soft Credits?" field, select "Both" (both contributions and soft credits), in result summary there is a discrepancy seen; Number of total r...CMS: Drupal 7.69
CiviCRM: 5.21.3
If contributions with status complete and for "Contributions OR Soft Credits?" field, select "Both" (both contributions and soft credits), in result summary there is a discrepancy seen; Number of total results does not match with the sum of total contributions and soft credits, please see attached screenshot. I was able to replicate it on [dmaster demo](https://dmaster.demo.civicrm.org/) site at some point back few days but not anymore.
![image](/uploads/655780b5f00f98abf880697baac2aa9c/image.png)https://lab.civicrm.org/dev/core/-/issues/3199Searching on address custom field for shared address2023-12-19T05:03:24ZMartinSearching on address custom field for shared addressFound this on Drupal 7 / Civi 5.28.3. We have a custom group on the Address entity with one custom field, and we often use shared addresses for our contacts (for example, an individual uses the address configured on a household contact)....Found this on Drupal 7 / Civi 5.28.3. We have a custom group on the Address entity with one custom field, and we often use shared addresses for our contacts (for example, an individual uses the address configured on a household contact).
For the contact using the shared address (i.e. the individual in the example above):
- The custom field does appear for them, for example on their contact summary page.
- The custom field does not get associated with them when doing any sort of searching (tested in advanced search and search builder).
I tested and confirmed this in dmaster (5.31.alpha1) with the following steps:
1. Created custom group for Address, with custom alphanumeric field as a select input with 3 options.
1. Created individuals test1 and test2, with relationship between them (I think actually the relationship is not needed, but anyways..).
1. Created address on test1 with "opt2" selected on custom field. On test2 selected this address to use as a shared address.
1. At this point both contact summary pages display the correct complete address with opt2 showing.
1. Do advanced search for address custom field opt2. Only contact test1 shows up.
1. Do search builder search for parameter Contacts -> Addr customgroup:customfield -> Primary -> equals -> opt2. Only contact test1 shows up.https://lab.civicrm.org/dev/core/-/issues/3198Can't see Soft Credit fields on a Contribution Detail Report?2023-12-18T05:03:27ZswebervnaCan't see Soft Credit fields on a Contribution Detail Report?When I add Soft Credit columns to a Contribution Detail Report, the data doesn't show - they're just empty cells:
![image](/uploads/63ee33909c9e1a3b9e314bbd3cd0308e/image.png)
(That first row/entry you see is in fact a contribution with...When I add Soft Credit columns to a Contribution Detail Report, the data doesn't show - they're just empty cells:
![image](/uploads/63ee33909c9e1a3b9e314bbd3cd0308e/image.png)
(That first row/entry you see is in fact a contribution with a soft credit, I checked.)https://lab.civicrm.org/dev/core/-/issues/3197SearchKit: Rewrite and Group By don't mix2023-12-18T15:06:05ZJonGoldSearchKit: Rewrite and Group By don't mixWhen using "Rewrite" in a search display, the rendered token for fields we've grouped by only show the first value.
### Steps to Replicate
* Install Search Kit, import the Search/Display below.
* Preview the Display.
* Turn off "Rewrite...When using "Rewrite" in a search display, the rendered token for fields we've grouped by only show the first value.
### Steps to Replicate
* Install Search Kit, import the Search/Display below.
* Preview the Display.
* Turn off "Rewrite" on the "Total Amount" field and preview again.
### Expected Result
Rendered token has the same output as the non-rewritten field.
### Actual Result
Token only renders the first value in a list.
```
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "group_and_rewrite",
"label": "group and rewrite",
"form_values": null,
"search_custom_id": null,
"api_entity": "Contact",
"api_params": {
"version": 4,
"select": [
"id",
"display_name",
"GROUP_CONCAT(Contact_Contribution_contact_id_01.total_amount) AS GROUP_CONCAT_Contact_Contribution_contact_id_01_total_amount"
],
"orderBy": [],
"where": [],
"groupBy": [
"id"
],
"join": [
[
"Contribution AS Contact_Contribution_contact_id_01",
"LEFT",
[
"id",
"=",
"Contact_Contribution_contact_id_01.contact_id"
]
]
],
"having": []
},
"expires_date": null,
"description": null,
"mapping_id": null
}
],
"match": [
"name"
]
}
],
[
"SearchDisplay",
"save",
{
"records": [
{
"name": "Contacts_Table_1",
"label": "Contacts Table 1",
"saved_search_id.name": "group_and_rewrite",
"type": "table",
"settings": {
"actions": true,
"limit": 50,
"classes": [
"table",
"table-striped"
],
"pager": {
"show_count": true,
"expose_limit": true
},
"sort": [
[
"sort_name",
"ASC"
]
],
"columns": [
{
"type": "field",
"key": "id",
"dataType": "Integer",
"label": "Contact ID",
"sortable": true
},
{
"type": "field",
"key": "display_name",
"dataType": "String",
"label": "Display Name",
"sortable": true
},
{
"type": "field",
"key": "GROUP_CONCAT_Contact_Contribution_contact_id_01_total_amount",
"dataType": "Money",
"label": "(List) Contact Contributions: Total Amount",
"sortable": true,
"rewrite": "[GROUP_CONCAT_Contact_Contribution_contact_id_01_total_amount]"
}
]
},
"acl_bypass": false
}
],
"match": [
"name",
"saved_search_id"
]
}
]
]
```https://lab.civicrm.org/dev/core/-/issues/3196Event ID is displaying Event Title in reports2023-12-17T05:03:31ZjgentlesEvent ID is displaying Event Title in reportsFirst, when you run a report and include the event ID column in some cases it displays the event title instead. In other cases, it does not show anything for the event id field. This is in CiviCRM 5.36.1.First, when you run a report and include the event ID column in some cases it displays the event title instead. In other cases, it does not show anything for the event id field. This is in CiviCRM 5.36.1.https://lab.civicrm.org/dev/core/-/issues/3195Exporting "Spouse of" or other relationship with matching labels only exports...2023-12-17T05:03:31ZtommyboboExporting "Spouse of" or other relationship with matching labels only exports the A>B relationshipWhen exporting a contact and their related contacts, the relationship type dropdown truncates all the "duplicate" relationship labels. So when you a user selects "Spouse Of" it only exports the A>B relationship.
If you were to export Jo...When exporting a contact and their related contacts, the relationship type dropdown truncates all the "duplicate" relationship labels. So when you a user selects "Spouse Of" it only exports the A>B relationship.
If you were to export John Doe(A) and James Doe(B), who are spouses, the export would be rendered as
| First | Last | Spouse of First | Spouse of Last |
| ------ | ------ | ------ | ------ |
| John | Doe | James | Doe |
| James | Doe | | |
This is an issue if you are trying to export a list of donors and spouses. If the primary donor is the B spouse you will end up with no spouse exported.
This appears to be an old issue.
https://civicrm.stackexchange.com/questions/27001/exporting-spouses-only-exports-one-side-of-relationshiphttps://lab.civicrm.org/dev/core/-/issues/3192Search Kit: Dropdown for the related contacts entity says "name" but for disp...2022-04-22T18:08:30ZDaveDSearch Kit: Dropdown for the related contacts entity says "name" but for display it shows "label"The field that's in the relationship_cache table is the `name` of the relationship type, so it does make sense that any dropdowns related to it would say `name`. However when you are selecting columns to include in the output, what it ac...The field that's in the relationship_cache table is the `name` of the relationship type, so it does make sense that any dropdowns related to it would say `name`. However when you are selecting columns to include in the output, what it actually displays in the table (correctly I would say) is `label`. So there's a minor disconnect.
![Untitled](/uploads/6dfeaff84dbd62663ebf48be350bd2e0/Untitled.png)https://lab.civicrm.org/dev/core/-/issues/3190How to package SearchKit Displays in an extension2022-04-22T18:06:46ZcolemanwHow to package SearchKit Displays in an extension## Use Case
Ship an extension with SearchKit-based tabs for the Contact Summary screen.
## Requirements
Using a Search Display as a contact summary tab requires 3 interconnected entities:
1. A **SavedSearch** containing the api param...## Use Case
Ship an extension with SearchKit-based tabs for the Contact Summary screen.
## Requirements
Using a Search Display as a contact summary tab requires 3 interconnected entities:
1. A **SavedSearch** containing the api params for the search.
2. A **SearchDisplay** linked to the `SavedSearch` by id (`saved_search_id = $savedSearch.id`).
3. An **Afform** linked to both the `SavedSearch` and the `SearchDisplay` by name (via embedded tag).
## Solutions
### 1. The Status Quo
Afforms can already be packaged as `.aff.html/.aff.json` files, and the Afform API & GUI have excellent handling for packaged Afforms to be overridden and reverted by site admins. If an extension upgrade provides updates to a packaged Afform, overrides will not be affected but the default version will be upgraded automatically.
DAO-based entities like `SavedSearch` and `SearchDisplay` can be packaged as `.mgd.php` files which will be added to the database via `hook_civicrm_managed`. However, the `CRM_Core_ManagedEntities` system doesn't provide any way for admins to override and then revert back to the packaged version, nor to reconcile potentially overridden entities with new packaged versions during extension upgrades. There are also an issue where the system doesn't guerantee write order, and in this case we need it to write the `SavedSearch` prior to the `SearchDisplay`, which contains a foreign key to the former.
Currently there is a workaround using chaining and `'update' = 'never'`, for example as used by the [Deduper Extension](https://github.com/eileenmcnaughton/deduper/blob/master/entities/SavedSearch.mgd.php).
`CRM_Core_ManagedEntities` offers us 2 modes for packaging `SavedSearch` and `SearchDisplay` entities, neither is ideal:
1. **`'update' = 'always'`** will essentially lock the entities. Any changes to the search made by the site admin will be overwritten on a regular basis. This solves the extension upgrade problem at the cost of configurability.
2. **`'update' = 'never'`** will drop the entities into the database and then never touch them again. This is the lesser of two evils because at least this way they are configurable.
**The bottom line:** The status quo allows us to package searches and displays. They will be user-configurable but not revertable (if the admin makes a mess of them, he'd have to delete them all and then uninstall/reinstall the extension). During extension upgrades, the packaged Afforms will update, but changes to `.mgd.php` files will do nothing unless the extension is uninstalled, searches are deleted, and then it's reinstalled.
### 2. Create APIv4 `PackagedEntity` class
This would do something like the `Afform` APIv4 entity: read from the database and *also* from json files. This would need to be opt-in on a per-entity basis (starting with `SavedSearch` and `SearchDisplay`) and would be mostly for configuration entities, as a file/DB hybrid would not be able to perform joins in the GET action.
**Tasks**
1. Add an APIv4 trait `PackagedEntity`
2. Opt-in `SavedSearch` and `SearchDisplay` to use that trait
3. Add a specialized `get` action which would read from json files and the database.
4. Add calculated fields comparable to Afform's `has_base` & `has_local` to `get` output.
**Pros**
- Would give excellent feature parity with Afform's packaged systems.
- Reverting and upgrades would be simple.
**Cons**
- Involves extra file i/o and directory scanning with each `get` - feasible with hundreds of records but not many thousands.
- Restricted to APIv4 as the packaged entities wouldn't exist as far as the DAO is concerned.
- Entities have to opt-in (whereas `mgd` works on any entity).
- Retrofitting an existing API over would involve a slight BC breakage as the new `get` method would be missing `JOIN`, and `HAVING` clauses.
### 3. Improve `CRM_Core_ManagedEntities`
Make the manager aware of whether a record has been manually updated. Add a new `'update' = 'auto'` mode which would intelligently push updates from `.mgd.php` only to untouched records. Add a way to revert a record.
**Tasks**
1. Add an `is_overridden` column to the `civicrm_managed` table.
2. Add some type of trigger to set that column when manual changes are made to a managed entity.
3. Add some type of `Revert` api action (currently the `Managed` class doesn't even have an API so this will take some thought).
4. Add a way to know if a database record has a corresponding managed entry (maybe a calculated field or maybe a DFK join - both would be slightly tricky).
**Pros**
- Fully backward compatible with existing entities.
- Improves the existing "Managed" system instead of inventing a new one.
- Wouldn't be a drag on performance.
**Cons**
- Might be a lot of work.https://lab.civicrm.org/dev/core/-/issues/3189Search-kit offer actions when grouped by an entity2023-12-15T05:03:27ZeileenSearch-kit offer actions when grouped by an entityWhen we have a search with an entity as group by we should offer actions for that entity
eg.
```
SELECT contact_id, SUM(total_amount) as totes FROM civicrm_contribution GROUP BY contact_id HAVING totes > 2000;
```
Should have contact...When we have a search with an entity as group by we should offer actions for that entity
eg.
```
SELECT contact_id, SUM(total_amount) as totes FROM civicrm_contribution GROUP BY contact_id HAVING totes > 2000;
```
Should have contact actions & the ability to create a smart groups
See https://github.com/civicrm/civicrm-core/pull/19936
@colemanwhttps://lab.civicrm.org/dev/core/-/issues/3188Can't create / use event template on 5.48.22024-01-20T05:03:28ZGuillaumeSorelCan't create / use event template on 5.48.2When creating an event, I can't use a template as the dropdown in itself is not shown even though one template exists.
Creating an event template is also not possible and leads to creating a simple event (regression from former issues).
...When creating an event, I can't use a template as the dropdown in itself is not shown even though one template exists.
Creating an event template is also not possible and leads to creating a simple event (regression from former issues).
To "create" a template it had to be 'forced' in database > table civicrm_event option `is_template` set to `1` for the chosen event but it's actually not useable. It shows up in template list, is editable but actually can't be chosen as the dropdown itself is not shown.