civicrm-core.git
4 years agoAdd setEntityId() to entityForm
Matthew Wire (MJW Consulting) [Wed, 6 Nov 2019 16:21:06 +0000 (16:21 +0000)]
Add setEntityId() to entityForm

4 years agoMerge pull request #16545 from eileenmcnaughton/part_pend
Seamus Lee [Fri, 21 Feb 2020 06:53:00 +0000 (17:53 +1100)]
Merge pull request #16545 from eileenmcnaughton/part_pend

[REF] Extract function to getTransactionInfo

4 years agoMerge pull request #16606 from ejegg/API4Regex-5.23
Seamus Lee [Fri, 21 Feb 2020 06:49:14 +0000 (17:49 +1100)]
Merge pull request #16606 from ejegg/API4Regex-5.23

Fix two more php-finding regexes

4 years agoFix two more php-finding regexes
Elliott Eggleston [Fri, 21 Feb 2020 01:34:13 +0000 (20:34 -0500)]
Fix two more php-finding regexes

Before: Civi code living under a path containing the characters php
(such as ~/src/php/civicrm) will fail to load the API4 explorer with
a message like the following:
    ReflectionException: "Class \Civi\Api4\src does not exist"

After: API4 explorer loads no matter what the enclosing path

Very similar to PR #16377

4 years agoMerge pull request #16605 from seamuslee001/master
Matthew Wire [Thu, 20 Feb 2020 23:06:02 +0000 (23:06 +0000)]
Merge pull request #16605 from seamuslee001/master

[REF] Update civicrm_generated following merge of #16362

4 years agoMerge pull request #16604 from civicrm/5.23
Seamus Lee [Thu, 20 Feb 2020 21:15:56 +0000 (08:15 +1100)]
Merge pull request #16604 from civicrm/5.23

5.23

4 years ago[REF] Update civicrm_generated following merge of #16362
Seamus Lee [Thu, 20 Feb 2020 21:07:36 +0000 (08:07 +1100)]
[REF] Update civicrm_generated following merge of #16362

4 years agoMerge pull request #16602 from mattwire/apiv3paymentspec
Seamus Lee [Thu, 20 Feb 2020 20:34:47 +0000 (07:34 +1100)]
Merge pull request #16602 from mattwire/apiv3paymentspec

Add description to params for api3 Payment.get

4 years agoAdd description to params for api3 Payment.get
Matthew Wire [Thu, 20 Feb 2020 17:12:50 +0000 (17:12 +0000)]
Add description to params for api3 Payment.get

4 years agoMerge pull request #16600 from mattwire/casesettingstpl
Yashodha Chaku [Thu, 20 Feb 2020 16:17:54 +0000 (21:47 +0530)]
Merge pull request #16600 from mattwire/casesettingstpl

Remove hardcoded settings from form and use SettingForm.tpl for Case settings

4 years agoMerge pull request #16362 from eileenmcnaughton/pp_disable
Matthew Wire [Thu, 20 Feb 2020 14:50:13 +0000 (14:50 +0000)]
Merge pull request #16362 from eileenmcnaughton/pp_disable

Do not enable core payment processor types that we believe likely don't work on new installs

4 years agoRemove hardcoded settings from form and use SettingForm.tpl for Case settings
Matthew Wire [Thu, 20 Feb 2020 13:36:52 +0000 (13:36 +0000)]
Remove hardcoded settings from form and use SettingForm.tpl for Case settings

4 years agoMerge pull request #16599 from seamuslee001/dev_translation_36
Mathieu Lu [Thu, 20 Feb 2020 13:27:24 +0000 (08:27 -0500)]
Merge pull request #16599 from seamuslee001/dev_translation_36

dev/translation#36 Ensure that we are only passing integers to the ng…

4 years agoMerge pull request #16562 from eileenmcnaughton/notice
Matthew Wire [Thu, 20 Feb 2020 12:39:19 +0000 (12:39 +0000)]
Merge pull request #16562 from eileenmcnaughton/notice

Move determination of year & month to formatCreditCardDetails

4 years agodev/translation#36 Ensure that we are only passing integers to the ngettext function...
Seamus Lee [Thu, 20 Feb 2020 01:53:07 +0000 (12:53 +1100)]
dev/translation#36 Ensure that we are only passing integers to the ngettext function for plurals

4 years agoMerge pull request #16596 from civicrm/5.23
Eileen McNaughton [Wed, 19 Feb 2020 22:52:54 +0000 (11:52 +1300)]
Merge pull request #16596 from civicrm/5.23

