civicrm-core.git
2 years agoAdd test to check update-with-id works and date handling works
Eileen McNaughton [Sat, 4 Jun 2022 12:04:53 +0000 (00:04 +1200)]
Add test to check update-with-id works and date handling works

Fix test to test the matching csv (changed by mistake)

2 years agoFix field mapping not loading
Eileen McNaughton [Sat, 4 Jun 2022 11:41:33 +0000 (23:41 +1200)]
Fix field mapping not loading

2 years agoRemove unused variables.
Eileen McNaughton [Sat, 4 Jun 2022 11:24:43 +0000 (23:24 +1200)]
Remove unused variables.

2 years agoEnotice fix
Eileen McNaughton [Sat, 4 Jun 2022 09:15:34 +0000 (21:15 +1200)]
Enotice fix

Enotice fix

2 years agoAdd test for tab-separated file
Eileen McNaughton [Sat, 4 Jun 2022 09:13:05 +0000 (21:13 +1200)]
Add test for tab-separated file

Missed out the csv files

2 years agoMembership form flow tidy-up
Eileen McNaughton [Fri, 3 Jun 2022 23:27:54 +0000 (11:27 +1200)]
Membership form flow tidy-up

2 years agoMember import cleanup - use datasource
Eileen McNaughton [Fri, 3 Jun 2022 23:02:59 +0000 (11:02 +1200)]
Member import cleanup - use datasource

2 years agoUpdate Member import to use labels not names in mapping
Eileen McNaughton [Thu, 26 May 2022 05:37:55 +0000 (17:37 +1200)]
Update Member import to use labels not names in mapping

2 years ago[Import] [Ref] Minor extraction on membership metadata
Eileen McNaughton [Thu, 26 May 2022 07:33:18 +0000 (19:33 +1200)]
[Import] [Ref] Minor extraction on membership metadata

2 years agoAdd extra shared import functions
Eileen McNaughton [Mon, 6 Jun 2022 03:18:53 +0000 (15:18 +1200)]
Add extra shared import functions

This is an attempt to get away from fixing known breakage
being blocked by
https://github.com/civicrm/civicrm-core/pull/23689

These functions should be mostly as-yet-unused, or only minorly changed
but required to fix the known issues

2 years agoMerge pull request #23669 from eileenmcnaughton/import_queue
Eileen McNaughton [Mon, 6 Jun 2022 04:27:14 +0000 (16:27 +1200)]
Merge pull request #23669 from eileenmcnaughton/import_queue

Use UI Queue runner for import

2 years agoFix tests to the updated function signature
Eileen McNaughton [Mon, 6 Jun 2022 02:07:35 +0000 (14:07 +1200)]
Fix tests to the updated function signature

2 years agoMerge pull request #23698 from seamuslee001/fix_price_set_entity_since
Eileen McNaughton [Mon, 6 Jun 2022 00:24:17 +0000 (12:24 +1200)]
Merge pull request #23698 from seamuslee001/fix_price_set_entity_since

[NFC] Fix Since version in Price Set Entity APIv4

2 years agoAlso remove contactFields from createContact signature
Eileen McNaughton [Mon, 6 Jun 2022 00:23:35 +0000 (12:23 +1200)]
Also remove contactFields from createContact signature

2 years agoRemove remaining refs to onDuplicate
Eileen McNaughton [Mon, 6 Jun 2022 00:17:10 +0000 (12:17 +1200)]
Remove remaining refs to onDuplicate

2 years agoMerge pull request #23687 from colemanw/adminAfformPerm
Eileen McNaughton [Sun, 5 Jun 2022 23:29:22 +0000 (11:29 +1200)]
Merge pull request #23687 from colemanw/adminAfformPerm

Afform - Add 'administer afform' permission

2 years agoUse UI Queue runner for import
Eileen McNaughton [Thu, 2 Jun 2022 14:14:34 +0000 (02:14 +1200)]
Use UI Queue runner for import

Additional minor code simplification

