CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2022-08-19T13:10:03Zhttps://lab.civicrm.org/dev/core/-/issues/3771Undefined array key "rows" in Search.tpl.php when entering "Manage Groups"2022-08-19T13:10:03ZTobias KrauseUndefined array key "rows" in Search.tpl.php when entering "Manage Groups"Whenever a user comes to "Manage groups" (/civicrm/group) the PHP warning appears:
`Warning: Undefined array key "rows" in include() (line 6 of sites/default/files/civicrm/templates_c/en_US/%%7A/7A2/7A24E297%%Search.tpl.php).`
It comes...Whenever a user comes to "Manage groups" (/civicrm/group) the PHP warning appears:
`Warning: Undefined array key "rows" in include() (line 6 of sites/default/files/civicrm/templates_c/en_US/%%7A/7A2/7A24E297%%Search.tpl.php).`
It comes from CRM/Group/Form/Search.tpl:
`<div class="crm-accordion-wrapper crm-search_builder-accordion {if $rows and empty($showSearchForm)}collapsed{/if}">`
Seems that this code is not correct anymore as stated by Demerit's answer?! https://civicrm.stackexchange.com/questions/42384/undefined-array-key-rows-in-search-tpl-php-when-entering-manage-groups5.54.0https://lab.civicrm.org/dev/core/-/issues/3766Patches for league/csv don't get patched for drupal 9 (https://github.com/civ...2022-08-02T18:53:22ZDaveDPatches for league/csv don't get patched for drupal 9 (https://github.com/civicrm/civicrm-core/pull/24046)It's not so much a regression as a recent change outputs warnings and doesn't work as intended, but effectively it's not doing anything different than before so it's not a functional bug yet.
After https://github.com/civicrm/civicrm-cor...It's not so much a regression as a recent change outputs warnings and doesn't work as intended, but effectively it's not doing anything different than before so it's not a functional bug yet.
After https://github.com/civicrm/civicrm-core/pull/24046
```
Applying patches for league/csv
https://raw.githubusercontent.com/civicrm/civicrm-core/cacdbfaeaed8e04d504bf2fc604536137c03abeb/tools/scripts/composer/leage_csv_fputcsv.patch (Adding in eol support to fputcsv for php8.1)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/cacdbfaeaed8e04d504bf2fc604536137c03abeb/tools/scripts/composer/leage_csv_fputcsv.patch
https://github.com/thephpleague/csv/commit/380f884922a6cdaaaaab3ad4bfc7d1d710af736e.patch (Remove deprecated flag from php8.1)
Could not apply patch! Skipping. The error was: Cannot apply patch https://github.com/thephpleague/csv/commit/380f884922a6cdaaaaab3ad4bfc7d1d710af736e.patch
https://github.com/thephpleague/csv/commit/613db0b20157a1114cb1f9a801bd4c9c1f609cdf.patch (Fix php8.1 deprecation errors part 1)
Could not apply patch! Skipping. The error was: Cannot apply patch https://github.com/thephpleague/csv/commit/613db0b20157a1114cb1f9a801bd4c9c1f609cdf.patch
https://github.com/thephpleague/csv/commit/49e2b08ca025ebaf87a904b5645f535c807b6f10.patch (Fix php8.1 deprecation errors part 2)
Could not apply patch! Skipping. The error was: Cannot apply patch https://github.com/thephpleague/csv/commit/49e2b08ca025ebaf87a904b5645f535c807b6f10.patch
https://github.com/thephpleague/csv/commit/b83e972caea3cd22e7aaf65c5cffff1d49b46b69.patch (Fix php8.1 notice issues part 3)
Could not apply patch! Skipping. The error was: Cannot apply patch https://github.com/thephpleague/csv/commit/b83e972caea3cd22e7aaf65c5cffff1d49b46b69.patch
```5.53.0https://lab.civicrm.org/dev/core/-/issues/3765Can't upgrade drupal 9 fully after https://github.com/civicrm/civicrm-core/pu...2022-07-31T01:19:31ZDaveDCan't upgrade drupal 9 fully after https://github.com/civicrm/civicrm-core/pull/24085 - compile plugin failshttps://github.com/civicrm/civicrm-core/pull/24085/files#r933814768
http_build_query gets defined in the new shim, ~~and then guzzle itself tries to redefine it but of course it doesn't check if someone else has defined it first since i...https://github.com/civicrm/civicrm-core/pull/24085/files#r933814768
http_build_query gets defined in the new shim, ~~and then guzzle itself tries to redefine it but of course it doesn't check if someone else has defined it first since it belongs to guzzle.~~ I'm not sure the reason but the error is
```
Compile: Generate CCL wrapper functions
> @php -r "require_once '.../vendor/autoload.php'; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::template($GLOBALS[\Civi\CompilePlugin\TaskTransfer::GLOBAL_VAR]);"
PHP Fatal error: Cannot redeclare GuzzleHttp\http_build_query() (previously declared in ...\vendor\civicrm\civicrm-core\guzzle_php81_shim.php:29) in ...\web\core\includes\guzzle_php81_shim.php on line 29
Script @php -r "require_once '.../vendor/autoload.php'; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::template($GLOBALS[\Civi\CompilePlugin\TaskTransfer::GLOBAL_VAR]);" handling the shell-runner event returned with error code 255
Fatal error: Cannot redeclare GuzzleHttp\http_build_query() (previously declared in ...\vendor\civicrm\civicrm-core\guzzle_php81_shim.php:29) in ...\web\core\includes\guzzle_php81_shim.php on line 29
Subcommand @composer compile returned with error code 255
```5.53.0https://lab.civicrm.org/dev/core/-/issues/3764AuthX: API explorer URL wrong for WordPress2022-07-29T03:42:47ZMichael McAndrewAuthX: API explorer URL wrong for WordPressI think that the URL that the API explorer spits out for WordPress for authx is wrong.
Testing on a fresh buildkit install...
```shell
# Does not work!
CRM_URL='http://wp-demo.localhost:7979/wp-admin/admin.php?page=CiviCRM&q=civicrm%2F...I think that the URL that the API explorer spits out for WordPress for authx is wrong.
Testing on a fresh buildkit install...
```shell
# Does not work!
CRM_URL='http://wp-demo.localhost:7979/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fajax%2Fapi4%2FContact%2Fget'
# Works!
CRM_URL='http://wp-demo.localhost:7979/civicrm/ajax/api4/Contact/get'
CRM_AUTH='X-Civi-Auth: Bearer 123'
curl -X POST -H "$CRM_AUTH" "$CRM_URL" \
-d 'params=%7B%22limit%22%3A25%7D'
```
I assume that WordPress is going to always be in control of authentication to `wp-admin/admin.php` urls and hence that URL in the first example will never work.
@colemanw - it looks like you wrote the code that displays this - Adding a true param to the resUrl var to make it public fixes the issue I think. Will submit a PR...5.53.0https://lab.civicrm.org/dev/core/-/issues/3763Search Kit: Can't save data segments when two datepickers are present2022-10-05T23:02:48ZJonGoldSearch Kit: Can't save data segments when two datepickers are presentVideo shows replication steps, screenshot shows the final state of the form so it's easy to replicate.
Note that you don't need to create a second condition if the first condition uses "BETWEEN".![data-segment-save](/uploads/e327cf654310...Video shows replication steps, screenshot shows the final state of the form so it's easy to replicate.
Note that you don't need to create a second condition if the first condition uses "BETWEEN".![data-segment-save](/uploads/e327cf654310d9605871f4effca59619/data-segment-save.mp4)![Selection_1597](/uploads/4b907205661da04e25209e0a5e74488e/Selection_1597.png)5.53.0https://lab.civicrm.org/dev/core/-/issues/3758CiviCRM 5.51.1 Contact Import, trying to import Contacts and set Shared Addre...2023-12-07T01:02:48Zjustinfreeman (Agileware)CiviCRM 5.51.1 Contact Import, trying to import Contacts and set Shared Address for the Contact (using the Master Address ID) results in a DB Error: constraint violation and the import fails.CiviCRM Contact Import, trying to import Contacts and set Shared Address for the Contact (using the Master Address ID) results in a DB Error: constraint violation and the import fails.
Do not know a way to import Contacts and have their...CiviCRM Contact Import, trying to import Contacts and set Shared Address for the Contact (using the Master Address ID) results in a DB Error: constraint violation and the import fails.
Do not know a way to import Contacts and have their address linked to another existing Contact.
Attached is an example CSV of contacts from the CiviCRM demo data which illustrates how the import is being performed. [CiviCRM_Contact_Search.csv](/uploads/8208b87e85ce38432169b0e5e34eb033/CiviCRM_Contact_Search.csv)
Attached is also a copy of the backtrace. [backtrace.txt](/uploads/30b094e4af4eafe58899e7a08a440734/backtrace.txt)
Environment: CiviCRM 5.51.1
Agileware Ref: CIVICRM-20215.69.0https://lab.civicrm.org/dev/core/-/issues/3756hook_civicrm_geocoderFormat does not alter address components2022-08-03T00:27:09ZAllenShawhook_civicrm_geocoderFormat does not alter address components**Steps to repro:**
1. Create an extension named `geocoderformat` containing this hook implementation:
```
function geocoderformat_civicrm_geocoderFormat($geoProvider, &$values, $xml) {
$values['county_id'] = 2;
}
```
2. Install clean...**Steps to repro:**
1. Create an extension named `geocoderformat` containing this hook implementation:
```
function geocoderformat_civicrm_geocoderFormat($geoProvider, &$values, $xml) {
$values['county_id'] = 2;
}
```
2. Install clean civicrm 5.49.5, enable this extension, and configure geocoding (*eg set "Administer => Mapping => Geocoding Provider" to "Google"*).
3. For any contact, save a new address in California, being sure to leave the county field empty, and observe that the county is forced to "Contra Costa".
4. Install clean civicrm 5.51.1 (I think 5.51.0 will also demonstrate the problem), enable this extension, and configure geocoding.
3. For any contact, save a new address in California, being sure to leave the county field empty, and observe that the county is not altered.
**Best guess as to the cause:**
Changes in cb695d3e4baa5d332d3f7f4a1105bb2c090ec4ee (pinging @colemanw) caused `CRM_Utils_Hook::geocoderFormat('Google', $values, $xml)` to be called in a context in which `$values` is never used.
**Suggested solution:**
The `CRM_Utils_Geocode_Google::makeRequest()` method should receive `$values` as a parameter-by-reference.
I'm planning to submit a simple PR along those lines.5.52.0https://lab.civicrm.org/dev/core/-/issues/3753Proposal: Allow negative rules for ACLs2023-09-08T10:52:34ZTobias Voigttobias.voigt@civiservice.deProposal: Allow negative rules for ACLs**PROBLEM:**
When defining ACL rules, it is only possible to 'allow' certain behaviour but not to 'disallow' it. This makes it tedious to define a set of rules that restricts access to e.g. groups of contacts or sets of custom fields - ...**PROBLEM:**
When defining ACL rules, it is only possible to 'allow' certain behaviour but not to 'disallow' it. This makes it tedious to define a set of rules that restricts access to e.g. groups of contacts or sets of custom fields - especially if you have many (groups or sets of custom fields).
**USE CASE:**
In one of our client's system, we have many groups and many sets of custom fields. What I want to achieve is:
1. define a privileged group / role that has exclusive access to **one** set of custom fields
2. allow access to all other sets of custom fields for all users
3. prevent 'normal' users from giving themselves access to the exclusive information by adding themselves to the privileged group
Because I can only define 'positive' ACL rules, here's what I have to do:
- turn off the WP permission for custom fields for the relevant roles (to be able to define my rules via CiviCRM ACLs)
- allow access to all sets of custom fields for 'everyone' (excluding the one I want to restrict access for) - **by creating a rule for each set of custom fields**
- define a rule to allow access to the restricted set of custom fields to the privileged role
Depending on the number of sets of custom fields, this can be a tedious process. Not only that - if I create a new set of custom fields at a later time, I have to remember to create a new ACL rule for that as well.
Now for the third task (preventing users from adding themselves to the privileged group). To achive this I furthermore have to:
- turn off the WP permissions for viewing and editing all contacts for the relevant roles
- allow access to all groups for 'everyone' (excluding the one I want to restrict access for) - **by creating a rule for each contact group**
- define a rule to allow access to the restricted contact group only for the privileged role
Again: With about 50+ groups, that's a tedious task. And again: I have to remember to create a new ACL rule each time I add a new group.
All in all I could end up with a multitude of rules (in our case 70+) that are really hard to maintain.
**PROPOSAL:**
This task could be so much easier, if it was possible to define 'negative' ACL rules. If this was possible, I could:
- turn off the relevant WP permissions
- allow access to all sets of custom fields for everyone (1 rule)
- allow access to all contact groups for everyone (1 rule)
- disallow access to the restricted set of custom fields for everyone (1 rule)
- disallow access to the restricted contact group for everyone (1 rule)
- allow access to the restricted set of custom fields for the privileged role (1 rule)
- allow access to the restricted contact group for the privileged role (1 rule)
As is implied above, **there would have to be some form of priorisation** of rules to make this work.
This way I would end up with only 6 rules and would not have to remember to create new rules whenever I create a new set of custom fields or a new contact group.5.64.0https://lab.civicrm.org/dev/core/-/issues/3749Scheduled Job, Process Pledges reports an error when executed - Scheduled Job...2022-07-28T23:27:08Zjustinfreeman (Agileware)Scheduled Job, Process Pledges reports an error when executed - Scheduled Job Failure: Finished execution of Process Pledges with result: Failure, Error message: invalid criteria for INScheduled Job, Process Pledges reports an error when executed.
`Scheduled Job Failure: Finished execution of Process Pledges with result: Failure, Error message: invalid criteria for IN.`
The CiviPledge component is not installed on thi...Scheduled Job, Process Pledges reports an error when executed.
`Scheduled Job Failure: Finished execution of Process Pledges with result: Failure, Error message: invalid criteria for IN.`
The CiviPledge component is not installed on this site.
Environment: CiviCRM 5.51.1
Agileware Ref: CIVICRM-20185.53.0https://lab.civicrm.org/dev/core/-/issues/3744Afform Submissions: record submitted data2023-09-13T14:40:55Zaydunsaidan.saunders@squiffle.ukAfform Submissions: record submitted dataOverview
----------------------------------------
When Afforms are submitted they can be logged resulting in an AfformSubmission entity. This records the result of the submission but not the data submitted. Often when investigating prob...Overview
----------------------------------------
When Afforms are submitted they can be logged resulting in an AfformSubmission entity. This records the result of the submission but not the data submitted. Often when investigating problems with any forms it is useful to know what data was entered.
Example use-case
----------------------------------------
1. From the Form Builder page, click 'New Submission Form'
2. Use the default 'Individual' entity - add a title, check 'Log submissions', add a 'Page' eg civicrm/test, Save
3. Go to the URL civicrm/test, enter 'Test99' for last name and first name, Submit
4. Go back to the Form Builder page, note there is 1 submission logged. Click on '1 Submission'. Note the id
5. In Api Explorer 4, use `AfformSubmission` `get` with a `where id = ` and the id from the previous line.
Current behaviour
----------------------------------------
Example result:
```
[
'id' => 11,
'contact_id' => 203,
'afform_name' => 'afformTest',
'data' => [
'Individual1' => [
[
'id' => 205,
],
],
],
'submission_date' => '2022-07-20 08:49:30',
],
```
Proposed behaviour
----------------------------------------
As above but including the entered data:
```
'submitted' => [
'Individual1' => [
[
'first_name' => 'Test99',
'middle_name' => '',
'last_name' => 'Test99',
],
],
]
```
Comments
----------------------------------------
This would also facilitate taking actions based on logged results.5.55.0https://lab.civicrm.org/dev/core/-/issues/3741afform: breadcrumbs present when flagged for frontend2022-08-01T23:12:05Zlcdwebafform: breadcrumbs present when flagged for frontendIf a form has been flagged for use on the frontend, breadcrumb links should not be visible, as we do with other frontend-facing forms.
Currently they are present, even for non-admin role users.If a form has been flagged for use on the frontend, breadcrumb links should not be visible, as we do with other frontend-facing forms.
Currently they are present, even for non-admin role users.5.53.0https://lab.civicrm.org/dev/core/-/issues/3736Some file upload fields not uploading2022-07-18T09:27:08ZDaveDSome file upload fields not uploadingIt works in some places, e.g. a custom field of type file, but for example:
1. CiviMail - Message Templates
2. Add message template
3. Choose upload document for the Source.
4. Upload a document - just a simple Word doc is fine - the fi...It works in some places, e.g. a custom field of type file, but for example:
1. CiviMail - Message Templates
2. Add message template
3. Choose upload document for the Source.
4. Upload a document - just a simple Word doc is fine - the file itself doesn't seem to be the issue.
5. When you click "Save and Done" it doesn't get uploaded. If you debug a bit you can see the browser submits it in the network request but the file field does not exist in the array from exportValues().
I've reproduced the above on dmaster.demo. I can also reproduce it with a little extension that has a file field on a custom form:
```php
in buildQuickForm:
$this->add('file', 'myfile', E::ts('My file'));
$this->addUploadElement('myfile');
in postProcess:
$values = $this->controller->exportValues($this->getName()); // it's the same if just use $this->exportValues()
CRM_Core_Error::debug(print_r($values, true));
```
Not sure when it started.5.53.0https://lab.civicrm.org/dev/core/-/issues/3735Can't search contact with only number2023-04-01T16:27:00ZPradeep Nayakpradpnayak@gmail.comCan't search contact with only numberContact search by number has stopped working for a few sites, when searching by only number the system searches by id rather than display/sort name. The system has an external identifier attached to sort/display name which helps the staf...Contact search by number has stopped working for a few sites, when searching by only number the system searches by id rather than display/sort name. The system has an external identifier attached to sort/display name which helps the staff to search the contact based on their old legacy number or by contact name. I can see there has been a [recent change](https://github.com/civicrm/civicrm-core/pull/23609) in Civi which would allow doing a search if the number starts with 0 but it is not the case here.
Is it right to say that force search by id should be a config setting which can be turned off on some systems either via UI or in civicrm.settings.php?5.57.0https://lab.civicrm.org/dev/core/-/issues/3733Importing Data: field "source" is updated instead of filled2022-08-10T01:07:08ZfastermannSGBImporting Data: field "source" is updated instead of filledWhen importing contacts you can choose wether to skip duplicates or update them or to just fill the data that does not exist.
That works fine. If the existing contact does not have a phone number and the imported data includes one, the c...When importing contacts you can choose wether to skip duplicates or update them or to just fill the data that does not exist.
That works fine. If the existing contact does not have a phone number and the imported data includes one, the contact will be filled. If the existing contact already has a phone number, it will remain and the imported number will be ignored.
But...
... that does not work on the data field "source".
Example:
--------
The contact Max Example exists. The field "source" already has a content, i.e. "Newsletter-Subscription"
Then we import new data from another campaign. Max Example is also in this list, with his postal adress, a phone number and a new source "Orders May 2022".
Import-Options for duplicate contacts is set to "Fill".
Duplicate will be recognized correctly, postal adresse and phone number will be added - but the source will be updated to "Orders May 22". So the information where the first data was generated ("Newsletter-Subscription") will be lost.
Question:
---------
Is it a bug or a feature? And if it's a feature, is there a workaround to not lose the existing data?
Best regards
Thomas5.53.0https://lab.civicrm.org/dev/core/-/issues/3732Show billing address on Edit contribution screen as well2022-09-26T16:47:07ZyashodhaShow billing address on Edit contribution screen as wellWe currently show billing address on _View Contribution_ screen.
I propose to show billing address on _Edit Contribution_ screen as well for consistency.We currently show billing address on _View Contribution_ screen.
I propose to show billing address on _Edit Contribution_ screen as well for consistency.5.55.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/3726contact import - unresponsive queue runner - 5.512022-07-10T22:43:09ZUpperholmecontact import - unresponsive queue runner - 5.51Trying to get the contact import working. Everything seems to go well and then I'm presented with the queue runner screen which just sits there and nothing happens.
In the browser console I see a 404 for a file - progress.gif - for whi...Trying to get the contact import working. Everything seems to go well and then I'm presented with the queue runner screen which just sits there and nothing happens.
In the browser console I see a 404 for a file - progress.gif - for which the console provides the URL as : https://mydomain.org/core/misc/progress.gif
Also seeing : SyntaxError: JSON Parse error: Unexpected EOF
Clicking the available Retry button has no effect.
Clicking the other button, which looks to be labelled 'skip', presents a partially completed progress bar with a message like 'processed 5 out of 8 rows' (my import file has just 8 rows of data), but no records appear to get imported.
The temporary database table does appear to get created.
Additionally, I found that clicking the 'skip' button multiple times got me to a reporting page that looked like a summary of perhaps what was supposed to happen. It correctly reported the number of rows in the 'imported data' (although of course no data was actually imported, and it erroneously reported that 8 records were created or modified.5.51.1https://lab.civicrm.org/dev/core/-/issues/3721Add Entity Reference custom field type (implementing EntityRef QuickForm elem...2023-07-28T15:04:53ZjensschuppeAdd Entity Reference custom field type (implementing EntityRef QuickForm element type)Overview
----------------------------------------
`EntityRef` ist a QuickForm element type being used to reference CiviCRM entities in several forms. But there is no custom field type implementing this, apart from the *ContactReference* ...Overview
----------------------------------------
`EntityRef` ist a QuickForm element type being used to reference CiviCRM entities in several forms. But there is no custom field type implementing this, apart from the *ContactReference* custom field type, which is (surprise!) restricted to referencing contacts.
Allowing users to model their "real world" use cases in CiviCRM using the UI without mis-using entity types for things they have not been intended for, just because you need some kind of relation between two things, would be a great improvement.
At this time, we are evaluating requirements for a current project where this might be needed, but wanted to discuss our thoughts with some Core people, especially @colemanw who already offered help with reviewing code, before we start, because this will have to be a PR to Core, probably with some refactoring involved.
Example use-case
----------------------------------------
With either Core or custom entities (such as multi-value custom field groups or [ECK entities](https://github.com/systopia/de.systopia.eck)), you might want to model references to different "things" in your business logic, not just contacts.
Imagine a *Project* entity that you would like to add references to contacts, but also to specific activities, contributions, etc. - without a *Project* having to be a contact type or a *Case*, or a *Campaign* because that might not be suitable because of reasons.
Current behaviour
----------------------------------------
Only contact entites can be referenced in custom fields.
Proposed behaviour
----------------------------------------
* Add a custom field type *Entity Reference* with configurable
* entity type
* label property (a property of the selected entity type that will be used for displaying the referenced entity when rendering the field value)
* entity filters (API parameters for the entity)
* Migrate the *Contact Reference* custom field type to be an *Entity Reference* field type with *Contact* as the referenceable entity type and the `display_name` as the label property
* Maybe allow custom field types be extendable, i.e. allow extensions to define additional custom field types
* Maybe add support for SearchKit (e.g. for defining filters or providing widget displays)
Technical Details
----------------------------------------
* *Contact Reference* fields currently store their API filters in the `filter` column of the `civicrm_custom_field` table. The entity itself might be just added there
* The label/title property might be stored in the `attributes` column, which is used for different stuff depending on the custom field type. Alternatively, a new column could be added to the `civicrm_custom_field` table (just as there are columns for other field types), although this is not that good of a design IMO
* Alternatively, all field-type-specific configuration could be migrated into a generic JSON-formatted `configuration` or `properties` column, at least for this new field type for now. There are many columns only needed for specific field types:
* `mask`
* `options_per_line`
* `text_length`
* `start_date_years`
* `end_date_years`
* `date_format`
* `time_format`
* `note_columns`
* `note_rows`
* `option_group_id`
* `filter`
I think adding a new custom field type that stores its configuration in existing columns would be a good first step. Any thoughts on that?
After storing information about a custom field in civicrm_custom_field, a table is created for each group or set of custom fields to store the value of each field for each instance of the set of custom fields. The name of this table is stored in custom_field_group.table_name. This table correlates each record of custom field values with the entity they extend using meta-data about the custom field set to identify the table extended (I think there is a translation of value in custom_field_group.extends to the table name of the entity extended) and the id of the instance extended.
It would be good to support regular CiviCRM entities that are implemented as tables as well as the higher order entities of Order and Payment that have id fields and APIs but not table implementations.
Funding
---------------------
Required: 40
Pledged:
- Third Sector Design - 8
- Systopia - 18
- Megaphone tech - 4 (depending on timeframe)
- JMA - 10
- Humanists UK - 55.60.0https://lab.civicrm.org/dev/core/-/issues/3719API4 - UserJob.get for job_type:label does not return a string2022-07-07T06:34:39ZtschuettlerAPI4 - UserJob.get for job_type:label does not return a stringOverview
----------------------------------------
The pseudoconstant for `job_type:label` from `UserJob` does not return the label by itself.
Reproduction steps
----------------------------------------
1. Create some user job, e.g. by s...Overview
----------------------------------------
The pseudoconstant for `job_type:label` from `UserJob` does not return the label by itself.
Reproduction steps
----------------------------------------
1. Create some user job, e.g. by starting a contact import
1. Execute https://dmaster.demo.civicrm.org/civicrm/api4#/explorer/UserJob/get?select=%5B%22job_type:label%22%5D
Current behaviour
----------------------------------------
Result will be
``` json
(1) [
{
"id": 1,
"job_type:label": {
"id": "contact_import",
"name": "contact_import",
"label": "Contact Import",
"class": "CRM_Contact_Import_Parser_Contact"
}
}
]
```
Side effect:
The contact import summary screen will have no title and there is a warning + notice:
>>>
Warning: strip_tags() expects parameter 1 to be string, array given in template_preprocess_html() (line 2641 of /opt/buildkit/build/rc/web/includes/theme.inc).
Notice: Array to string conversion in include() (line 46 of /opt/buildkit/build/rc/web/themes/garland/page.tpl.php).
>>>
![grafik](/uploads/6521dbc32a669660de94a330b23df681/grafik.png)
Expected behaviour
----------------------------------------
Result should be
``` json
(1) [
{
"id": 1,
"job_type:label": "Contact Import"
}
]
```
The contact import summary screen will have a proper title.
Comments
----------------------------------------
I guess that this is a side effect of converting in the user job type entity to string in https://github.com/civicrm/civicrm-core/pull/23888.
PR attempt here: https://github.com/civicrm/civicrm-core/pull/239445.51.0https://lab.civicrm.org/dev/core/-/issues/3717Sorting on import/export Mapping page is not sorted by mapping type2022-07-05T20:50:09ZtschuettlerSorting on import/export Mapping page is not sorted by mapping typeOverview
----------------------------------------
Sorting in the mapping page does not work as intended by the source code inhttps://github.com/civicrm/civicrm-core/blob/3cf2f2b0a0c5b499a0064be725887ec5b2fdfe47/CRM/Admin/Page/Mapping.php...Overview
----------------------------------------
Sorting in the mapping page does not work as intended by the source code inhttps://github.com/civicrm/civicrm-core/blob/3cf2f2b0a0c5b499a0064be725887ec5b2fdfe47/CRM/Admin/Page/Mapping.php#L126, instead it is sorted by name only.
Reproduction steps
----------------------------------------
1. Create mappings for different mapping types (e.g. contact and participant)
2. Visit: https://dmaster.demo.civicrm.org/civicrm/admin/mapping?reset=1
Current behaviour
----------------------------------------
List is sorted by mapping name
Expected behaviour
----------------------------------------
List is sorted by mapping type, followed by name
Comments
----------------------------------------
https://github.com/civicrm/civicrm-core/pull/239425.52.0https://lab.civicrm.org/dev/core/-/issues/3716E-Notice on Import/Export Mapping Page2022-07-11T07:41:34ZtschuettlerE-Notice on Import/Export Mapping PageReproduction steps
----------------------------------------
1. Enable Debugging: https://dmaster.demo.civicrm.org/civicrm/admin/setting/debug?reset=1
1. Save a field mapping when doing an import
1. Got an e-notice on the import/export ma...Reproduction steps
----------------------------------------
1. Enable Debugging: https://dmaster.demo.civicrm.org/civicrm/admin/setting/debug?reset=1
1. Save a field mapping when doing an import
1. Got an e-notice on the import/export mapping page (https://dmaster.demo.civicrm.org/civicrm/admin/mapping?reset=1):
`Notice: Undefined index: description in include() (line 22 of /srv/buildkit/build/dmaster/web/sites/default/files/civicrm/templates_c/en_US/%%B7/B7D/B7D2F296%%Mapping.tpl.php).`
## Current behaviour
The e-notice will appear for every field mapping without a description.
## Expected behaviour
No e-notice shown.
## Comments
No recent regression
~https://github.com/civicrm/civicrm-core/pull/23941~
https://github.com/civicrm/civicrm-core/pull/239455.52.0