5.23

4 years agoMerge pull request #16594 from alifrumin/rn-5.23
Seamus Lee [Wed, 19 Feb 2020 21:48:24 +0000 (08:48 +1100)]
Merge pull request #16594 from alifrumin/rn-5.23

First pass at release notes for 5.23

4 years agoFirst pass at release notes for 5.23
Alice Frumin [Wed, 19 Feb 2020 20:43:16 +0000 (15:43 -0500)]
First pass at release notes for 5.23

4 years agoMerge pull request #16529 from mattwire/altermailing_templatetype
Eileen McNaughton [Wed, 19 Feb 2020 20:06:07 +0000 (09:06 +1300)]
Merge pull request #16529 from mattwire/altermailing_templatetype

Pass template_type through to alterMailing hook

4 years agoMerge pull request #16085 from seamuslee001/dev_core_1466
Matthew Wire [Wed, 19 Feb 2020 16:25:51 +0000 (16:25 +0000)]
Merge pull request #16085 from seamuslee001/dev_core_1466

[NFC] dev/core#1466 Update Documentation URLS to be the correct links…

4 years agoMerge pull request #15940 from seamuslee001/dev_financial_105
Matthew Wire [Wed, 19 Feb 2020 16:18:55 +0000 (16:18 +0000)]
Merge pull request #15940 from seamuslee001/dev_financial_105

dev/financial#105 Add CSS class onto the radio button payment processor options

4 years agoMerge pull request #15316 from mepps/order-campaign-dashboard
Matthew Wire [Wed, 19 Feb 2020 16:16:56 +0000 (16:16 +0000)]
Merge pull request #15316 from mepps/order-campaign-dashboard

Secondarily order campaign dashboard by id

4 years agoMerge pull request #15884 from kainuk/issue-lab-1365
Matthew Wire [Wed, 19 Feb 2020 16:14:17 +0000 (16:14 +0000)]
Merge pull request #15884 from kainuk/issue-lab-1365

Related / Inherited Memberships: Custom fields not filled with data

4 years agoMerge pull request #16359 from jensschuppe/dev_core_1547
Matthew Wire [Wed, 19 Feb 2020 16:10:04 +0000 (16:10 +0000)]
Merge pull request #16359 from jensschuppe/dev_core_1547

dev/core#1547 Add DT_RowClass CSS classes to nested group markup

4 years agoMerge pull request #16005 from magnolia61/Contribution_Invoice_Privacy
Seamus Lee [Wed, 19 Feb 2020 10:08:25 +0000 (21:08 +1100)]
Merge pull request #16005 from magnolia61/Contribution_Invoice_Privacy

dev/core#1436 Do not CC or BCC Contribution invoice

4 years agoMerge pull request #16580 from civicrm/5.23
Eileen McNaughton [Tue, 18 Feb 2020 21:49:59 +0000 (10:49 +1300)]
Merge pull request #16580 from civicrm/5.23

5.23

4 years agoMerge pull request #16588 from eileenmcnaughton/523partnotice
Seamus Lee [Tue, 18 Feb 2020 19:57:08 +0000 (06:57 +1100)]
Merge pull request #16588 from eileenmcnaughton/523partnotice

Fix enotice regression (unreleased)

4 years agoMerge pull request #16589 from colemanw/copyValues
Eileen McNaughton [Tue, 18 Feb 2020 19:47:00 +0000 (08:47 +1300)]
Merge pull request #16589 from colemanw/copyValues

Cleanup copyValues DAO function

4 years agoCleanup copyValues DAO function
Coleman Watts [Tue, 18 Feb 2020 13:29:17 +0000 (08:29 -0500)]
Cleanup copyValues DAO function

The $serializeArrays parameter was transitional and is now always enabled.
Passing $params by reference was unnecessary and has been removed.
Renamed a few variables for readability.

4 years agoMerge pull request #16585 from eileenmcnaughton/dep_it
Yashodha Chaku [Tue, 18 Feb 2020 11:21:13 +0000 (16:51 +0530)]
Merge pull request #16585 from eileenmcnaughton/dep_it

Add deprecation notice

4 years agoMerge pull request #16581 from eileenmcnaughton/nfc
Yashodha Chaku [Tue, 18 Feb 2020 10:04:07 +0000 (15:34 +0530)]
Merge pull request #16581 from eileenmcnaughton/nfc

[NFC] Test cleanup.

4 years agoFix enotice regressionn
eileen [Tue, 18 Feb 2020 07:23:13 +0000 (20:23 +1300)]
Fix enotice regressionn

