Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-02-03T05:04:08Zhttps://lab.civicrm.org/dev/core/-/issues/1554URL Encoded values for event pages work but cause style changes2023-02-03T05:04:08Zluke.stewartURL Encoded values for event pages work but cause style changesOverview
----------------------------------------
In Drupal 7
Both: (A) civicrm/event/info%3Freset%3D1%26id%3D7 and (B) civicrm/event/info?reset=1&id=7 appear to show the same page however for anon viewers the custom-civicrm.css is loa...Overview
----------------------------------------
In Drupal 7
Both: (A) civicrm/event/info%3Freset%3D1%26id%3D7 and (B) civicrm/event/info?reset=1&id=7 appear to show the same page however for anon viewers the custom-civicrm.css is loaded on (A) but not (B) and for logged in users if a different civicrm admin theme is set this is used to render the page instead for (A).
The version (A) is what is provided by default when using drupal views to display a link to events.
Reproduction steps
----------------------------------------
1. Change the civicrm admin theme to be different to the default theme.
2. Add a civicrm custom stylesheet via /civicrm/admin/setting/url?reset=1 or install the shoreditch extension.
3. Create an event
4. visit the event info page via the URL encoded link and compare to the non url encoded link.
Current behaviour
----------------------------------------
![EventPage](/uploads/993d08057dd7662865b79c096dcb4e10/EventPage.png)
When viewed logged in with permission to view civicrm admin theme (A) displays using the admin theme (B) using the default theme.
When viewed as anon - or logged in civicrm-custom.css is loaded on (A) and not (B)
Expected behaviour
----------------------------------------
Both pages should be identical.
Environment information
----------------------------------------
* __CiviCRM:__ 5.21.1
* __CMS:__ Drupal 7.x
* __Web Server:__ Nginx
Comments
----------------------------------------
Of relevance:
https://lab.civicrm.org/dev/core/issues/378
https://github.com/civicrm/civicrm-core/pull/14876
https://chat.civicrm.org/civicrm/pl/iqg97j674fbn5d5jsf1n8qjnbyhttps://lab.civicrm.org/dev/core/-/issues/1555Undefined offset and uninitialized string offset notices on upgrade to 5.212020-03-08T14:54:45ZjamieUndefined offset and uninitialized string offset notices on upgrade to 5.21I get tons of these:
```
Undefined offset: 0 SmartGroups.php:290
Uninitialized string offset: 0 SmartGroups.php:290
```I get tons of these:
```
Undefined offset: 0 SmartGroups.php:290
Uninitialized string offset: 0 SmartGroups.php:290
```5.22.0jamiejamiehttps://lab.civicrm.org/dev/core/-/issues/1556fatal error in "make pledge payment" if previous payment had soft credit AND ...2023-02-03T05:04:07ZAllenShawfatal error in "make pledge payment" if previous payment had soft credit AND contribution page has no "honoree" profile**Reproduced** on https://dmaster.demo.civicrm.org/ ("Powered by CiviCRM 5.23.alpha1", also on versions as early as 5.19.2) with these steps:
1. Log in as 'demo' user.
1. Check configuration the existing "help support CiviCRM" contrib...**Reproduced** on https://dmaster.demo.civicrm.org/ ("Powered by CiviCRM 5.23.alpha1", also on versions as early as 5.19.2) with these steps:
1. Log in as 'demo' user.
1. Check configuration the existing "help support CiviCRM" contribution page, and ensure it's configured to allow pledges, and that the Honoree Section is not enabled.
1. Visit the live contribution page and submit a pledge for multiple installments
1. Visit the contact record for the 'demo' user and observe that the pledge was correctly created, with one completed payment in the correct amount.
1. Edit this completed payment and make no other change except to assign a soft credit (I did it for the full amount, but probably this bug repro will happen for any partial amount) to some other contact. Save that edit.
1. Extra credit: record as many payments on this pledge as you like, some with soft credits and some without; but ensure that the most recent payment has a soft credit.
1. Visit the user dashboard at [url]/civicrm/user; there, find the pledge under "My Pledges", and click the "Make a payment" link for that pledge.
1. Observe the fatal error: `Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
One of parameters (value: ) is not of the type Positive`
**Analysis:**
At around this line https://lab.civicrm.org/dev/core/blob/master/CRM/Contribute/Form/Contribution/Main.php#L163, the code assumes that if there are soft credits, then there must be an "honoree" profile on the contribution page. Oddly, it actually makes that decision based only on one completed contribution, which by chance is usually the one with the greatest contribution id, thus normally the most recent one.
**Possible solution:**
It's probably enough to test whether `$this->_honoreeProfileId` is set (maybe around https://lab.civicrm.org/dev/core/blob/master/CRM/Contribute/Form/Contribution/Main.php#L171) before trying to use it in this way. But I do wonder if we should also try and clean up that odd foreach logic in lines [163](https://lab.civicrm.org/dev/core/blob/master/CRM/Contribute/Form/Contribution/Main.php#L163) through [166](https://lab.civicrm.org/dev/core/blob/master/CRM/Contribute/Form/Contribution/Main.php#L166): the `foreach()` is checking all completed contributions, but the `if()` is only acting on the last one checked.https://lab.civicrm.org/dev/core/-/issues/1557Quick Search doesn't respect "Search Primary Details Only" flag2023-02-19T05:03:21ZJonGoldQuick Search doesn't respect "Search Primary Details Only" flagQuick Search doesn't respect the "Search Primary Details Only" flag. To replicate:
* Create a contact with two addresses.
* Attempt to use Quick Search to find them by the non-primary street address.
I know "Search Primary Details Onl...Quick Search doesn't respect the "Search Primary Details Only" flag. To replicate:
* Create a contact with two addresses.
* Attempt to use Quick Search to find them by the non-primary street address.
I know "Search Primary Details Only" is a controversial feature, but I think in this particular case, we avoid the concerns that accompany this feature. See PR for details.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/1558CQ: Eliminate 'contribution_invoice_settings' 'Setting' in favour of followin...2023-02-07T05:04:30ZeileenCQ: Eliminate 'contribution_invoice_settings' 'Setting' in favour of following our standardWhen invoicing code was added the setting standard of one setting per key was ignored & several settings (some only relevant when invoicing is enabled), were jumbled into one setting. This is not our standard & there is no intent to chan...When invoicing code was added the setting standard of one setting per key was ignored & several settings (some only relevant when invoicing is enabled), were jumbled into one setting. This is not our standard & there is no intent to change our standard so we need to migrate them into 'real' settings to clean this up. We did 'defered_revenue_enabled' a while back &
I just finished it off via https://github.com/civicrm/civicrm-core/pull/16395
I currently have a PR open to migrate out https://github.com/civicrm/civicrm-core/pull/16397 - this includes code to support attempts to get this setting via contribution_invoice_settings for a few releases (in case any extensions are accessing the settings).
I think I need to enhance the spec to handle the show hide thinghttps://lab.civicrm.org/dev/core/-/issues/1559Use markdown in php docblocks2023-02-05T05:03:36ZcolemanwUse markdown in php docblocks**tl;dr:** I propose we standardize the format of our docblocks to use markdown.
To-date, docblocks in CiviCRM haven't been very visible (or very much of anything). The APIv4 Explorer is starting to change that. For example, this docblo...**tl;dr:** I propose we standardize the format of our docblocks to use markdown.
To-date, docblocks in CiviCRM haven't been very visible (or very much of anything). The APIv4 Explorer is starting to change that. For example, this docblock:
```php
/**
* ACL (Access Control List).
*
* An ACL record consists of:
*
* - an Operation (e.g. 'View' or 'Edit')
* - a set of Data that the operation can be performed on (e.g. a group of contacts)
* - and a Role that has permission to do this operation.
*
* Creating a new ACL requires at minimum a entity table, entity ID and object_table.
*
* @see https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control
* @package Civi\Api4
*/
class ACL extends Generic\DAOEntity {
```
Displays in the explorer like this:
![image](/uploads/2a04dad923b43fc4f5e739bef6feb064/image.png)
I've been doing my best to make them render nicely, for example it turns ticks into bullets, `@see` annotations into links, and double-line-breaks into paragraphs... but that's about it so far. It would be really nice if we could fully support markdown for formatting, lists, tables, code blocks, etc. etc.
Apparently using markdown in PHP docblocks is gaining popularity. [PHPStorm now supports it, as does PHPDocumentor](https://blog.jetbrains.com/phpstorm/2014/04/phpstorm-8-markdown-support-in-phpdoc-blocks/).
I suggest we jump on that bandwagon. If there's no objections I'll add a markdown parser to the APIv4 Explorer and start using markdown syntax in more docblocks.https://lab.civicrm.org/dev/core/-/issues/1560Search Builder fields are truncated to 251 characters upon edit2023-02-06T05:03:27ZBobSSearch Builder fields are truncated to 251 characters upon editOverview
----------------------------------------
If a Search Builder field exceeds 251 characters and the search is saved as a Smart Group, the search is stored in table civicrm_saved_search as expected, and the Smart Group is populated...Overview
----------------------------------------
If a Search Builder field exceeds 251 characters and the search is saved as a Smart Group, the search is stored in table civicrm_saved_search as expected, and the Smart Group is populated as expected.
However, if one attempts to edit the group's search parameters, then the Search Builder form populates with the search terms truncated at a length of 251 characters, with "..." appended. Subsequent execution of the search is be performed with the truncated search term, and saving the search as a new/updated group results in the truncated value being saved.
Example use-case
----------------------------------------
**Create a smart group with a long search term**
1. Click on **Search-> Search Builder**.
1. Create a search term with an expression exceeding 251 characters, e.g.: **Contacts | Email | Primary | Regex | <LONG_EXPRESSION>**
1. Click **Search**.
1. Click **All XX records**.
1. Select from the Actions drop-down **Group - create smart group**.
1. Name the group and save.
**Attempt to edit the search criteria**
1. Click **Contacts | Manage Groups**
1. For the newly created group, click **Settings | Edit smart group criteria**
Current behaviour
----------------------------------------
<LONG_EXPRESSION> is truncated to 251 characters, plus "...".
Proposed behaviour
----------------------------------------
<LONG_EXPRESSION> would not be altered. Form fields would fully support copy/pasted values of much greater length (e.g. 64K or more).
Comments
----------------------------------------
I found this limitation while searching for a pipe-delimited list of email domains, something that does not seem like an unreasonable thing to do.
Issue was confirmed on [demo site](https://demo.circle-interactive.co.uk/civicrm/)https://lab.civicrm.org/dev/core/-/issues/1561"Primary" email option in Search Builder behaves as "Any"2023-06-04T05:03:24ZBobS"Primary" email option in Search Builder behaves as "Any"Overview
----------------------------------------
If Primary is selected as the email location in Search Builder, then contacts with a matching email address which is not primary are returned in the search results.
Reproduction steps
--...Overview
----------------------------------------
If Primary is selected as the email location in Search Builder, then contacts with a matching email address which is not primary are returned in the search results.
Reproduction steps
----------------------------------------
1. Click on **Contacts -> Search Builder**.
1. Create a search term **Contact | Email | Primary | = | <email_address>**.
1. Click **Search**.
Current behaviour
----------------------------------------
Contacts having <email_address> as a non-primary email are returned. Primary seems to function like "Any". Same problem with other operators, e.g. Like, RegEx.
Expected behaviour
----------------------------------------
Only contacts having a matching email address which is primary should be returned.
Environment information
----------------------------------------
* __CiviCRM:__ _5.21.0_
* __PHP:__ _7.2_
* __CMS:__ _Drupal 7.69_
* __Database:__ _MariaDB 10.0_
* __Web Server:__ _Apache 2.4.41_
Comments
----------------------------------------
The current behavior is useful, but should be called "Any" rather than "Primary", and a working "Primary" option should by provided as well.
Confirmed on [demo site](https://demo.circle-interactive.co.uk/civicrm)https://lab.civicrm.org/dev/core/-/issues/1562`E2E_Cache_*Test` raises dependency-hell in D82020-04-15T10:08:35Ztotten`E2E_Cache_*Test` raises dependency-hell in D8Overview
----------------------------------------
The end-to-end tests for the cache interfaces rely on the baseline tests from https://github.com/php-cache/integration-tests. This creates dependency-hell when trying to run tests on D8.
...Overview
----------------------------------------
The end-to-end tests for the cache interfaces rely on the baseline tests from https://github.com/php-cache/integration-tests. This creates dependency-hell when trying to run tests on D8.
Reproduction steps
----------------------------------------
```
$ composer init
...
$ composer require civicrm/civicrm-core:dev-master pear/validate_finance_creditcard:dev-master
...
$ composer install --dev
...
Nothing to install or update
$ find -name SimpleCacheTest.php
...(no files)...
```
Current behaviour
----------------------------------------
There is no way to prompt composer to give you the dependencies needed for running Civi's end-to-end tests.
You can work-around this in the top-level project by running:
```
composer require "cache/integration-tests:dev-master#b97328797ab199f0ac933e39842a86ab732f21f9"
```
But that's not sustainable...
Expected behaviour
----------------------------------------
You should be able to get the dependencies for E2E tests without knowing the exact SHA revision of a transitive dependency.
Comments
----------------------------------------
* Previously, we imported this code into `civicrm-packages.git` and made some alterations to allow it run well.
* IIRC, there was concern that it used the older PHPUnit base-class (`\PHPUnit_Framework_TestCase`) instead of the newer PHP base-class (`\PHPUnit\Framework\TestCase`).
* Later, we normalized the dependency - removing it from `civicrm-packages.git` and instead pulling the dependency via `composer` and `require-dev`.
In a more just world, that would be a good change.
Here are the problems:
* For running E2E tests on D8, you need to create a top-level project which is *not* CiviCRM. Consequently, it doesn't pull in the `require-dev` items for `civicrm-core`.
* Even if there were a composer command to "go get the transitive dev dependencies for civicrm-core (but preferrably not all dev deps for the entire pkg tree)", the upstream `cache/integration-tests` project has not made a stable release that uses `\PHPUnit\Framework\TestCase`. All the published versions on packagist use `\PHPUnit_Framework_TestCase`. And in the time since we started using `dev-master`, they've added an ill-declared dependency on `symfony/phpunit-bridge`.
I don't see a good option here. Ideas:
* Put `SimpleCacheTest.php` back in `civicrm-packages.git`
* Fork `cache/integration-tests`. Give it a new name and a tagged version number. In `civicrm-core.git:composer.json`, list this new package as a standard `require` rather than `require-dev`.
* Update `composer`'s design (via patch or plugin) to allow pulling in supplemental dev deps for this situation. (Maybe something along the lines of merge-plugin?)https://lab.civicrm.org/dev/core/-/issues/1563API explorer fatal joining to contribution from contact2020-08-31T02:04:59ZeileenAPI explorer fatal joining to contribution from contact
```
$contacts = civicrm_api4('Contact', 'get', [
'where' => [
['contributions.id', '=', 5],
],
'limit' => 25,
]);
```
The above generated from the api explorer ![Screen_Shot_2020-01-30_at_6.12.52_PM](/uploads/dcb4d2bfa22fdc6...
```
$contacts = civicrm_api4('Contact', 'get', [
'where' => [
['contributions.id', '=', 5],
],
'limit' => 25,
]);
```
The above generated from the api explorer ![Screen_Shot_2020-01-30_at_6.12.52_PM](/uploads/dcb4d2bfa22fdc6d9e658d86600c03df/Screen_Shot_2020-01-30_at_6.12.52_PM.png)gives a fatal error
Annoyingly the debug doesn't work when there is a mysql syntax error but the bug is in the join
SELECT a.id as `id`, a.display_name as `display_name`, a.preferred_language as `preferred_language` FROM civicrm_contact a LEFT JOIN `civicrm_email` `emails` ON a.id = emails.contact_id LEFT JOIN `civicrm_contribution` `contributions` ON a.id = contributions.contribution_contact_id WHERE (`contributions`.`id` = "6940") AND (`emails`.`is_primary` = "") AND (`a`.`is_deleted` = "0") LIMIT 25 OFFSET 0 [nativecode=1054 ** Unknown column 'contributions.contribution_contact_id' in 'on clause']
@colemanw FYIhttps://lab.civicrm.org/dev/core/-/issues/1564Exception Malformed temp table category on New A/B Test2020-02-04T22:47:09ZscardiniusException Malformed temp table category on New A/B TestOverview
----------------------------------------
When I create new A/B Test I receive error in session status *Exception Malformed temp table*
Reproduction steps
----------------------------------------
1. Create any new A/B Test
1. on...Overview
----------------------------------------
When I create new A/B Test I receive error in session status *Exception Malformed temp table*
Reproduction steps
----------------------------------------
1. Create any new A/B Test
1. on final step click on **Submit Mailing**
1. Error *Exception Malformed temp table* is displayed
Current behaviour
----------------------------------------
There is a problem with length of $category, which for this case is a variable
```php
// CRM/Mailing/BAO/Recipients.php
->setCategory('srcmailing' . $sourceMailingId)
```
For mailing_id greater than 99 (sic!) the generated category is invalid due to this check (`CATEGORY_LENGTH` is equal only 12):
```php
// CRM/Utils/SQL/TempTable.php
public function setCategory($category) {
if ($category && !preg_match(self::CATEGORY_REGEXP, $category) || strlen($category) > self::CATEGORY_LENGTH) {
CRM_Core_Error::backtrace();
throw new \RuntimeException("Malformed temp table category");
}
$this->category = $category;
return $this;
}
```
Expected behaviour
----------------------------------------
We should create category for max of INT(10) UNSIGNED, so it should be `srcmailing4294967295`char(20) or shorter prefix. Probably in both situation we need to increase `self::CATEGORY_LENGTH`
Environment information
----------------------------------------
* __CiviCRM:__ 5.21.15.22.0https://lab.civicrm.org/dev/core/-/issues/1565Failing to copy file when creating new attachment with APIv32020-02-10T03:07:09ZalbionbrownFailing to copy file when creating new attachment with APIv3In this block of code in civicrm/api/v3/Attachment.php:
```
$path = $config->customFileUploadDir . DIRECTORY_SEPARATOR . $fileDao->uri;
if (is_string($content)) {
file_put_contents($path, $content);
}
elseif (is_string($moveF...In this block of code in civicrm/api/v3/Attachment.php:
```
$path = $config->customFileUploadDir . DIRECTORY_SEPARATOR . $fileDao->uri;
if (is_string($content)) {
file_put_contents($path, $content);
}
elseif (is_string($moveFile)) {
// CRM-17432 Do not use rename() since it will break file permissions.
// Also avoid move_uplaoded_file() because the API can use options.move-file.
copy($moveFile, $path);
unlink($moveFile);
}
```
Is there a reason why we can't check if the copy failed and throw an API_Exception if it did?
The reason being, is that I've had some issues with the new Catalina MacOS update and the NFS mounting option lately. I couldn't figure out why my file upload wasn't working. Ultimately it came down to directory permissions as a result of the Catalina update.
Is it possible we could change this to:
```
$path = $config->customFileUploadDir . DIRECTORY_SEPARATOR . $fileDao->uri;
if (is_string($content)) {
file_put_contents($path, $content);
}
elseif (is_string($moveFile)) {
// CRM-17432 Do not use rename() since it will break file permissions.
// Also avoid move_uploaded_file() because the API can use options.move-file.
if (!copy($moveFile, $path)) {
throw new API_Exception("Cannot copy uploaded file ".$moveFile." to ".$path);
}
unlink($moveFile);
}
```
So we know when the move has failed?5.24.0https://lab.civicrm.org/dev/core/-/issues/1566CustomValue.GetTree API Does Not Return Display Value for Money Select/Radio ...2023-03-26T05:03:14Ztunbola@compucorp.co.ukCustomValue.GetTree API Does Not Return Display Value for Money Select/Radio Custom fieldOverview
----------------------------------------
The CustomValue.gettree API returns custom fields and its values for an entity. When the custom field is of data type Money and the field type is Select/Radio. The CustomValue.gettree doe...Overview
----------------------------------------
The CustomValue.gettree API returns custom fields and its values for an entity. When the custom field is of data type Money and the field type is Select/Radio. The CustomValue.gettree does not return any value for the display field for the custom field even though there is data in the field.
Reproduction steps
----------------------------------------
Take for example a Case that has a custom group that has a Money select field with options
Field Label: Two Dollars, Field Value : 2.
If the select option of Two Dollars is selected when creating the case and the API is invoked after creation:
```php
$result = civicrm_api3('CustomValue', 'gettree', [
'entity_id' => 29,
'entity_type' => "Case",
]);
//Result
{
"is_error": 0,
"version": 3,
"count": 2,
"values": {
"Apha_Num": {
"id": "11",
"name": "Apha_Num",
"table_name": "civicrm_value_apha_num_11",
"title": "Apha Num",
"extends": "Case",
"is_public": "1",
"fields": {
"Money_Select": {
"value": {
"id": "9",
"data": "2.00",
"display": "" // THE DISPLAY FIELD IS EMPTY
},
"id": "40",
"name": "Money_Select",
"label": "Money Select",
"column_name": "money_select_40",
"data_type": "Money",
"html_type": "Select",
"option_group_id": "119",
"in_selector": "0"
}
}
}
}
}
```
Current behaviour
----------------------------------------
I did a bit of investigation about this. For Money fields that are select or radio, the values are stored in a DECIMAL column type in the database. These value stored in this field is formatted as decimal. So for the example given above. The value of 2.00 was stored in the column for the Case.
![_MySQL_5.7.28-0ubuntu0.16.04.2-log__case-award.localcivicrmcivicrm_value_apha_num_11_2020-01-30_12-06-27](/uploads/6010bc9f7a8ae207b01def6ba2340e2e/_MySQL_5.7.28-0ubuntu0.16.04.2-log__case-award.localcivicrmcivicrm_value_apha_num_11_2020-01-30_12-06-27.png)
While the option group created for the Select option values has a value of 2.
![Apha_Num_-_Custom_Fields__CiviAwards_2020-01-30_12-13-57](/uploads/a55347fc5ebf40a75718468c3170b7d0/Apha_Num_-_Custom_Fields__CiviAwards_2020-01-30_12-13-57.png)
When the display for the Money field select type is being fetched here: https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/BAO/CustomField.php#L1120. The value set is an empty string because the options contain something similar to this
```php
array (
2 => 'Two Dollars',
)
```
While the `$value = 2.00`, So the value can not be found in the array and `''` is returned.
Expected behaviour
----------------------------------------
Ideally, I think the label for the option value (in this case Two Dollars) should be returned when the CustomValue.gettree API. Although the Money field is a bit different and not sure if it is the value (2.00) that should be returned in this case as the display field.https://lab.civicrm.org/dev/core/-/issues/1567Make sure mailing titles are always rendered properly2023-02-09T05:03:28ZyashodhaMake sure mailing titles are always rendered properlyMake sure mailing titles are always rendered properly so that 'TITLE' is replaced by mail subject when viewing the mailing public link.Make sure mailing titles are always rendered properly so that 'TITLE' is replaced by mail subject when viewing the mailing public link.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/1568scheduled reminder: select participant role permissions require admin & don't...2020-02-17T15:15:52ZDLaurysscheduled reminder: select participant role permissions require admin & don't match rest of scheduled reminder permissionsIn scheduled reminders, with all relevant event-level permissions, a person can set up almost every aspect of a scheduled reminder. However, if they choose 'limit to' or 'also include' and then opt for 'participant role', the drop-down b...In scheduled reminders, with all relevant event-level permissions, a person can set up almost every aspect of a scheduled reminder. However, if they choose 'limit to' or 'also include' and then opt for 'participant role', the drop-down box for which participant role does not appear.
This seems to be a bug, as viewing the drop-down box of roles and selecting a participant role to 'limit to' or 'also include' is not a higher level action than any of the other aspects of setting up a scheduled reminder.
I'm not a developer, just a user hoping that we don't have to keep giving staff administrative permissions just so they can set up this one minor aspect of a scheduled reminder. Thanks!https://lab.civicrm.org/dev/core/-/issues/1569Need to Increase Data Size for `form_values` column on civicrm_report_instanc...2020-03-19T21:27:11Ztunbola@compucorp.co.ukNeed to Increase Data Size for `form_values` column on civicrm_report_instance tableOverview
----------------------------------------
Currently form_values column of the civicrm_report_instance table is of data type TEXT. This is sufficient for saving most report instances. However we have a couple of custom reports bas...Overview
----------------------------------------
Currently form_values column of the civicrm_report_instance table is of data type TEXT. This is sufficient for saving most report instances. However we have a couple of custom reports based on the Core Civi report functionality with some dynamic filters that may vary based on some conditions in the system. As such some of the reports have a lot of custom form filters fields and when these reports are saved in the database, the serialized data in the `form_values` column of the civicrm_report_instance table gets truncated and this renders the saved report unusable.
Proposed behaviour
----------------------------------------
The Proposal is to change the data type of the form_values column of the civicrm_report_instance table to MEDIUMTEXT which can hold much more data (~16MB) as compared with TEXT (64KB). With this change, the data will not be truncated and any custom report form with much form fields will not having any issue getting saved at all.5.25.0https://lab.civicrm.org/dev/core/-/issues/1570when formatting params for deduping, we do a case sensitive check for Primary2023-02-24T05:03:59Zjamiewhen formatting params for deduping, we do a case sensitive check for PrimaryI've run into a problem - when I call the `Profile.getfields` with `api_action=submit` and a profile_id, I get a nice list of fields in that profile, notably - the primary email field name is lowercased to `email-primary`.
When I fill o...I've run into a problem - when I call the `Profile.getfields` with `api_action=submit` and a profile_id, I get a nice list of fields in that profile, notably - the primary email field name is lowercased to `email-primary`.
When I fill out those fields and submit them to `CRM_Contact_BAO_Contact::getDuplicateContacts` I fail to find the duplicates that should be found.
It turns out that's because `getDuplicateContacts` calls `Dedupe_Finder::formatParams` which does some nice magic on primary style fields by finding them with:
`preg_match('/(.*)-(primary-[\d+])$|(.*)-(\d+|Primary)$/', strtolower($key), $matches)`
The capital P is what causes the problem.
I think it's safe to convert that to a lowercase check.jamiejamiehttps://lab.civicrm.org/dev/core/-/issues/1572Unit test environment no longer working on windows after latest CodeGen updates2020-03-11T20:44:30ZDaveDUnit test environment no longer working on windows after latest CodeGen updatesThere were some codegen updates to create the sql on the fly instead of loading from files. On windows though the backwards path separators cause the parsing of the xml to not be able to find the files. The call to DomDocument->xinclude(...There were some codegen updates to create the sql on the fly instead of loading from files. On windows though the backwards path separators cause the parsing of the xml to not be able to find the files. The call to DomDocument->xinclude() gets confused.
This quick hack makes it work, but doesn't seem like a proper fix. In general php works well on windows when you always use forward slash except when calling out to system calls, so maybe the path could be normalized somewhere higher up the chain. I haven't traced it back where it's getting it from in the first place.
Running the old `php GenCode.php` always used to work, so it's something about the environment difference when running in tests where the path is getting mangled.
```
diff --git a/CRM/Core/CodeGen/Util/Xml.php b/CRM/Core/CodeGen/Util/Xml.php
index 8d64be7006..91710ffe17 100644
--- a/CRM/Core/CodeGen/Util/Xml.php
+++ b/CRM/Core/CodeGen/Util/Xml.php
@@ -15,6 +15,7 @@ class CRM_Core_CodeGen_Util_Xml {
$dom = new DomDocument();
$xmlString = file_get_contents($file);
$dom->loadXML($xmlString);
+ $file = str_replace("\\", '/', $file);
$dom->documentURI = $file;
$dom->xinclude();
$xml = simplexml_import_dom($dom);
```5.24.0https://lab.civicrm.org/dev/core/-/issues/1573Add columns to Contribution Detail report: Employer, Location Type, Preferred...2020-02-05T03:07:10ZAllenShawAdd columns to Contribution Detail report: Employer, Location Type, Preferred Communication MethodFor some time I've been running a PHP file override to get some extra columns into the *Contribution Detail* report. Adding these to the core report is fairly easy, and these columns seem like they'd be useful to others (who could also o...For some time I've been running a PHP file override to get some extra columns into the *Contribution Detail* report. Adding these to the core report is fairly easy, and these columns seem like they'd be useful to others (who could also of course just move right along as usual without using them, if they like).
Because these columns simply amount to more information about entities already included in the report, this change would not make any changes to the underlying logic (or lack thereof) of the report itself.
PR forthcoming.5.23.0AllenShawAllenShawhttps://lab.civicrm.org/dev/core/-/issues/1574Allow Contributions to go from "Completed" to "Partially Paid" when a refund ...2020-02-05T22:09:38ZalicefruminAllow Contributions to go from "Completed" to "Partially Paid" when a refund is issuedCurrently when updating a Contribution thru the API using `Contribution.create` which status a contribution can be updated to is validated based on the current status of the contribution.
At this time a "Completed" contribution can be u...Currently when updating a Contribution thru the API using `Contribution.create` which status a contribution can be updated to is validated based on the current status of the contribution.
At this time a "Completed" contribution can be updated to 'Cancelled', 'Refunded' or 'Chargeback'.
Currently we are working on Refund/Void functionality for Payments. We would like to make the case for allowing Contributions to go from "Completed" to "Partially Paid" when one of multiple payments is refunded or voided either by:
+ Adding "Partially paid" to the list of allowed statuses Completed contributions can be updated to in [CRM_Contribute_BAO_Contribution::checkStatusValidation](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/BAO/Contribution.php#L3846) OR
+ by adding a flag to override status validation to `Contribution.create`
Relevant Code:
+ [where CRM_Contribute_BAO_Contribution::checkStatusValidation is called in Contribution.create](https://github.com/civicrm/civicrm-core/blob/master/api/v3/Contribution.php#L63).
+ [CRM_Contribute_BAO_Contribution::checkStatusValidation](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/BAO/Contribution.php#L3846).