civicrm-core.git
5 years agoMerge pull request #15751 from magnolia61/workflow_template_contribution_terms
Eileen McNaughton [Thu, 7 Nov 2019 01:26:14 +0000 (14:26 +1300)]
Merge pull request #15751 from magnolia61/workflow_template_contribution_terms

changed wording to Total Fee & Total Paid

5 years agoMerge pull request #15748 from eileenmcnaughton/line_item_belt_braces
Eileen McNaughton [Thu, 7 Nov 2019 01:02:14 +0000 (14:02 +1300)]
Merge pull request #15748 from eileenmcnaughton/line_item_belt_braces

Provide precautionary handling for theoretical error scenario.

5 years agochanged wording to Total Fee & Total Paid
magnolia61 [Wed, 6 Nov 2019 23:38:40 +0000 (00:38 +0100)]
changed wording to Total Fee & Total Paid

5 years agoProvide precautionary handling for theoretical error scenario.
eileen [Wed, 6 Nov 2019 19:40:37 +0000 (08:40 +1300)]
Provide precautionary handling for theoretical error scenario.

While testing payments I hit a bug where I tried to add a payment to a contribution with no financial items.

I never managed to replicate it again or determine how the payment came to be in that state but
it's been playing in my mind that people could get fatal errors if the financial_items don't exist
and dealing with those as regression reports will very tough. So my plan is
- for 5.20 add this extra routine to create it if it does not exist
- use this mechanism + more digging to figure out how legit an issue it is https://github.com/civicrm/civicrm-core/pull/15706
- in future releases 'get noisy' about having to create them if they don't exist
- eventually remove this routine

5 years agoMerge pull request #15740 from eileenmcnaughton/partial
Seamus Lee [Wed, 6 Nov 2019 23:23:44 +0000 (10:23 +1100)]
Merge pull request #15740 from eileenmcnaughton/partial

dev/financial#40 Fix for non-allocation of payment to fully reversed checkboxes option

5 years agoMerge pull request #15745 from seamuslee001/master
Eileen McNaughton [Wed, 6 Nov 2019 22:07:34 +0000 (11:07 +1300)]
Merge pull request #15745 from seamuslee001/master

Update template upgrade list as per PR #15742

5 years agoMerge pull request #15750 from eileenmcnaughton/except
Eileen McNaughton [Wed, 6 Nov 2019 21:06:22 +0000 (10:06 +1300)]
Merge pull request #15750 from eileenmcnaughton/except

[NFC] Cleanup on exceptions

5 years agoMerge pull request #15744 from yashodha/participant_edit
Eileen McNaughton [Wed, 6 Nov 2019 21:04:13 +0000 (10:04 +1300)]
Merge pull request #15744 from yashodha/participant_edit