This was merged to 5.23 but I made a booboo in it
https://github.com/civicrm/civicrm-core/commit/a3aed42a453009733e8feb2c56fde5750b37cd14

I think the params are actually not used so it's just the notice it causes but this fixes

4 years agoMerge pull request #16587 from seamuslee001/5.23
Seamus Lee [Tue, 18 Feb 2020 06:52:24 +0000 (17:52 +1100)]
Merge pull request #16587 from seamuslee001/5.23

Add release-notes/5.22.1.md

4 years agoMerge pull request #16575 from colemanw/savedSearch
Eileen McNaughton [Tue, 18 Feb 2020 06:52:13 +0000 (19:52 +1300)]
Merge pull request #16575 from colemanw/savedSearch

Make savedSearch bao sane

4 years agoMerge pull request #16583 from totten/5.23-gencode-no-l10n
Eileen McNaughton [Tue, 18 Feb 2020 06:51:57 +0000 (19:51 +1300)]
Merge pull request #16583 from totten/5.23-gencode-no-l10n

xml/GenCode.php - Fix execution in default locale (without l10n data)

4 years agoAdd release-notes/5.22.1.md
Tim Otten [Tue, 18 Feb 2020 06:26:22 +0000 (22:26 -0800)]
Add release-notes/5.22.1.md

4 years agoAdd deprecation notice
eileen [Tue, 18 Feb 2020 05:31:18 +0000 (18:31 +1300)]
Add deprecation notice

I've been trying to figure out when this line would be hit but I just can't find a way to trigger
it - removing it would help a lot with this code but let's deprecate for a bit.

4 years agoFurther test fix
eileen [Tue, 18 Feb 2020 04:26:06 +0000 (17:26 +1300)]
Further test fix

4 years agoMerge pull request #16582 from eileenmcnaughton/ids
Seamus Lee [Tue, 18 Feb 2020 04:29:01 +0000 (15:29 +1100)]
Merge pull request #16582 from eileenmcnaughton/ids

(NFC) Remove `$Id$` from header

4 years agoMake savedSearch bao sane
Coleman Watts [Mon, 17 Feb 2020 21:40:35 +0000 (16:40 -0500)]
Make savedSearch bao sane

4 years agoxml/GenCode.php - Fix execution in default locale (without l10n data)
Tim Otten [Tue, 18 Feb 2020 03:40:14 +0000 (19:40 -0800)]
xml/GenCode.php - Fix execution in default locale (without l10n data)

Overview
--------

This fixes a recent regression in which `xml/GenCode.php` fails to execute in certain configurations.

Initial report: https://github.com/civicrm/civicrm-buildkit/issues/503

Before
------

* If the folder `l10n` exists in its traditional location, and if you run `./bin/setup.sh -g`, then it
  correctly executes.
* If the folder `l10n` does not exist in its traditional locacation, and if you run `./bin/setup.sh -g`,
  then it fails with an error like this:
  ```
  + php -d mysql.default_host=127.0.0.1:3306 -d mysql.default_user=dmasterciv_abcde -d mysql.default_password=abcd1234 GenCode.php schema/Schema.xml '' Drupal

  civicrm_domain.version := 5.23.alpha1

  Parsing schema description schema/Schema.xml
  Extracting database information
  Extracting table information
  PHP Fatal error:  Uncaught RuntimeException: Invalid configuration: the [cms.root] path must be an absolute URL in /home/me/.../Civi/Core/Paths.php:174
  Stack trace:
  #0 /home/me/.../Civi/Core/Paths.php(151): Civi\Core\Paths->toAbsoluteUrl('/', 'cms.root')
  #1 /home/me/.../Civi/Core/Paths.php(176): Civi\Core\Paths->getVariable('cms.root', 'url')
  #2 /home/me/.../Civi/Core/Paths.php(151): Civi\Core\Paths->toAbsoluteUrl('/', 'civicrm.root')
  #3 /home/me/.../Civi/Core/Paths.php(224): Civi\Core\Paths->getVariable('civicrm.root', 'path')
  #4 /home/me/.../Civi/Core/Paths.php(84): Civi\Core\Paths->getPath('l10n')
  #5 [internal function]: Civi\Core\Paths->Civi\Core\{closure}()
  #6 /home/jo in /home/me/.../Civi/Core/Paths.php on line 174
  ```

After
-----

You can run `./bin/setup.sh -g` with or without the `l10n` folder.

Comments
--------