Tear down fix

Maybe the var name needs to match in the CI php version

2 years agoMerge pull request #23691 from eileenmcnaughton/contact_type
Seamus Lee [Sun, 5 Jun 2022 22:52:02 +0000 (08:52 +1000)]
Merge pull request #23691 from eileenmcnaughton/contact_type

Add not-yet-used function to allow the import to run in static (queue) context

2 years agoMerge pull request #23688 from eileenmcnaughton/import_cont_tests
Seamus Lee [Sun, 5 Jun 2022 22:51:45 +0000 (08:51 +1000)]
Merge pull request #23688 from eileenmcnaughton/import_cont_tests

Contribution import - tests & fixes on dates, amount

2 years ago[NFC] Fix Since version in Price Set Entity APIv4
Seamus Lee [Sun, 5 Jun 2022 22:42:03 +0000 (08:42 +1000)]
[NFC] Fix Since version in Price Set Entity APIv4

2 years agoMerge pull request #23693 from pradpnayak/pricesetid1
Eileen McNaughton [Sun, 5 Jun 2022 22:24:07 +0000 (10:24 +1200)]
Merge pull request #23693 from pradpnayak/pricesetid1

Typo fix for Entity Id

2 years agoMerge pull request #23694 from pradpnayak/pricesetid2
Eileen McNaughton [Sun, 5 Jun 2022 22:23:44 +0000 (10:23 +1200)]
Merge pull request #23694 from pradpnayak/pricesetid2

Add price set entity api4 support

2 years agoMerge pull request #23696 from mlutfy/mailingSubCancel
Eileen McNaughton [Sun, 5 Jun 2022 22:13:23 +0000 (10:13 +1200)]
Merge pull request #23696 from mlutfy/mailingSubCancel

Mailing List Subscription: remove the cancel button

2 years agoMailing List Subscription: remove the cancel button
Mathieu Lutfy [Sun, 5 Jun 2022 20:20:01 +0000 (16:20 -0400)]
Mailing List Subscription: remove the cancel button

2 years agoAdd price set entity api4 support
Pradeep Nayak [Sun, 5 Jun 2022 18:58:27 +0000 (19:58 +0100)]
Add price set entity api4 support

2 years agoTypo fix for Entity Id
Pradeep Nayak [Sun, 5 Jun 2022 18:55:44 +0000 (19:55 +0100)]
Typo fix for Entity Id

2 years agoAdd runImport function
Eileen McNaughton [Sat, 4 Jun 2022 22:32:43 +0000 (10:32 +1200)]
Add runImport function

This is required both for the queue fix and for QA fixes on the import classes.

2 years agoSave different type_id per import
Eileen McNaughton [Sat, 4 Jun 2022 22:27:28 +0000 (10:27 +1200)]
Save different type_id per import

I left it as just contact to start with - but as I've gone further it's clear
we need a type for each import - best done now

2 years agoContribution import - tests & fixes on dates, amount
Eileen McNaughton [Sat, 4 Jun 2022 03:32:08 +0000 (15:32 +1200)]
Contribution import - tests & fixes on dates, amount

Fixes inconsistent  amount handling - these
are issues that I found through writing unit tests to cover them
The money handling was permitting amounts where the
decimal separator was before the thousand. On the dates
there was a format being handled for some fields
but not others

2 years agoExtract saveFieldMapping
Eileen McNaughton [Fri, 3 Jun 2022 23:27:30 +0000 (11:27 +1200)]
Extract saveFieldMapping

2 years agoMerge pull request #23690 from totten/master-queue-visibility
Eileen McNaughton [Sat, 4 Jun 2022 11:17:35 +0000 (23:17 +1200)]
Merge pull request #23690 from totten/master-queue-visibility

APIv4 - Allow creator to read `UserJob` and `Queue` records

2 years agoAPIv4 - Allow creator to read `UserJob` and `Queue` records
Tim Otten [Sat, 4 Jun 2022 08:02:06 +0000 (01:02 -0700)]
APIv4 - Allow creator to read `UserJob` and `Queue` records

