CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2018-06-21T21:41:15Zhttps://lab.civicrm.org/dev/core/-/issues/187Fix typo in CRM_Grant_Form_Task that prevents retrieving session key from URL2018-06-21T21:41:15Zmattwiremjw@mjwconsult.co.ukFix typo in CRM_Grant_Form_Task that prevents retrieving session key from URLOverview
----------------------------------------
Identified during investigation for dev/core#158
Before
----------------------------------------
Cannot retrieve session key for Grant form task.
After
---------------------------------...Overview
----------------------------------------
Identified during investigation for dev/core#158
Before
----------------------------------------
Cannot retrieve session key for Grant form task.
After
----------------------------------------
Session key for Grant form task is retrieved just like all other tasks.
Technical Details
----------------------------------------
The wrong object was being used in static context ($this instead of $form).5.4.0https://lab.civicrm.org/dev/core/-/issues/96Expose source column in booking report2018-06-29T18:52:04ZyashodhaExpose source column in booking reportExpose source column in booking report and as filter as well.Expose source column in booking report and as filter as well.5.4.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/176Odd / Even street number sorting column missing from Reports2018-07-06T22:11:10Zjoels341Odd / Even street number sorting column missing from ReportsWhen trying to make a walk list in reports (odd/even street numbers), there is no option to sort by odd or even. I am using Civicrm in English on Joomla.
The French demo on Drupal has "Numéro de rue pair/impair" in the "column" dropdown...When trying to make a walk list in reports (odd/even street numbers), there is no option to sort by odd or even. I am using Civicrm in English on Joomla.
The French demo on Drupal has "Numéro de rue pair/impair" in the "column" dropdown, but I do not see it in the English version.![street-number](/uploads/f74556e4b99a646ee3aa1c9fdaacd96c/street-number.jpg)5.5.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/218On Case Type listing page, for reserved ones the, 'More' link doesn't show an...2018-07-09T22:42:08ZMonish DebOn Case Type listing page, for reserved ones the, 'More' link doesn't show any optionsSteps to replicate:
1. Enable CiviCase component.
2. Go to Administer >> CiviCase >> Case Types
3. Click on 'More' action against any reserved Case type
![test-multiple-before](/uploads/c14d32b041c69c2b9c1941615214d1ac/test-multiple-befo...Steps to replicate:
1. Enable CiviCase component.
2. Go to Administer >> CiviCase >> Case Types
3. Click on 'More' action against any reserved Case type
![test-multiple-before](/uploads/c14d32b041c69c2b9c1941615214d1ac/test-multiple-before.gif)
**Proposal**:
Show the 'More' action only when
1. the case type is not reserved because then you have 'Delete' and Enable/Disable action OR
2. If case-type is reserved then show the more action only if the case-type is forked and/or disable, because then you got 'Revert' and/or 'Enable' option to show5.5.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/228Option group disabled on update2018-07-11T00:47:58ZajesamsonOption group disabled on updateWhen updating option group attributes (excluding `is_active`), the updated option group gets disabled. This is because option group was [defaulted](https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/BAO/OptionGroup.php#L95) to ...When updating option group attributes (excluding `is_active`), the updated option group gets disabled. This is because option group was [defaulted](https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/BAO/OptionGroup.php#L95) to `FALSE` when adding or updating record without specifying desired `is_active` status.
![option_group](/uploads/d8291f18e46149d5852335749ca473e3/option_group.gif)
The desired result would have been leaving the `is_active` status untouched, if not required to be updated during attributes update.5.5.0https://lab.civicrm.org/dev/core/-/issues/241Fix Manage Premiums UI2018-07-12T23:12:09Zmattwiremjw@mjwconsult.co.ukFix Manage Premiums UIRef: https://github.com/civicrm/civicrm-core/pull/12436
Manage premiums UI was not displaying the financial type correctly (it was showing the ID). The PR does the following:
1. Enable pseudoconstant for financial_type_id.
2. Use pseud...Ref: https://github.com/civicrm/civicrm-core/pull/12436
Manage premiums UI was not displaying the financial type correctly (it was showing the ID). The PR does the following:
1. Enable pseudoconstant for financial_type_id.
2. Use pseudoconstant functions to get the financial_type label (name) for display.
3. Format the money fields using crmMoney.
4. Add the cost field to the UI (normally I'd do this as a separate PR but it would be more work to break out the template changes and given how flaky/old the premiums code seems to be I suspect it's not actually being used by very many people - also it's only affecting an admin screen by displaying existing information).5.5.0https://lab.civicrm.org/dev/core/-/issues/141Custom groups with different names but same title would not be saved2018-07-14T01:25:44ZjaapjansmaCustom groups with different names but same title would not be savedI have created two custom groups from within my extension:
* Name: group_areas, Title: Areas
* Name: contact_areas, Title: Areas
When I now edit the custom group it will fail because both custom groups have the same title but a differe...I have created two custom groups from within my extension:
* Name: group_areas, Title: Areas
* Name: contact_areas, Title: Areas
When I now edit the custom group it will fail because both custom groups have the same title but a different name.
Is this correct behaviour?
See this stack exchange question: https://civicrm.stackexchange.com/questions/25102/https-civicrm-org-extensions-areas-causing-error/25104#25104
Tested on CiviCRM version 5.0.0 and CiviCRM version 5.1.aplha15.5.0https://lab.civicrm.org/dev/core/-/issues/188Fix Floating Point Precision Comparison Exception on Order Creation2018-07-15T23:12:07ZCamilo RodríguezFix Floating Point Precision Comparison Exception on Order Creation## Overview
When adding Orders, a check is done by CiviCRM core when the contribution is being created to make sure the sum of line item totals is equal to the contribution total amount. This comparison, however, is done comparing floati...## Overview
When adding Orders, a check is done by CiviCRM core when the contribution is being created to make sure the sum of line item totals is equal to the contribution total amount. This comparison, however, is done comparing floating point values, which may fail falsely, under some circumstances.
This is the line where the comparison is done:
https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/BAO/Contribution.php#L5011
This problem is documented in PHP official documentation, and is actually related to the way floating point values are modeled in programming languages in general.
http://php.net/manual/en/language.types.float.php
http://floating-point-gui.de/basic/
This has to be taken into account to make sure the comparison doesn't fail when it shouldn't.
## How it Works Currently
1. Use API to try to create Order with given sample data.
2. Exception is thrown, saying "Line item total doesn't match with total amount".
## How it Should Work
1. Use API to try to create Order with given sample data.
2. Order is created without throwing exception.
## Sample Data
```
data ={
'contact_id': 1051,
'payment_instrument_id': 6,
'line_items': [{
'line_item': {
'0': {
'price_field_value_id': 56,
'price_field_id': 33,
'entity_id': 646,
'tax_amount': 0,
'line_total': 14.85,
'label': 4,
'entity_table': 'civicrm_membership',
'unit_price': 14.85,
'qty': 1}}}, {
'line_item': {
'1': {
'price_field_value_id': 55,
'price_field_id': 32,
'entity_id': 648,
'tax_amount': 0,
'line_total': 1.66,
'label': 50,
'entity_table': 'civicrm_membership',
'unit_price': 1.66,
'qty': 1}}}, {
'line_item': {
'2': {
'price_field_value_id': 49,
'price_field_id': 26,
'entity_id': 647,
'tax_amount': 0,
'line_total': 0.16,
'label': 47,
'entity_table': 'civicrm_membership',
'unit_price': 0.16,
'qty': 1}}}],
'total_amount': 16.67,
'financial_type_id': 2,
'fee_amount': 0,
'payment_processor_id': 5,
'receive_date': '2017-10-16',
'contribution_status_id': 1
}
```
## Failing API Call Example
Calling API using cv:
```
echo '{"contact_id":45,"payment_instrument_id":6,"line_items":[{"line_item":{"6":{"price_field_value_id":52,"price_field_id":29,"tax_amount":0,"line_total":14.85,"financial_type_id":2,"qty":1,"entity_table":"civicrm_membership","unit_price":14.85,"label":5}}},{"line_item":{"7":{"price_field_value_id":53,"price_field_id":30,"tax_amount":0,"line_total":1.66,"financial_type_id":2,"qty":1,"entity_table":"civicrm_membership","unit_price":1.66,"label":49}}},{"line_item":{"8":{"price_field_value_id":49,"price_field_id":26,"tax_amount":0,"line_total":0.16,"financial_type_id":2,"qty":1,"entity_table":"civicrm_membership","unit_price":0.16,"label":47}}}],"tax_amount":0,"total_amount":16.67,"contribution_recur_id":733,"financial_type_id":2,"fee_amount":0,"payment_processor_id":5,"receive_date":"2017-12-15","contribution_status_id":1}' | cv api Order.create --in=json
```5.5.0https://lab.civicrm.org/dev/core/-/issues/150Chain select for country/state in Search Builder does not stay within OR grou...2018-07-17T06:54:34ZAndie HuntChain select for country/state in Search Builder does not stay within OR groupingsdev/core#142 introduces a chained select for picking states from countries and picking counties from states. The changes there correctly limit the chaining to be within the same location type. However, picking a country will modify *al...dev/core#142 introduces a chained select for picking states from countries and picking counties from states. The changes there correctly limit the chaining to be within the same location type. However, picking a country will modify *all* state/province fields of that location type, even if they're in different "Also include contacts where" sections.
To recreate, let's say you are planning an event in Detroit:
1. Search for contacts in Michigan:
```
Contacts | Country | Home | = | United States
Contacts | State | Home | = | Michigan
```
2. Search for contacts in Ontario by clicking "Also include contacts where" and setting up:
```
Contacts | Country | Home | = | Canada
Contacts | State | Home | = | Ontario
```
Notice that the state dropdown where Michigan had been selected now has nothing selected and offers only Canadian provinces.
The same thing happens if you have a state field on its own (without country) and you pick a country in another `OR` grouping.5.5.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/152Remove AdvMulti-Select custom field type2018-07-18T20:03:11ZcolemanwRemove AdvMulti-Select custom field type![Screenshot_from_2018-05-29_15_19_57](/uploads/ec6cb2f79769ef926d2d2deff6b8e1c8/Screenshot_from_2018-05-29_15_19_57.png)
Since 2014 this widget has been deprecated and this notice has displayed whenever someone tries to select it.
I th...![Screenshot_from_2018-05-29_15_19_57](/uploads/ec6cb2f79769ef926d2d2deff6b8e1c8/Screenshot_from_2018-05-29_15_19_57.png)
Since 2014 this widget has been deprecated and this notice has displayed whenever someone tries to select it.
I think it's time to remove it alltogether.https://lab.civicrm.org/dev/core/-/issues/265The Edit screen handles Tax Amount and Total Amount differently depending on ...2018-07-20T21:44:32ZKarinGThe Edit screen handles Tax Amount and Total Amount differently depending on how whether Contributions are data entered with or without priceset.A. What's happening? The Edit screen handles Tax Amount and Total Amount differently depending on how whether Contributions are data entered with or without priceset. This results in an error on when trying to (empty Edit ->) Save a Cont...A. What's happening? The Edit screen handles Tax Amount and Total Amount differently depending on how whether Contributions are data entered with or without priceset. This results in an error on when trying to (empty Edit ->) Save a Contribution that has Sales Tax associated with it and is generated without a priceset. The error prompts users to manually adjust the Total Amount (and/or the Fee Amount and/or the Net Amount themselves and that results in bad data;
B. Can one use JMA's lineItem editor extension fix this? No - the civicrm_line_item data themselves are correct. Everything is properly recorded in both civicrm_line_item as well as in civicrm_contribution [screenshots at the bottom]. The issue is the math/data handling that is being done when the Edit screen is invoked.
C. Is this a specific Client issue for you? No it's not - it's a stripped down real issue example to point out that we need to standardize and define/review Tax Amount, Fee Amount, Net Amount, Total Amount, Contribution Total, Subtotal, Line Total, Total Price and use the calculations/definitions across all CiviCRM pathways or we'll continue to play whack-a-mole on Sales Taxes.
D. What would be a solution? We need to decide on what the Edit screen and math should look like - and make that independent of whether the contribution and it's associated line items were originally created with a priceset or not.
Setup:
* CiviCRM 5.3.0;
* Tax and Invoicing Enabled;
* 5% Sale Tax associated with Financial Type 'Taxable Item";
* lineItem editor extension installed;
**Contribution 4392 - Contribution w/ Sales Tax and NO priceset**
Steps to reproduce:
Contributions -> New Contribution:
![image](/uploads/c2eda8ae1cfd343cab99881e652533ec/image.png)
Save
![image](/uploads/c88751015be56d68fb20888f0ba60ab2/image.png)
Edit -> Save -> Error:
![image](/uploads/2e97f54b08ec71b81b576c1808befebf/image.png)
**Contribution 4394 - Contributions w/ Sales Tax and priceset**
Steps to reproduce:
Contributions -> New Contribution:
![image](/uploads/82622cd3ac88b1ad74e3260d4d8eb472/image.png)
Save
Edit (and Saves without Errors)
![image](/uploads/54f7680d542ce01423c3a3fe770a9b5d/image.png)
**Summary - two Contributions are identical except for how they were generated - 4394 can be edited and 4392 can not;**
![image](/uploads/58d888db9b42763385711ac7c14e53b1/image.png)
![image](/uploads/e839c09cb6ce57f991916204905d93e8/image.png)
![image](/uploads/14ff617650a153b32dc9b8dc566d947c/image.png)https://lab.civicrm.org/dev/core/-/issues/257Improve CustomValue API2018-07-23T10:50:10ZDon WijesooriyaImprove CustomValue APIDuring the few months of working with CiviCRM, I have often found myself limited working with CustomValue API. Not sure if I am missing something but suggesting the following improvements so it would make life a bit easier
**For CustomV...During the few months of working with CiviCRM, I have often found myself limited working with CustomValue API. Not sure if I am missing something but suggesting the following improvements so it would make life a bit easier
**For CustomValue get API**
1. Remove limitation of retrieving only 1 value for multiple custom data groups for Contact entity.
- This appears not to be the case, but [the documentation says only returns 1 row](https://docs.civicrm.org/dev/en/latest/api/custom-data/)
2. Add ability to retrieve values by custom group id/name possibly combined with entity id
- This would make it easier to retrieve all data for a particular custom group, even disregarding entity and entity id
- Add an API parameter like "custom_group_id" perhaps?
3. In the api explorer, add a separate parameter to select Entity (a select option perhaps?)
4. If the entity is selected, make Entity ID a chain select so it would display drop down list of entity ID's related to that entity
5. Add parameter "ID" (custom value id) in the API explorer so we can directly obtain value related to certain row ID coupled with custom group id
6. Reformat the way values are returned from the API. Few suggestions:
- group multiple custom values together into a separate array such as: "values":["id": 1, "latest":"first value" ,"custom_values":[23:"first value", 43:"second value"]] {- make "latest" value display ID rather than actual value, so we can get it from "custom_values" array -}
- if implementing above (2.), group by entity id etc.
7. Make entity_id NOT mandatory instead have separate combinations of 2 or more fields mandatory for eg: as in (5.) above, if custom_value_id is specified, custom_group_id should be mandatory
I think rather than trying to automatically figure out which entities/values to select from, would be better to give more flexibility to the developer via the API and prepare more comprehensive documentation.
**Add "delete" method for CustomValue actions**
Suggested parameters:
- custom_value_id combined with custom_group_id to delete specific custom value row
- custom_field_id to delete all values for that custom field
- custom_group_id to delete all values for that custom group
- {- can combine all of the above with entity_id to delete only for that one -}https://lab.civicrm.org/dev/core/-/issues/223Expose prefix and suffix in reports2018-07-24T00:24:18ZyashodhaExpose prefix and suffix in reportsAdd prefix and suffix to *getContactColumns* method.Add prefix and suffix to *getContactColumns* method.5.5.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/219Improve consistency displaying "Test Transactions"2018-07-24T19:41:11Zmattwiremjw@mjwconsult.co.ukImprove consistency displaying "Test Transactions"There are currently a number of inconsistencies with displaying test transactions:
1. There is either no indication, or it is not obvious that you are viewing a test contribution/recur/membership when viewing the details.
2. Test members...There are currently a number of inconsistencies with displaying test transactions:
1. There is either no indication, or it is not obvious that you are viewing a test contribution/recur/membership when viewing the details.
2. Test memberships do not appear in the contact membership tab, but test contributions/recurring contributions do.
Proposal:
1. Add some "help" text that appears above the entity detail when viewing the entity if it is a test transaction.
2. Show test memberships in contact membership tab so it is consistent with other tabs.5.5.0https://lab.civicrm.org/dev/core/-/issues/244Allow use of custom fields of type select without specifying an optiongroup2018-07-24T20:41:10Zmattwiremjw@mjwconsult.co.ukAllow use of custom fields of type select without specifying an optiongroupFor an extension I had a requirement to add a "Select Month" custom field. The options are populated dynamically using hook_civicrm_fieldOptions and there is no need for an option group to be associated with them (manually specifying th...For an extension I had a requirement to add a "Select Month" custom field. The options are populated dynamically using hook_civicrm_fieldOptions and there is no need for an option group to be associated with them (manually specifying the months of the year in an optiongroup means they won't be updated to match the current locale).
Additionally, if populated dynamically using the hook_civicrm_fieldOptions and there is an optiongroup associated with the field, the "Edit options" element is automatically added to the UI which is not desirable and does not work properly as the optiongroup is not populated.
There is a single line in CRM_Core_BAO_CustomField::getOptions which causes the function to return before calling hooks if the element is a Select and doesn't have an option group defined which makes it impossible to populate the field using hooks. Removing this allows the hook to populate the custom field values and everything works.
For an example see https://github.com/mattwire/uk.co.mjwconsult.variablerecurpayments (Edit a Membership Type and select the Pro-Rata Start Month).
https://github.com/civicrm/civicrm-core/pull/12439 is also required.
PR: https://github.com/civicrm/civicrm-core/pull/124405.0.0https://lab.civicrm.org/dev/core/-/issues/232Contact types with double hyphens in 'name' field : searches not returning an...2018-07-26T14:57:01ZPradeep Nayakpradpnayak@gmail.comContact types with double hyphens in 'name' field : searches not returning any contactshhttps://lab.civicrm.org/dev/core/-/issues/291Allow password field sizes to be set in props a la text fields2018-07-30T00:43:07ZseamusleeAllow password field sizes to be set in props a la text fieldshttps://lab.civicrm.org/dev/core/-/issues/221Inappropriate warning on preview page of empty custom data set2018-07-30T09:49:04ZmadhaviInappropriate warning on preview page of empty custom data setI'am using Civicrm version 5.2.2.
When a new empty custom data set is created and clicked on preview it gives following warning on the preview page:
![customDataPreview](/uploads/5c4116b36bdd37e3a090e70b3a31eb41/customDataPreview.png)
PR...I'am using Civicrm version 5.2.2.
When a new empty custom data set is created and clicked on preview it gives following warning on the preview page:
![customDataPreview](/uploads/5c4116b36bdd37e3a090e70b3a31eb41/customDataPreview.png)
PR here : https://github.com/civicrm/civicrm-core/pull/12392https://lab.civicrm.org/dev/core/-/issues/261Expose Financial Type on Grant form and View Page2018-07-31T21:50:22ZPradeep Nayakpradpnayak@gmail.comExpose Financial Type on Grant form and View PageIt turns out that `civicrm_grant` actually has a `financial_type_id` field, which doesn't seem to be exposed to the UI.
Submit a PR to
1. Add financial type field on Add/Edit Grant form.
2. Add Financial type section on View Grant page...It turns out that `civicrm_grant` actually has a `financial_type_id` field, which doesn't seem to be exposed to the UI.
Submit a PR to
1. Add financial type field on Add/Edit Grant form.
2. Add Financial type section on View Grant page.
3. Add financial type column in grant's search result.
PR:https://github.com/civicrm/civicrm-core/pull/12493https://lab.civicrm.org/dev/core/-/issues/277Recurring contribution tab shouldn't count test transactions2018-07-31T22:12:11ZPradeep Nayakpradpnayak@gmail.comRecurring contribution tab shouldn't count test transactions![Screenshot_from_2018-07-24_13-27-48](/uploads/4ec1bca56c36f0c71cf2b7694662bde6/Screenshot_from_2018-07-24_13-27-48.png)
PR at https://github.com/civicrm/civicrm-core/pull/12553![Screenshot_from_2018-07-24_13-27-48](/uploads/4ec1bca56c36f0c71cf2b7694662bde6/Screenshot_from_2018-07-24_13-27-48.png)
PR at https://github.com/civicrm/civicrm-core/pull/125535.5.0