civicrm-core.git
2 years agoFix Contribution import with pledge handling, add test
Eileen McNaughton [Wed, 8 Jun 2022 00:50:50 +0000 (12:50 +1200)]
Fix Contribution import with pledge handling, add test

2 years agoSwitch contribution to use same error handling
Eileen McNaughton [Tue, 7 Jun 2022 23:34:20 +0000 (11:34 +1200)]
Switch contribution to use same error handling

2 years agoMerge pull request #23709 from eileenmcnaughton/buttons
colemanw [Wed, 8 Jun 2022 00:21:52 +0000 (20:21 -0400)]
Merge pull request #23709 from eileenmcnaughton/buttons

Trivial extraction - addFormButtons shared code

2 years agoMerge pull request #23714 from eileenmcnaughton/import_conts
colemanw [Tue, 7 Jun 2022 23:59:34 +0000 (19:59 -0400)]
Merge pull request #23714 from eileenmcnaughton/import_conts

Contribution import - simplify error handling

2 years agoMerge pull request #23707 from eileenmcnaughton/import_activity
Eileen McNaughton [Tue, 7 Jun 2022 23:30:37 +0000 (11:30 +1200)]
Merge pull request #23707 from eileenmcnaughton/import_activity

Fix import activity & add tests

2 years agoMerge pull request #23711 from totten/master-queue-status
Eileen McNaughton [Tue, 7 Jun 2022 22:48:39 +0000 (10:48 +1200)]
Merge pull request #23711 from totten/master-queue-status

Queue - When UserJob has no more tasks, update status & fire hook

2 years agoFix copy & paste
Eileen McNaughton [Tue, 7 Jun 2022 21:59:07 +0000 (09:59 +1200)]
Fix copy & paste

2 years agoRemove copy&paste extraneous select
Eileen McNaughton [Tue, 7 Jun 2022 19:40:28 +0000 (07:40 +1200)]
Remove copy&paste extraneous select

2 years agoFixes for Activity import
Eileen McNaughton [Tue, 7 Jun 2022 02:55:32 +0000 (14:55 +1200)]
Fixes for Activity import

2 years agoExpand try-catch to whole function
Eileen McNaughton [Tue, 7 Jun 2022 03:01:11 +0000 (15:01 +1200)]
Expand try-catch to whole function

2 years agoMerge pull request #23703 from eileenmcnaughton/import_unblock
Eileen McNaughton [Tue, 7 Jun 2022 21:54:14 +0000 (09:54 +1200)]
Merge pull request #23703 from eileenmcnaughton/import_unblock

Fix Participant import, add tests

2 years agoMerge pull request #21471 from mattwire/edittemplatecontributionform
Eileen McNaughton [Tue, 7 Jun 2022 21:39:12 +0000 (09:39 +1200)]
Merge pull request #21471 from mattwire/edittemplatecontributionform

Fix editing and saving a template contribution via form

2 years agoMerge pull request #23713 from colemanw/globFix
Seamus Lee [Tue, 7 Jun 2022 21:20:48 +0000 (07:20 +1000)]
Merge pull request #23713 from colemanw/globFix

PHP8.1 - Fix deprecated passing null to glob

2 years agoSimplify parameters for duplicate - use class functions
Eileen McNaughton [Tue, 7 Jun 2022 21:10:50 +0000 (09:10 +1200)]
Simplify parameters for duplicate - use class functions

2 years agoSimplify error handling - allow catch to handle
Eileen McNaughton [Tue, 7 Jun 2022 20:32:39 +0000 (08:32 +1200)]
Simplify error handling - allow catch to handle

2 years agoRemove call to 'summary'
Eileen McNaughton [Tue, 7 Jun 2022 20:24:13 +0000 (08:24 +1200)]
Remove call to 'summary'

2 years agoMerge pull request #23704 from eileenmcnaughton/try
colemanw [Tue, 7 Jun 2022 19:49:18 +0000 (15:49 -0400)]
Merge pull request #23704 from eileenmcnaughton/try

Expand try-catch to whole function

2 years agoA couple more fixes..
Eileen McNaughton [Tue, 7 Jun 2022 19:38:08 +0000 (07:38 +1200)]
A couple more fixes..

2 years agoEnotice fix
Eileen McNaughton [Tue, 7 Jun 2022 19:05:24 +0000 (07:05 +1200)]
Enotice fix

