Development issueshttps://lab.civicrm.org/groups/dev/-/issues2021-10-03T17:48:05Zhttps://lab.civicrm.org/dev/core/-/issues/2881APIv3 "replace" action is broken when there is > 25 records to replace.2021-10-03T17:48:05ZJonGoldAPIv3 "replace" action is broken when there is > 25 records to replace.In what might be the oldest bug in API3...
### Steps to replicate
* Have a site with > 25 groups.
* Create a mailing.
* Start adding groups to the mailing.
* Run `select count(*) from civicrm_mailing_group WHERE mailing_id = <your maili...In what might be the oldest bug in API3...
### Steps to replicate
* Have a site with > 25 groups.
* Create a mailing.
* Start adding groups to the mailing.
* Run `select count(*) from civicrm_mailing_group WHERE mailing_id = <your mailing ID here>`.
* Note that the number of records is equal to the number of groups you added to the mailing.
* Add the 26th group and run that SQL again.
* Oops.
The number goes up very quickly - `replace` will only delete the first 25 records, so this quickly spirals out of control. Also, `MailingGroup.replace` is called every time the mailing is saved, so the problem increases exponentially until it can't calculate recipients and you can't send the mailing.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/2880No meaningful translation possible for "Cancel "2021-10-02T05:28:27ZDetlev SieberNo meaningful translation possible for "Cancel "Overview
----------------------------------------
civicrm/CRM/Event/Form/SelfSvcUpdate.php contains a selection of "transfer" and "cancel" for an event participation. However, "cancel" is a very common word which cannot be translated in ...Overview
----------------------------------------
civicrm/CRM/Event/Form/SelfSvcUpdate.php contains a selection of "transfer" and "cancel" for an event participation. However, "cancel" is a very common word which cannot be translated in a meaningful way in this context (at least for many languages, e.g. german).
"cancel registration" remains meaningful in english, but works better in other languages.
This string already exists in CRM/Event/Form/Registration/ParticipantConfirm.php, so most probably transifex already has the translation available for most languages.
Changing the string from "Cancel" to "Cancel Registration" will help - especially since this string already exists in the code and is already5.43.0https://lab.civicrm.org/dev/core/-/issues/2879Message admin extension won't load workflows from extensions2023-09-29T05:03:22ZeileenMessage admin extension won't load workflows from extensionsI spent ages trying to get our wmf workflow message to work with the Message Admin extension (I even renamed all the abbreviated variable names to words & added getters for all the abbreviated class properties so I could read the code wi...I spent ages trying to get our wmf workflow message to work with the Message Admin extension (I even renamed all the abbreviated variable names to words & added getters for all the abbreviated class properties so I could read the code without glazing over) and ... eventually I tracked it down.....
https://github.com/civicrm/civicrm-core/blob/master/Civi/Test/ExampleDataLoader.php#L80-L88
Normally I would say it's great to constrain things to core while things bed in - but in this case being able to define workflow messages in an extension is the main deliverable.https://lab.civicrm.org/dev/core/-/issues/2878Custom Date Tokens do not resolve if the field has no time part2021-10-05T08:29:17Zmagnolia61Custom Date Tokens do not resolve if the field has no time partOverview
----------------------------------------
Custom Date Tokens do not resolve if the field has no time part
Reproduction steps
----------------------------------------
1. apply https://github.com/civicrm/civicrm-core/pull/21666 to...Overview
----------------------------------------
Custom Date Tokens do not resolve if the field has no time part
Reproduction steps
----------------------------------------
1. apply https://github.com/civicrm/civicrm-core/pull/21666 to support participant tokens
2. send a scheduled reminder with a date field and some other tokens
Current behaviour
----------------------------------------
The date field does not resolve, but not only that. It caused no token at all to render.
Expected behaviour
----------------------------------------
A rendered date field would be expected of the custom date field token.
Environment information
----------------------------------------
Current master (5.43) with https://github.com/civicrm/civicrm-core/pull/21666
Comments
----------------------------------------
When in the backend I change the date field to also have a time part, the token starts rendering.https://lab.civicrm.org/dev/core/-/issues/2877Add recurring failed messaging to core?2023-10-02T05:03:25ZeileenAdd recurring failed messaging to core?I'm just working on updating our custom code for sending emails when people's credit cards start failing & just thought I'd put it out there that this could be moved to core if there is demand.
The basic spec is
- a workflow template
-...I'm just working on updating our custom code for sending emails when people's credit cards start failing & just thought I'd put it out there that this could be moved to core if there is demand.
The basic spec is
- a workflow template
- code to send an email when failures hit a threshold IF they don't have any active recurrings (because people often start a new one themselves).
- the threshold would be from a 'number of fails before emailing' setting I think with empty = disabled
My guess is that user orgs would feel this should be in core & extension writers might prefer to solve in an extension. If there isn't demand I won't do it.https://lab.civicrm.org/dev/core/-/issues/2876Message about dependent extensions when installing an extension uses "key" in...2021-10-18T19:28:04ZDaveDMessage about dependent extensions when installing an extension uses "key" instead of labelFor example when you install stripe, you get
```
x
Extension Upgrade Failed
You will not be able to install/upgrade com.drastikbydesign.stripe until you have installed the mjwshared extension.
```
Now try to find "mjwshared" to install...For example when you install stripe, you get
```
x
Extension Upgrade Failed
You will not be able to install/upgrade com.drastikbydesign.stripe until you have installed the mjwshared extension.
```
Now try to find "mjwshared" to install it. If you don't already know that that's called "Payment shared" you can't find it. I think this changed when the extension screen stopped showing the keys which wasn't that long ago, but I wouldn't really call it a "regression".
It's at https://github.com/civicrm/civicrm-core/blob/8df2a2894845a30c9af289694cfd7f5373333b54/CRM/Extension/Downloader.php#L80
The second variable $extension is just a string so at first glance the label isn't readily available and it might need to do some kind of lookup.5.44.0https://lab.civicrm.org/dev/backdrop/-/issues/2Profile fields in Backdrop still say "Drupal"2021-10-21T20:23:12ZlarynProfile fields in Backdrop still say "Drupal"When adding/editing a profile, the checkbox options still say Drupal:
![profile-backdrop](/uploads/c0f5620f1b7c64cadaaf39273e038879/profile-backdrop.jpg)
@megaphonejon notes:
> I fixed this elsewhere - [civicrm/civicrm-core#14288](htt...When adding/editing a profile, the checkbox options still say Drupal:
![profile-backdrop](/uploads/c0f5620f1b7c64cadaaf39273e038879/profile-backdrop.jpg)
@megaphonejon notes:
> I fixed this elsewhere - [civicrm/civicrm-core#14288](https://github.com/civicrm/civicrm-core/pull/14288). Moreover, see @mlutfy's criticism, and my comments on [civicrm/civicrm-core#14286](https://github.com/civicrm/civicrm-core/pull/14286). The correct way to handle this would be to create a method on the `CRM_Utils_System_*` classes that returns the name - and ideally a second method for the "User Permissions" URL - so these can all be fixed in a reliable way.
I also noticed that it's done slightly differently in the database integration section, using the generic "CMS" instead of the specific name of the CMS. I'm not sure if we need to standardize these for consistency or not.
![database-backdrop](/uploads/81b42622d75fdf5c196333998da28e7f/database-backdrop.jpg)5.44.0https://lab.civicrm.org/dev/backdrop/-/issues/1Convert member and group to roles sync rules from database to config2023-02-27T16:56:29ZherbdoolConvert member and group to roles sync rules from database to configCurrently they're stored in the database but they smell a lot like configuration. Better to store them in the config json files and drop the database tables.Currently they're stored in the database but they smell a lot like configuration. Better to store them in the config json files and drop the database tables.herbdoolherbdoolhttps://lab.civicrm.org/dev/core/-/issues/2875CiviCase Forces Case Status to Resolved (Closed) when all Activities in a Seq...2023-09-30T05:03:30ZpbarmakCiviCase Forces Case Status to Resolved (Closed) when all Activities in a Sequence are CompleteOverview
----------------------------------------
For Cases that use a Sequence, once all activities in the sequence are complete, the Case gets set to a Resolved (aka Closed) status. This is fine. However, after a Case is in the Resolve...Overview
----------------------------------------
For Cases that use a Sequence, once all activities in the sequence are complete, the Case gets set to a Resolved (aka Closed) status. This is fine. However, after a Case is in the Resolved status, if a user then wishes to change the status to something other than Resolved (like to a custom status), even though CiviCase says it made the change and even creates a status change activity that shows the status was changed, the case remains in Resolved status.
It looks like Civi/CCase/SequenceListener.php is firing after any case status changes are written to the DB, but SequenceListener is not accounting for someone purposefully trying to change the case status. It only looks for all activities being completed and forces the case back to Resolved.
This doesn't seem like correct behavior nor a good user experience. The listener should check to see if the action was a status change action and not fire the API call in that case. I'm not sure how that can be done (not sure what input the listener has), but that's my guess on how to resolve the issue.
Reproduction steps
----------------------------------------
1. Create a Case Type that uses a sequence of activities (doesn't matter how many)
1. Create a new Case using that type
1. Complete each activity in the sequence and see that the Case automatically changes to Resolved.
1. Try to then change the Case Status to something other than Resolved (like In Progress or Ongoing or any custom status).
1. See that the Case status remains as Resolved, even though a new case activity says it was changed.
Expected behaviour
----------------------------------------
The Case should allow a change in Status even if all Activities in a Sequence are completed. That way user can change to a custom status that also reflects completion (we have multiple status that denote completion but for a variety of reasons).https://lab.civicrm.org/dev/core/-/issues/2874Search Builder: Fails validation when state_province location type is "primar...2021-11-05T20:55:25ZJonGoldSearch Builder: Fails validation when state_province location type is "primary" and operator is "IN"### Steps to Replicate
* On Search Builder, select **Contacts**, **State**, **Primary**, **In**, and at least one value.
* Press **Search**.
### Expected Result
Search completes.
### Actual result
This field fails validation with the e...### Steps to Replicate
* On Search Builder, select **Contacts**, **State**, **Primary**, **In**, and at least one value.
* Press **Search**.
### Expected Result
Search completes.
### Actual result
This field fails validation with the error *Please Enter a Value*.
This is down to [PR #8890](https://github.com/civicrm/civicrm-core/pull/8890)/[CRM-19081](https://issues.civicrm.org/jira/browse/CRM-19081), which introduced special handling for the `state_province` field in Search Builder to handle legacy smart groups.
That PR added this:
```php
if (!is_numeric($value) && $fldName == 'state_province') {
$value = CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_Address', 'state_province_id', $value);
}
```
The ticket isn't specific, but this code suggests that legacy smart groups passed a state `name` or `abbreviation` rather than an ID.
The issue arises with the `IN` operator because it's not passing a numeric value but an array Passing an array to `getKey` returns `NULL`, causing the bug. Adding an `is_array` check to that `if` solves the problem.
I see that PR #8890 has a test, so I'm going to take a quick crack at writing a Search Builder test before submitting my patch.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/2873Exporting related contact's information on a contact that is a subtype fails2024-02-02T05:03:23Zfabian_SYSTOPIAExporting related contact's information on a contact that is a subtype failsOverview
----------------------------------------
There is an old bug described on the old issue tracker that prevents related contact information to be exported via the UI if one of the contacts is a subtype.
https://issues.civicrm.org/...Overview
----------------------------------------
There is an old bug described on the old issue tracker that prevents related contact information to be exported via the UI if one of the contacts is a subtype.
https://issues.civicrm.org/jira/browse/CRM-16693
Reproduction steps
----------------------------------------
1. Search for any contacts, e.g. a subtype
1. Select at least one contact and choose "export contacts"
1. choose select fields for export
1. select display name or anything else of the contact (will be exported correctly)
1. select a field of a related contact (relationship) e.g. display name
Current behaviour
----------------------------------------
If one of the contacts is a contact subtype or the relationship is defined to be only allowed among subtypes the exported columns won't contain any data (data of the "main contact" will be exported correctly).
Expected behaviour
----------------------------------------
Data of related contact should be exported as well.
Environment information
----------------------------------------
* Browser: all
* CiviCRM: Since 4.6.x still occuring in 5.35.x
Comments
----------------------------------------
We may have funding to fix this bug and would appreciate an estimate from the core team.Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/2872Email to Activity processing: If there's a matching org contact and no matchi...2021-11-09T15:24:53Zlisandro_compucorpEmail to Activity processing: If there's a matching org contact and no matching individual, then file on the org instead of creating a new individualOverview
----------------------------------------
Hello CiviCRM team, on the automatic creation of email activities, we are trying to find a solution for the received emails that are associated with organizations, not individuals.
The e...Overview
----------------------------------------
Hello CiviCRM team, on the automatic creation of email activities, we are trying to find a solution for the received emails that are associated with organizations, not individuals.
The emails sent to an organization mail account are associated with a new contact of type `individual`, instead of the existent contact of type `organization`.
This exact same situation was raised a few years ago here: https://civicrm.stackexchange.com/questions/20200/autofiling-email-activities-via-emailprocessor-to-organization
Proposed behaviour
----------------------------------------
We would like to add the ability to save these organization emails on the expected contact. This would be configurable using a specific new setting.
We would do the change on https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Mail/Incoming.php#L450
replacing the line for something like
```php
$cType = CRM_Core_BAO_MailSettings::defaultDAO()->save_organization_emails ? NULL : 'Individual';
$dao = CRM_Contact_BAO_Contact::matchContactOnEmail($email, $cType);
```
And adding the new field on MailSetting:
![new_screen](/uploads/6545b96b1b5e7dd1b3244573f86d762c/new_screen.png)
If you think it is an acceptable idea, we will create a PR.
Thanks!5.45.0https://lab.civicrm.org/dev/core/-/issues/28715.43 will need an upgrade message about the token changes - with a link to th...2023-09-24T22:50:51Zeileen5.43 will need an upgrade message about the token changes - with a link to the docshttps://lab.civicrm.org/dev/core/-/issues/2870Upgrade error - upgrading to 5.432021-09-29T22:27:14ZeileenUpgrade error - upgrading to 5.43I just hit this upgrading my local copy of the wmf db (it's unlikely to have much oddness in it as a local dev version)
From https://github.com/civicrm/civicrm-core/commit/9f3b9e969597d718a23a22f904c703338ce186fa
![image](/uploads/1f3e...I just hit this upgrading my local copy of the wmf db (it's unlikely to have much oddness in it as a local dev version)
From https://github.com/civicrm/civicrm-core/commit/9f3b9e969597d718a23a22f904c703338ce186fa
![image](/uploads/1f3e16ec59af641428453c1e52b03f1e/image.png)
SHOW CREATE TABLE
```
CREATE TABLE `civicrm_mapping_field` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Mapping Field ID',
`mapping_id` int(10) unsigned NOT NULL COMMENT 'Mapping to which this field belongs',
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Mapping field key',
`contact_type` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Contact Type in mapping',
`column_number` int(10) unsigned NOT NULL COMMENT 'Column number for mapping set',
`location_type_id` int(10) unsigned DEFAULT NULL COMMENT 'Location type of this mapping, if required',
`phone_type_id` int(10) unsigned DEFAULT NULL COMMENT 'Which type of phone does this number belongs.',
`im_provider_id` int(10) unsigned DEFAULT NULL COMMENT 'Which type of IM Provider does this name belong.',
`website_type_id` int(10) unsigned DEFAULT NULL COMMENT 'Which type of website does this site belong',
`relationship_type_id` int(10) unsigned DEFAULT NULL COMMENT 'Relationship type, if required',
`relationship_direction` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`grouping` int(10) unsigned DEFAULT 1 COMMENT 'Used to group mapping_field records into related sets (e.g. for criteria sets in search builder\n mappings).',
`operator` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SQL WHERE operator for search-builder mapping fields (search criteria).',
`value` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SQL WHERE value for search-builder mapping fields.',
PRIMARY KEY (`id`),
KEY `FK_civicrm_mapping_field_mapping_id` (`mapping_id`),
KEY `FK_civicrm_mapping_field_location_type_id` (`location_type_id`),
KEY `FK_civicrm_mapping_field_relationship_type_id` (`relationship_type_id`),
CONSTRAINT `FK_civicrm_mapping_field_location_type_id` FOREIGN KEY (`location_type_id`) REFERENCES `civicrm_location_type` (`id`),
CONSTRAINT `FK_civicrm_mapping_field_mapping_id` FOREIGN KEY (`mapping_id`) REFERENCES `civicrm_mapping` (`id`),
CONSTRAINT `FK_civicrm_mapping_field_relationship_type_id` FOREIGN KEY (`relationship_type_id`) REFERENCES `civicrm_relationship_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC```5.43.0https://lab.civicrm.org/dev/core/-/issues/2868TypeError: Argument 1 passed to CRM_Import_DataSource_CSV::trimNonBreakingSpa...2021-09-27T23:50:39Zjustinfreeman (Agileware)TypeError: Argument 1 passed to CRM_Import_DataSource_CSV::trimNonBreakingSpaces() must be of the type string, null given in CRM_Import_DataSource_CSV::trimNonBreakingSpacesWhen performing a Contact Import, if the supplied CSV file has multiple blank lines at the end of the file, then the import will abort and an error shown:
`TypeError: Argument 1 passed to CRM_Import_DataSource_CSV::trimNonBreakingSpaces(...When performing a Contact Import, if the supplied CSV file has multiple blank lines at the end of the file, then the import will abort and an error shown:
`TypeError: Argument 1 passed to CRM_Import_DataSource_CSV::trimNonBreakingSpaces() must be of the type string, null given in CRM_Import_DataSource_CSV::trimNonBreakingSpaces`
This error occurs when importing a CSV which has either:
- Multiple blank lines in the CSV file, [CiviCRM_Contact_Search-Fails-Import-1.csv](/uploads/06f1bfd9ce1dff6cc965c7fa42f7b301/CiviCRM_Contact_Search-Fails-Import-1.csv), or
- Has multiple blank lines at the end of the CSV file, [CiviCRM_Contact_Search-Fails-Import-2.csv](/uploads/a472ffd1ed517b2ab593f297224cad09/CiviCRM_Contact_Search-Fails-Import-2.csv)
Conversely, a CSV file will import when:
- There is only 1 blank line at the end of the CSV, [CiviCRM_Contact_Search-OK-Import-2.csv](/uploads/79609a77e01c4aeae2c1cc4e3e8ab48b/CiviCRM_Contact_Search-OK-Import-2.csv), or
- No blank lines, [CiviCRM_Contact_Search-OK-Import-1.csv](/uploads/fb18b66bb23934d7e5dfea2b3a7bbb51/CiviCRM_Contact_Search-OK-Import-1.csv)
Confirmed in CiviCRM 5.40.4 and CiviCRM 5.41.2
**PR submitted**, https://github.com/civicrm/civicrm-core/pull/21638
Agileware Ref: CIVICRM-1847https://lab.civicrm.org/dev/core/-/issues/2867api4 explorer - entity displays as `\undefined` in the generated code sample2021-09-27T05:01:21ZDaveDapi4 explorer - entity displays as `\undefined` in the generated code samplee.g. pick Contact and Get, then look down at the bottom:
```
OOP Style
$contacts = \undefined::get()
->setLimit(25)
->execute();
foreach ($contacts as $contact) {
// do something
}
```
Same on dmaster.demo
FYI @colemanwe.g. pick Contact and Get, then look down at the bottom:
```
OOP Style
$contacts = \undefined::get()
->setLimit(25)
->execute();
foreach ($contacts as $contact) {
// do something
}
```
Same on dmaster.demo
FYI @colemanw5.43.0https://lab.civicrm.org/dev/core/-/issues/2866Start phasing out 'preferred_mail_format'2024-02-27T05:03:24ZeileenStart phasing out 'preferred_mail_format'Preferred mail format was the idea of sending a message in html or text or both depending what you knew about their preferrences. However, mostly this is an email client setting - you send both and the client deals with it.
We actually ...Preferred mail format was the idea of sending a message in html or text or both depending what you knew about their preferrences. However, mostly this is an email client setting - you send both and the client deals with it.
We actually invest quite a lot of code & unnecessary queries into this feature & when it came up there was general support for removing it. I also included it in the dev digest on 12 Sep 2021 - so I think we are a couple of emojis away from concept approval on this
https://github.com/civicrm/civicrm-core/pull/21426#pullrequestreview-751423307https://lab.civicrm.org/dev/core/-/issues/2865Missing message template updates2023-10-02T05:03:25ZDaveDMissing message template updatesI had noticed a missing handful earlier and added it to https://github.com/civicrm/civicrm-core/blob/0ebeb224903925880f3ad0ddacd4e90470049839/CRM/Upgrade/Incremental/MessageTemplates.php#L252, but I'm noticing a few more seem to be out o...I had noticed a missing handful earlier and added it to https://github.com/civicrm/civicrm-core/blob/0ebeb224903925880f3ad0ddacd4e90470049839/CRM/Upgrade/Incremental/MessageTemplates.php#L252, but I'm noticing a few more seem to be out of date. I'll try to reconcile.
It's technically a regression but at first glance they all seem to just be php8 updates, nothing functional.
A bigger project: Why does the upgrade work the way it does and why does it need this list to be manually updated? Why doesn't it just compare the default version in the database to what's on disk, and update it if different? Why does it even need a default version in the database anyway - maybe just because it makes Revert code easier?https://lab.civicrm.org/dev/core/-/issues/2862Support additional token entities for email letter task2021-10-12T04:23:43ZeileenSupport additional token entities for email letter taskWe've finished getting the email task to use the token processor for existing tokens (contact, contribution) and with a bit more cleanup it is 'easy' to add other entities.
However, there is a gotcha that I discovered on the contributio...We've finished getting the email task to use the token processor for existing tokens (contact, contribution) and with a bit more cleanup it is 'easy' to add other entities.
However, there is a gotcha that I discovered on the contribution task.
If I have 2 contributions in the search and you select to send me emails for both I will get 1 email - with details from only 1 of the contributions. This seems wrong. OTOH if the letter had NO contribution specific tokens it would make sense.....5.43.0https://lab.civicrm.org/dev/core/-/issues/2861regression: Custom searches are completely broken when used as smart groups2021-09-25T08:04:08ZJonGoldregression: Custom searches are completely broken when used as smart groupsI'm attaching a video that demonstrates the replication steps, but:
* Create a new custom search.
* The results of the search are correct.
* Save the results as a smart group.
* View the smart group.
* The smart group contains all contac...I'm attaching a video that demonstrates the replication steps, but:
* Create a new custom search.
* The results of the search are correct.
* Save the results as a smart group.
* View the smart group.
* The smart group contains all contacts.
![broken_custom_searches](/uploads/7298e847393f8456bb907c80820c6d93/broken_custom_searches.mp4)
This led to someone emailing all contacts in their database on a CiviMail, which they're predictably taking seriously.
I traced the issue and found that at `CRM_Contact_BAO_GroupContactCache::insertGroupContactsIntoTempTable()`, there's an [if statement](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/GroupContactCache.php#L832) that looks like it should evaluate to `TRUE` that evaluates to `FALSE` but forcing it to `TRUE` doesn't solve the problem.5.41.2