(dev/core#1065) Participant in Edit mode needs to be shown consistently

5 years agoMerge pull request #15749 from seamuslee001/Additional_Fixes_to_workflow_templates
Seamus Lee [Wed, 6 Nov 2019 20:56:27 +0000 (07:56 +1100)]
Merge pull request #15749 from seamuslee001/Additional_Fixes_to_workflow_templates

Additional fixes to workflow templates

5 years agoUpdate template upgrade list as per PR #15742
Seamus Lee [Wed, 6 Nov 2019 18:43:57 +0000 (05:43 +1100)]
Update template upgrade list as per PR #15742

5 years agoCleanup on exceptions
eileen [Wed, 6 Nov 2019 20:09:51 +0000 (09:09 +1300)]
Cleanup on exceptions

Fixes a low level function to throw a CRM_Core_Exception & tidies up functions
above to specify that. Fixes casing on a function call, removes a fatal
for status bounce

5 years agoFix Smarty Syntax in payment_or_refund_notification_text template and update unit...
Seamus Lee [Wed, 6 Nov 2019 19:44:21 +0000 (06:44 +1100)]
Fix Smarty Syntax in payment_or_refund_notification_text template and update unit tests to match the change in langauge in the templates

5 years agoMerge pull request #15746 from civicrm/5.19
Eileen McNaughton [Wed, 6 Nov 2019 19:29:45 +0000 (08:29 +1300)]
Merge pull request #15746 from civicrm/5.19

5.19

5 years agoMerge pull request #15741 from totten/5.19-volinst
Seamus Lee [Wed, 6 Nov 2019 19:18:37 +0000 (06:18 +1100)]
Merge pull request #15741 from totten/5.19-volinst

(dev/core#1093) Fix regression during extension activation

5 years agoMerge pull request #15743 from eileenmcnaughton/validate_test
Seamus Lee [Wed, 6 Nov 2019 18:35:01 +0000 (05:35 +1100)]
Merge pull request #15743 from eileenmcnaughton/validate_test

Fix test to be more valid

5 years agoAdditional changes to workflow message templates
magnolia61 [Wed, 6 Nov 2019 07:52:02 +0000 (08:52 +0100)]
Additional changes to workflow message templates

5 years ago(dev/core#1065) Participant in Edit mode needs to be shown consistently
yashodha [Wed, 6 Nov 2019 09:07:55 +0000 (14:37 +0530)]
(dev/core#1065) Participant in Edit mode needs to be shown consistently

5 years agoFix test to be more valid
eileen [Wed, 6 Nov 2019 08:51:35 +0000 (21:51 +1300)]
Fix test to be more valid

I've added a check to run after tests & before tearDown to ensure that all payments have the
right entity_financial_trxn records.

This required fixing one ttest to be valid. It's not possible to create a contribution using the
back office for with status set to Partially Paid (it's not an option in the drop down, so
the test should create as Pending & then add a payment to get to partially paid

5 years ago(dev/core#1093) Fix permission error when activating extension
Tim Otten [Wed, 6 Nov 2019 07:50:16 +0000 (23:50 -0800)]
(dev/core#1093) Fix permission error when activating extension

Overview
--------

This fixes a recent/unreleased regression from #15726 in which the D7 demo build fails.

Before
------

When running `civibuild reinstall ...` on a `drupal-demo` site, it fails at this step:

```
+++ drush -y cvapi extension.install key=org.civicrm.volunteer debug=1
Authorization failed                                                                                                                                                   [error]
Array
(
    [error_code] => unauthorized
    [entity] => Extension
    [action] => install
    [trace] => #0 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(166): Civi\API\Kernel->authorize(Object(Civi\Api4\Provider\ActionObjectProvider), Object(Civi\Api4\Generic\DAOSaveAction))
1 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php(235): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOSaveAction))
2 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Utils/Migrate/Import.php(374): Civi\Api4\Generic\AbstractAction->execute()
3 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Utils/Migrate/Import.php(82): CRM_Utils_Migrate_Import->customFields(Object(SimpleXMLElement), Array)
4 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/tools/extensions/civivolunteer/CRM/Volunteer/Upgrader.php(836): CRM_Utils_Migrate_Import->runXmlElement(Object(SimpleXMLElement))
5 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/tools/extensions/civivolunteer/CRM/Volunteer/Upgrader.php(48): CRM_Volunteer_Upgrader->executeCustomDataTemplateFile('volunteer-custo...')
6 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/tools/extensions/civivolunteer/CRM/Volunteer/Upgrader/Base.php(306): CRM_Volunteer_Upgrader->install()
7 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/tools/extensions/civivolunteer/volunteer.civix.php(131): CRM_Volunteer_Upgrader_Base->onInstall()
8 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/tools/extensions/civivolunteer/volunteer.php(204): _volunteer_civix_civicrm_install()
9 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Extension/Manager/Module.php(76): volunteer_civicrm_install()
10 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Extension/Manager/Module.php(48): CRM_Extension_Manager_Module->callHook(Object(CRM_Extension_Info), 'install')
11 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Extension/Manager.php(264): CRM_Extension_Manager_Module->onPreInstall(Object(CRM_Extension_Info))
12 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/api/v3/Extension.php(58): CRM_Extension_Manager->install(Array)
13 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_extension_install(Array)
14 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke(Array)
15 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest(Array)
16 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->runSafe('extension', 'install', Array, NULL)
17 /Users/myuser/bknix/build/dmaster/web/sites/all/modules/civicrm/drupal/drush/civicrm.drush.inc(1557): civicrm_api('extension', 'install', Array)
18 phar:///Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar/includes/command.inc(422): drush_civicrm_api('extension.insta...', 'key=org.civicrm...', 'debug=1')
19 phar:///Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
20 phar:///Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar/includes/command.inc(199): drush_command('extension.insta...', 'key=org.civicrm...', 'debug=1')
21 phar:///Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
22 phar:///Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
23 phar:///Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar/includes/startup.inc(465): drush_main()
24 phar:///Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...')
25 phar:///Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar/drush(114): drush_startup(Array)
26 /Users/myuser/bknix/civicrm-buildkit/extern/drush8.phar(10): require('phar:///Users/t...')
27 {main}
    [is_error] => 1
    [error_message] => Authorization failed
)
```

After
-----

It works again.

5 years agoMerge pull request #15738 from agileware/CIVICRM-1354
Eileen McNaughton [Wed, 6 Nov 2019 05:35:02 +0000 (18:35 +1300)]
Merge pull request #15738 from agileware/CIVICRM-1354

Fix the relationship direction in testSingleMembershipForTwoRelationships

5 years agoFix for non-allocation of payment to fully reversed checkboxes option
eileen [Wed, 6 Nov 2019 04:51:20 +0000 (17:51 +1300)]
Fix for non-allocation of payment to fully reversed checkboxes option

This addresses an issue partially identified in https://lab.civicrm.org/dev/financial/issues/98 whereby
civicrm_entity_financial_trxn records for the civicrm_financial_item table are not created when
refunding against line items with a quantity of zero  - ie where there were selected checkboxes & they
were reversed.

The reason this check was there relates to former logic - now we have a calculated allocation
we don't need this check.

I want to do a test but need to do a bit of work to get it set up & I think this should hit 5.20
as it relates to an issue identified by Kevin in reviewing patches merged to that version

5 years agoMerge pull request #15731 from eileenmcnaughton/rel_clean
Eileen McNaughton [Wed, 6 Nov 2019 04:05:26 +0000 (17:05 +1300)]
Merge pull request #15731 from eileenmcnaughton/rel_clean

dev/core#1361 Fix bug where 2 memberships created for same relationship

5 years agoMerge pull request #15556 from demeritcowboy/convert-label-to-name-2
Eileen McNaughton [Wed, 6 Nov 2019 03:07:46 +0000 (16:07 +1300)]
Merge pull request #15556 from demeritcowboy/convert-label-to-name-2

Upgrade script for dev/core#1046

5 years agoCIVICRM-1354 fix test
Pengyi [Wed, 6 Nov 2019 03:04:25 +0000 (14:04 +1100)]
CIVICRM-1354 fix test

5 years agoMerge pull request #15735 from jitendrapurohit/dev-1367
Eileen McNaughton [Wed, 6 Nov 2019 02:46:25 +0000 (15:46 +1300)]
Merge pull request #15735 from jitendrapurohit/dev-1367

dev/core#1367 - Incorrect line items recorded with contribution repea…

5 years agodev/core#1361 Fix bug where 2 memberships created for same relationship
eileen [Tue, 5 Nov 2019 15:32:08 +0000 (04:32 +1300)]
dev/core#1361 Fix bug where 2 memberships created for same relationship

Fixes a bug (likely recent regression) identified by @agileware-pengyi where duplicate inherited relationships for the same membership were being created

I've been pretty much sweating blood trying to understand the code, & have now resorted to adding a class to
generate a saner data set

5 years agoMerge pull request #15733 from seamuslee001/payment_process_api4_schema
Eileen McNaughton [Wed, 6 Nov 2019 02:08:08 +0000 (15:08 +1300)]
Merge pull request #15733 from seamuslee001/payment_process_api4_schema

Schema changes for PaymentProcessor and PaymentProcessorType to suppo…

5 years agoMerge pull request #15737 from eileenmcnaughton/php73
Eileen McNaughton [Tue, 5 Nov 2019 22:46:22 +0000 (11:46 +1300)]
Merge pull request #15737 from eileenmcnaughton/php73

Php 7.3 fix - don't mis-use continue

5 years agoMerge pull request #15705 from eileenmcnaughton/refund_fix
Eileen McNaughton [Tue, 5 Nov 2019 22:44:55 +0000 (11:44 +1300)]
Merge pull request #15705 from eileenmcnaughton/refund_fix

Fix Payment.create with a negative value to create the correct financial items

5 years agoMerge pull request #15736 from demeritcowboy/remove-old-code
Seamus Lee [Tue, 5 Nov 2019 21:03:52 +0000 (08:03 +1100)]
Merge pull request #15736 from demeritcowboy/remove-old-code

(NFC) Remove windows-specific debugging code from 11 years ago

5 years agoFix Payment.create with a negative value to create the correct financial items
eileen [Sat, 2 Nov 2019 02:39:16 +0000 (15:39 +1300)]
Fix Payment.create with a negative value to create the correct financial items

The job of a refund in this function turns out to be exactly the same as the a payment. I originally thought the
from & to accounts would be reversed but in fact because we are recording a negative amount that is not the case.
We need the from-to accounts to be the same. The only difference turns out to be the status
of the financialTrxn (Completed vs Refunded it seems).

Without this change the refund code is calling the recordFinancialAccounts function but after stepping
through it I'm sure the only thing that function is doing for it is creating the
FinancialTrxn. It *should* be creating the EntityFinancialItem too but it is not
and the best place for that to be done is in the payment class not in a spaghetti function.

Note that after this we need some robust testing & probably a follow up
patch on the handling of tax items - which is unlikely to be correct since it wasn't in the past
AFAIK and is unchanged.....

However, this fixes an important bug & should be merged as soon as it is confirmed non-regressive
to allow the next one to be investigated

m

5 years agoBring recordRefundPayment back into the main function.
eileen [Sat, 2 Nov 2019 02:09:23 +0000 (15:09 +1300)]
Bring recordRefundPayment back into the main function.

It's adding confusion and it turns out it's broken so let's fix properly

5 years agoUpdate all payment tests to ensure entity financial items created
eileen [Sat, 2 Nov 2019 02:00:45 +0000 (15:00 +1300)]
Update all payment tests to ensure entity financial items created

Alsothwe had tests for this it turns out they were only checking that they were correct IF created. This
ensures they also exist & is a sanity check to run at the end of tests. The two failing tests are
really failing :-(

5 years agoFix double loop on lineItems
eileen [Fri, 1 Nov 2019 02:54:12 +0000 (15:54 +1300)]
Fix double loop on lineItems

Historically the code followed 2 loops - one for the (very rare) situation when an array of
'line_item' was passed in - in fact this array is an array of arrays where each array represents
the id of a line item and the amount to allocate.

The other loop is the main loop that allocates according to a calculation.

This fixes it so that the allocation is correctly merged in if passed in in
getPayableLineItems and from that point we only need one loop.

This simplification is tested via the testCreatePaymentLineItems
which I cleaned up and made more robust. I was able to step through it and identify how
it was working

5 years agoMerge pull request #15684 from eileenmcnaughton/legacy_extract
Seamus Lee [Tue, 5 Nov 2019 21:01:08 +0000 (08:01 +1100)]
Merge pull request #15684 from eileenmcnaughton/legacy_extract

Remove recordPayment function.

5 years agoPhp 7.3 fix - don't mis-use continue
eileen [Sat, 2 Nov 2019 05:21:36 +0000 (18:21 +1300)]
Php 7.3 fix - don't mis-use continue

Also fix some casing

5 years agoMerge pull request #15640 from eileenmcnaughton/pp_pay
Eileen McNaughton [Tue, 5 Nov 2019 20:44:53 +0000 (09:44 +1300)]
Merge pull request #15640 from eileenmcnaughton/pp_pay

Fix Payment.create bug whereby payment_processor_id is not being used for the to_account_id

5 years agoremove debugging code
DemeritCowboy [Tue, 5 Nov 2019 20:17:02 +0000 (15:17 -0500)]
remove debugging code

5 years agodev/core#1367 - Incorrect line items recorded with contribution repeattransaction api
Jitendra Purohit [Tue, 5 Nov 2019 12:17:08 +0000 (17:47 +0530)]
dev/core#1367 - Incorrect line items recorded with contribution repeattransaction api

5 years agoMerge pull request #15732 from totten/master-tplaner-when
Tim Otten [Tue, 5 Nov 2019 06:34:29 +0000 (22:34 -0800)]
Merge pull request #15732 from totten/master-tplaner-when

composer.{json,lock} - Make the "tplaner/when" exception for old PHP reproducible

5 years agoSchema changes for PaymentProcessor and PaymentProcessorType to support apiv4 entities
Seamus Lee [Tue, 5 Nov 2019 05:18:48 +0000 (16:18 +1100)]
Schema changes for PaymentProcessor and PaymentProcessorType to support apiv4 entities

5 years agoMerge pull request #15730 from seamuslee001/new_xkerman_package
Seamus Lee [Tue, 5 Nov 2019 05:09:23 +0000 (16:09 +1100)]
Merge pull request #15730 from seamuslee001/new_xkerman_package

Add in xkerman/restricted-unserialize package

5 years agocomposer.{json,lock} - Make the "tplaner/when" exception for old PHP reproducible
Tim Otten [Tue, 5 Nov 2019 04:40:14 +0000 (20:40 -0800)]
composer.{json,lock} - Make the "tplaner/when" exception for old PHP reproducible

Overview
--------

The library `tplaner/when` has an inaccurate dependency on php71 and
requires special work to deploy on php70.

Before
------

The `composer.lock` file was manually edited to make it runnable on php70.
However, if you `rm composer.lock && composer install`, then it fails.

After
-----

The `composer.json` and `composer.lock` are more repeatable.  If you run
`rm composer.lock && composer install`, then it works.

Comments
--------

This adds a fairly ugly section.  However, the good news is that it should
be more transparent - which should make it easier to understand/remove
later.

As a general rule, we don't want to have `civicrm-core.git` depend on
packages/versions that aren't published.  This is a somewhat unusual
edge-case - this package/version is published via `packagist.org`.  If you
run without this on php71+, then you still get a valid/equivalent package.
All that we've done is to enable running on `php70` (when `civicrm-core` is
a root project).

5 years agoAdd in xkerman/restricted-unserialize package
Seamus Lee [Tue, 5 Nov 2019 03:47:26 +0000 (14:47 +1100)]
Add in xkerman/restricted-unserialize package

5 years agoMerge pull request #15728 from eileenmcnaughton/rel_clean
Eileen McNaughton [Tue, 5 Nov 2019 03:12:06 +0000 (16:12 +1300)]
Merge pull request #15728 from eileenmcnaughton/rel_clean

[REF] minor code simplification

5 years ago[REF] minor code simplification
eileen [Mon, 4 Nov 2019 20:51:37 +0000 (09:51 +1300)]
[REF] minor code simplification

Switches a call to an old function to an api function & removes post filtering.

Currently the code calls an old function which gets all membership ids & then filters on
statuses. This switches to an api call & passes statuses in as a filter

Strong test cover in testSingleMembershipForTwoRelationships which tests these lines in a variety of ways

5 years agoMerge pull request #15707 from eileenmcnaughton/setter
Matthew Wire [Mon, 4 Nov 2019 23:27:30 +0000 (23:27 +0000)]
Merge pull request #15707 from eileenmcnaughton/setter

dev/financial#82 revert added setters

5 years agoMerge pull request #15710 from seamuslee001/custom_field_convert
Seamus Lee [Mon, 4 Nov 2019 23:13:52 +0000 (10:13 +1100)]
Merge pull request #15710 from seamuslee001/custom_field_convert

dev/core#561 Add in routine to convert custom date fields in smart groups to datep…

5 years agoMerge pull request #14349 from mattwire/case_links_refactor_3
Eileen McNaughton [Mon, 4 Nov 2019 23:07:40 +0000 (12:07 +1300)]
Merge pull request #14349 from mattwire/case_links_refactor_3

Convert case activity links to 'actionLinks'

5 years agoRe-apply useful cleanups from reverted commits
eileen [Mon, 4 Nov 2019 22:06:46 +0000 (11:06 +1300)]
Re-apply useful cleanups from reverted commits

5 years agoRevert "dev/financial#77 ++ Make contribution_id mandatory for PaymentProcessor.pay...
eileen [Sat, 2 Nov 2019 06:06:12 +0000 (19:06 +1300)]
Revert "dev/financial#77 ++ Make contribution_id mandatory for PaymentProcessor.pay, pass incoieID"

This reverts commit 783b62a7dfe3c94bd69bcb182732b240e53911be.

5 years agoRevert places where setters are used to set things
eileen [Sat, 2 Nov 2019 04:16:33 +0000 (17:16 +1300)]
Revert places where setters are used to set things

These are all new in 5.20 & if we are going to change we should reverse & re-do before cutting 5.20

5 years agoRevert "Add getters & setters for contributionID on CRM_Core_Payment."
eileen [Sat, 2 Nov 2019 04:15:01 +0000 (17:15 +1300)]
Revert "Add getters & setters for contributionID on CRM_Core_Payment."

This reverts commit c28ad54a7194e30033ffed1ad727586546e80db3.

5 years agoRevert "Add a bunch of additional getters & setters"
eileen [Sat, 2 Nov 2019 04:14:19 +0000 (17:14 +1300)]
Revert "Add a bunch of additional getters & setters"

This reverts commit c5884dfddb30e40e06af9ef0f2dc940ad6ae55bd.

5 years agoMerge pull request #15694 from eileenmcnaughton/custom
Seamus Lee [Mon, 4 Nov 2019 21:18:37 +0000 (08:18 +1100)]
Merge pull request #15694 from eileenmcnaughton/custom

Get rid of jcalendar range in custom data

5 years agoMerge pull request #15729 from civicrm/5.19
Eileen McNaughton [Mon, 4 Nov 2019 21:01:05 +0000 (10:01 +1300)]
Merge pull request #15729 from civicrm/5.19

5.19 to master

5 years agoMerge pull request #15726 from MiyaNoctem/dev-core-1093-fix-installation-of-custom...
Eileen McNaughton [Mon, 4 Nov 2019 21:00:06 +0000 (10:00 +1300)]
Merge pull request #15726 from MiyaNoctem/dev-core-1093-fix-installation-of-custom-fields-with-option-values

dev/core#1093: Fix Installation of Custom Fields with Option Values From XML

5 years agoAdd in a unit test of the custom field date range conversion
Seamus Lee [Mon, 4 Nov 2019 20:07:33 +0000 (07:07 +1100)]
Add in a unit test of the custom field date range conversion

5 years agoAdd in routine to convert custom date fields in smart groups to datepicker format
Seamus Lee [Sun, 3 Nov 2019 02:17:08 +0000 (13:17 +1100)]
Add in routine to convert custom date fields in smart groups to datepicker format

5 years agoRemove 'recode handling
eileen [Mon, 4 Nov 2019 04:56:19 +0000 (17:56 +1300)]
Remove 'recode handling

5 years agoAdd in template file for laying out datepicker in custom fields and extract js into...
Seamus Lee [Sat, 2 Nov 2019 00:20:38 +0000 (11:20 +1100)]
Add in template file for laying out datepicker in custom fields and extract js into own template for sharing

5 years agoGet rid of jcalendar range in custom data
eileen [Fri, 1 Nov 2019 07:02:18 +0000 (20:02 +1300)]
Get rid of jcalendar range in custom data

5 years agoMerge pull request #15727 from civicrm/5.19
Eileen McNaughton [Mon, 4 Nov 2019 19:37:33 +0000 (08:37 +1300)]
Merge pull request #15727 from civicrm/5.19

5.19

5 years agoMerge pull request #15719 from eileenmcnaughton/custom_query_fix_join
Seamus Lee [Mon, 4 Nov 2019 19:34:37 +0000 (06:34 +1100)]
Merge pull request #15719 from eileenmcnaughton/custom_query_fix_join

Fix Custom field date query builder to work with 'raw' high & low params

5 years agoMerge pull request #15724 from MiyaNoctem/dev-core-1360-fix-programatic-installation...
Seamus Lee [Mon, 4 Nov 2019 19:32:35 +0000 (06:32 +1100)]
Merge pull request #15724 from MiyaNoctem/dev-core-1360-fix-programatic-installation-of-extensions-v519

dev/core#1360: Fix Programatic Installation Of Multiple Extensions on v5.19

5 years agodev/core#1093: Fix Installation of Custom Fields with Option Values From XML
Camilo Rodriguez [Mon, 4 Nov 2019 16:40:36 +0000 (16:40 +0000)]
dev/core#1093: Fix Installation of Custom Fields with Option Values From XML

5 years agoMerge pull request #15722 from eileenmcnaughton/rel_test
colemanw [Mon, 4 Nov 2019 12:49:15 +0000 (07:49 -0500)]
Merge pull request #15722 from eileenmcnaughton/rel_test

[REF] minor tidy ups on very nasty function

5 years agodev/core#1360: Fix Programatic Installation Of Multiple Extensions
Camilo Rodriguez [Fri, 1 Nov 2019 15:03:39 +0000 (15:03 +0000)]
dev/core#1360: Fix Programatic Installation Of Multiple Extensions

5 years agoMerge pull request #15723 from eileenmcnaughton/rel_clean
colemanw [Mon, 4 Nov 2019 11:51:32 +0000 (06:51 -0500)]
Merge pull request #15723 from eileenmcnaughton/rel_clean

Eliminate silly parameter

5 years agoFurther join tests & fixes
eileen [Mon, 4 Nov 2019 06:08:17 +0000 (19:08 +1300)]
Further join tests & fixes

Turns out the carefully constructed join was being whomped - but only sometimes

5 years agoFix Custom field date query builder to work with 'raw' high & low params
eileen [Mon, 4 Nov 2019 04:17:21 +0000 (17:17 +1300)]
Fix Custom field date query builder to work with 'raw' high & low params

Once we convert to datePicker we will be passing in parameters like custom_3_high, custom_3_low & custom_3_relative.

Currently we pass in custom_3_to & custom_3_from and custom_3_relative. This adds support for the new high & low
withoutt touching support for previously working or switching the field across (as yet). This paves the way for
the datepicker conversion. After a lot of brain pain I concluded the fundamental problem was the whereTables
from the CustomQuery were being merged in but actually then lost when where() is called.

5 years agoMove all thte code that relates to joining tables/constructing From to one place.
eileen [Mon, 4 Nov 2019 01:15:18 +0000 (14:15 +1300)]
Move all thte code that relates to joining tables/constructing From to one place.

This could definitely be cleaned up more - but the goal of this step is just to move all the code that
constructs the from code into one place, so it can be called more sensibly.

Tested in the newly written testAddressCustomFields

5 years agoSwitch to cached retrieval function
eileen [Mon, 4 Nov 2019 07:41:16 +0000 (20:41 +1300)]
Switch to cached retrieval function

5 years agoAdd date check to test
eileen [Mon, 4 Nov 2019 07:35:38 +0000 (20:35 +1300)]
Add date check to test

Remove a few lines of unnecessary code
It used to be necessary to ISO format code before DAO->save. However, along the line wee fixed it lower
down & no longer need this smattered all over the code. Test proves it's OK

5 years agoEliminate silly parameter
eileen [Mon, 4 Nov 2019 09:52:29 +0000 (22:52 +1300)]
Eliminate silly parameter

 is only ever passed into this function once. In that instance
it is then populated off owner_membership_id & then wrangled in the calling function
back to a separatte arry before being unset. The moves it back to the calling function &
simplifieds

Good test cover exists in testCreateMembership

5 years agoMerge pull request #15721 from eileenmcnaughton/odd_return
Seamus Lee [Mon, 4 Nov 2019 09:33:31 +0000 (20:33 +1100)]
Merge pull request #15721 from eileenmcnaughton/odd_return

Remove early return on joinTable

5 years agoMerge pull request #15720 from eileenmcnaughton/test_clean
Eileen McNaughton [Mon, 4 Nov 2019 07:43:55 +0000 (20:43 +1300)]
Merge pull request #15720 from eileenmcnaughton/test_clean

Test improvements

5 years agoRemove early return on joinTable
eileen [Mon, 4 Nov 2019 01:05:30 +0000 (14:05 +1300)]
Remove early return on joinTable

I looked up the reason for the early return here and it was that the UI for adding other tables
in was too complex. In other words the removed lines should never be true.

However, I don't think it's the place of the query object to enforce not attempting a query the
UI struggles with. Removing this will save a later person having to figure that out

5 years agoConvert customQueryTest to test the BAO_Contact_Query
eileen [Mon, 4 Nov 2019 02:42:03 +0000 (15:42 +1300)]
Convert customQueryTest to test the BAO_Contact_Query

While I understand the theory of unit tests is to test low level chunks of code that relates in many
ways to WELL-DESIGNED chunks. In the case of the query object it is more important to
ensure the results experienced by the user are correct - this converts the existing test
to a more end-to-end test on the CRM_Contact_BAO_Query object acting correctly.

5 years ago[NFC] Test cleam up
eileen [Mon, 4 Nov 2019 01:56:31 +0000 (14:56 +1300)]
[NFC] Test cleam up

5 years agoMerge pull request #15718 from eileenmcnaughton/custom_query_fix
Seamus Lee [Mon, 4 Nov 2019 04:59:02 +0000 (15:59 +1100)]
Merge pull request #15718 from eileenmcnaughton/custom_query_fix

[REF] Remove early return on joinTable

5 years agoMerge pull request #15714 from eileenmcnaughton/custom_sane_save
Seamus Lee [Mon, 4 Nov 2019 04:57:59 +0000 (15:57 +1100)]
Merge pull request #15714 from eileenmcnaughton/custom_sane_save

[REF] remove  as a return Param of getHierContactDetails

5 years agoMerge pull request #15715 from eileenmcnaughton/custom_query
Seamus Lee [Mon, 4 Nov 2019 04:55:22 +0000 (15:55 +1100)]
Merge pull request #15715 from eileenmcnaughton/custom_query

Add test to lock in obscure custom join handling

5 years agoAdd test to lock in obscure custom join handling
eileen [Mon, 4 Nov 2019 00:16:43 +0000 (13:16 +1300)]
Add test to lock in obscure custom join handling

5 years agoMerge pull request #15717 from seamuslee001/backdrop_regen
Eileen McNaughton [Mon, 4 Nov 2019 03:25:01 +0000 (16:25 +1300)]
Merge pull request #15717 from seamuslee001/backdrop_regen

[NFC] Allow users on backdrop to trigger regen.sh

5 years agoMerge pull request #15716 from eileenmcnaughton/except
Eileen McNaughton [Mon, 4 Nov 2019 03:24:44 +0000 (16:24 +1300)]
Merge pull request #15716 from eileenmcnaughton/except

[NFC] Fix exception thrown to std CRM_Core_Exception

5 years agoMerge pull request #15062 from eileenmcnaughton/agile_fix
Seamus Lee [Mon, 4 Nov 2019 02:25:23 +0000 (13:25 +1100)]
Merge pull request #15062 from eileenmcnaughton/agile_fix

Agile fixFix inherited membership being deleted when there is still a valid …  …relationship

5 years agoRemove early return on joinTable
eileen [Mon, 4 Nov 2019 01:05:30 +0000 (14:05 +1300)]
Remove early return on joinTable

I looked up the reason for the early return here and it was that the UI for adding other tables
in was too complex. In other words the removed lines should never be true.

However, I don't think it's the place of the query object to enforce not attempting a query the
UI struggles with. Removing this will save a later person having to figure that out

5 years ago[NFC] Allow users on backdrop to trigger regen.sh
Seamus Lee [Mon, 4 Nov 2019 01:02:51 +0000 (12:02 +1100)]
[NFC] Allow users on backdrop to trigger regen.sh

5 years agoFix exception thrown to std CRM_Core_Exception
eileen [Mon, 4 Nov 2019 00:59:26 +0000 (13:59 +1300)]
Fix exception thrown to std CRM_Core_Exception

5 years agoMerge pull request #15713 from eileenmcnaughton/query_clean
Seamus Lee [Mon, 4 Nov 2019 00:36:00 +0000 (11:36 +1100)]
Merge pull request #15713 from eileenmcnaughton/query_clean

[NFC] various code cleanup on CRM_Contact_BAO_Query

5 years ago[REF] remove as a return Param of getHierContactDetails
eileen [Sun, 3 Nov 2019 23:34:43 +0000 (12:34 +1300)]
[REF] remove  as a return Param of getHierContactDetails

In trying to get to the bottom of BAO_CustomQuery I hit confusion about whether options should still exist.

This removes it from the return values of getHierContactDetails, making for a cleaner later PR when
we can check all calls to CRM_Contact_BAO_Query::apiQuery use the 'list' construct and only
use one param - at which point we can pull it out of apiQuery

5 years ago[NFC] various code cleanup on CRM_Contact_BAO_Query
eileen [Sun, 3 Nov 2019 22:54:21 +0000 (11:54 +1300)]
[NFC] various code cleanup on CRM_Contact_BAO_Query

Fix comment blocks, correct parameter types in blocks etc, fix some miscased fn calls, add throws tags
use strict comparision when comparing with strings

5 years agoMerge pull request #15571 from herbdool/ops-906
Eileen McNaughton [Sun, 3 Nov 2019 22:38:40 +0000 (11:38 +1300)]
Merge pull request #15571 from herbdool/ops-906

Backdrop support for adding roles and perms

5 years agoMerge pull request #15701 from seamuslee001/allow_extensions_to_override_acl_temp_tab...
Eileen McNaughton [Sun, 3 Nov 2019 20:32:34 +0000 (09:32 +1300)]
Merge pull request #15701 from seamuslee001/allow_extensions_to_override_acl_temp_table_use

Add in method to allow extensions to opt out of using temporary table…

5 years agoMerge pull request #15712 from seamuslee001/form_reorder_modified
Seamus Lee [Sun, 3 Nov 2019 20:04:24 +0000 (07:04 +1100)]
Merge pull request #15712 from seamuslee001/form_reorder_modified

Re-arrange change log advanced search panel so both modified fields a…

5 years agoRe-arrange change log advanced search panel so both modified fields are next to each...
Seamus Lee [Sun, 3 Nov 2019 06:14:10 +0000 (17:14 +1100)]
Re-arrange change log advanced search panel so both modified fields are next to each other

5 years agoMerge pull request #15711 from eileenmcnaughton/cust_ug
Seamus Lee [Sun, 3 Nov 2019 06:08:36 +0000 (17:08 +1100)]
Merge pull request #15711 from eileenmcnaughton/cust_ug

Minor refactors to support converting custom fields to datepicker fields

5 years agoAdd a couple of throws to comments
eileen [Sun, 3 Nov 2019 04:42:46 +0000 (17:42 +1300)]
Add a couple of throws to comments

5 years agoMove CustomQuery iteraction out of the tail end of the SelectClause
eileen [Sun, 3 Nov 2019 04:41:34 +0000 (17:41 +1300)]
Move CustomQuery iteraction out of the tail end of the SelectClause

It's not part of the select clause so having it in there is confusing & mislead. No functional change as it's the next
thin to be called either way