There's an argument to be made that this shouldn't be necessary: when running
`GenCode`, it should only create PHP files, and none of the output should depend
on the CMS URL - because that's liable to change when you deploy the PHP code.
If someone did try to generate URL at such an early stage, it's arguably good to
generate an error.  In point of fact, `GenCode` is not actually using the CMS
URL.

The oddity stems from the contract of `CRM_Utils_System_*` (specifically,
`getCiviSourceStorage()` and `getDefaultFileStorage()`) which do double-duty
providing both path and URL.  To avoid duplicate work, `Civi\Core\Paths` uses
the same grain of information - it tracks the pairs of path+URL.

A more aggressive fix might be to split `getCiviSourceStorage()` and
`getDefaultFileStorage()` so that it's possible to get the path and URL
separately; then revise `Civi\Core\Paths` to take advantage of the finer-grained
contract.  However, splitting those things would be a more invasive patch,
and we're currently in RC.

4 years ago[NFC] Test cleanup.
eileen [Tue, 18 Feb 2020 01:01:53 +0000 (14:01 +1300)]
[NFC] Test cleanup.

Cleaned up this test - re-used code etc

4 years agoMerge pull request #16531 from eileenmcnaughton/cn_
colemanw [Tue, 18 Feb 2020 02:57:39 +0000 (21:57 -0500)]
Merge pull request #16531 from eileenmcnaughton/cn_

dev/financial#84 Move sequential credit notes from 'deeply  embeded functions to separate structure

4 years agoMerge pull request #16528 from mattwire/removeoldflexmailer
Tim Otten [Tue, 18 Feb 2020 01:38:18 +0000 (17:38 -0800)]
Merge pull request #16528 from mattwire/removeoldflexmailer

Remove old defines for flexmailer that haven't been required since CiviCRM 5.x

4 years agoRemove from header
eileen [Tue, 18 Feb 2020 01:18:29 +0000 (14:18 +1300)]
Remove  from header

I was a bit surprised to see the old drupal svn  value pop back up - did if come from this header.txt file

4 years agoMerge pull request #16578 from seamuslee001/dev_core_1602
Seamus Lee [Tue, 18 Feb 2020 01:01:06 +0000 (12:01 +1100)]
Merge pull request #16578 from seamuslee001/dev_core_1602

dev/core#1602 Fix join date filtering in search builder by standardis…

4 years agodev/core#1602 Fix join date filtering in search builder by standardising date field...
Seamus Lee [Mon, 17 Feb 2020 23:00:46 +0000 (10:00 +1100)]
dev/core#1602 Fix join date filtering in search builder by standardising date field handling in Membership Query BAO

4 years agoMerge pull request #16563 from eileenmcnaughton/selfsvc
Seamus Lee [Mon, 17 Feb 2020 23:32:25 +0000 (10:32 +1100)]
Merge pull request #16563 from eileenmcnaughton/selfsvc

[NFC] Minor code cleanup

4 years agoMerge pull request #16577 from civicrm/5.23
Eileen McNaughton [Mon, 17 Feb 2020 22:57:11 +0000 (11:57 +1300)]
Merge pull request #16577 from civicrm/5.23

5.23 to master

4 years agoMerge pull request #16558 from eileenmcnaughton/523dupe
Eileen McNaughton [Mon, 17 Feb 2020 22:53:15 +0000 (11:53 +1300)]
Merge pull request #16558 from eileenmcnaughton/523dupe

dev/core#1597 & dev/core#1595 fix regression when deduping on custom fields

4 years agoCRM-21541 CRM.moneyFormat can't handle values with zero or one decimals (#16445)
Sandor Semsey [Mon, 17 Feb 2020 22:11:37 +0000 (23:11 +0100)]
CRM-21541 CRM.moneyFormat can't handle values with zero or one decimals (#16445)

* CRM.formatMoney() handles zero or one decimals

* CRM.formatMoney() handles zero or one decimals

* CRM.formatMoney() handles zero or one decimals

* CRM.formatMoney() handles zero or one decimals

* CRM.formatMoney() handles zero or one decimals

* CRM.formatMoney() handles zero or one decimals

* CRM.formatMoney() handles zero or one decimals

* missing semicolon

* comment

* comment

* comment

* comment

4 years agoMerge pull request #16564 from eileenmcnaughton/test
Seamus Lee [Mon, 17 Feb 2020 21:43:07 +0000 (08:43 +1100)]
Merge pull request #16564 from eileenmcnaughton/test

dev/financial#102 Extend test to check status