2 years agoMinor wording tweak
Eileen McNaughton [Tue, 7 Jun 2022 19:00:06 +0000 (07:00 +1200)]
Minor wording tweak

This file is shared by memberships, contributions, participants, activities

2 years agoRemove reference to built in contact types
Eileen McNaughton [Tue, 7 Jun 2022 18:59:05 +0000 (06:59 +1200)]
Remove reference to built in contact types

2 years agoPHP8.1 - Fix deprecated passing null to glob
Coleman Watts [Tue, 7 Jun 2022 18:56:08 +0000 (14:56 -0400)]
PHP8.1 - Fix deprecated passing null to glob

2 years agoFix error due to interim merge adding funciton to parent
Eileen McNaughton [Tue, 7 Jun 2022 18:55:39 +0000 (06:55 +1200)]
Fix error due to interim merge adding funciton to parent

2 years agoFix Participant import, add tests
Eileen McNaughton [Mon, 6 Jun 2022 04:52:56 +0000 (16:52 +1200)]
Fix Participant import, add tests

2 years agoWrap function in try-catch
Eileen McNaughton [Tue, 7 Jun 2022 03:54:16 +0000 (15:54 +1200)]
Wrap function in try-catch

2 years agoMerge pull request #23710 from eileenmcnaughton/civi_import
Yashodha Chaku [Tue, 7 Jun 2022 16:25:17 +0000 (21:55 +0530)]
Merge pull request #23710 from eileenmcnaughton/civi_import

Minor simplification - use `$self->getContactType(),`

2 years agoMerge pull request #23620 from bugfolder/8_move_session_start
demeritcowboy [Tue, 7 Jun 2022 12:59:00 +0000 (08:59 -0400)]
Merge pull request #23620 from bugfolder/8_move_session_start

dev/backdrop#8 - Move session start into CMS-specific classes.

2 years agoMerge pull request #23708 from eileenmcnaughton/date
Monish Deb [Tue, 7 Jun 2022 11:58:41 +0000 (17:28 +0530)]
Merge pull request #23708 from eileenmcnaughton/date

dev/core#2325 Fix handling of seconds on import

2 years agodemoqueue - Include a userjob with the demo
Tim Otten [Tue, 7 Jun 2022 10:25:31 +0000 (03:25 -0700)]
demoqueue - Include a userjob with the demo

2 years agoMinor simplification - use
Eileen McNaughton [Tue, 7 Jun 2022 10:00:51 +0000 (22:00 +1200)]
Minor simplification - use

2 years agoQueue - When UserJob.queue_id works down to zero tasks, update status and fire hook
Tim Otten [Tue, 7 Jun 2022 08:46:34 +0000 (01:46 -0700)]
Queue - When UserJob.queue_id works down to zero tasks, update status and fire hook

Suppose you setup a queue with several tasks and then run them all. What happens
to the queue's status?

Before
------

The status always remains `active`.

After
-----

Depends on the use-case:

* If you have an open-ended queue providing an on-going service (no `UserJob`),
  then the status remains `active`.
* If you have a fixed-purpose queue attached to a `UserJob`, then the status
  changes from `active` to `completed`, and it fires an event:
    ```
    function hook_civicrm_queueStatus(CRM_Queue_Queue $queue, string $status)
    ```

Technical Details
-----------------

* There are two main ways that items get removed from a queue (`Queue.runNext`
  API and `civicrm/queue/ajax/runNext`).  Both of these fire an internal event
  (`civi.queue.check`) to consult the status.

2 years agoMinor extraction - addFormButtons shared code
Eileen McNaughton [Tue, 7 Jun 2022 08:32:57 +0000 (20:32 +1200)]
Minor extraction - addFormButtons shared code

2 years agodev/core#2325 Fix handling of seconds on import
Eileen McNaughton [Tue, 7 Jun 2022 07:51:29 +0000 (19:51 +1200)]
dev/core#2325 Fix handling of seconds on import

This addresses an issue where the following date time has the time component
stripped

2012-12-12 07:12:56

Without the seconds - ie

2012-12-12 07:12

Note that I do have a test in a PR for the import where

2 years agoMerge pull request #23692 from eileenmcnaughton/contact_out
Eileen McNaughton [Tue, 7 Jun 2022 02:57:59 +0000 (14:57 +1200)]
Merge pull request #23692 from eileenmcnaughton/contact_out

