Development issueshttps://lab.civicrm.org/groups/dev/-/issues2021-09-20T19:48:04Zhttps://lab.civicrm.org/dev/core/-/issues/2820Deduping produces bad results after a rule change2021-09-20T19:48:04Zaydunsaidan.saunders@squiffle.ukDeduping produces bad results after a rule changeOverview
----------------------------------------
When a dedupe rule is changed, the results appear to be cached.
Reproduction steps
----------------------------------------
1. Create a dedupe rule on 'Last Name' weight 5, 'First Name' ...Overview
----------------------------------------
When a dedupe rule is changed, the results appear to be cached.
Reproduction steps
----------------------------------------
1. Create a dedupe rule on 'Last Name' weight 5, 'First Name' weight 5, threshold 5.
1. Run a dedupe search with this rule - should show contacts with either first or last matching names
1. Edit the dedupe rule, change the threshold to 10.
1. Run a dedupe search with this rule
Current behaviour
----------------------------------------
Shows previous results - those with first or last matching names. Click the 'Threshold' box and note scores of 5 - below the specified threshold of 10.
Expected behaviour
----------------------------------------
Should only list contacts with matching first and last names where threshold score is 10.
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
If you're quick, there is a 'New first, last' rule on dmaster showing the problem.
Comments
----------------------------------------5.43.0https://lab.civicrm.org/dev/core/-/issues/2819Contribution Aggregate by Relationship civireport has deprecation notice abou...2023-12-28T05:03:22ZDaveDContribution Aggregate by Relationship civireport has deprecation notice about formatting non-numeric values`User deprecated function: Formatting non-numeric values is no longer supported: Díaz, Santina Caller: CRM_Utils_Money::formatLocaleNumericRoundedByPrecision in CRM_Core_Error::deprecatedWarning() (line 1060 of /srv/buildkit/build/dmaste...`User deprecated function: Formatting non-numeric values is no longer supported: Díaz, Santina Caller: CRM_Utils_Money::formatLocaleNumericRoundedByPrecision in CRM_Core_Error::deprecatedWarning() (line 1060 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Error.php).`
Repeated many times.
A proper solution maybe involves checking the field data type first but a quick fix is to wrap https://github.com/civicrm/civicrm-core/blob/28878097fa2908956cac2df1f63e7ce32bb85668/CRM/Report/Form/Contribute/History.php#L821 with `if is_numeric($value) {`:
L821: `$value = CRM_Utils_Money::formatLocaleNumericRoundedForDefaultCurrency($value);`
The reason that quickfix isn't enough is because this report will do something like format a postal code 90210 as "90,210.00" if you include that field in the columns, but that pre-dates the deprecation.https://lab.civicrm.org/dev/core/-/issues/2818Context gets lost when sending an email from manage case so it redirects some...2023-09-24T05:03:25ZDaveDContext gets lost when sending an email from manage case so it redirects somewhere else afterI think this is the same cause as https://lab.civicrm.org/dev/core/-/issues/2318 where something about `$this->_single` went missing. It should redirect you back to manage case.
1. Turn off popups at administer - customize - display pre...I think this is the same cause as https://lab.civicrm.org/dev/core/-/issues/2318 where something about `$this->_single` went missing. It should redirect you back to manage case.
1. Turn off popups at administer - customize - display prefs (or when opening the link in step 3 open in a new tab).
1. Create case
1. In the roles section use the email icon to send an email to e.g. the client
1. After sending, it goes somewhere else instead of manage case. Sometimes it will take you to the contact record which at least is related, sometimes it goes to /civicrm/dashboard, sometimes somewhere else.https://lab.civicrm.org/dev/core/-/issues/2817Deprecate `replaceCaseTokens` in core2021-09-15T23:14:33ZeileenDeprecate `replaceCaseTokens` in coreCurrently all case token handling in core is done using `replaceCaseTokens` which is accessed via 2 workflows
- send email
- send pdf
It is also used from outside of core & my intention is to leave that working
I have added tests for...Currently all case token handling in core is done using `replaceCaseTokens` which is accessed via 2 workflows
- send email
- send pdf
It is also used from outside of core & my intention is to leave that working
I have added tests for the current 'advertised' functionality already and adding a 'basic' Case Token Processor would provide parity for all advertised tokens except that `case.status_id` and `case.case_type_id` should be mapped to `case.case_type_id:label` and `case.status_id:label`
In addition `replaceCaseTokens` supports some 'unadvertised tokens` which might, or might not be used
The process I propose is as follows
- [x] add support to `replaceCaseTokens` for `case.case_type_id:label` and `case.case_type_id`
- [x] update the advertised tokens `selectValues:caseTokens` to advertise the 2 new-style tokens and not advertise the 'ambiguouse' ones
- [x] update the validate function on pdf & email traits to fail validation if one of the deprecated tokens is used
- [x] add Case_Tokens as a basic processor class extending entity tokens - this will add all standard fields from civicrm_case table (with tests) - but any decisions about non-standard fields will be out of scope for this ticket - https://github.com/civicrm/civicrm-core/pull/21383
- [x] Update pdf & email functions to render using the processor (already done for contact tokens so case will be an easy add) https://github.com/civicrm/civicrm-core/pull/21445 and https://github.com/civicrm/civicrm-core/pull/21447
- [-] ~~add logic so that if there are still `{case.x}` tokens in the text for the email & pdf traits, after they have called the general render the `replaceCaseTokens` function is still called - at this point I will add some log out put to indicated that but nothing in the UI - later the UI could be updated.~~ UPDATE - I did some more digging and the only 2 other fields that would have been replaced are `{case.clientId}` and `{case.contact_id}` but they would have been replace by an array so would no thave been usable
- [x] add deprecated to the replaceCaseTokens comment block but do not add additional 'noise' for now (added in https://github.com/civicrm/civicrm-core/pull/21447)
@DaveD5.43.0https://lab.civicrm.org/dev/core/-/issues/2815Can't cancel a non-CiviMail email2021-09-03T23:02:02ZJonGoldCan't cancel a non-CiviMail emailIs this a regression? Yes. Is it from March 2020? Also yes, so I don't think it gets the "regression" tag.
### Steps to Replicate
* From a contact record, click on someone's email address to start an email.
* Change your mind, press *...Is this a regression? Yes. Is it from March 2020? Also yes, so I don't think it gets the "regression" tag.
### Steps to Replicate
* From a contact record, click on someone's email address to start an email.
* Change your mind, press **Cancel**
### Expected Behavior
You're returned to the contact record.
### Actual Behavior
The same screen reloads, the button press is basically ignored.
`git bisect` blames commit a1b37126ebd627ce2dc423bea1a21e837c783f36. That's PR #16913, aka Civi 5.25.
This isn't exactly a priority, but I thought I'd log it.https://lab.civicrm.org/dev/core/-/issues/2814Stop using replaceContactTokens in core2021-12-20T21:55:11ZeileenStop using replaceContactTokens in coreAs of a 6 months ago, or so, we had resolved all differences between using the token processor and replaceContactTokens to ....replaceContactTokens.
We don't quite have the api yet but when complete it is pretty much a drop in replaceme...As of a 6 months ago, or so, we had resolved all differences between using the token processor and replaceContactTokens to ....replaceContactTokens.
We don't quite have the api yet but when complete it is pretty much a drop in replacement for
```
$url = CRM_Core_BAO_MessageTemplate::renderTemplate([
'messageTemplate' => ['msg_text' => $this->_postURL],
'contactId' => $this->_id,
'disableSmarty' => TRUE,
])['text'];
```
Calling `renderTemplate` directly is supported provided
1) it is only done from core and
2) there is test cover for each instance
We don't have that many places left so I'm going to push through & replace them.
The last place in core is the token processor itself. I intend to cut that dependency last & duplicate the code in some way onto the processor.
While not supported from outside of core `replaceContactTokens` IS called from a number of places. We are also firming up the new token api so I don't want to 'hustle' people to change their code until it's bedded in so I propose to deprecate quietly at this stage (`@deprecated` on the function but don't make it 'noisy' for a few more months)https://lab.civicrm.org/dev/core/-/issues/2813"Soft Credit Only" Contribution export screen and exported data don't match2023-09-22T05:03:27Zalicefrumin"Soft Credit Only" Contribution export screen and exported data don't matchOverview
----------------------------------------
When Exporting Contributions from a search with the "Soft Credits Only" filter, the export screen shows the contributor information but the exported file shows the soft credited contact.
...Overview
----------------------------------------
When Exporting Contributions from a search with the "Soft Credits Only" filter, the export screen shows the contributor information but the exported file shows the soft credited contact.
Reproduction steps
----------------------------------------
1. Go to the "Find Contributions" search form (CiviCRM Admin menu -> Search -> Find Contributions)
2. For the "Contributions OR Soft Credits?" field select "Soft Credits Only"
3. Click Search
4. Select All records
5. Select the Action "export contributions"
6. pick the "Select fields for Export" option and click "Continue"
7. Add a "First Name" Field
8. Click "Download File"
Current behaviour
----------------------------------------
The export screen shows the first name of the Contributor
The export file shows the first name of the person who is soft credited
Expected behaviour
----------------------------------------
The export screen and exported file should display the same information. Because the filter is for "Soft Credit Only" I would expect they would both show the soft credit contact.
Environment information
----------------------------------------
I was able to recreate this on https://dmaster.demo.civicrm.org/
* __CiviCRM: 5.43.alpha1
* __CMS:drupalhttps://lab.civicrm.org/dev/drupal/-/issues/163Session erroneously getting set to NULL on Drupal user login2021-11-11T23:32:18ZsteveplatzSession erroneously getting set to NULL on Drupal user loginAnonymous sessions may contain data that needs to be retained after login, for example commerce cart data. In the initialize() method of the core session class civicrm/civicrm-core/CRM/Core/Session.php, there is a check for a changed ses...Anonymous sessions may contain data that needs to be retained after login, for example commerce cart data. In the initialize() method of the core session class civicrm/civicrm-core/CRM/Core/Session.php, there is a check for a changed session id, which if it evaluates to TRUE will set a current session with data to NULL.
```php
// remove $_SESSION reference if session is changed
if (($sid = session_id()) !== $this->sessionID) {
$this->_session = NULL;
$this->sessionID = $sid;
}
```
I've tested this with Drupal 9.2.4 CiviCRM 5.35 and Drupal Commerce 2.26. This specific change was added in https://lab.civicrm.org/dev/drupal/-/issues/98 for Drupal 7.5.43.0https://lab.civicrm.org/dev/core/-/issues/2809Profile error - requested Profile is disabled OR2024-01-28T05:03:32ZcweddellProfile error - requested Profile is disabled ORWe're seeing recurring errors when trying to complete registration using various Profiles:
"The requested Profile (gid=XX) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile wit...We're seeing recurring errors when trying to complete registration using various Profiles:
"The requested Profile (gid=XX) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile."
All the relevant ACL permissions are in place - Register for event, Profile edit/create/view/access custom data.
Creating new profiles (with no custom fields) makes no difference.
Others have found found they only encounter the Profile error if the event has "Send Confirmation Email?" turned ON in Online Registration. If the email is turned off, I don't see the error.
This has not solved it for me, though it appears data is saved when the form is submitted, but emails are not sent (the error is thrown).
https://chat.civicrm.org/civicrm/pl/r6ucwf994brotgiaa87gjjx5jo
https://civicrm.stackexchange.com/questions/40119/profile-error-requested-profile-is-disabled-or
* Browser: not browser dependent - same error while using Firefox 91.0 / Chrome 93.0.4577.42 / Safari 14.1.2
* CiviCRM: probably started 5.35.2 (ish), still happening 5.40.4
* PHP: 7.3.27
* CMS: WordPress 5.7 & 5.8
* Database: mySQL 5.7.31
* Web Server: Apache 2.4.48Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/2808Profiles in Search mode in chrome browsers caching search criteria2023-09-17T05:03:15ZalicefruminProfiles in Search mode in chrome browsers caching search criteriaOverview
----------------------------------------
Profiles in Search mode in chrome browsers caching search criteria.
Reproduction steps
----------------------------------------
1. Open a chrome browser
2. Create a Profile to be used ...Overview
----------------------------------------
Profiles in Search mode in chrome browsers caching search criteria.
Reproduction steps
----------------------------------------
1. Open a chrome browser
2. Create a Profile to be used for search listings
3. Include state and country as search fields
4. Go to the profile in search mode
5. select a country and state, click search
6. click the browser back button
7. Do not repopulate the search criteria (both fields should be empty),
8. Click Search
Current behaviour
----------------------------------------
state and country selected in step 5 are still searched for Additionally, if in step 7 you can select a country but you cannot select a new state.
Expected behaviour
----------------------------------------
Search should be empty
Environment information
----------------------------------------
* __Browser: Chrome
* __CiviCRM: Master
* __CMS: WordPress (and Drupal)
NOTE: I was able to recreate this on wpmaster.demo.civicrm.org and dmaster.demo.civicrm.orghttps://lab.civicrm.org/dev/core/-/issues/2805Field transformations2023-09-27T05:03:14ZeileenField transformationsField transformation options for money field don't make sense
Rounding would make sense
![image](/uploads/3266f956bb062d11d3b574fc6ebad623/image.png)Field transformation options for money field don't make sense
Rounding would make sense
![image](/uploads/3266f956bb062d11d3b574fc6ebad623/image.png)https://lab.civicrm.org/dev/core/-/issues/2804Field transformations - Upper messes with option value result2023-09-15T05:03:24ZeileenField transformations - Upper messes with option value resultGender renders as 'Male' but if I use UPPER field transform it renders as 1
![image](/uploads/ed6906369628db8055b86f9396177213/image.png)Gender renders as 'Male' but if I use UPPER field transform it renders as 1
![image](/uploads/ed6906369628db8055b86f9396177213/image.png)https://lab.civicrm.org/dev/core/-/issues/2803Field transformations - not null2023-09-15T05:03:24ZeileenField transformations - not nullIn reviewing the updates in https://github.com/civicrm/civicrm-core/pull/21320 I feel that 'IS NULL' should be complemented by 'IS NOT NULL'
In this screen shot I feel people would want a yes, potentially, when marriage date is not null...In reviewing the updates in https://github.com/civicrm/civicrm-core/pull/21320 I feel that 'IS NULL' should be complemented by 'IS NOT NULL'
In this screen shot I feel people would want a yes, potentially, when marriage date is not null (& I guess no or blank if it is)
![image](/uploads/81a65afacf7a90375824aa653aae3f4b/image.png)https://lab.civicrm.org/dev/core/-/issues/2802Cancel button on email form gives validation errors2021-09-01T00:07:31ZDaveDCancel button on email form gives validation errors1. From the Contacts menu choose New Email.
2. Don't enter anything just click cancel.
3. => Validation errors.1. From the Contacts menu choose New Email.
2. Don't enter anything just click cancel.
3. => Validation errors.https://lab.civicrm.org/dev/core/-/issues/2801Scheduled Job, fetch_bounces with is_create_activities=1 parameter. CiviCRM d...2024-03-15T21:10:52Zjustinfreeman (Agileware)Scheduled Job, fetch_bounces with is_create_activities=1 parameter. CiviCRM does not unsubscribe a Contact when receiving an email to the verb unsubscribe email addressScheduled Job, fetch_bounces with is_create_activities=1 parameter. CiviCRM does not unsubscribe a Contact when receiving an email to the verb unsubscribe email address. As a result, **Contacts are not being unsubscribed when this reques...Scheduled Job, fetch_bounces with is_create_activities=1 parameter. CiviCRM does not unsubscribe a Contact when receiving an email to the verb unsubscribe email address. As a result, **Contacts are not being unsubscribed when this request is received via email**. This contravenes Australian Anti-Spam Law (Spam ACT 2003).
The current behaviour is that the Scheduled Job, fetch_bounces with is_create_activities=1 parameter creates a new Contact ("Unsubscribe" Contact) using the verb unsubscribe email address which is incorrect. An Inbound Email Activity is then created and associated with this new Contact. The Activity is created and assigned to the emailed Contact that should be unsubscribed.
The emailed Contact is not unsubscribed from the mailing list and no unsubscribe event is recorded. So further emails will be sent to this Contact, despite their explicit unsubscribe request.
The expected behaviour is that:
1. CiviCRM looks up the emailed Contact using the unsubscribe email address and then creates the Inbound Email Activity for that Contact. No new contact is required.
2. The Contact that should be unsubscribed from the mailing list.
Related https://lab.civicrm.org/dev/core/-/issues/2800
Agileware Ref: CIVICRM-1826
CiviCRM 5.40.1https://lab.civicrm.org/dev/core/-/issues/2800Scheduled Job, fetch_bounces with is_create_activities=1 parameter creates a ...2023-10-05T00:59:49Zjustinfreeman (Agileware)Scheduled Job, fetch_bounces with is_create_activities=1 parameter creates a new Contact using the Return-path email address which is incorrectScheduled Job, fetch_bounces with is_create_activities=1 parameter creates a new Contact ("Return-path" Contact) using the Return-path email address which is incorrect. An Inbound Email Activity is then created and associated with this n...Scheduled Job, fetch_bounces with is_create_activities=1 parameter creates a new Contact ("Return-path" Contact) using the Return-path email address which is incorrect. An Inbound Email Activity is then created and associated with this new Contact.
The expected behaviour is that CiviCRM looks up the **emailed Contact using the Return-path address** and then creates the Inbound Email Activity for that Contact. No new contact is required.
The impact of problem is that:
1. a lot of "Return-path" Contacts are created which confuses CiviCRM users, "who are these contacts? how did they get here? have we been hacked?"
2. a CiviCRM admin needs to manually read each Inbound Email Activity to figure out what contact it actually relates too
3. the "Return-path" Contacts need to be deleted as they serve no real purpose
4. this is a performance hit when sending out large mailings, as CiviCRM is also creating Contacts and Activities as bounce emails are processed.
It does appear that the emailed Contact is being correctly detected as bounced, as it appears in the bounced contacts report for the Mailing.
Possibly related to this documentation issue, https://lab.civicrm.org/documentation/docs/sysadmin/-/issues/217
Agileware Ref: CIVICRM-1778
CiviCRM 5.40.15.66.0https://lab.civicrm.org/dev/core/-/issues/2799Activity import: allow multivalue custom data2022-06-11T00:07:25ZMichael McAndrewActivity import: allow multivalue custom dataBefore: the current activity import does not allow the import of multi value custom data.
If I have a favourite primary colours field, I could not import a CSV with the a column for this field with the value `Red, Blue`. It would look f...Before: the current activity import does not allow the import of multi value custom data.
If I have a favourite primary colours field, I could not import a CSV with the a column for this field with the value `Red, Blue`. It would look for the entire string `Red, Blue` and complain that `Red, Blue` is not a primary colour.
After: we can now import multi value custom data using the comma as a separator.
The proposed patch explodes any _multi valued_ custom data fields on the `,` character.
Note that this does not stop people from using commas in labels of custom data fields. It just means that if people want to make use of the importer to import multi value custom data, they will need to ensure that their labels don't have any commas in them.
Saying the same thing again using some different words...
We are assuming that if people want to import multi value custom data then they will use a comma seperator to seperate fields and understand that any labels will not contain commas as a result.
This feel fairly reasonable to me.5.51.0https://lab.civicrm.org/dev/core/-/issues/2798activity import: better labels for custom fields2021-09-03T00:15:28ZMichael McAndrewactivity import: better labels for custom fieldsPreviously, in the activity import, the dropdown that allowed you to select the field that you want to map a csv column to did not include the custom group title when listing custom fields. This lead to a usability issue in data models w...Previously, in the activity import, the dropdown that allowed you to select the field that you want to map a csv column to did not include the custom group title when listing custom fields. This lead to a usability issue in data models where custom field titles are repeated across groups and there is no way of distinguishing these fields in the import UI.
With this patch, custom field group titles are prepended to field title like this: `Custom group title :: custom field title`.
This has the nice side effect that custom fields are grouped by custom group.
Also, it brings it inline with the behaviour of the contact import (win!)
See also https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport/issues/37 for a similar issue fixed in the @eileen's csv api import extension.5.43.0https://lab.civicrm.org/dev/core/-/issues/2797Import: do not attempt to validate multivalue custom reference fields2021-08-31T08:24:58ZMichael McAndrewImport: do not attempt to validate multivalue custom reference fieldsThe importer validates the options submitted for all custom fields that allow multiple values ("checkboxes and multiselect", according to a code comment). It does this by checking for serialize=1 in the custom field definition and runnin...The importer validates the options submitted for all custom fields that allow multiple values ("checkboxes and multiselect", according to a code comment). It does this by checking for serialize=1 in the custom field definition and running a [validation routine](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/Import/Parser/Contact.php#L1075-L1091).
However, we are now setting serialize = 1 for contact reference fields as part of work to allow multivalue contact reference fields. The validation routine is now being attempted on contact reference fields, but it is not designed for this type of field.
A simple solution (proposed) is to not attempt to run this validation routine on contact reference fields.5.42.0https://lab.civicrm.org/dev/core/-/issues/2794Sort order of userdashboard event listing2023-10-21T13:17:38Zmagnolia61Sort order of userdashboard event listingWhile in the event dashboard I understand the registered_date to be the sort order,
In the userdashboard tab for events a sort order by event startdate would be more logic.
I have been searching where this is configured, but could not f...While in the event dashboard I understand the registered_date to be the sort order,
In the userdashboard tab for events a sort order by event startdate would be more logic.
I have been searching where this is configured, but could not find it.
Basically I'm asking
1) if more people agree with the default sort order by event date
2) where to find a place to change the default sort order in the user dashboard tab