CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2022-04-22T15:53:23Zhttps://lab.civicrm.org/dev/core/-/issues/3273Performance issue when exporting to CSV from reports with custom fields2022-04-22T15:53:23ZJonGoldPerformance issue when exporting to CSV from reports with custom fields### User Story
As an end user, I want to run a report of my organization's alumni. This is about 16,000 contacts, and my report contains 6 custom fields. However, this report takes about 8.5 minutes to generate, far longer than the 300...### User Story
As an end user, I want to run a report of my organization's alumni. This is about 16,000 contacts, and my report contains 6 custom fields. However, this report takes about 8.5 minutes to generate, far longer than the 300 second timeout on processes.
### Profiling
I stepped through the code until I saw that `CRM_Core_BAO_CustomField::displayValue()` was the culprit, which is called ~96,000 times (# of rows * custom fields). I used a profiler and it reported that 97% of the time was spent in the `CRM_Core_BAO_CustomField::getOptions()` method.
### Improvements
* `CRM_Core_BAO_CustomField::getOptions()` is called on every custom field - even those that don't use it (e.g. text or money fields). By moving it so it's only called when needed, I immediately got a speedup.
* `getOptions()` should only be called 6 times in my example, not 96,000 times. I'm going to put a cache into `getOptions()`.5.21.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3271Regression: Can't use operators to filter contact subtypes other than "Is One...2022-04-22T15:53:19ZJonGoldRegression: Can't use operators to filter contact subtypes other than "Is One Of"This is introduced by core#544, which introduces a hard-coded `LIKE` where the code should allow for different operators.
[A commit based on 5.14 is here](https://github.com/MegaphoneJon/civicrm-core/commit/625b0b06e64d02883614e31bb4ef7...This is introduced by core#544, which introduces a hard-coded `LIKE` where the code should allow for different operators.
[A commit based on 5.14 is here](https://github.com/MegaphoneJon/civicrm-core/commit/625b0b06e64d02883614e31bb4ef79825a1b8ad2#diff-d355cdb00cea3915a3cf306c6c08f6a6L2131) and hopefully I (or someone) will have time to merge and add tests in the near future.5.16.0https://lab.civicrm.org/dev/core/-/issues/3270getAddressColumns doesn't fully support prefix2022-04-22T15:53:18ZJonGoldgetAddressColumns doesn't fully support prefixThere's one place where the table name is hard coded that should be `$tableAlias`. I wrote a fix + UT.
I also realized that the way odd/even street numbers are handled causes the address table to always get joined regardless of whether...There's one place where the table name is hard coded that should be `$tableAlias`. I wrote a fix + UT.
I also realized that the way odd/even street numbers are handled causes the address table to always get joined regardless of whether it's necessary, but that's out of scope for now.5.14.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3267Case Detail 'Active Role?' filter excludes cases without relationships2022-04-22T15:53:13Zaydunsaidan.saunders@squiffle.ukCase Detail 'Active Role?' filter excludes cases without relationshipsThe 'Active Role?' filter in the Case Detail report checks the status of relationships.
The current implementation of the filter as a simple boolean requires relationships to exist, and therefore excludes cases without relationships whe...The 'Active Role?' filter in the Case Detail report checks the status of relationships.
The current implementation of the filter as a simple boolean requires relationships to exist, and therefore excludes cases without relationships whether the setting is Yes or No.
Problem also reported here: https://civicrm.stackexchange.com/questions/28836/case-details-report-active-case-role-filter5.22.0aydunsaidan.saunders@squiffle.ukaydunsaidan.saunders@squiffle.ukhttps://lab.civicrm.org/dev/core/-/issues/3261Membership Detail Report fails when ACLs are enabled2022-04-22T15:53:02ZJonGoldMembership Detail Report fails when ACLs are enabledDuring a tidy-up on the Membership Detail Report, the `from()` method was modified to use `CRM_Report_Form::setFromBase()`, which concatenates `$this->aclFrom`. However, concatenating `$this->aclFrom` was never removed from the child cl...During a tidy-up on the Membership Detail Report, the `from()` method was modified to use `CRM_Report_Form::setFromBase()`, which concatenates `$this->aclFrom`. However, concatenating `$this->aclFrom` was never removed from the child class, so it's added to the SQL statement twice.5.3.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3260Icon in status message after saving a civireport is misleading2022-04-22T15:53:01ZDaveDIcon in status message after saving a civireport is misleadingIt's the 'alert' icon instead of success.
1. Go to any CiviReport.
1. From the Actions dropdown choose Save.
1. Icon indicates a warning but it's all good.
Also for "save a copy".It's the 'alert' icon instead of success.
1. Go to any CiviReport.
1. From the Actions dropdown choose Save.
1. Icon indicates a warning but it's all good.
Also for "save a copy".5.29.0https://lab.civicrm.org/dev/core/-/issues/3258CiviReports issue with boolean fields2022-04-22T15:52:59ZMWestergaardCiviReports issue with boolean fieldsI recently noticed that boolean fields (Deceased, Do Not Email, Do Not SMS, etc) are all displayed as "Yes" on contact and membership reports, regardless of their actual values. The data itself is correct and is fine elsewhere, such as i...I recently noticed that boolean fields (Deceased, Do Not Email, Do Not SMS, etc) are all displayed as "Yes" on contact and membership reports, regardless of their actual values. The data itself is correct and is fine elsewhere, such as in search results and contact displays. The issue seems to be only on report display. The report filters work correctly on those fields, only the display is wrong. I checked my production system (CiviHosting), my dev system (personal Linux box), and the public WordPress demo system at wpmaster.demo.civicrm.org and I see the same thing. I tried the Drupal demo system at CiviHosting and did not see this issue. Perhaps it's an issue under WordPress. I was advised on StackExchange to submit as an issue.
My system is CiviCRM 5.2.2, WordPress 4.9.6, PHP 7.1.16, MySQL 5.7.21.5.3.0https://lab.civicrm.org/dev/core/-/issues/3255Book keeping Report : Add Time field for Transaction Date and Receive Date field2022-04-22T15:52:54ZsunilBook keeping Report : Add Time field for Transaction Date and Receive Date fieldSame issue : https://lab.civicrm.org/dev/report/-/issues/7 ,with some solution : https://github.com/civicrm/civicrm-core/pull/13571
But not its not working ..., Reason Parent Class `CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME` Time ...Same issue : https://lab.civicrm.org/dev/report/-/issues/7 ,with some solution : https://github.com/civicrm/civicrm-core/pull/13571
But not its not working ..., Reason Parent Class `CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME` Time handling changed.
Add Time Time and Add Sort on Contribution Receive Date and Transaction Date.
![Screenshot_2020-08-27_at_10.31.17_PM](/uploads/5b3ab509542d99720f8d40cd67796187/Screenshot_2020-08-27_at_10.31.17_PM.png)5.30.0https://lab.civicrm.org/dev/core/-/issues/3252View Payment owned by Different contact on Membership and Participant View.2022-04-22T15:52:43ZsunilView Payment owned by Different contact on Membership and Participant View.Overview
----------------------------------------
Using Webform, we can set that, contribution assigned to contact A and Membership record will be assigned to Contact B and C (based on number Contact selected in webform). IF we visit the...Overview
----------------------------------------
Using Webform, we can set that, contribution assigned to contact A and Membership record will be assigned to Contact B and C (based on number Contact selected in webform). IF we visit the Membership Record of B and C, we can not see the linked Payment, because its owned by another contact. and there is NO way to check who own the payment record.
Current behaviour
----------------------------------------
Currently it does not show linked payment record if payment is not present on same contact.
Expected behaviour
----------------------------------------
Linked Payment record should show, irrespective of who own the payment record as long as payment is belong the respective Membership.
In this case, webform create membership payment link between each contact membership and contribution id in `civicrm_membership_payment` table.
As long as we have linking between membership and contribution id, then it shows linked payment on Membership View. Same apply to participant.
----------------------------------------
https://github.com/civicrm/civicrm-core/pull/182815.31.0https://lab.civicrm.org/dev/core/-/issues/3251Searchkit: OptionValue search with a WHERE clause for option group returns 0 ...2022-04-22T15:52:42ZDaveDSearchkit: OptionValue search with a WHERE clause for option group returns 0 resultsThis worked the first time I tested https://github.com/civicrm/civicrm-core/pull/22081 two weeks ago, so has broken some time in between.
It looks like the query does this, mixing up `name` and `value`:
```
"where": [
[
"opti...This worked the first time I tested https://github.com/civicrm/civicrm-core/pull/22081 two weeks ago, so has broken some time in between.
It looks like the query does this, mixing up `name` and `value`:
```
"where": [
[
"option_group_id:name",
"=",
"2"
]
],
```5.44.0https://lab.civicrm.org/dev/core/-/issues/3250Add custom field groups to Membership Contribution Detail report2022-04-22T15:52:41ZJonGoldAdd custom field groups to Membership Contribution Detail reportEvery other report template that has `Contact` in the `$_customGroupExtends` array also includes individual contact types - "Individual" almost always, "Organization" and "Household" where relevant.
This PR adds the contact types to the...Every other report template that has `Contact` in the `$_customGroupExtends` array also includes individual contact types - "Individual" almost always, "Organization" and "Household" where relevant.
This PR adds the contact types to the `$_customGroupExtends` array.5.31.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3241SearchKit: Chicken-and-egg problem upgrading from 5.35.2 to 5.44.02022-04-22T15:52:28ZDaveDSearchKit: Chicken-and-egg problem upgrading from 5.35.2 to 5.44.0## Steps:
1. Install 5.35.2 and enable search kit.
1. Create a search with a display and save it.
1. Upgrade to 5.44.0. The civi upgrade runs ok.
* The 5.44 part isn't too relevant I think - 5.40+ seems like it would also happen.
1. ...## Steps:
1. Install 5.35.2 and enable search kit.
1. Create a search with a display and save it.
1. Upgrade to 5.44.0. The civi upgrade runs ok.
* The 5.44 part isn't too relevant I think - 5.40+ seems like it would also happen.
1. Visit the system status page and run the extension upgrades.
1. Error as below because upgrade_1001 triggers something that doesn't exist until upgrade_1005.
If you look at http://stats.civicrm.org/?tab=sites you'll notice there's a lot of sites on `5.35` because it was a security release, so will be a problem when they upgrade.
Some workarounds are upgrade in smaller steps, or manually create the column first:
`alter table civicrm_search_display add column acl_bypass tinyint DEFAULT 0 COMMENT 'Skip permission checks and ACLs when running this display.';`
## Details
```
[info] Applying update 1001 - normalize search display columns.
[error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`saved_search_id` AS `saved_search_id`, `a`.`type` AS `type`, `a`.`settings` AS `settings`, `a`.`acl_bypass` AS `acl_bypass`
FROM civicrm_search_display a
WHERE (`a`.`saved_search_id` = "1")
[nativecode=1054 ** Unknown column 'a.acl_bypass' in 'field list']
[type] => DB_Error
[user_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`saved_search_id` AS `saved_search_id`, `a`.`type` AS `type`, `a`.`settings` AS `settings`, `a`.`acl_bypass` AS `acl_bypass`
FROM civicrm_search_display a
WHERE (`a`.`saved_search_id` = "1")
[nativecode=1054 ** Unknown column 'a.acl_bypass' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`saved_search_id` AS `saved_search_id`, `a`.`type` AS `type`, `a`.`settings` AS `settings`, `a`.`acl_bypass` AS `acl_bypass`
FROM civicrm_search_display a
WHERE (`a`.`saved_search_id` = "1")
[nativecode=1054 ** Unknown column 'a.acl_bypass' in 'field list']"]
)
Dec 22 13:41:25 [debug] $backTrace = #0 ...\sites\all\modules\civicrm\CRM\Core\Error.php(942): CRM_Core_Error::backtrace("backTrace", TRUE)
1 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
2 ...\sites\all\modules\civicrm\vendor\pear\db\DB.php(997): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
3 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
4 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(223): PEAR::_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...", "DB_Error", TRUE)
5 ...\sites\all\modules\civicrm\vendor\pear\db\DB\common.php(1928): PEAR->__call("raiseError", (Array:7))
6 ...\sites\all\modules\civicrm\vendor\pear\db\DB\mysqli.php(936): DB_common->raiseError(-19, NULL, NULL, "SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...", "1054 ** Unknown column 'a.acl_bypass' in 'field list'")
7 ...\sites\all\modules\civicrm\vendor\pear\db\DB\mysqli.php(406): DB_mysqli->mysqliRaiseError()
8 ...\sites\all\modules\civicrm\vendor\pear\db\DB\common.php(1234): DB_mysqli->simpleQuery("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
9 ...\sites\all\modules\civicrm\packages\DB\DataObject.php(2696): DB_common->query("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
10 ...\sites\all\modules\civicrm\packages\DB\DataObject.php(1829): DB_DataObject->_query("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
11 ...\sites\all\modules\civicrm\CRM\Core\DAO.php(468): DB_DataObject->query("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
12 ...\sites\all\modules\civicrm\CRM\Core\DAO.php(1621): CRM_Core_DAO->query("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...", TRUE)
13 ...\sites\all\modules\civicrm\Civi\Api4\Query\Api4SelectQuery.php(167): CRM_Core_DAO::executeQuery("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
14 ...\sites\all\modules\civicrm\Civi\Api4\Generic\DAOGetAction.php(111): Civi\Api4\Query\Api4SelectQuery->run()
15 ...\sites\all\modules\civicrm\Civi\Api4\Generic\DAOGetAction.php(99): Civi\Api4\Generic\DAOGetAction->getObjects(Object(Civi\Api4\Generic\Result))
16 ...\sites\all\modules\civicrm\Civi\Api4\Provider\ActionObjectProvider.php(68): Civi\Api4\Generic\DAOGetAction->_run(Object(Civi\Api4\Generic\Result))
17 ...\sites\all\modules\civicrm\Civi\API\Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOGetAction))
18 ...\sites\all\modules\civicrm\Civi\Api4\Generic\AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
19 ...\sites\all\modules\civicrm\api\api.php(85): Civi\Api4\Generic\AbstractAction->execute()
20 ...\sites\all\modules\civicrm\Civi\Api4\Provider\ActionObjectProvider.php(103): civicrm_api4("SearchDisplay", "get", (Array:13), NULL)
21 ...\sites\all\modules\civicrm\Civi\Api4\Provider\ActionObjectProvider.php(84): Civi\Api4\Provider\ActionObjectProvider->runChain((Array:4), (Array:14))
22 ...\sites\all\modules\civicrm\Civi\Api4\Provider\ActionObjectProvider.php(69): Civi\Api4\Provider\ActionObjectProvider->handleChains(Object(Civi\Api4\Generic\DAOGetAction), Object(Civi\Api4\Generic\Result))
23 ...\sites\all\modules\civicrm\Civi\API\Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOGetAction))
24 ...\sites\all\modules\civicrm\Civi\Api4\Generic\AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
25 ...\sites\all\modules\civicrm\ext\search_kit\CRM\Search\Upgrader.php(58): Civi\Api4\Generic\AbstractAction->execute()
26 ...\sites\all\modules\civicrm\CRM\Extension\Upgrader\QueueTrait.php(49): CRM_Search_Upgrader->upgrade_1001()
27 ...\sites\all\modules\civicrm\CRM\Queue\Task.php(74): CRM_Extension_Upgrader_Base::_queueAdapter(Object(CRM_Queue_TaskContext), "org.civicrm.search_kit", "upgrade_1001")
28 ...\sites\all\modules\civicrm\CRM\Queue\Runner.php(201): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
29 ...\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(36): CRM_Queue_Runner->runNext(TRUE)
30 ...\sites\all\modules\civicrm\CRM\Queue\ErrorPolicy.php(89): CRM_Queue_Page_AJAX::{closure}()
31 ...\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(38): CRM_Queue_ErrorPolicy->call(Object(Closure))
32 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(279): CRM_Queue_Page_AJAX::runNext()
33 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(69): CRM_Core_Invoke::runItem((Array:13))
34 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
35 ...\sites\all\modules\civicrm\drupal\civicrm.module(471): CRM_Core_Invoke::invoke((Array:4))
36 ...\includes\menu.inc(527): civicrm_invoke("queue", "ajax", "runNext")
37 ...\index.php(21): menu_execute_active_handler()
38 {main}
```5.46.0https://lab.civicrm.org/dev/core/-/issues/3238Graphs on Contribution Summary report replace final row with grand total value2022-04-22T15:51:46ZAndrew WestGraphs on Contribution Summary report replace final row with grand total valueGraphs on the Contribution Summary report will include the grand total in some circumstances. To replicate on demo site:
1. Using demo data, launch the Contribution Summary report
2. Leave all settings as default
3. Refresh results a...Graphs on the Contribution Summary report will include the grand total in some circumstances. To replicate on demo site:
1. Using demo data, launch the Contribution Summary report
2. Leave all settings as default
3. Refresh results and note the grand total. Current data shows this:
![Annotation_2020-05-20_211434](/uploads/17d1b5942dde265bf0076d857396e46b/Annotation_2020-05-20_211434.png)
4. Switch to a bar chart in the top right and click 'View'. Hover over the final column and you'll see it's the grand total number:
![barchart](/uploads/3454788b2eecfc7ea4b8d44538b371d6/barchart.png)
I'm not terribly familiar with reports, but my initial fix was to add this to the top of CRM_Report_Form_Contribute_Summary::buildChart()
if ($this->_rollup) {
array_pop($rows);
}
If this makes sense I can make it a PR.5.28.0https://lab.civicrm.org/dev/core/-/issues/3233Address location type search errors when using a search profile2022-04-22T15:51:34ZMonish DebAddress location type search errors when using a search profileSteps to replicate the issue:
1. Create a profile for use as a search view. The fields I have used - address name, phone, city, state
2. Go to Advanced Search
3. Trigger a search using that profile, and select an address location type.
...Steps to replicate the issue:
1. Create a profile for use as a search view. The fields I have used - address name, phone, city, state
2. Go to Advanced Search
3. Trigger a search using that profile, and select an address location type.
_Environment details_
```
CiviCRM ver - 5.37.alpha1 / master
CMS - Drupal 7.78
```
Error:
```
DB Error: no such field
$Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id )
LEFT JOIN civicrm_location_type `1-location_type` ON ( ( `1-address`.location_type_id = `1-location_type`.id ) )
WHERE ( civicrm_address.location_type_id IN (5) ) AND ( 1 ) AND (contact_a.is_deleted = 0) [nativecode=1054 ** Unknown column '1-address.location_type_id' in 'on clause']
[type] => DB_Error
[user_info] => SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id )
LEFT JOIN civicrm_location_type `1-location_type` ON ( ( `1-address`.location_type_id = `1-location_type`.id ) )
WHERE ( civicrm_address.location_type_id IN (5) ) AND ( 1 ) AND (contact_a.is_deleted = 0) [nativecode=1054 ** Unknown column '1-address.location_type_id' in 'on clause']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id )
LEFT JOIN civicrm_location_type `1-location_type` ON ( ( `1-address`.location_type_id = `1-location_type`.id ) )
WHERE ( civicrm_address.location_type_id IN (5) ) AND ( 1 ) AND (contact_a.is_deleted = 0) [nativecode=1054 ** Unknown column '1-address.location_type_id' in 'on clause']"]
)
Mar 10 08:47:38 [debug] $backTrace = #0 /Users/monish/src/civicrm-core/CRM/Core/Error.php(942): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /Users/monish/src/civicrm-core/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /Users/monish/src/civicrm-core/vendor/pear/db/DB.php(998): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...")
#3 /Users/monish/src/civicrm-core/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...")
#4 /Users/monish/src/civicrm-core/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...", "DB_Error", TRUE)
#5 /Users/monish/src/civicrm-core/vendor/pear/db/DB/common.php(1928): PEAR->__call("raiseError", (Array:7))
#6 /Users/monish/src/civicrm-core/vendor/pear/db/DB/mysqli.php(936): DB_common->raiseError(-19, NULL, NULL, "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...", "1054 ** Unknown column '1-address.location_type_id' in 'on clause'")
#7 /Users/monish/src/civicrm-core/vendor/pear/db/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
#8 /Users/monish/src/civicrm-core/vendor/pear/db/DB/common.php(1234): DB_mysqli->simpleQuery("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...")
#9 /Users/monish/src/civicrm-core/packages/DB/DataObject.php(2696): DB_common->query("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...")
#10 /Users/monish/src/civicrm-core/packages/DB/DataObject.php(1829): DB_DataObject->_query("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...")
#11 /Users/monish/src/civicrm-core/CRM/Core/DAO.php(454): DB_DataObject->query("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...")
#12 /Users/monish/src/civicrm-core/CRM/Core/DAO.php(1565): CRM_Core_DAO->query("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...", TRUE)
#13 /Users/monish/src/civicrm-core/CRM/Contact/BAO/Query.php(4988): CRM_Core_DAO::executeQuery("SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name\n FROM civicr...")
#14 /Users/monish/src/civicrm-core/CRM/Contact/Selector.php(1194): CRM_Contact_BAO_Query->alphabetQuery()
#15 /Users/monish/src/civicrm-core/CRM/Utils/PagerAToZ.php(92): CRM_Contact_Selector->alphabetQuery()
#16 /Users/monish/src/civicrm-core/CRM/Utils/PagerAToZ.php(121): CRM_Utils_PagerAToZ::getDynamicCharacters(Object(CRM_Contact_Selector), FALSE)
#17 /Users/monish/src/civicrm-core/CRM/Utils/PagerAToZ.php(36): CRM_Utils_PagerAToZ::createLinks(Object(CRM_Contact_Selector), NULL, FALSE)
#18 /Users/monish/src/civicrm-core/CRM/Contact/Form/Search.php(853): CRM_Utils_PagerAToZ::getAToZBar(Object(CRM_Contact_Selector), NULL)
#19 /Users/monish/src/civicrm-core/CRM/Contact/Form/Search/Advanced.php(305): CRM_Contact_Form_Search->postProcess()
#20 /Users/monish/src/civicrm-core/CRM/Core/Form.php(526): CRM_Contact_Form_Search_Advanced->postProcess()
```
Screencast:
![before](/uploads/38cc7c6898e1b2e9e89b279a6c40ea6a/before.gif)5.37.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3231Correct Mailing Report unique Count2022-04-22T15:51:27ZsunilCorrect Mailing Report unique CountMailing -> Scheduled and Sent Mailings -> Report
Unique Opens -> Report
Total Opens -> Report
Both Report show same count.Mailing -> Scheduled and Sent Mailings -> Report
Unique Opens -> Report
Total Opens -> Report
Both Report show same count.5.10https://lab.civicrm.org/dev/core/-/issues/3230Membership join date checkbox on constituent detail report has lost its label2022-04-22T15:51:23ZDaveDMembership join date checkbox on constituent detail report has lost its labelOn the columns tab there's a checkbox that has no label. It's supposed to be membership join date. I'm not sure when it started but seems to go back to at least 5.20.
In the report the line that defines join_date has always set it to nu...On the columns tab there's a checkbox that has no label. It's supposed to be membership join date. I'm not sure when it started but seems to go back to at least 5.20.
In the report the line that defines join_date has always set it to null and that hasn't changed, so maybe what changed is that at some point something elsewhere changed to show blank checkboxes instead of skipping them when the field definition is null.5.25.0https://lab.civicrm.org/dev/core/-/issues/3228Can't filter by anything other than contribution status in Contribution Aggre...2022-04-22T15:51:19ZDaveDCan't filter by anything other than contribution status in Contribution Aggregate by Relationship CiviReportThere's a hack(?) in the report to allow filtering by status: https://github.com/civicrm/civicrm-core/blob/08e8cd56136aed47f3c9e598c2d9f318d6c81977/CRM/Report/Form/Contribute/History.php#L432-L434
and then the query uses it at https://g...There's a hack(?) in the report to allow filtering by status: https://github.com/civicrm/civicrm-core/blob/08e8cd56136aed47f3c9e598c2d9f318d6c81977/CRM/Report/Form/Contribute/History.php#L432-L434
and then the query uses it at https://github.com/civicrm/civicrm-core/blob/08e8cd56136aed47f3c9e598c2d9f318d6c81977/CRM/Report/Form/Contribute/History.php#L688-L690
(Yes this report is in a file called History.php - I assume for _historical_ reasons...)
But choosing to filter by anything else doesn't apply the filter.
1. Create two contributions for a person, with different financial types.
1. Run the report and check the Aggregate Amount column and filter by one financial type.
1. It still includes both contributions.
There's an argument that this is "correct" in the sense described at https://lab.civicrm.org/dev/core/-/issues/2707#note_62816, i.e. "Find contacts that match the criteria, THEN run the report on them", so that it's finding _CONTACTS_ that have a contribution with that financial type, and then running the report and aggregating their contributions. But this report isn't a generic advanced search, it's specifically related to contributions, so I'd argue the contribution filters should apply to the contributions being included.
I can see why this might be a little difficult in this report because it needs to build the rows separately to handle the relationships, so it doesn't just use the stock civireport framework to do the filtering. But maybe the "hack" could be made more generic.
The report also gives an error `User deprecated function: Formatting non-numeric values is no longer supported: ... Caller: CRM_Utils_Money::formatLocaleNumericRoundedByPrecision` but that's separate. (Edit: Haha it seems I've noticed this before https://lab.civicrm.org/dev/core/-/issues/2819)5.45.0https://lab.civicrm.org/dev/core/-/issues/3227getAddressColumns defined `street_name` twice.2022-04-22T15:51:17ZJonGoldgetAddressColumns defined `street_name` twice.As reported [on Stack Exchange](https://civicrm.stackexchange.com/questions/26457/columns-available-for-sorting-in-civireport-seem-arbitrary-random), you can't sort by `address_name`, even though it's defined to allow it. That's because...As reported [on Stack Exchange](https://civicrm.stackexchange.com/questions/26457/columns-available-for-sorting-in-civireport-seem-arbitrary-random), you can't sort by `address_name`, even though it's defined to allow it. That's because it's defined twice in the `$spec` array.5.7JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3225SearchKit/Form: exposing a Date custom field has invalid year range2022-04-22T15:51:14ZbgmSearchKit/Form: exposing a Date custom field has invalid year rangeTo reproduce on dmaster:
1) Create a new Custom Field (ex: Lucky Day), type 'Date', searchable, by range.
![image](/uploads/06c2a53ea2ca237bf3b1e2a6332dc5cd/image.png)
Optionally you can update a contact, so that at least one has a Lu...To reproduce on dmaster:
1) Create a new Custom Field (ex: Lucky Day), type 'Date', searchable, by range.
![image](/uploads/06c2a53ea2ca237bf3b1e2a6332dc5cd/image.png)
Optionally you can update a contact, so that at least one has a Lucky Day, but it is not a requirement to reproduce the bug. For extra luck, I used 2021-08-13.
2) Create a SearchKit that lists Contacts, and display the field
3) Create a Form for that Search, and expose the Lucky Day field as a filter. Give the form an URL to view the page.
![image](/uploads/5ee592a6a1b483797d01b8712eb68761/image.png)
Then go view the form, and notice how the date filter only lets you select dates in 2021:
![image](/uploads/b7ce2b3f40df756fb8347586a9c4d0b4/image.png)
If you go back to the custom field configuration, and set a number of years in the "Dates may be up to" prior/after, then the filter works correctly. However, having these fields empty usually means that there are no restrictions (or they default to -20/+10 years).5.46.0https://lab.civicrm.org/dev/core/-/issues/3224Search Kit doesn't display related contact custom fields2022-04-22T15:51:13ZJonGoldSearch Kit doesn't display related contact custom fieldsIf you have a Search Kit that includes a related contact, displaying the related contact's custom data will actually show the main contact's custom data.
See screenshots below. Teresa has a most important issue of "Education", Santina'...If you have a Search Kit that includes a related contact, displaying the related contact's custom data will actually show the main contact's custom data.
See screenshots below. Teresa has a most important issue of "Education", Santina's is "Social Justice". When I build a search and include both the `Constituent Information: Most Important Issue` and `Contact Related Contacts: Constituent Information: Most Important Issue` columns, they both have the same value.
![Selection_1184](/uploads/ba7c2f496b001f8bd86536d9419b0035/Selection_1184.png)
![Selection_1185](/uploads/d28c833e256a6dcc091d5f1629a124f2/Selection_1185.png)
![Selection_1186](/uploads/65af3fd4f21cb09b60274a700ee2f580/Selection_1186.png)5.42.0