4 years agodev/core#1597 & dev/core#1595 fix regression when deduping on custom fields
eileen [Sun, 16 Feb 2020 21:26:03 +0000 (10:26 +1300)]
dev/core#1597 & dev/core#1595 fix regression when deduping on custom fields

4 years agoMerge pull request #16571 from wmortada/over-ride
Eileen McNaughton [Mon, 17 Feb 2020 21:13:27 +0000 (10:13 +1300)]
Merge pull request #16571 from wmortada/over-ride

(NFC) Fix typo - no hyphen in 'override'

4 years agoMerge pull request #16095 from seamuslee001/dev_core_1450
Eileen McNaughton [Mon, 17 Feb 2020 20:58:10 +0000 (09:58 +1300)]
Merge pull request #16095 from seamuslee001/dev_core_1450

dev/core#1450 Try reducing the size of the temporary table so it only…

4 years agoMerge pull request #16574 from civicrm/5.23
Eileen McNaughton [Mon, 17 Feb 2020 20:52:44 +0000 (09:52 +1300)]
Merge pull request #16574 from civicrm/5.23

5.23

4 years agoMerge pull request #16567 from eileenmcnaughton/parti_form
Seamus Lee [Mon, 17 Feb 2020 20:50:10 +0000 (07:50 +1100)]
Merge pull request #16567 from eileenmcnaughton/parti_form

Fix theoretical regression

4 years agoMerge pull request #16572 from civicrm/5.23
Seamus Lee [Mon, 17 Feb 2020 20:06:53 +0000 (07:06 +1100)]
Merge pull request #16572 from civicrm/5.23

5.23

4 years agoFix typo - no hyphen in 'override'
William Mortada [Mon, 17 Feb 2020 18:04:18 +0000 (18:04 +0000)]
Fix typo - no hyphen in 'override'

4 years agoMerge pull request #16506 from mattwire/invoicedue_countrefunded
Matthew Wire [Mon, 17 Feb 2020 16:01:31 +0000 (16:01 +0000)]
Merge pull request #16506 from mattwire/invoicedue_countrefunded

Count refunds when calculating amount due for an invoice

4 years agoMerge pull request #16009 from jmcclelland/import-match-phone
colemanw [Mon, 17 Feb 2020 15:20:06 +0000 (10:20 -0500)]
Merge pull request #16009 from jmcclelland/import-match-phone

dev/core#1438 Enable matching on contact phone when importing contributions

4 years agoMerge pull request #16035 from demeritcowboy/ang-crmcasetype-list-boolean
Matthew Wire [Mon, 17 Feb 2020 15:16:22 +0000 (15:16 +0000)]
Merge pull request #16035 from demeritcowboy/ang-crmcasetype-list-boolean

dev/core#1451 Incorrect dropdown action choices on case type listing screen

4 years agoMerge pull request #16565 from eileenmcnaughton/contview
Matthew Wire [Mon, 17 Feb 2020 14:33:57 +0000 (14:33 +0000)]
Merge pull request #16565 from eileenmcnaughton/contview

dev/financial#118 Move source & receive date to the top on contribution view page

4 years agoMerge pull request #16568 from JGaunt/patch-4
Yashodha Chaku [Mon, 17 Feb 2020 13:25:25 +0000 (18:55 +0530)]
Merge pull request #16568 from JGaunt/patch-4

Update 5.23.0.md

4 years agoMerge pull request #16491 from mfb/undefined-index
Matthew Wire [Mon, 17 Feb 2020 13:11:28 +0000 (13:11 +0000)]
Merge pull request #16491 from mfb/undefined-index

Resolve notices if first donation amount and date columns were disabled

4 years agoMerge pull request #16455 from MegaphoneJon/core-1568
Matthew Wire [Mon, 17 Feb 2020 13:03:11 +0000 (13:03 +0000)]
Merge pull request #16455 from MegaphoneJon/core-1568

core#1568: Show recipientListing to non-admins

4 years agoUpdate 5.23.0.md
Jade Gaunt [Mon, 17 Feb 2020 11:52:39 +0000 (11:52 +0000)]
Update 5.23.0.md

Added organisation name :)

4 years agoMerge pull request #14928 from lcdservices/dev-core-1158
Matthew Wire [Mon, 17 Feb 2020 11:01:19 +0000 (11:01 +0000)]
Merge pull request #14928 from lcdservices/dev-core-1158

dev/core#1158 mailing labels: explicitly set primary flag