Before
------

* `Queue.get` requires permission `administer queues`
* `UserJob.*` requires permission `access CiviCRM`, but it only
   returns records if where the `created_id` matches current-user

After
-----

* `Queue.get` and `UserJob.*` follow similar rules
* Users with permission `administer queues` can view all
* Users with permission `access CiviCRM` can view items where `created_id` matches current-user

2 years agoMerge pull request #23670 from colemanw/searchKitAddPerm
Eileen McNaughton [Sat, 4 Jun 2022 04:00:04 +0000 (16:00 +1200)]
Merge pull request #23670 from colemanw/searchKitAddPerm

SearchKit - Add "administer search_kit" permission

2 years agoMerge pull request #23684 from colemanw/relationshipCachePermissions
Eileen McNaughton [Sat, 4 Jun 2022 02:30:41 +0000 (14:30 +1200)]
Merge pull request #23684 from colemanw/relationshipCachePermissions

RelationshipCache - Set 'get' permissions

2 years agoAfform - Add 'administer afform' permission
Coleman Watts [Sat, 4 Jun 2022 01:39:22 +0000 (21:39 -0400)]
Afform - Add 'administer afform' permission

This permission allow non-admins to compose forms and view submission results.

2 years agoAPIv4 - Use api kernel to validate entity permissions
Coleman Watts [Fri, 3 Jun 2022 03:29:30 +0000 (23:29 -0400)]
APIv4 - Use api kernel to validate entity permissions

This allows extensions to expand permissions via the civi.api.authorize event,
instead of assuming that all permissions are hard-coded in the core entity.

2 years agoSearchKit - Switch nav menu to mgd.php with new permission
Coleman Watts [Thu, 2 Jun 2022 15:06:10 +0000 (11:06 -0400)]
SearchKit - Switch nav menu to mgd.php with new permission

2 years agoMerge pull request #23683 from eileenmcnaughton/import_cont
colemanw [Sat, 4 Jun 2022 01:23:59 +0000 (21:23 -0400)]
Merge pull request #23683 from eileenmcnaughton/import_cont

[Import] [Contribution] Cleanup templates & form variables, following contact pattern

2 years agoMerge pull request #23685 from colemanw/mixinUpdate
Eileen McNaughton [Fri, 3 Jun 2022 23:50:25 +0000 (11:50 +1200)]
Merge pull request #23685 from colemanw/mixinUpdate

[NFC] Mixin - update version tags and add comment for new version of mgd-php

2 years agoUse getTransformedValue more & really old code less
Eileen McNaughton [Fri, 3 Jun 2022 06:34:50 +0000 (18:34 +1200)]
Use getTransformedValue more & really old code less

2 years agoCleanup templates & form variables, following contact pattern
Eileen McNaughton [Fri, 3 Jun 2022 05:12:05 +0000 (17:12 +1200)]
Cleanup templates & form variables, following contact pattern

2 years agoFix fatal when going back from MapField due to no dataSource
Eileen McNaughton [Fri, 3 Jun 2022 03:24:14 +0000 (15:24 +1200)]
Fix fatal when going back from MapField due to no dataSource

2 years agoAdd import labels fixes that I figured out doing memberhsip
Eileen McNaughton [Fri, 3 Jun 2022 03:23:29 +0000 (15:23 +1200)]
Add import labels fixes that I figured out doing memberhsip

Importantly do_not_import should be added

2 years agoMerge pull request #23686 from demeritcowboy/primary-ts
colemanw [Fri, 3 Jun 2022 20:54:26 +0000 (16:54 -0400)]
Merge pull request #23686 from demeritcowboy/primary-ts

dev/core#3481 - Don't translate css classes

2 years agodon't translate css classes
demeritcowboy [Fri, 3 Jun 2022 18:48:30 +0000 (14:48 -0400)]
don't translate css classes