Import - make tracking fields import-specific

2 years agoExpand try-catch to whole function
Eileen McNaughton [Tue, 7 Jun 2022 02:57:22 +0000 (14:57 +1200)]
Expand try-catch to whole function

2 years agoMerge pull request #23701 from eileenmcnaughton/unused
Seamus Lee [Tue, 7 Jun 2022 02:39:53 +0000 (12:39 +1000)]
Merge pull request #23701 from eileenmcnaughton/unused

Remove unused properties

2 years agoFix merge resolution issue
Eileen McNaughton [Tue, 7 Jun 2022 01:11:32 +0000 (13:11 +1200)]
Fix merge resolution issue

2 years agoMerge pull request #23700 from eileenmcnaughton/import_cont_err
colemanw [Tue, 7 Jun 2022 00:32:03 +0000 (20:32 -0400)]
Merge pull request #23700 from eileenmcnaughton/import_cont_err

Make try-catch more catchy

2 years agoMerge pull request #23702 from colemanw/loadingPlaceholders
Eileen McNaughton [Tue, 7 Jun 2022 00:23:53 +0000 (12:23 +1200)]
Merge pull request #23702 from colemanw/loadingPlaceholders

SearchKit - Make loading placeholders configurable

2 years agoFix merge resolution mistake
Eileen McNaughton [Mon, 6 Jun 2022 02:47:11 +0000 (14:47 +1200)]
Fix merge resolution mistake

2 years agoImprove codes & testing
Darrick Servis [Mon, 6 Jun 2022 00:32:24 +0000 (12:32 +1200)]
Improve codes & testing

2 years agoMove validateValues to parent as now generic
Eileen McNaughton [Mon, 6 Jun 2022 00:04:23 +0000 (12:04 +1200)]
Move validateValues to parent as now generic

2 years agoFix Record duplicates multiple contacts contact import exception.
Darrick Servis [Sun, 5 Jun 2022 19:36:15 +0000 (12:36 -0700)]
Fix Record duplicates multiple contacts contact import exception.

Add csv file required for test.

2 years agoAdd import-specific tracking fields
Eileen McNaughton [Sun, 5 Jun 2022 00:43:41 +0000 (12:43 +1200)]
Add import-specific tracking fields

2 years agoSimplify try-catch to a single block
Eileen McNaughton [Sat, 4 Jun 2022 23:39:13 +0000 (11:39 +1200)]
Simplify try-catch to a single block

2 years agoRemove extra validation - per the comments it is a duplicate
Eileen McNaughton [Sat, 4 Jun 2022 23:22:03 +0000 (11:22 +1200)]
Remove extra validation - per the comments it is a duplicate

2 years agoMerge pull request #23689 from eileenmcnaughton/member_really_labels
Monish Deb [Mon, 6 Jun 2022 16:48:04 +0000 (22:18 +0530)]
Merge pull request #23689 from eileenmcnaughton/member_really_labels

[Import] [Membership] Cleanup, fix form breakage (unreleased regression)

2 years agoSearchKit - Make loading placeholders configurable
Coleman Watts [Mon, 6 Jun 2022 14:26:28 +0000 (10:26 -0400)]
SearchKit - Make loading placeholders configurable

This allows the admin to control how many (if any) skeleton results are shown
during ajax loading.

It also lightens the colors to make the flashing a bit more subtle.

2 years agoMerge pull request #23648 from colemanw/afformUndo
Monish Deb [Mon, 6 Jun 2022 13:47:51 +0000 (19:17 +0530)]
Merge pull request #23648 from colemanw/afformUndo

Afform - Add undo/redo buttons to the Admin UI

2 years agoRemove unused properties
Eileen McNaughton [Mon, 6 Jun 2022 12:08:02 +0000 (00:08 +1200)]
Remove unused properties

2 years agoMake try-catch more catchy
Eileen McNaughton [Mon, 6 Jun 2022 11:59:30 +0000 (23:59 +1200)]
Make try-catch more catchy

2 years agoUpdates to reflect changes made for QA for import_queue, test to fix validate now...
Eileen McNaughton [Mon, 6 Jun 2022 04:41:42 +0000 (16:41 +1200)]
Updates to reflect changes made for QA for import_queue, test to fix validate now as that is where it fails

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.