4 years agoMerge pull request #15856 from agileware/CIVICRM-1368
Matthew Wire [Mon, 17 Feb 2020 08:46:03 +0000 (08:46 +0000)]
Merge pull request #15856 from agileware/CIVICRM-1368

dev/financial#104 Use rounding and integers to compare monetary values…

4 years agoFix theoretical regression
eileen [Mon, 17 Feb 2020 08:04:00 +0000 (21:04 +1300)]
Fix theoretical regression

This PR https://github.com/civicrm/civicrm-core/pull/16363/commits/44237a295dc5eab4f6110fb0556b1af742364f6e
(merged to 5.23) calls self::::getDefaultRoleID() in a way that was always flawed but definitely woudl
not work now. I think it is never reached but better to put this fix into 5.23 & maybe reemove the line in master
later since it assumes participant_status_id is optional - which is not true of the backoffice form

4 years agodev/financial#118 Move source & receive date to the top on contribution view page
eileen [Mon, 17 Feb 2020 06:28:43 +0000 (19:28 +1300)]
dev/financial#118 Move source & receive date to the top on contribution view page

Per https://lab.civicrm.org/dev/financial/issues/118 this doesn't seem to be controversial - although there is a desire
to take it further & once this is merged I'll look at that

4 years agodev/financial#102 Extend test to check status
eileen [Mon, 17 Feb 2020 06:03:03 +0000 (19:03 +1300)]
dev/financial#102 Extend test to check status

It turns out the code is working fine (fixed in the meantime?) and I just needed to extend the checks
a bit, did some tangental cleanup

4 years ago[NFC] Minor code cleanup
eileen [Mon, 17 Feb 2020 04:50:04 +0000 (17:50 +1300)]
[NFC] Minor code cleanup

Declare exceptions, use single quotes & strict comparison, do not declare unused params

4 years agoMove determination of year & month to formatCreditCardDetails
eileen [Mon, 17 Feb 2020 01:37:16 +0000 (14:37 +1300)]
Move determination of year & month to formatCreditCardDetails

Per https://github.com/civicrm/civicrm-core/pull/16514 it makes sense as a better place for these

4 years agoMerge pull request #16557 from eileenmcnaughton/find
Eileen McNaughton [Mon, 17 Feb 2020 00:34:02 +0000 (13:34 +1300)]
Merge pull request #16557 from eileenmcnaughton/find

[NFC] Preliminary cleanup

4 years agoMerge pull request #16498 from seamuslee001/net_smtp_upgrade
Seamus Lee [Sun, 16 Feb 2020 22:50:36 +0000 (09:50 +1100)]
Merge pull request #16498 from seamuslee001/net_smtp_upgrade

Upgrade Net_SMTP Package and remove now unneded patches and mov…

4 years agoUpdate patch URL and remove patch content as per standard now
Seamus Lee [Sun, 16 Feb 2020 21:39:24 +0000 (08:39 +1100)]
Update patch URL and remove patch content as per standard now

4 years ago[REF] Upgrade Net_SMTP Package and remove now unneded patches and move to using compo...
Seamus Lee [Sat, 8 Feb 2020 03:40:42 +0000 (14:40 +1100)]
[REF] Upgrade Net_SMTP Package and remove now unneded patches and move to using composer patches rather than patching in a script file

4 years ago[NFC] Preliminary cleanup
eileen [Sun, 16 Feb 2020 21:01:51 +0000 (10:01 +1300)]
[NFC] Preliminary cleanup

Declare exceptions, params, don't declare unused variables

4 years agoMerge pull request #16552 from eileenmcnaughton/part_form
colemanw [Sun, 16 Feb 2020 19:36:56 +0000 (14:36 -0500)]
Merge pull request #16552 from eileenmcnaughton/part_form

[REF] Fix static call to non-static function.

4 years agodev/financial#84 Move sequential credit notes from 'deeply embedeed in BAO functions...
eileen [Wed, 12 Feb 2020 13:23:25 +0000 (02:23 +1300)]
dev/financial#84 Move sequential credit notes from 'deeply  embedeed in BAO functions' to usin a listener structure

https://lab.civicrm.org/dev/financial/issues/84

We have a significant problem in our code base that it is hard to cleanup our key processes and make them usable and
Form-builder ready because of all the features deeply interwoven into them. It will be important that our
Order->add payment flow works and can be utilsed by the form builder. The expectation is that adding a payment
will update all the appropriate entities. We've been working pretty hard on this for a couple of years now (I think the time
taken to clean up code is sadly greater than the time it takes to add it :-() and the Payment.create part is getting
pretty solid now.