2 years agoMixin - update version tags and add comment for new version of mgd-php
Coleman Watts [Fri, 3 Jun 2022 18:19:05 +0000 (14:19 -0400)]
Mixin - update version tags and add comment for new version of mgd-php

2 years agoMerge pull request #23680 from eileenmcnaughton/contact_map
colemanw [Fri, 3 Jun 2022 16:54:39 +0000 (12:54 -0400)]
Merge pull request #23680 from eileenmcnaughton/contact_map

Contact import - extract common code, make tags & groups queue-friendly

2 years agoRelationshipCache - Set 'get' permissions to be the same as for 'Relationship' entity
Coleman Watts [Fri, 3 Jun 2022 16:47:08 +0000 (12:47 -0400)]
RelationshipCache - Set 'get' permissions to be the same as for 'Relationship' entity

This gives lesser-permissioned users access to the RelationshipCache entity, for Search Kit.

2 years agoMerge pull request #23283 from eileenmcnaughton/import_saved_map
Tim Otten [Fri, 3 Jun 2022 07:11:04 +0000 (00:11 -0700)]
Merge pull request #23283 from eileenmcnaughton/import_saved_map

[REF] Remove handling for non-existent 'savedMapping' field

2 years agoAdd generic PreProcess
Eileen McNaughton [Fri, 3 Jun 2022 06:46:19 +0000 (18:46 +1200)]
Add generic PreProcess

2 years agoMove setImportStatus to parent
Eileen McNaughton [Fri, 3 Jun 2022 06:44:33 +0000 (18:44 +1200)]
Move setImportStatus to parent

m

2 years agoAdd generic label get function - not used yet
Eileen McNaughton [Fri, 3 Jun 2022 06:42:23 +0000 (18:42 +1200)]
Add generic label get function - not used yet

2 years agoFix flow for groups & tags
Eileen McNaughton [Thu, 2 Jun 2022 09:13:27 +0000 (21:13 +1200)]
Fix flow for groups & tags

The new way is
- create the tags & groups at the form layer & only the ids
go to the parser - which adds them

This patch should be a nullop in terms of the efficiency of these

2 years agoContact import - extract assignments to be used by other forms
Eileen McNaughton [Fri, 3 Jun 2022 04:33:40 +0000 (16:33 +1200)]
Contact import - extract assignments to be used by other forms

2 years agoExtract common part of MapTable.tpl
Eileen McNaughton [Fri, 3 Jun 2022 03:06:37 +0000 (15:06 +1200)]
Extract common part of MapTable.tpl

2 years agoSearchKit - Add "administer SearchKit" permission
Coleman Watts [Thu, 2 Jun 2022 14:26:30 +0000 (10:26 -0400)]
SearchKit - Add "administer SearchKit" permission

This permission allows non-admins to use search kit.
Previously the user needed 'administer CiviCRM data' permission.

Fixes dev/core#3457

2 years agoMerge pull request #23675 from demeritcowboy/test-sequential
Eileen McNaughton [Fri, 3 Jun 2022 01:40:11 +0000 (13:40 +1200)]
Merge pull request #23675 from demeritcowboy/test-sequential

[NFC] Failing test for api chain using sequential

2 years agoMerge pull request #23676 from eileenmcnaughton/white
Eileen McNaughton [Fri, 3 Jun 2022 01:37:16 +0000 (13:37 +1200)]
Merge pull request #23676 from eileenmcnaughton/white

Reformat whitespace

2 years agoMerge pull request #22762 from totten/master-queue-api4-alt
Eileen McNaughton [Fri, 3 Jun 2022 01:21:56 +0000 (13:21 +1200)]
Merge pull request #22762 from totten/master-queue-api4-alt

