Coleman Watts [Tue, 29 Sep 2020 21:53:31 +0000 (17:53 -0400)]
Remove problematic tests
This removes 2 tests that broke with the upgrade to Angular 1.8.
Neither test was covering much of anything useful.
Coleman Watts [Tue, 29 Sep 2020 15:53:30 +0000 (11:53 -0400)]
dev/core#1818 Upgrade AngularJS from 1.5.11 to 1.8
https://lab.civicrm.org/dev/core/-/issues/1818
The biggest breaking change between 1.5 and 1.8 was the default hashPrefix.
See https://github.com/angular/angular.js/blob/master/CHANGELOG.md#location-due-to-1
Our solution is to force crmApp to use the previous default. This ensures that existing modules
which rely on crmApp for routing (which is nearly all of them) will be unaffected.
New modules like Afform which use their own routing should use the new default recommended by Angular.
Eileen McNaughton [Thu, 1 Oct 2020 10:43:49 +0000 (23:43 +1300)]
Merge pull request #18655 from eileenmcnaughton/token2
dev/core#2079 [REF] Fix some more calls to getTokens to make it clear only the first return value is used
Seamus Lee [Thu, 1 Oct 2020 07:30:44 +0000 (17:30 +1000)]
Merge pull request #18652 from eileenmcnaughton/silly
Fix patently silly code
eileen [Thu, 1 Oct 2020 05:39:34 +0000 (18:39 +1300)]
[REF] Fix some more calls to getTokens to make it clear only the first return value is used
eileen [Thu, 1 Oct 2020 03:59:30 +0000 (16:59 +1300)]
Fix patently silly code
Seamus Lee [Thu, 1 Oct 2020 02:56:54 +0000 (12:56 +1000)]
Merge pull request #18640 from eileenmcnaughton/syn
dev/core#2073 Improve cleanup on syntax conformance test
Eileen McNaughton [Thu, 1 Oct 2020 02:54:27 +0000 (15:54 +1300)]
Merge pull request #18416 from seamuslee001/dev_core_2003
dev/core#2003 Use Brick/Money to ensure that we display all possible …
Seamus Lee [Thu, 1 Oct 2020 02:14:20 +0000 (12:14 +1000)]
Merge pull request #18646 from totten/master-complib
(REF) Switch to composer-compile-lib
eileen [Wed, 30 Sep 2020 05:09:05 +0000 (18:09 +1300)]
dev/core#2073 Improve cleanup on syntaxconformance test
Cleaning up all objects seems a bit too much - but ensuring we
re-set the DAO we create in this class should be a memory-friendly action
https://github.com/civicrm/civicrm-core/pull/18639
Tim Otten [Wed, 30 Sep 2020 22:42:29 +0000 (15:42 -0700)]
Greenwich - Switch to composer-compile-lib
Seamus Lee [Wed, 30 Sep 2020 23:11:05 +0000 (09:11 +1000)]
Merge pull request #18607 from eileenmcnaughton/website
dev/core#2046 Rationalise add vs create on website BAO
Seamus Lee [Wed, 30 Sep 2020 22:38:31 +0000 (08:38 +1000)]
Merge pull request #18642 from seamuslee001/dev_core_339_custom_field
dev/core#334 Use the current in use collation and character sets when…
Tim Otten [Wed, 30 Sep 2020 21:36:44 +0000 (14:36 -0700)]
composer.json - Switch to composer-compile-lib. Add more helpers.
The overall effect of this change is to get access to a few more helpers.
Before: Load `composer-compile-plugin`, `scssphp`, and `php-autoprefxer` as
three distinct packages.
After: Load `composer-compile-lib`, which transitively requires all those others
*and* includes some helpers.
Sea also
* https://github.com/civicrm/composer-compile-plugin
* https://github.com/civicrm/composer-compile-lib
Seamus Lee [Wed, 9 Sep 2020 05:54:50 +0000 (15:54 +1000)]
dev/core#2003 Use Brick/Money to ensure that we display all possible digits stored in the database for the option amount
Add in noisy notice about fall back due to missing intl extension
Seamus Lee [Wed, 30 Sep 2020 21:10:47 +0000 (07:10 +1000)]
Merge pull request #18621 from eileenmcnaughton/prefix
dev/membership#27 Update outdated membership statuses in preProcess rather than submit
Seamus Lee [Wed, 30 Sep 2020 21:05:36 +0000 (07:05 +1000)]
Merge pull request #18632 from eileenmcnaughton/leak
dev/core#2073 Memory drain
Seamus Lee [Wed, 30 Sep 2020 08:19:58 +0000 (18:19 +1000)]
dev/core#334 Use the current in use collation and character sets when creating new custom value tables
Seamus Lee [Wed, 30 Sep 2020 20:32:06 +0000 (06:32 +1000)]
Merge pull request #18599 from seamuslee001/frontend_group_fields
[REF] Add in frontend fields for title and description of group Schem…
Seamus Lee [Fri, 25 Sep 2020 21:05:06 +0000 (07:05 +1000)]
[REF] Add in frontend fields for title and description of group Schema only change
Add in upgrade step to expand title column to be 255 as well
Update langauge as per Artfulrobot and require group title field
Seamus Lee [Wed, 30 Sep 2020 08:22:01 +0000 (18:22 +1000)]
Merge pull request #18641 from eileenmcnaughton/will-the-real-slim-leaky-please-stand-up
dev/core#2073 Fix a real live leak
eileen [Wed, 30 Sep 2020 05:44:19 +0000 (18:44 +1300)]
dev/core#2073 Fix a real live leak
I used the same methods I had been playing with on the test class on a contribution
import script and found that the object that was increasing in memory in tandem with
me increasing iterations was an instance of DB_result
I tracked it down to here. In essence our main DAO functions clean up after themselves - e.g
when the DAO is destructed it cleans up the globals it has created.
However, this older ->query() function does not do that and each time is is called increases it's memory hold.
It's also worth better caching in this function...
Seamus Lee [Wed, 30 Sep 2020 05:37:36 +0000 (15:37 +1000)]
Merge pull request #18638 from eileenmcnaughton/test_perf
[Civi\Test] Fix test output noise
Eileen McNaughton [Wed, 30 Sep 2020 01:29:25 +0000 (14:29 +1300)]
Merge pull request #18637 from demeritcowboy/no-details
dev/core#2075 - E_NOTICE viewing an activity that has no details contents
eileen [Wed, 30 Sep 2020 00:27:20 +0000 (13:27 +1300)]
[Civi\Test] Fix test output noise
Seeing this is test logs
Warning: Invalid argument supplied for foreach() in /home/jenkins/bknix-dfl/build/core-18634-8zcf7/web/sites/all/modules/civicrm/Civi/Test/Schema.php on line 29
Call Stack:
0.0007 530944 1. {main}() /home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar:0
0.0498
9999808 2. PHPUnit\TextUI\Command::main() /home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar:615
0.0498
10008600 3. PHPUnit\TextUI\Command->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/TextUI/Command.php:162
1.1684
104654872 4. PHPUnit\TextUI\TestRunner->doRun() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/TextUI/Command.php:206
1.2327
104791840 5. PHPUnit\Framework\TestSuite->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/TextUI/TestRunner.php:652
3300.8182
675188928 6. PHPUnit\Framework\TestSuite->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestSuite.php:746
3300.8199
675188928 7. CiviUnitTestCase::setUpBeforeClass() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestSuite.php:703
3300.8199
675188928 8. CiviUnitTestCase::_populateDB() /home/jenkins/bknix-dfl/build/core-18634-8zcf7/web/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:311
3300.8199
675188928 9. Civi\Test\Data->populate() /home/jenkins/bknix-dfl/build/core-18634-8zcf7/web/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:305
3300.8199
675189248 10. Civi\Test::asPreInstall() /home/jenkins/bknix-dfl/build/core-18634-8zcf7/web/sites/all/modules/civicrm/Civi/Test/Data.php:45
:
demeritcowboy [Tue, 29 Sep 2020 23:29:50 +0000 (19:29 -0400)]
handle missing details
Eileen McNaughton [Tue, 29 Sep 2020 20:01:30 +0000 (09:01 +1300)]
Merge pull request #18596 from MegaphoneJon/core-2063
core#2063: Don't throw a warning when public ext directory isn't found
Eileen McNaughton [Tue, 29 Sep 2020 19:17:19 +0000 (08:17 +1300)]
Merge pull request #18564 from seamuslee001/dev_core_1838
dev/core#1838 Ensure that no fatal error is triggered if you try to a…
Eileen McNaughton [Tue, 29 Sep 2020 19:01:33 +0000 (08:01 +1300)]
Merge pull request #18544 from magnolia61/participant_status_notification_default
Set participant status notification to false by default
Seamus Lee [Tue, 22 Sep 2020 22:50:03 +0000 (08:50 +1000)]
dev/core#1838 Ensure that no fatal error is triggered if you try to access a merged contact and the contact that it was merged into has been permanently deleted
Move exception capturing into the page layer and extend unit test to cover page function
Update status message as per Mikeý's comment
Seamus Lee [Tue, 29 Sep 2020 06:21:36 +0000 (16:21 +1000)]
Merge pull request #18633 from eileenmcnaughton/leak2
dev/core#2073 just tweak a memory leak
eileen [Tue, 29 Sep 2020 03:33:31 +0000 (16:33 +1300)]
dev/core#2073 Memory leak fix
eileen [Tue, 29 Sep 2020 04:03:48 +0000 (17:03 +1300)]
dev/core#2073 just tweak a memory leak
This one is like https://github.com/civicrm/civicrm-core/pull/18632 but only
seems to have switched us from an xml leakage to a string leakage - it still
seems slightly better from a code quality point of view
Seamus Lee [Tue, 29 Sep 2020 00:52:01 +0000 (10:52 +1000)]
Merge pull request #18630 from eileenmcnaughton/pps
[REF] Parse ids before sending to single function (minor simplification)
Seamus Lee [Tue, 29 Sep 2020 00:44:25 +0000 (10:44 +1000)]
Merge pull request #18619 from demeritcowboy/contact-test
[NFC/Test] Unit test activity-contact variations
Eileen McNaughton [Mon, 28 Sep 2020 23:55:33 +0000 (12:55 +1300)]
Merge pull request #18570 from mlutfy/pcpLinksHook
dev/core#2061 PCP: call the hook_civicrm_links hook for PCP page user actions
Eileen McNaughton [Mon, 28 Sep 2020 22:40:14 +0000 (11:40 +1300)]
Merge pull request #18626 from demeritcowboy/why-no-id
[Test framework] Wrong group id in mailing test setup
Eileen McNaughton [Mon, 28 Sep 2020 22:39:46 +0000 (11:39 +1300)]
Merge pull request #18627 from civicrm/5.30
5.30
Seamus Lee [Mon, 28 Sep 2020 22:39:02 +0000 (08:39 +1000)]
Merge pull request #18628 from seamuslee001/dev_core_2035
dev/core#2035 Add in upgrade step to fix the template copy on current…
eileen [Mon, 28 Sep 2020 21:14:59 +0000 (10:14 +1300)]
[REF] Parse ids before sending to single function (minor simplification)
Overview
----------------------------------------
Minor simplification - parse ids into valid format & pass them into single, rather than passing them in wrong & 'asking' singleto parse them
Before
----------------------------------------
parsing of ids into usable array done at the last minute, other values passes around unnecessarily
After
----------------------------------------
parsing done close to the point where they are derived
Technical Details
----------------------------------------
Comments
----------------------------------------
Eileen McNaughton [Mon, 28 Sep 2020 20:42:10 +0000 (09:42 +1300)]
Merge pull request #18613 from mattwire/moveloadrelatedobjects
Simplify call to loadRelatedObjects in repeat/completetransaction
Seamus Lee [Mon, 28 Sep 2020 20:15:09 +0000 (06:15 +1000)]
dev/core#2035 Add in upgrade step to fix the template copy on current installs
Seamus Lee [Mon, 28 Sep 2020 20:11:24 +0000 (06:11 +1000)]
Merge pull request #18602 from eileenmcnaughton/msg
dev/core#2035 Invoice template - show Amount paid even when it is fully paid
Mathieu Lutfy [Wed, 23 Sep 2020 20:07:39 +0000 (16:07 -0400)]
dev/core#2061 PCP: call the hook_civicrm_links hook for PCP page user actions
demeritcowboy [Mon, 28 Sep 2020 19:25:53 +0000 (15:25 -0400)]
missing id
Seamus Lee [Mon, 28 Sep 2020 10:50:11 +0000 (20:50 +1000)]
Merge pull request #18559 from agileware/CIVICRM-1567
Update the post-upgrade thank you message to include URLs to CiviCRM contributors, CiviCRM members and minor rewrite
Matthew Wire [Sat, 26 Sep 2020 18:40:26 +0000 (19:40 +0100)]
Simplify call to loadRelationObjects in repeat/completetransaction
Matthew Wire [Mon, 28 Sep 2020 10:30:52 +0000 (11:30 +0100)]
Merge pull request #18590 from eileenmcnaughton/taskname
[REF] Remove unused taskName variable
Matthew Wire [Mon, 28 Sep 2020 10:29:24 +0000 (11:29 +0100)]
Merge pull request #18600 from eileenmcnaughton/aipn
[REF] IPN - move unshared chunk of code out of shared function
Matthew Wire [Mon, 28 Sep 2020 10:28:51 +0000 (11:28 +0100)]
Merge pull request #18536 from eileenmcnaughton/main
[REF] Paypal std ipn Move not-actually shared-code out of shared code function
Matthew Wire [Mon, 28 Sep 2020 10:28:18 +0000 (11:28 +0100)]
Merge pull request #18614 from eileenmcnaughton/mem
[REF] Remove some unused params, move one to where it is used
eileen [Sun, 27 Sep 2020 00:32:49 +0000 (13:32 +1300)]
[REF] Remove some unused params, move one to where it is used
Matthew Wire [Mon, 28 Sep 2020 08:29:44 +0000 (09:29 +0100)]
Merge pull request #18617 from eileenmcnaughton/ord
[Ref] Extract getOrderParams
Eileen McNaughton [Mon, 28 Sep 2020 01:29:33 +0000 (14:29 +1300)]
Merge pull request #18620 from eileenmcnaughton/notice
Enotice fix
Eileen McNaughton [Mon, 28 Sep 2020 00:54:29 +0000 (13:54 +1300)]
Merge pull request #18622 from civicrm/5.30
5.30
Seamus Lee [Mon, 28 Sep 2020 00:31:39 +0000 (10:31 +1000)]
Merge pull request #18615 from eileenmcnaughton/530
Fix regression on back-office membership renewal by credit card
eileen [Mon, 28 Sep 2020 00:05:38 +0000 (13:05 +1300)]
dev/membership#27 Update outdated membership statuses in preProcess rather than submit
Per https://lab.civicrm.org/dev/membership/-/issues/27 the function fixMembershipBeforeRenew is agreed to be a useful part of this flow
(ie we should set to expired before renewing if that is the correct pre-renewal status). As discussed on that
issue this moves that handling to the pre-process function.
In the process I hit what appears to be an unreleased regression affecting fixMembershipBeforeRenew borking
when changeDate = NULL from https://github.com/civicrm/civicrm-core/commit/
2cb6497039fde605f5d64b2fe4fa0548cd5d1e07#diff-f43c8498e32f5b2d68ab27bcd243ca36L1136
The regression only affects master
eileen [Sun, 27 Sep 2020 22:02:23 +0000 (11:02 +1300)]
Enotice fix
demeritcowboy [Sun, 27 Sep 2020 18:12:51 +0000 (14:12 -0400)]
test activity contact variations
Seamus Lee [Sun, 27 Sep 2020 20:35:50 +0000 (06:35 +1000)]
Merge pull request #18609 from eileenmcnaughton/act2
dev/core#2057 Reduce queries when calling activity.create
eileen [Sun, 27 Sep 2020 01:14:25 +0000 (14:14 +1300)]
Fix regression or back-office membership renewal by credit card
Looking at the code I realised a mistake was made in https://github.com/civicrm/civicrm-core/pull/17398 whereby
the actual membership id would not be passed through correctly
eileen [Sun, 27 Sep 2020 05:34:09 +0000 (18:34 +1300)]
[Ref] Extract getOrderParams
Overview
----------------------------------------
Minor extraction
Before
----------------------------------------
Code not re-usable
After
----------------------------------------
Code is re-useable, basis for further fix
Technical Details
----------------------------------------
Comments
----------------------------------------
Note this ties into https://lab.civicrm.org/dev/membership/-/issues/28
Seamus Lee [Sat, 26 Sep 2020 22:19:25 +0000 (08:19 +1000)]
Merge pull request #18593 from mattwire/joblog
Add an 'Execute Now' button to the job log
eileen [Sat, 26 Sep 2020 07:58:57 +0000 (19:58 +1200)]
dev/core#2057 Reduce queries when calling activity.create
This reduces queries in 2 ways
1) if the action is 'create' then existing activity contacts cannot exist, so do not try to delete them
2) if the action is 'edit' then look for & delete for all 3 record types at once.
There are still questions about how we can improve this further but it should remove up to 3 queries per
Activity.create call
Matthew Wire [Sat, 26 Sep 2020 18:31:28 +0000 (19:31 +0100)]
Merge pull request #18604 from eileenmcnaughton/act_cont
[REF] Very minor cleanup
Matthew Wire [Fri, 17 Jan 2020 19:04:00 +0000 (19:04 +0000)]
Add an 'Execute Now' button to the job log
eileen [Sat, 26 Sep 2020 03:24:51 +0000 (15:24 +1200)]
dev/core#2046 Rationalise add vs create on website BAO
2 years ago we deprecated 'calling website create in weird ways' - it seems like now we can remove that
handling & standardise on recommended create function & deprecate add
https://lab.civicrm.org/dev/core/-/issues/2046
Eileen McNaughton [Sat, 26 Sep 2020 06:43:00 +0000 (18:43 +1200)]
Merge pull request #18605 from totten/master-pscss
dev/core#1393 - distmaker - Skip new file "vendor/bin/pscss"
colemanw [Sat, 26 Sep 2020 03:04:00 +0000 (23:04 -0400)]
Merge pull request #18586 from eileenmcnaughton/blok
[REF] Fix Event location to create it's locations directly rather than via shared methods
eileen [Sat, 26 Sep 2020 00:43:38 +0000 (12:43 +1200)]
dev/core#2035 Invoice template - show Amount paid even when it is fully paid
In https://github.com/civicrm/civicrm-core/pull/16680/files?w=1#diff-b211e0dac858fdad5d480c118d645e0bR129 there was a change from
'show amount paid & due depending on pay-later status' to 'show amount paid & due depending on whether payment is due'
This has been experienced as a regression and, being an invoice, there seems no reason to only change it sometimes.
This change just alters the template that new installs will receive. If approved another step is needed to update existing
installs (unless they have customised the template)
colemanw [Sat, 26 Sep 2020 02:32:19 +0000 (22:32 -0400)]
Merge pull request #18598 from eileenmcnaughton/prim
Fix bug in primary handling where TRUE rather than 1 used
Eileen McNaughton [Sat, 26 Sep 2020 02:25:37 +0000 (14:25 +1200)]
Merge pull request #18601 from eileenmcnaughton/apiv3activity
Test cleanup fix
Tim Otten [Sat, 26 Sep 2020 00:46:23 +0000 (17:46 -0700)]
dev/core#1393 - distmaker - Skip new file "vendor/bin/pscss"
This file was recently added by way of `scssphp`. We don't use it, and
trying to bundle the symlink into the tarball breaks some consumers.
* Before (last release): `vendor/bin/pscss` does not exist
* Before (current master): `vendor/bin/pscss` is created as symlink, copied to tarball
* After (this commit): `vendor/bin/pscss` is created on dev-builds but omitted from tarball
eileen [Wed, 23 Sep 2020 03:33:39 +0000 (15:33 +1200)]
Minor code cleanup
eileen [Wed, 23 Sep 2020 03:31:07 +0000 (15:31 +1200)]
Remove unused variable
eileen [Sat, 26 Sep 2020 00:23:33 +0000 (12:23 +1200)]
Test cleanup fix
Note it's better practice to clean up in the tear down but it looks like someone
tried & failed before so let's see....
Eileen McNaughton [Sat, 26 Sep 2020 00:17:16 +0000 (12:17 +1200)]
Merge pull request #18447 from mlutfy/inheritLocaleRegression
dev/translation#51 Fix inheritLocale regression
Seamus Lee [Fri, 25 Sep 2020 23:57:25 +0000 (09:57 +1000)]
Merge pull request #18567 from eileenmcnaughton/apiv3activity
dev/core#2057 Fix 'sleeper-bug' in apiv4, BAO activity.create
eileen [Fri, 25 Sep 2020 21:54:54 +0000 (09:54 +1200)]
[REF] IPN - move unshared chunk of code out of shared function
We are passing a lot of variables into recur (& going to a lot of work to construct them) when they are not
actually processed in a common way - returning them to the calling functions makes it clear we are
a skip & a jump from not needing to instantiate objects at all
colemanw [Fri, 25 Sep 2020 22:59:54 +0000 (18:59 -0400)]
Merge pull request #18591 from eileenmcnaughton/search
[REF] Consolidate retrieval of searchFormValues
Eileen McNaughton [Fri, 25 Sep 2020 21:42:50 +0000 (09:42 +1200)]
Merge pull request #18597 from seamuslee001/core_exts_distmaker
[REF] Include recently added core extensions into distmaker
eileen [Fri, 25 Sep 2020 20:49:18 +0000 (08:49 +1200)]
Fix bug inn primary handling where TRUE rather than 1 used
colemanw [Fri, 25 Sep 2020 20:48:44 +0000 (16:48 -0400)]
Merge pull request #18571 from eileenmcnaughton/aipn
dev/financial#148 Duplicate validateData onto A.net
Seamus Lee [Fri, 25 Sep 2020 20:41:28 +0000 (06:41 +1000)]
[REF] Include recently added core extensions into distmaker
Eileen McNaughton [Fri, 25 Sep 2020 20:22:30 +0000 (08:22 +1200)]
Merge pull request #18594 from mattwire/repeattransactiondoubleexception
Remove double exception handling in repeattransaction
Jon Goldberg [Fri, 25 Sep 2020 20:21:30 +0000 (16:21 -0400)]
Don't throw a warning when public ext directory isn't found
eileen [Fri, 25 Sep 2020 02:46:31 +0000 (14:46 +1200)]
[REF] Consolidate retrieval of searchFormValues
Currently there are 3 ways in which the values from the searchForm are retrieved
1) the search form sets a value 'searchFormName' on the form during search which can
be later retrieved
2) the search task has an action that reflects the form it came from
3) as per 2 but there is additional handling for the fact it might be
the contact search (knowable because the entity has been set to 'Contact'
I'm not 100% sure at this stage that the selected method (3) in this PR is the best -
but it seems 'as good' as 1 with less form-state stuff and this PR consolidates it
into 1 place so it is handled consistently
Eileen McNaughton [Fri, 25 Sep 2020 20:14:58 +0000 (08:14 +1200)]
Merge pull request #18587 from eileenmcnaughton/prevnext
dev/core#2029 E2E.Core.PrevNextTest.testDeleteByCacheKey More debug attempts
Eileen McNaughton [Fri, 25 Sep 2020 20:11:08 +0000 (08:11 +1200)]
Merge pull request #18595 from adixon/preferred-language-1883
pass in "required" value when building preferred_language form element
Alan Dixon [Fri, 25 Sep 2020 16:11:04 +0000 (12:11 -0400)]
pass in "required" value when building preferred_language form element
Matthew Wire [Fri, 25 Sep 2020 15:18:20 +0000 (16:18 +0100)]
Remove double exception handling in repeattransaction
eileen [Fri, 25 Sep 2020 08:45:25 +0000 (20:45 +1200)]
Fix MailingJob::writeToDB to handle it's own activityTarget wrangling
Per https://github.com/civicrm/civicrm-core/pull/18567 it makes sense for activity to have basic support for activity targets
but form more nuance the function can DIY
eileen [Wed, 23 Sep 2020 02:22:07 +0000 (14:22 +1200)]
Fix 'sleeper-bug' in api.
It turns out that the Activity.create BAO
- deletes the existing source contact for an activity if the param 'source_contact_id' is set
- deletes existing assignee contacts for an activity if the param 'assignee_contact_id' is empty
- deletes existing target contacts for an activity if the param 'target_contact_id' is empty
The v3 api provides some fairly convoluted wrapping to effectively convert is empty
to isset (via 2 params deleteActivityAssignment, deleteActivityTarget which would only
be anything other than true if the relevant value key is not set or we are operating from
the one place in universe that passes in this param (well actually it's true then too
https://github.com/eileenmcnaughton/civicrm_entity/commit/
bd779c19bbf82ca22260615b4f7667d02eee1200
)
The v4 api does no handling and we can expect that on update activity contact records are
likely being lost - ditto with direct BAO calls that were probably QAd at some point but
may have changed over time.
This changes the BAO to treat the assignee & target params the same way as source
- ie do nothing if not set, but empty means to delete them
Remove support for api param deleteActivityAssignment, deleteActivityTarget
I did a universe search & it was only called from one place which
I fixed
https://github.com/eileenmcnaughton/civicrm_entity/commit/
bd779c19bbf82ca22260615b4f7667d02eee1200
- it's never been a tested param so technically not supported
This is part of my effort to fix redundant queries in Activity.create regarding
activity contacts
eileen [Thu, 24 Sep 2020 23:01:09 +0000 (11:01 +1200)]
[REF] Fix Event location to create it's locations directly rather than via shared methods
This form does extra work in order to call CRM_Core_BAO_Block::create and CRM_Core_BAO_Address::create - but they have
extra handling that only exists for this code place. So, we are making 2 functions more complex in order to inter-relate them.
This simplifies the CRM_Event_Form_ManageEvent_Location and I will do follow on cleanup once merged. Note I previously
added tests to CRM_Event_Form_ManageEvent_LocationTest specifically to cover this (in a recent previous refactor
Eileen McNaughton [Fri, 25 Sep 2020 04:23:40 +0000 (16:23 +1200)]
Merge pull request #18588 from eileenmcnaughton/phone
dev/core#2046 Fix Phone:add to be a pseudonym for Phone.create
eileen [Fri, 25 Sep 2020 02:07:58 +0000 (14:07 +1200)]
[REF] Remove unused taskName variable
This variable is only used at the tpl layer in export - there is a separate PR
to change that usage to something more meaningful
https://github.com/civicrm/civicrm-core/pull/18589
Other than that all this task assignment appears to be just cruft
It's likely that it precedes other ways of setting the page title
eileen [Thu, 24 Sep 2020 23:31:39 +0000 (11:31 +1200)]
dev/core#2046 Fix Phone:add to be a pseudonym for Phone.create
Per https://lab.civicrm.org/dev/core/-/issues/2046 we have discussed rationalising add vs create
In the case of phone making this change only affects one place - a place that currently has a
bug that relates specifically to the handling of is_primary & which is more solvable by
calling create with it's extra is_primary handling.
(the related bug is that the is_primary handling in Block::create is unreliable &
to mitigate that we are doing an additional 10 queries on every contact create - so
handling is_primary right in the first place helps address that)
colemanw [Fri, 25 Sep 2020 00:06:00 +0000 (20:06 -0400)]
Merge pull request #18510 from eileenmcnaughton/preprocess
[Ref] Extract getFormValues
eileen [Thu, 24 Sep 2020 23:17:47 +0000 (11:17 +1200)]
dev/core#2029 More debug attempts
Eileen McNaughton [Thu, 24 Sep 2020 22:40:33 +0000 (10:40 +1200)]
Merge pull request #18583 from colemanw/afformGui
Afform GUI: add bootstrap3