CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-05-03T05:47:11Zhttps://lab.civicrm.org/dev/core/-/issues/2104Add more columns for Activity Report2023-05-03T05:47:11ZyashodhaAdd more columns for Activity ReportAdd more columns for Activity Report e,g target related fields currently it is showing target name and email only.Add more columns for Activity Report e,g target related fields currently it is showing target name and email only.5.62.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/2103Event location "used by 1 other events"2022-05-13T17:23:04Zaydunsaidan.saunders@squiffle.ukEvent location "used by 1 other events"Overview
----------------------------------------
When viewing event location configuration it displays this:
![image](/uploads/ef57dddf378f249ac33ab7a22e5c1e01/image.png)
Issues
------
1. It is not used by '1 **other** events', it is o...Overview
----------------------------------------
When viewing event location configuration it displays this:
![image](/uploads/ef57dddf378f249ac33ab7a22e5c1e01/image.png)
Issues
------
1. It is not used by '1 **other** events', it is only used here. (You can check by creating an event with a new random address and see that it still shows this.)
1. It always says '1' other location, regardless of how many actually use it. (Check by creating new events and reusing existing locations.
1. It is not easy to see what other events use that location.
Proposed behaviour
----------------------------------------
1. Only show the message if there are other events using this location, excluding this event.
1. Correctly show how many other events are using this location. (Consider whether that is all events, or just active and/or future events) Handle singular/plural correctly.
Bonus:
1. Maybe include a link to search for events using that location. The 'Find Events' on 'Manage Events' could be enhanced to search by location.
Comments
----------------------------------------
Might be suitable for someone looking for a 'getting started' PR5.49.0https://lab.civicrm.org/dev/core/-/issues/2102Changing address on event hangs2020-10-10T19:34:14Zaydunsaidan.saunders@squiffle.ukChanging address on event hangsOverview
----------------------------------------
Changing the address on an event causes hang (spinning logo)
Reproduction steps
----------------------------------------
1. Create an Event with a location & Save.
1. On Event configurat...Overview
----------------------------------------
Changing the address on an event causes hang (spinning logo)
Reproduction steps
----------------------------------------
1. Create an Event with a location & Save.
1. On Event configuration select 'Event Location' tab
1. Click **Create new location** radio
1. Enter address details
1. Click **Save**
Current behaviour
----------------------------------------
Spinning logo. On reloading the page, 'Create new location' is still selected with no address details
Expected behaviour
----------------------------------------
Should save as normal
Environment information
----------------------------------------
* __CiviCRM:__ _Master_
Comments
----------------------------------------
Also tested on test site for https://github.com/civicrm/civicrm-core/pull/18710 (ie not fixed by PR 18710)
Regression since 5.28.25.31.1https://lab.civicrm.org/dev/core/-/issues/2096Creating new event without email fails2020-10-08T19:41:38Zaydunsaidan.saunders@squiffle.ukCreating new event without email failsOverview
----------------------------------------
Creating a new event without an email produces `Mandatory values missing from Api4 Email::save: email` failure
Reproduction steps
----------------------------------------
1. Click on **E...Overview
----------------------------------------
Creating a new event without an email produces `Mandatory values missing from Api4 Email::save: email` failure
Reproduction steps
----------------------------------------
1. Click on **Events -> New Event**.
1. Enter mandatory fields **Event Type**, **Default Role**, **Event Title** and **Start** and click **Continue**.
1. Observe Email is not required
1. Click **Save and Done**
Current behaviour
----------------------------------------
Error: `Mandatory values missing from Api4 Email::save: email`
Expected behaviour
----------------------------------------
No error!
Environment information
----------------------------------------
* __CiviCRM:__ _Master_
Comments
----------------------------------------
Verified on dmaster5.31.0https://lab.civicrm.org/dev/core/-/issues/2093Undefined index 'class' on new individual form2020-10-06T23:51:30ZDaveDUndefined index 'class' on new individual formIt's probably not limited to new individual, but [this recent commit](https://github.com/civicrm/civicrm-core/commit/4367e9641356b13764aceb289c46b6023c6c6bb8#diff-bdea9a3ec62827e6c90a70202ea9f7ccR797) added a line that generates the noti...It's probably not limited to new individual, but [this recent commit](https://github.com/civicrm/civicrm-core/commit/4367e9641356b13764aceb289c46b6023c6c6bb8#diff-bdea9a3ec62827e6c90a70202ea9f7ccR797) added a line that generates the notice:
`$fieldAttributes['class'] .= ltrim($fieldAttributes['class'] ?? '' . ' crm-select2');`
You can't use `.=` if the variable isn't set yet, so this gives a red error box on the form. I thought I had written a test to catch generic red boxes on New Individual but maybe it's not a complete test.
Also while it ends up not mattering here, on the right-hand-side personally I think it's best to use brackets to be clear when using `??` and `.` at the same time, since the `.` ends up winning and can sometimes be a sneaky bug.5.31.0https://lab.civicrm.org/dev/core/-/issues/2090Undefined index on contact's activity tab when there's an activity that has n...2020-10-03T23:07:08ZDaveDUndefined index on contact's activity tab when there's an activity that has no With ContactYou can't see the error because ajax swallows it, but you can:
1. Install the [loudnotices](https://lab.civicrm.org/extensions/loudnotices) extension.
2. Create an activity and leave the With Contact blank.
3. Visit the contact's activi...You can't see the error because ajax swallows it, but you can:
1. Install the [loudnotices](https://lab.civicrm.org/extensions/loudnotices) extension.
2. Create an activity and leave the With Contact blank.
3. Visit the contact's activity tab. It will hang.
4. Look in ConfigAndLog and you'll see the error/backtrace.
PR coming.5.31.0https://lab.civicrm.org/dev/core/-/issues/2087Remove extraneous UF match queries2020-10-07T19:48:51ZeileenRemove extraneous UF match queries
When calling contact.create the sequence is
1) create/ edit the contact
2) do any email adds / deletes requested - this requires
- if a primary email is added/ altered update the uf_name
3) update the the uf name
Within update the ...
When calling contact.create the sequence is
1) create/ edit the contact
2) do any email adds / deletes requested - this requires
- if a primary email is added/ altered update the uf_name
3) update the the uf name
Within update the uf name there are 2 queries to see if the update is needed
1) check if they have a primary address
2) check if they have a uf match
**Proposal**
1) Remove the update from Contact.create since it is done in Email.create
2) Add the update into Email.delete when promoting another email
3) check for uf_match before has primary when doing uf match
Sub-pr of #20335.31.0https://lab.civicrm.org/dev/core/-/issues/2084Address extraneous UF Match queries2020-10-07T19:48:34ZeileenAddress extraneous UF Match queriesI a typical contact create UFMatch::updateUFName is called once in contact create & once in Email.create. This former call is unnecessary as the email creation passes through the second.
Also we could check if UF match exists before che...I a typical contact create UFMatch::updateUFName is called once in contact create & once in Email.create. This former call is unnecessary as the email creation passes through the second.
Also we could check if UF match exists before checking if the email is primary and potentially reduce that query too - this could eliminate 3 queries per contact create (if no uf_match is found, or 2 if it is) fairly easily.
It would also be possible but more complex / less likely to reduce queries to see if the primary email is actually changing at the php layer before altering.5.31.0https://lab.civicrm.org/dev/core/-/issues/2075E_NOTICE viewing an activity that has no details contents2020-09-30T02:48:32ZDaveDE_NOTICE viewing an activity that has no details contents1. Create an activity, e.g. a Meeting.
2. Don't put anything in the details field.
3. Save.
4. Turn off popups at admin - customize - display prefs, or in the next step use right-click and view in new tab/window.
5. View the activity.
6....1. Create an activity, e.g. a Meeting.
2. Don't put anything in the details field.
3. Save.
4. Turn off popups at admin - customize - display prefs, or in the next step use right-click and view in new tab/window.
5. View the activity.
6. `Notice: Undefined index: details in CRM_Activity_Form_Activity->preProcess() (line 506 of .../CRM/Activity/Form/Activity.php).`
I can do a PR.5.31.0https://lab.civicrm.org/dev/core/-/issues/2071Mandatory keys check fails erroneously for float 0.0 value in civicrm_api3_ve...2021-05-21T04:01:28ZorigamiusaMandatory keys check fails erroneously for float 0.0 value in civicrm_api3_verify_mandatory()Overview
----------------------------------------
The mandatory keys check in function `civicrm_api3_verify_mandatory()` fails erroneously if the key exists but it has the floating-point value of 0.0.
Reproduction steps
----------------...Overview
----------------------------------------
The mandatory keys check in function `civicrm_api3_verify_mandatory()` fails erroneously if the key exists but it has the floating-point value of 0.0.
Reproduction steps
----------------------------------------
Using APIv3, create an entity that contains a required key with the floating-point value of 0.0, for example, line_total in a price field element.
Current behaviour
----------------------------------------
APIv3 throws a `Mandatory key(s) missing from params array:` exception.
Expected behaviour
----------------------------------------
Successful creation.
Environment information
----------------------------------------
* __Browser:__ _Safari_
* __CiviCRM:__ _5.29.1_
* __PHP:__ _7.3.9__
* __CMS:__ _Drupal 7.73_
Comments
----------------------------------------
To fix, in civicrm/api/v3/utils.php, change line 92 from
```
if (!array_key_exists($key, $params) || (empty($params[$key]) && $params[$key] !== 0 && $params[$key] !== '0')) {
```
to
```
if (!array_key_exists($key, $params) || (empty($params[$key]) && $params[$key] !== 0.0 && $params[$key] !== '0')) {
```
The second version will match on both integer 0 and float 0.0, while the first only matches on integer 0 but not float 0.0.5.39.0https://lab.civicrm.org/dev/core/-/issues/2067Add relative date searching on search creator2021-01-19T03:57:57ZeileenAdd relative date searching on search creator5.34.0https://lab.civicrm.org/dev/core/-/issues/2063Eliminate "No extensions available for this version of CiviCRM"2020-09-29T20:07:08ZJonGoldEliminate "No extensions available for this version of CiviCRM"This error is a possible outcome of the "checkExtensions" system check. I propose we eliminate it:
* There's never going to be another version of CiviCRM that has no extensions available, so the message is wrong.
* The error pretty much...This error is a possible outcome of the "checkExtensions" system check. I propose we eliminate it:
* There's never going to be another version of CiviCRM that has no extensions available, so the message is wrong.
* The error pretty much exclusively happens when there's an error on the c.o side, like an outage.
* There are no actionable steps for someone receiving this message.
* My personal gripe: When c.o goes down, I get this message from a gazillion sites at once.
While I'm aware it's theoretically possible that someone could define an alternate extension directory source from c.o, to my knowledge that a) has never been done, b) if you do that, you shouldn't need a warning in the UI to tell you no extensions are available.
Happy to take this on if folks approve.5.31.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/2061PCP action links support for hook_civicrm_links2020-09-29T02:47:01ZbgmPCP action links support for hook_civicrm_linksAs a user who creates a Personal Campaign Page (PCP), CiviCRM displays a list of actions to manage the PCP page:
![pcp-links](/uploads/f28d64cd689c1d0d2705cdccc4c85984/pcp-links.jpg)
As site admins, we may want to customize the list of...As a user who creates a Personal Campaign Page (PCP), CiviCRM displays a list of actions to manage the PCP page:
![pcp-links](/uploads/f28d64cd689c1d0d2705cdccc4c85984/pcp-links.jpg)
As site admins, we may want to customize the list of links that are displayed. CiviCRM already has a [hook_civicrm_links](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_links/) hook, but it is not being called from here.
(I will open a PR)5.31.0https://lab.civicrm.org/dev/core/-/issues/2056Performance - do not retrieve soft credits & pcps when not required2020-10-08T00:17:06ZeileenPerformance - do not retrieve soft credits & pcps when not requiredPer https://lab.civicrm.org/dev/core/-/issues/2033 3.5% (14 out of 393) of the queries I recorded when importing 7 contacts with 7 contributions were for retrieving pcp & soft credit information. However, this retrieved information is di...Per https://lab.civicrm.org/dev/core/-/issues/2033 3.5% (14 out of 393) of the queries I recorded when importing 7 contacts with 7 contributions were for retrieving pcp & soft credit information. However, this retrieved information is discarded unless the params hold the key 'pcp' or 'soft_credit' so we can simply bypass these queries almost all the time.
examples
|timestamp|query|seconds|rows found|columns requested|
|----------|-------|-------|-------|-------|
| 15/09/20 2:54 | SELECT id FROM civicrm_contribution_soft WHERE contribution_id = 49769031 AND pcp_id IS NOT NULL | 0.000624 | 0 | 0 |
| 15/09/20 2:54 | SELECT id FROM civicrm_contribution_soft WHERE contribution_id = 49769031 AND pcp_id IS NULL | 0.000616 | 0 | 0 |5.31.0https://lab.civicrm.org/dev/core/-/issues/2052Some datepicker fields only allow choosing dates far in the future2020-09-20T21:21:36ZJonGoldSome datepicker fields only allow choosing dates far in the futureSteps to replicate:
* Send a mass SMS. If you're using a buildkit build, you'll need to install an SMS extension and define an SMS provider.
* On the "Schedule" screen, try to pick a schedule date.
Expected Behavior:
Years shown are 20...Steps to replicate:
* Send a mass SMS. If you're using a buildkit build, you'll need to install an SMS extension and define an SMS provider.
* On the "Schedule" screen, try to pick a schedule date.
Expected Behavior:
Years shown are 2020 and above.
Actual behavior:
Dates are several thousand years in the future.
I used `git bisect` to track it to [this PR](https://github.com/civicrm/civicrm-core/pull/16610). Tagging @mattwire.
I can see that `CRM_SMS_Form_Schedule` sets the `minDate` to `time()`, which is a Unix timestamp - and Matt's PR runs that through `strtotime`, which munges it into a different Unix timestamp. If Matt could give insight as to whether this should get fixed at the form level or in `CRM_Core_Form` I could potentially work on a fix.5.30.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/2047Merge - ensure location entities remaining on deleted contacts have is_primar...2020-10-16T01:52:16ZeileenMerge - ensure location entities remaining on deleted contacts have is_primary integrityThe testing I'm doing for https://lab.civicrm.org/dev/core/-/issues/2039 highlights that when a contact is deleted by merge they can be left with 1 or more address/email etc but none marked primary,
I thought about fixing the test to ex...The testing I'm doing for https://lab.civicrm.org/dev/core/-/issues/2039 highlights that when a contact is deleted by merge they can be left with 1 or more address/email etc but none marked primary,
I thought about fixing the test to exclude deleted contacts but
1) if they are undeleted again then the integrity is not fixed
2) having integrity on all contacts makes it a bit easier to check for integrity (ie the query in the test is faster than once we start filtering out deleted contacts)
I've started on some preparatory cleanup
https://github.com/civicrm/civicrm-core/pull/18499
https://github.com/civicrm/civicrm-core/pull/185005.32.0eileeneileenhttps://lab.civicrm.org/dev/core/-/issues/2044Proposal apiv4 - revisit required parameters on location entities2020-10-02T01:41:10ZeileenProposal apiv4 - revisit required parameters on location entitiesI propose we adjust the location api required fields inn v4api
- Address - don't require contact_id, make location_type_id required in xml
- Email - don't require contact_id, make location_type_id required in xml
- Phone - don't require...I propose we adjust the location api required fields inn v4api
- Address - don't require contact_id, make location_type_id required in xml
- Email - don't require contact_id, make location_type_id required in xml
- Phone - don't require contact_id, make location_type_id required in xml
For all these entities we have a valid use case for no contact_id in the context of location blocks for addresses. I wanted to cleanup the code in ManageLocation around addresses https://github.com/civicrm/civicrm-core/pull/18488 & found I can't use Address::save to do in a better way due to the above
@colemanw how far did you go down this path?5.31.0https://lab.civicrm.org/dev/core/-/issues/2041Plaintext version of email not replacing tokens in some situations2021-09-29T04:57:25ZDaveDPlaintext version of email not replacing tokens in some situationsI'm still trying to nail down the exact situations but here's one way to reproduce:
1. Create an outbound email.
1. Send it to two people in the To field, and one in the Cc.
1. In the html body put {contact.first_name} somewhere.
1. In ...I'm still trying to nail down the exact situations but here's one way to reproduce:
1. Create an outbound email.
1. Send it to two people in the To field, and one in the Cc.
1. In the html body put {contact.first_name} somewhere.
1. In the text body put {contact.last_name} somewhere.
Everything is correct except the text body inserts blank for the token.5.43.0https://lab.civicrm.org/dev/core/-/issues/2040Multiple email activity cc recipients get scrunched together in recorded acti...2020-09-23T00:47:08ZDaveDMultiple email activity cc recipients get scrunched together in recorded activity details fieldRecently refactored and the comma separator went missing: https://github.com/civicrm/civicrm-core/commit/a01fb99f56574eae7b6ade7cbb4f3292c505fe7d#diff-e604b19bd1979412f2455096459e761bR411-L439
https://github.com/civicrm/civicrm-core/blo...Recently refactored and the comma separator went missing: https://github.com/civicrm/civicrm-core/commit/a01fb99f56574eae7b6ade7cbb4f3292c505fe7d#diff-e604b19bd1979412f2455096459e761bR411-L439
https://github.com/civicrm/civicrm-core/blob/b3925388349a3d356b8852ead72361123e3ed196/CRM/Contact/Form/Task/EmailTrait.php#L564
Also the contact link url contains force=1 which seems unnecessary.
1. Send an outbound email in civi to multiple cc recipients.
1. Look at the details field on the recorded activity.
I can do a PR - came up while reviewing https://github.com/civicrm/civicrm-core/pull/182995.31.0https://lab.civicrm.org/dev/core/-/issues/2039Address extraneous location queries2022-02-01T08:31:54ZeileenAddress extraneous location queriesWhen importing a 'contact with a donation' 18% of the total queries come from [this line of code](https://github.com/civicrm/civicrm-core/blob/d357f225f281a0862b67a60d027c703ed2292f8b/CRM/Core/BAO/Location.php#L73) for [this issue](https...When importing a 'contact with a donation' 18% of the total queries come from [this line of code](https://github.com/civicrm/civicrm-core/blob/d357f225f281a0862b67a60d027c703ed2292f8b/CRM/Core/BAO/Location.php#L73) for [this issue](https://issues.civicrm.org/jira/browse/CRM-5051). I believe the handling in the create classes likely makes it obsolete.
I'm going to dig a bit further on that & put up a PR with the case for removing the line (unless I find a reason not to)
Per https://lab.civicrm.org/dev/core/-/issues/2033
examples - openid queries make up 4% of the total queries! and the line is 18% when including all location entities. This would be higher if it were only Contact.create that were being called
|timestamp|query|seconds|rows found|columns requested|
|----------|-------|-------|-------|-------|
| Location queries | 15/09/20 2:54 | SELECT * FROM `civicrm_openid` WHERE ( ( is_primary = 0 OR is_primary IS NULL ) ) AND ( `civicrm_openid`.`contact_id` = 46011839 ) | 0.000643 | 0 | 0 |
| Location queries | 15/09/20 2:54 | SELECT * FROM `civicrm_openid` WHERE ( ( is_primary = 0 OR is_primary IS NULL ) ) AND ( `civicrm_openid`.`contact_id` = 46011840 ) | 0.000517 | 0 | 0 |
| Location queries | 15/09/20 2:54 | SELECT * FROM `civicrm_openid` WHERE ( ( is_primary = 1 ) ) AND ( `civicrm_openid`.`contact_id` = 46011834 ) | 0.001377 | 0 | 0 |5.31.0