However, we are consistently hampered by code that has been 'enmeshed' into deep BAO code. In the case of the credit note
creation something that can easily be implemented as a pre hook and kept entirely out of the  Contribution.create function
is not only embedded in there but also in updateFinancialAccountsOnContributionStatusChange - which is one of the functions
we are some dozens of hours into adding tests & 'sorting out'. We need to find a way to

1) Declutter key functions where possible and
2) Model good ways of implementing things by hook (& work through limitations in this approach) as part of cleaning
up core and pushing towards a LeXIM approach.

I originally agreed with the CiviDiet approach that we should try to move the myriad of things that are 'add ons' that someone
thought was necessary & useful to others (or less charitably  they thought that if they got it into core someone else would have
to maintain it for them) moved out of core into extensions and eventually the maintenance of them moved out of the core team too.

However, it's clear from the  discussion on moving credit notes out of core that this is too hard for the forseeable future. We can try to avoid more features being added to core but most features in core are used by at least one organization & the politics of
moving things out are too hard. On the bright side we let a lot less new features into core these days - not none - the membership status override date springs to mind and the ongoing adding of fields & filters to reports - but less.

This leaves us with the question of whether we can still achieve the goal of making add-on features less of a developer burden.
In addition to ensuring code is tested we can do this by getting it out of the 'deep functions' into a listener structure.
I was able to covert the  'spaghetti-like-tendrils' in the credit note code to a simple 'pre' hook.

So it felt like we needed to create something new. Something like .. an extension .. but not visible on the extensions screen
and in core. Something like ... an extension in a folder in the core codebase that is suppressed from the extensions UI....

So this adds it as an extension to core in a new location & ensures GUI users cannot see it. I don't know exactly where we
draw the line around packaging things this way - Partial payments is clearly part of the core architecture, but there might be
a world in which we move something like event cart to be a more distinct bundle. As we move to form builder forms we are going to
want forms being replaced to be able to be 'quarantined' for future amputation.... I would be looking to move financial type acls and
invoicing to this structure - mostly because they are the biggest 'offenders' in terms of having code all over the place causing
problems with  other code initiatives & we've struggled to come up with a way to deal with that other than putting touching that
code in the 'too hard basket'. But even things like PCPs & Premiums would be more maintainable if they were discrete & overcoming
the challenges involved in that would solve a lot of extensibility issues.