(dev/core#1304) Queues - Allow background worker to drive tasks via APIv4

2 years agoMerge pull request #23520 from eileenmcnaughton/old_code
Tim Otten [Fri, 3 Jun 2022 00:54:36 +0000 (17:54 -0700)]
Merge pull request #23520 from eileenmcnaughton/old_code

Deprecate stuff getting super deep into the BAO unformatted

2 years agofailing test for api chain with sequential
demeritcowboy [Thu, 2 Jun 2022 23:47:19 +0000 (19:47 -0400)]
failing test for api chain with sequential

2 years agoMerge pull request #23666 from eileenmcnaughton/import_combo
Mathieu Lu [Thu, 2 Jun 2022 23:56:31 +0000 (19:56 -0400)]
Merge pull request #23666 from eileenmcnaughton/import_combo

Contact Import cleanup - includes fixes to contact matchine

2 years agoReformat whitespace
Eileen McNaughton [Thu, 2 Jun 2022 23:51:04 +0000 (11:51 +1200)]
Reformat whitespace

2 years agoMerge pull request #23672 from seamuslee001/fix_sequential_enforcement
Seamus Lee [Thu, 2 Jun 2022 23:39:36 +0000 (09:39 +1000)]
Merge pull request #23672 from seamuslee001/fix_sequential_enforcement

APIv3 - Fix regression in handling chained calls with `sequential`

2 years agoMerge pull request #23671 from seamuslee001/master
Seamus Lee [Thu, 2 Jun 2022 21:20:49 +0000 (07:20 +1000)]
Merge pull request #23671 from seamuslee001/master

Fix issue #116 api3 chain check_permissions

2 years ago[REF] Fix issue where forceing sequential broke webform API chained usage
Seamus Lee [Thu, 2 Jun 2022 21:18:21 +0000 (07:18 +1000)]
[REF] Fix issue where forceing sequential broke webform API chained usage

2 years agoFix issue #116 api3 chain check_permissions
Rich [Tue, 31 May 2022 22:58:34 +0000 (22:58 +0000)]
Fix issue #116 api3 chain check_permissions

2 years agoCivi\Api4\Queue - Add APIs for claiming and running enqueued tasks
Tim Otten [Wed, 2 Feb 2022 08:41:03 +0000 (00:41 -0800)]
Civi\Api4\Queue - Add APIs for claiming and running enqueued tasks

2 years agoCRM_Queue_TaskRunner - Add background-friendly handler for `CRM_Queue_Task`s
Tim Otten [Wed, 2 Feb 2022 08:29:13 +0000 (00:29 -0800)]
CRM_Queue_TaskRunner - Add background-friendly handler for `CRM_Queue_Task`s

2 years agoSqlParallel - Implement BatchQueueInterface
Tim Otten [Fri, 11 Feb 2022 09:07:25 +0000 (01:07 -0800)]
SqlParallel - Implement BatchQueueInterface

Before
------

Each of the `CRM_Queue_Queue_*` drivers supports a set of methods for
claiming/releasing one queue-item at a time (eg `claimItem()`,
`releaseItem()`, `deleteItem()`).

After
-----

All drivers still support the same queue-item methods.  Additionally, the
`SqlParallel` driver supports batch-oriented equivalents (`claimItems()`,
`deleteItems()`, etc).

Comments
--------

I initially looked at updating all of the drivers to support queues.  There
were a few obstacles.  Firstly, batched-claims seem semantically
questionable for queues that run 1-by-1 (`Sql`, `Memory`).  Secondly, there
are a few extensions in contrib that extend these classes and override
methods (consequently, they're looking for stable signatures).

The approach here seemed to resolve those two concerns in an OOP-safe way:
define an optional interface (`BatchQueueInterface`) which can be used to
mark enhanced functionality on queues where it makes sense (eg
`SqlParallel`).

2 years agoCRM_Queue_Queue_* - Respect `$queueSpec['lease_time']` (if given)
Tim Otten [Fri, 11 Feb 2022 06:12:40 +0000 (22:12 -0800)]
CRM_Queue_Queue_* - Respect `$queueSpec['lease_time']` (if given)

Before: The lease-time is one of the following:

1. A value requested at runtime
2. The constant 3600

After: The lease-time is either supplied as

1. A value requested at runtime
2. A value configured for the queue
3. The constant 3600

2 years agoCRM_Queue_Queue_* - Respect `$queueSpec['retry_interval']` (if given)
Tim Otten [Wed, 2 Feb 2022 07:22:31 +0000 (23:22 -0800)]
CRM_Queue_Queue_* - Respect `$queueSpec['retry_interval']` (if given)

Background:

* A queue runner should call `releaseItem()` if it tries and aborts some task.
* The `retry_interval` is defined as the extra time to wait before trying again.

Before: The `releaseItem()` always releases for immediate execution.

After: The `releaseItem()` checks `retry_interval`.  If it's set, then it
will add an extra delay before retrying.

2 years agoCRM_Queue_Queue_* - Track and report `run_count` for each item
Tim Otten [Fri, 11 Feb 2022 03:32:02 +0000 (19:32 -0800)]
CRM_Queue_Queue_* - Track and report `run_count` for each item

Before: Whenever you `claimItem()` from the queue, it marks the item `release_time`.

After: Whenever you `claimItem()` from the queue, it marks _both_ the
`release_time` and the `run_count`.

Comments:

* This is the basis for enforcing a `retry_limit` policy.

* This doesn't require any extra queries or joins - it fits into the
  existing update query.

2 years agoCRM_Queue_Queue_* - Add fetchItem($id)
Tim Otten [Thu, 20 Jan 2022 23:31:50 +0000 (15:31 -0800)]
CRM_Queue_Queue_* - Add fetchItem($id)

Note: The return types are a bit wonky here.  Unfortunately, as I recall,
the original specification for all the methods here allowed backend-specific
return types -- anti-standardized return-types.

2 years agoCRM_Queue_Queue_* - Add isActive() and setStatus()
Tim Otten [Tue, 31 May 2022 08:00:42 +0000 (01:00 -0700)]
CRM_Queue_Queue_* - Add isActive() and setStatus()

2 years agoMerge pull request #23646 from seamuslee001/improve_get_coordinates
colemanw [Thu, 2 Jun 2022 20:05:27 +0000 (16:05 -0400)]
Merge pull request #23646 from seamuslee001/improve_get_coordinates

[REF] Improve Get Coordinates by supporting other geocoding providers…

2 years agoAdd in unit test of getCoordinates Address action and update TestProvider to be like...
Seamus Lee [Wed, 1 Jun 2022 01:54:31 +0000 (11:54 +1000)]
Add in unit test of getCoordinates Address action and update TestProvider to be like the Google provider change

Fix Tear down of geoProvider setting

2 years agoMerge pull request #23668 from colemanw/civiGrantPerm
Eileen McNaughton [Thu, 2 Jun 2022 14:36:56 +0000 (02:36 +1200)]
Merge pull request #23668 from colemanw/civiGrantPerm

CiviGrant - Add prefix to permission label

2 years agoCiviGrant - Add prefix to permission label
Coleman Watts [Thu, 2 Jun 2022 12:48:08 +0000 (08:48 -0400)]
CiviGrant - Add prefix to permission label

2 years agoMerge pull request #23667 from totten/master-queue-status-error
Eileen McNaughton [Thu, 2 Jun 2022 11:01:08 +0000 (23:01 +1200)]
Merge pull request #23667 from totten/master-queue-status-error

(dev/core#1304) Queues - Define 'status' and 'error' columns

2 years agoDo not rely in init to set whether address parsing is on
Eileen McNaughton [Thu, 2 Jun 2022 07:13:13 +0000 (19:13 +1200)]
Do not rely in init to set whether address parsing is on

2 years agoRemove now-unused getActiveFields
Eileen McNaughton [Thu, 2 Jun 2022 07:08:08 +0000 (19:08 +1200)]
Remove now-unused getActiveFields

2 years agoRemove a couple of unused params
Eileen McNaughton [Thu, 2 Jun 2022 07:06:32 +0000 (19:06 +1200)]
Remove a couple of unused params

2 years agoStop setting now-unused updateWithId
Eileen McNaughton [Thu, 2 Jun 2022 07:05:26 +0000 (19:05 +1200)]
Stop setting now-unused updateWithId

2 years agoRemove transitional getMetadataParams
Eileen McNaughton [Thu, 2 Jun 2022 07:04:21 +0000 (19:04 +1200)]
Remove transitional getMetadataParams

2 years agoRemove now-unused function
Eileen McNaughton [Thu, 2 Jun 2022 06:53:31 +0000 (18:53 +1200)]
Remove now-unused function

2 years agoMove function to the only class that still calls it
Eileen McNaughton [Wed, 1 Jun 2022 02:40:02 +0000 (14:40 +1200)]
Move function to the only class that still calls it

2 years agoMove isErrorInCustomData to shared class
Eileen McNaughton [Thu, 2 Jun 2022 06:50:52 +0000 (18:50 +1200)]
Move isErrorInCustomData to shared class

2 years agoFold getParams into getMapped row
Eileen McNaughton [Thu, 2 Jun 2022 06:44:52 +0000 (18:44 +1200)]
Fold getParams into getMapped row

No point having a separate  line function

2 years agoRemove function that no longer does anything
Eileen McNaughton [Thu, 2 Jun 2022 06:42:57 +0000 (18:42 +1200)]
Remove function that no longer does anything

This is now only checking booleans in a way that duplicates getTransformedValue

2 years agoCleanup unparsed address message handling
Eileen McNaughton [Thu, 2 Jun 2022 03:48:10 +0000 (15:48 +1200)]
Cleanup unparsed address message handling

2 years agoContact import - reduce over-formatting
Eileen McNaughton [Thu, 2 Jun 2022 02:49:52 +0000 (14:49 +1200)]
Contact import - reduce over-formatting

2 years agoExtract create relationship
Eileen McNaughton [Thu, 2 Jun 2022 06:35:51 +0000 (18:35 +1200)]
Extract create relationship

2 years agoRemove always true if
Eileen McNaughton [Thu, 2 Jun 2022 06:35:38 +0000 (18:35 +1200)]
Remove always true if

2 years agoOnly call getParams once
Eileen McNaughton [Thu, 2 Jun 2022 06:28:47 +0000 (18:28 +1200)]
Only call getParams once

2 years agoRemove code that handled now-changed relationship key
Eileen McNaughton [Thu, 2 Jun 2022 06:07:31 +0000 (18:07 +1200)]
Remove code that handled now-changed relationship key

Note this code is no longer called by contact import, and the others do not pass
in relationship key - so we can remove rather than fix

2 years agoFix Import related contact stealing
Eileen McNaughton [Thu, 2 Jun 2022 04:57:03 +0000 (16:57 +1200)]
Fix Import related contact stealing

2 years agoHandle error when creating related contact
Eileen McNaughton [Thu, 2 Jun 2022 01:37:20 +0000 (13:37 +1200)]
Handle error when creating related contact

This addresses the e-notice identified here
https://github.com/civicrm/civicrm-core/pull/23643#discussion_r887406505

I believe the bug report in that thread was a variant of the e-notice. Ie the import()
function was failing to catch an exception & it was bubbling up to run()

While there is no support currently for calling import()
outside of run() - the intent is to replace run() with something
more sane - which WILL be callable from the outside (likely
via api).

The right behaviour for import() is to catch all errors

2 years agoRemove unused getting & setting (copy & paste)
Eileen McNaughton [Wed, 1 Jun 2022 23:57:38 +0000 (11:57 +1200)]
Remove unused getting & setting (copy & paste)

2 years agoImport flow - separate out 'validate' function from 'run'
Eileen McNaughton [Tue, 24 May 2022 23:23:14 +0000 (11:23 +1200)]
Import flow - separate out 'validate' function from 'run'