Note this approach permits an  incremental cleanup-up-to-separation  process. For example we could create an  extension for  a
feature and move some code to it and later move some other code. For example we  could move the invoicingPostProcessHook
to a  shell invoicing extension and at some later point  address other  parts of the  invoicing code (check LineItem::getLineItems
for the chunk of  code  that has been blocking  other  cleanup - moving  this to a listener would help a lot

Note this PR does not address the significant performance issues associated with the creditnotes code on larger sites, only the impact
it has on our code maintainability. If we can agree a way to start to address how to split out or code into listeners in an agreed structure then I can look at that as a follow up.

4 years agoMerge pull request #16551 from totten/master-ext-tags
Eileen McNaughton [Sat, 15 Feb 2020 22:37:43 +0000 (11:37 +1300)]
Merge pull request #16551 from totten/master-ext-tags

info.xml - Allow extensions to define a list of tags

4 years agoMerge pull request #16554 from demeritcowboy/add-tag-ewarning
colemanw [Sat, 15 Feb 2020 22:28:14 +0000 (17:28 -0500)]
Merge pull request #16554 from demeritcowboy/add-tag-ewarning

dev/core#1593 and dev/core#1536 - Remove unused code causing E_WARNING

4 years agoCount refunds when calculating amount due for an invoice
Matthew Wire [Tue, 11 Feb 2020 15:18:49 +0000 (15:18 +0000)]
Count refunds when calculating amount due for an invoice

4 years agoMerge pull request #16525 from eileenmcnaughton/validate
Matthew Wire [Sat, 15 Feb 2020 18:52:06 +0000 (18:52 +0000)]
Merge pull request #16525 from eileenmcnaughton/validate

Allow any casting done in Type::validate to bubble up to Request::retrieveValue

4 years agoremove unused code causing E_WARNING
demeritcowboy [Sat, 15 Feb 2020 02:28:46 +0000 (21:28 -0500)]
remove unused code causing E_WARNING

4 years agoMerge pull request #16468 from mattwire/tokens_activitytokenprocessortrait
Eileen McNaughton [Sat, 15 Feb 2020 03:29:36 +0000 (16:29 +1300)]
Merge pull request #16468 from mattwire/tokens_activitytokenprocessortrait

REF Refactor ActivityTokens to use a trait that can be shared with other entities

4 years ago[REF] Fix static call to non-static function.
eileen [Sat, 15 Feb 2020 02:45:13 +0000 (15:45 +1300)]
[REF] Fix static call to non-static function.

This non-static function was being called statically. On grepping I found it is only called from this
one place so  I moved it to the form

4 years agoMerge pull request #16515 from mattwire/phpnotice_noteprivacy
Eileen McNaughton [Sat, 15 Feb 2020 02:39:22 +0000 (15:39 +1300)]
Merge pull request #16515 from mattwire/phpnotice_noteprivacy

Fix a PHP notice for users with limited permissions when loading cont…

4 years agoMerge pull request #16533 from eileenmcnaughton/ex_angular
Eileen McNaughton [Sat, 15 Feb 2020 02:36:55 +0000 (15:36 +1300)]
Merge pull request #16533 from eileenmcnaughton/ex_angular

Do not fatally fail on angular pages if an extension is missing

4 years agoinfo.xml - Allow extensions to define a list of tags
Tim Otten [Sat, 15 Feb 2020 01:24:40 +0000 (17:24 -0800)]
info.xml - Allow extensions to define a list of tags

Overview
--------

This adopts a convention by which extensions may use `info.xml` to register tags, e.g.

```xml
<extension key="org.civicrm.foo" type="module">
  <tags>
    <tag>civicontribute</tag>
    <tag>payment-processor</tag>
    <tag>install-mandatory</tag>
  </tags>
</extension>
```

Before
------

To add *any* metadata to `info.xml` files, you must update the parser and providing
filtering/indexing.

After
-----

If you need to add very simple metadata (tags), you can do that without
extra parsing code.  The tag information can be accessed in the following
ways:

* Using the extension mapper
    ```php
    $mapper = CRM_Extension_System::singleton()->getMapper();
    $allTags = $mapper->getAllTags();
    $mandatoryExts = $mapper->getKeysByTag('install-mandatory');
    ```
* The `Extension.get` API will return the list of tags for each ext

4 years agoMerge pull request #16548 from civicrm/5.23
Seamus Lee [Sat, 15 Feb 2020 00:09:48 +0000 (11:09 +1100)]
Merge pull request #16548 from civicrm/5.23

5.23

4 years agoMerge pull request #16547 from seamuslee001/5.23
Seamus Lee [Sat, 15 Feb 2020 00:07:37 +0000 (11:07 +1100)]
Merge pull request #16547 from seamuslee001/5.23

[NFC] Ensure that annon permissions are correctly assigned when enabl…

4 years agoMerge pull request #16549 from seamuslee001/style_fix_property_bag
Seamus Lee [Sat, 15 Feb 2020 00:07:28 +0000 (11:07 +1100)]
Merge pull request #16549 from seamuslee001/style_fix_property_bag

[NFC] Fix style error

4 years ago[NFC] Fix style error
Seamus Lee [Fri, 14 Feb 2020 23:58:14 +0000 (10:58 +1100)]
[NFC] Fix style error

4 years agoMerge pull request #16532 from eileenmcnaughton/5.23
Seamus Lee [Fri, 14 Feb 2020 23:55:02 +0000 (10:55 +1100)]
Merge pull request #16532 from eileenmcnaughton/5.23

dev/core#1588 Fix regression where empty string is passed to PropertyBag

4 years ago[NFC] Ensure that annon permissions are correctly assigned when enabling civicrm...
Seamus Lee [Fri, 14 Feb 2020 23:05:34 +0000 (10:05 +1100)]
[NFC] Ensure that annon permissions are correctly assigned when enabling civicrm webtest module in backdrop

4 years agoMerge pull request #16544 from seamuslee001/dev_core_1594
Seamus Lee [Fri, 14 Feb 2020 21:16:31 +0000 (08:16 +1100)]
Merge pull request #16544 from seamuslee001/dev_core_1594

dev/core#1594 [TEST] Fix running of unit tests within an extension

4 years agoExtract function to getTransactionInfo
eileen [Fri, 14 Feb 2020 21:13:46 +0000 (10:13 +1300)]
Extract function to getTransactionInfo

4 years agoMerge pull request #16543 from jmcclelland/issue1589
Eileen McNaughton [Fri, 14 Feb 2020 20:20:35 +0000 (09:20 +1300)]
Merge pull request #16543 from jmcclelland/issue1589

dev/core#1589 avoid error when merging record with null create date