civicrm-core.git
3 years agoMerge pull request #21489 from eileenmcnaughton/act_toke
demeritcowboy [Fri, 17 Sep 2021 12:39:46 +0000 (08:39 -0400)]
Merge pull request #21489 from eileenmcnaughton/act_toke

Fix activity tokens

3 years agoMerge pull request #21479 from eileenmcnaughton/case_rep2
demeritcowboy [Fri, 17 Sep 2021 03:51:36 +0000 (23:51 -0400)]
Merge pull request #21479 from eileenmcnaughton/case_rep2

dev/core#2790 Move rest of pdfCommon functionality to the trait

3 years agoMerge pull request #21476 from eileenmcnaughton/part
colemanw [Thu, 16 Sep 2021 22:01:26 +0000 (18:01 -0400)]
Merge pull request #21476 from eileenmcnaughton/part

[REF] add test & static array to participant values tokens

3 years agoMerge pull request #21356 from eileenmcnaughton/msg_testing
colemanw [Thu, 16 Sep 2021 21:07:18 +0000 (17:07 -0400)]
Merge pull request #21356 from eileenmcnaughton/msg_testing

Add workflow template for 'recurring edit' workflow

3 years agoMerge pull request #21505 from civicrm/5.42
Eileen McNaughton [Thu, 16 Sep 2021 20:04:00 +0000 (08:04 +1200)]
Merge pull request #21505 from civicrm/5.42

5.42 to master

3 years agoMerge pull request #21502 from colemanw/scssFix
Eileen McNaughton [Thu, 16 Sep 2021 20:03:30 +0000 (08:03 +1200)]
Merge pull request #21502 from colemanw/scssFix

Fixes dev/drupal#164 scss compile error

3 years agoMerge pull request #21504 from eileenmcnaughton/exit
Eileen McNaughton [Thu, 16 Sep 2021 19:17:46 +0000 (07:17 +1200)]
Merge pull request #21504 from eileenmcnaughton/exit

Attempt to fix test site 500 errors on activity pdf

3 years agoMerge pull request #21503 from eileenmcnaughton/tpl
demeritcowboy [Thu, 16 Sep 2021 18:08:37 +0000 (14:08 -0400)]
Merge pull request #21503 from eileenmcnaughton/tpl

Tpl notice fixes

3 years agoFixes dev/drupal#164 scss compile error
Coleman Watts [Thu, 16 Sep 2021 15:29:55 +0000 (11:29 -0400)]
Fixes dev/drupal#164 scss compile error

3 years agoMerge pull request #21501 from JKingsnorth/add-sorting-to-event-summary-report
Eileen McNaughton [Thu, 16 Sep 2021 16:37:37 +0000 (04:37 +1200)]
Merge pull request #21501 from JKingsnorth/add-sorting-to-event-summary-report

Add sort functionality to event summary report

3 years agoAttempt to fix test site 500 errors on activity pdf
Eileen McNaughton [Thu, 16 Sep 2021 16:33:10 +0000 (04:33 +1200)]
Attempt to fix test site 500 errors on activity pdf

3 years agoTpl fixes
Eileen McNaughton [Thu, 16 Sep 2021 15:48:29 +0000 (03:48 +1200)]
Tpl fixes

3 years agoMerge pull request #21500 from eileenmcnaughton/badger
colemanw [Thu, 16 Sep 2021 12:44:37 +0000 (08:44 -0400)]
Merge pull request #21500 from eileenmcnaughton/badger

dev/core#2486 Add printLabel v4 api

3 years agoMerge pull request #21498 from eileenmcnaughton/test_flean
Eileen McNaughton [Thu, 16 Sep 2021 10:23:47 +0000 (22:23 +1200)]
Merge pull request #21498 from eileenmcnaughton/test_flean

[NFC] [test] minor cleanup in test

3 years agoMerge pull request #21499 from seamuslee001/master
Eileen McNaughton [Thu, 16 Sep 2021 10:23:23 +0000 (22:23 +1200)]
Merge pull request #21499 from seamuslee001/master

Revert "dev/core#2812 Fix issue where having a processor configured w…

3 years agoAdd sort functionality to event summary report
John Kingsnorth [Thu, 16 Sep 2021 10:13:31 +0000 (11:13 +0100)]
Add sort functionality to event summary report

3 years agoAdd printLabel v4 api
Eileen McNaughton [Thu, 16 Sep 2021 09:05:31 +0000 (21:05 +1200)]
Add printLabel v4 api

3 years ago[NFC] [test] minor cleanup in test
Eileen McNaughton [Thu, 16 Sep 2021 08:13:41 +0000 (20:13 +1200)]
[NFC] [test] minor cleanup in test

This switches to using restoreMembershipTypes rather than creating a membership.

restoreMembershipTypes would ideally be in tearDown to get us back to a known membership
set but there is fallout

3 years agoRevert "dev/core#2812 Fix issue where having a processor configured with a search...
Seamus Lee [Thu, 16 Sep 2021 08:15:53 +0000 (18:15 +1000)]
Revert "dev/core#2812 Fix issue where having a processor configured with a search output casues WSOD not allowing for access to upgrade screen"

This reverts commit 6c83ef4336884a15da996ba8dcf9ec4ee6439424.

3 years agoMerge pull request #21497 from eileenmcnaughton/ug
Eileen McNaughton [Thu, 16 Sep 2021 07:51:34 +0000 (19:51 +1200)]
Merge pull request #21497 from eileenmcnaughton/ug

Remove fugly bit

3 years agoRemove fugly bit
Eileen McNaughton [Thu, 16 Sep 2021 06:04:59 +0000 (18:04 +1200)]
Remove fugly bit

3 years agoMerge pull request #21496 from civicrm/5.42
Eileen McNaughton [Thu, 16 Sep 2021 06:00:36 +0000 (18:00 +1200)]
Merge pull request #21496 from civicrm/5.42

5.42 to master

3 years agoMerge pull request #21492 from colemanw/fixRecentItems
Eileen McNaughton [Thu, 16 Sep 2021 06:00:05 +0000 (18:00 +1200)]
Merge pull request #21492 from colemanw/fixRecentItems

Fixes dev/core#2840 bug in recent items sidebar/menu

3 years agoFixes dev/core#2840 bug in recent items sidebar/menu
Coleman Watts [Thu, 16 Sep 2021 00:33:28 +0000 (20:33 -0400)]
Fixes dev/core#2840 bug in recent items sidebar/menu

3 years agoMerge pull request #21449 from eileenmcnaughton/compat
Tim Otten [Thu, 16 Sep 2021 03:45:34 +0000 (20:45 -0700)]
Merge pull request #21449 from eileenmcnaughton/compat

dev/core#2814 TokenCompatSubscriber - Evaluate tokens during "civi.token.eval" phase

3 years agoRecurringEdit - Add example. Include test assertions. Fix undeclared/missing properties.
Tim Otten [Wed, 15 Sep 2021 10:45:25 +0000 (03:45 -0700)]
RecurringEdit - Add example. Include test assertions. Fix undeclared/missing properties.

This creates a new example of the `RecurringEdit` workflow message.

Note that the example is tagged `phpunit` and defines a list of `asserts`. These
assertions are evaluated using the default message-template.

The test was not passing because some important properties were missing from `RecurringEdit`.

3 years agoMerge pull request #21485 from colemanw/fixFilter
Eileen McNaughton [Thu, 16 Sep 2021 00:45:06 +0000 (12:45 +1200)]
Merge pull request #21485 from colemanw/fixFilter

SearchKit - Correctly process filters passed through Afform from js

3 years agoMerge pull request #21435 from colemanw/pseudoFields
Eileen McNaughton [Thu, 16 Sep 2021 00:12:42 +0000 (12:12 +1200)]
Merge pull request #21435 from colemanw/pseudoFields

SearchKit - Add pseudo-fields for row number and current user

3 years agoMerge pull request #21491 from civicrm/5.42
Eileen McNaughton [Thu, 16 Sep 2021 00:08:34 +0000 (12:08 +1200)]
Merge pull request #21491 from civicrm/5.42

5.42 to master

3 years agoMerge pull request #21347 from seamuslee001/5.42
Eileen McNaughton [Thu, 16 Sep 2021 00:08:05 +0000 (12:08 +1200)]
Merge pull request #21347 from seamuslee001/5.42

dev/core#2812 Fix issue where having a processor configured with a se…

3 years agoMerge pull request #21488 from colemanw/fixPager
Eileen McNaughton [Thu, 16 Sep 2021 00:06:26 +0000 (12:06 +1200)]
Merge pull request #21488 from colemanw/fixPager

SearchKit - Fix search display pager when using default pager settings

3 years agoFix activity tokens
Eileen McNaughton [Wed, 15 Sep 2021 22:03:56 +0000 (10:03 +1200)]
Fix activity tokens

I wasn't gonna touch these until the end but there
seems to be some active breakage so this does enough to get the following to
work - but leaves a full cleanup pass out of scope as it does
the reconcilliation between the trait & parent class
and any decisions about any finalised interface.

Tests cover the changes to tokens and
testActivityDateTimeMatchRepeatableSchedule covers the schedule rendering

Existing tokens still work but new-style are advertised with this

```

Subject: {activity.subject}
Date: {activity.activity_date_time}
Duration: {activity.duration}
Location: {activity.location}
Details: {activity.details}
Status ID: {activity.status_id}
(legacy) Status: {activity.status}
Status: {activity.status_id:label}
Activity Type ID: {activity.activity_type_id}
(legacy) Activity Type: {activity.activity_type}
Activity Type: {activity.activity_type_id:label}
Activity ID: {activity.activity_id}
(legacy) Activity ID: {activity.id}

(just weird) Case ID: {activity.case_id}
```

3 years agoMerge pull request #21487 from seamuslee001/master
Seamus Lee [Wed, 15 Sep 2021 23:42:17 +0000 (09:42 +1000)]
Merge pull request #21487 from seamuslee001/master

[NFC] Fix Fatal error on php 8 due to mis matched function declaration

3 years agoRecurringEdit - Typehint getters/setters. Make property name conformant.
Tim Otten [Wed, 15 Sep 2021 23:07:58 +0000 (16:07 -0700)]
RecurringEdit - Typehint getters/setters. Make property name conformant.

3 years ago(REF) Extract example "entity/Contact/Alex" from "workflow/generic/Alex"
Tim Otten [Wed, 15 Sep 2021 23:24:25 +0000 (16:24 -0700)]
(REF) Extract example "entity/Contact/Alex" from "workflow/generic/Alex"

3 years agoConvert `contribution{,_recur}.ex.php` to `Civi/Test/ExampleData/*`
Tim Otten [Tue, 14 Sep 2021 23:42:54 +0000 (16:42 -0700)]
Convert `contribution{,_recur}.ex.php` to `Civi/Test/ExampleData/*`

1. Use revised class format
2. Use `entity/{$ENTITY}/{$EXAMPLE}` instead of `workflow/{$WORKFLOW}/{$EXAMPLE}`

3 years agoCivi\Test::example() - Make it a bit easier for the typical case
Tim Otten [Wed, 15 Sep 2021 09:02:05 +0000 (02:02 -0700)]
Civi\Test::example() - Make it a bit easier for the typical case

This changes the signature on a new helper method. This method is not widely used, and each reference is updated here.

Before: `Civi\Test::example($name)` returns the *metadata* for the example.

After: `Civi\Test::example($name)` returns the *data* for the example.

Comment: It's more convenient to stitch together examples from the data.  Of
course, metadata may also be useful -- it's still available through
`Civi\Test::examples()->getFoo(...)` (with a few different `getFoo()`
methods).

3 years agodev/core#2790 Move pdf processTemplate to the trait
Eileen McNaughton [Tue, 14 Sep 2021 21:49:01 +0000 (09:49 +1200)]
dev/core#2790 Move pdf processTemplate to the trait

3 years agoExampleDataLoader - Also scan "Civi/Test/ExampleData/*.ex.php"
Tim Otten [Wed, 15 Sep 2021 22:51:09 +0000 (15:51 -0700)]
ExampleDataLoader - Also scan "Civi/Test/ExampleData/*.ex.php"

3 years agoUse new template contract for recurring edit
Eileen McNaughton [Fri, 3 Sep 2021 04:39:23 +0000 (16:39 +1200)]
Use new template contract for recurring edit

3 years agoAdd sample data from contribution & contribution recur
Eileen McNaughton [Thu, 2 Sep 2021 04:17:10 +0000 (16:17 +1200)]
Add sample data from contribution & contribution recur

3 years agoMerge pull request #21478 from eileenmcnaughton/case_replace
demeritcowboy [Wed, 15 Sep 2021 22:39:54 +0000 (18:39 -0400)]
Merge pull request #21478 from eileenmcnaughton/case_replace

dev/core#2790 Move pdf postProcess function to the trait

3 years agoMerge pull request #21447 from eileenmcnaughton/case_email
colemanw [Wed, 15 Sep 2021 22:28:42 +0000 (18:28 -0400)]
Merge pull request #21447 from eileenmcnaughton/case_email

dev/core#2817 Remove last core calls to `replaceCaseTokens`

3 years agoMerge pull request #21486 from totten/master-entity-mock-data
Seamus Lee [Wed, 15 Sep 2021 22:23:41 +0000 (08:23 +1000)]
Merge pull request #21486 from totten/master-entity-mock-data

(dev/mail#83) EntityTokens - Allow using mocked data

3 years ago[NFC] Fix Fatal error on php 8 due to mis matched function declaration
Seamus Lee [Wed, 15 Sep 2021 21:58:18 +0000 (07:58 +1000)]
[NFC] Fix Fatal error on php 8 due to mis matched function declaration

3 years agoSearchKit - Fix search display pager when using default pager settings
Coleman Watts [Wed, 15 Sep 2021 22:04:24 +0000 (18:04 -0400)]
SearchKit - Fix search display pager when using default pager settings

3 years agoSearchKit - Only allow real fields to be sortable
Coleman Watts [Wed, 15 Sep 2021 22:01:48 +0000 (18:01 -0400)]
SearchKit - Only allow real fields to be sortable

3 years ago(NFC) TokenProcessorTest - Extend `testMockData` to touch on contact entity
Tim Otten [Wed, 15 Sep 2021 20:25:34 +0000 (13:25 -0700)]
(NFC) TokenProcessorTest - Extend `testMockData` to touch on contact entity

3 years agoEntityTokens - Allow using mocked data
Tim Otten [Wed, 15 Sep 2021 09:46:46 +0000 (02:46 -0700)]
EntityTokens - Allow using mocked data

Before: EntityTokens reads `$tokenContext['contributionId']` and fetches the corresponding `civicrm_contribution`. The
data must exist in that record.

After: EntityTokens reads both `$tokenContext['contributionId']` and `$tokenContext['contribution']`. Data in
`$tokenContext['contribution']` takes precedence, rendering the content of `civicrm_contribution` mute.

3 years agoSearchKit - Add pseudo-fields for row number and current user
Coleman Watts [Sat, 11 Sep 2021 14:56:57 +0000 (10:56 -0400)]
SearchKit - Add pseudo-fields for row number and current user

3 years agoMerge pull request #21482 from colemanw/fixLinks
colemanw [Wed, 15 Sep 2021 17:31:15 +0000 (13:31 -0400)]
Merge pull request #21482 from colemanw/fixLinks

SearchKit - Fix links to non-aggregage join fields

3 years agoSearchKit - Correctly process filters passed through Afform from javascript
Coleman Watts [Wed, 15 Sep 2021 17:17:04 +0000 (13:17 -0400)]
SearchKit - Correctly process filters passed through Afform from javascript

3 years agoSearchKit - Fix links to non-aggregage join fields
Coleman Watts [Wed, 15 Sep 2021 14:22:02 +0000 (10:22 -0400)]
SearchKit - Fix links to non-aggregage join fields

3 years agoMerge pull request #21420 from colemanw/fixSearchKitMultiLink
colemanw [Wed, 15 Sep 2021 13:15:35 +0000 (09:15 -0400)]
Merge pull request #21420 from colemanw/fixSearchKitMultiLink

SearchKit - Fix display of links in aggregated columns

3 years agoMerge pull request #21481 from eileenmcnaughton/mem_std
colemanw [Wed, 15 Sep 2021 13:14:29 +0000 (09:14 -0400)]
Merge pull request #21481 from eileenmcnaughton/mem_std

[REF] simplify member_tokens

3 years agoMerge pull request #21480 from totten/master-edl
Eileen McNaughton [Wed, 15 Sep 2021 02:43:39 +0000 (14:43 +1200)]
Merge pull request #21480 from totten/master-edl

(dev/mail#83) ExampleDataLoader - Multiple fixes for quirky examples

3 years agodev/core#2790 Move pdf postProcess function to the trait
Eileen McNaughton [Tue, 14 Sep 2021 21:32:42 +0000 (09:32 +1200)]
dev/core#2790 Move pdf postProcess function to the trait

3 years ago[REF] simplify member_tokens
Eileen McNaughton [Wed, 15 Sep 2021 00:35:57 +0000 (12:35 +1200)]
[REF] simplify member_tokens

Now we have good test cover we can switch to using the parent.

The one thorn in our side is membership.fee.
Dealing with the field, and hence opening up 'listening'
is out of scope for this pr

We can (and should) switch fee to membership_type_id.minimum_fee and add
generic support. However, we also have a formatting issue.
The field is formatted 'number only' 'just cos'.

If we map that field without figuring out formatting
it will be locked in as an anomaly.

3 years agoCaseActivity Examples - Only report example-data if the workflow is actually valid
Tim Otten [Wed, 15 Sep 2021 00:13:11 +0000 (17:13 -0700)]
CaseActivity Examples - Only report example-data if the workflow is actually valid

The `case_activity` workflow definition is weirdly/temporarily in
`tests/phpunit`.  This makes it loadable for headless testing, but it's not
truly loadable in a web-env.  Consequently, the examples should not be
presented as valid example data when using web-env.

3 years agoExampleDataLoader - Fix loading data-sets from `tests/phpunit/*` from web-env
Tim Otten [Wed, 15 Sep 2021 00:11:01 +0000 (17:11 -0700)]
ExampleDataLoader - Fix loading data-sets from `tests/phpunit/*` from web-env

Before: If you add example-data under `tests/phpunit/`, then it works
in headless env. In web-env, it will be scanned, but the `include $file` step will fail.

After: The `include $file` step will succeed.

3 years ago(REF) ExampleDataLoader - Extract private method `createObj()`. Improve errors.
Tim Otten [Tue, 14 Sep 2021 23:45:14 +0000 (16:45 -0700)]
(REF) ExampleDataLoader - Extract private method `createObj()`. Improve errors.

__Before__: Two different bits of code responsible for loading+instantiating test-data class.
Different (and somewhat opaque) error-handling behaviors.

__After__: One private helper called twice. Consistent (and clearer) error-reporting.

3 years agoMerge pull request #21477 from eileenmcnaughton/mem_test
Seamus Lee [Tue, 14 Sep 2021 23:35:34 +0000 (09:35 +1000)]
Merge pull request #21477 from eileenmcnaughton/mem_test

dev/core#2650 upgrade membership tokens to the new format

3 years agoMerge pull request #21475 from eileenmcnaughton/case_replace
Eileen McNaughton [Tue, 14 Sep 2021 21:12:48 +0000 (09:12 +1200)]
Merge pull request #21475 from eileenmcnaughton/case_replace

dev/core#2817 remove call to getTokenDetails

3 years agodev/core#2650 upgrade membership tokens to the new format
Eileen McNaughton [Tue, 14 Sep 2021 21:00:00 +0000 (09:00 +1200)]
dev/core#2650 upgrade membership tokens to the new format

3 years agoHard code the array to what is tested
Eileen McNaughton [Tue, 14 Sep 2021 20:28:18 +0000 (08:28 +1200)]
Hard code the array to what is tested

3 years agoMerge pull request #21474 from MegaphoneJon/core-2318
demeritcowboy [Tue, 14 Sep 2021 20:26:13 +0000 (16:26 -0400)]
Merge pull request #21474 from MegaphoneJon/core-2318

fixes core#2318: fix cancel button when sending an individual email

3 years agoAdd test cover for existing participant tokens
Eileen McNaughton [Tue, 14 Sep 2021 20:19:57 +0000 (08:19 +1200)]
Add test cover for existing participant tokens

3 years agoMerge pull request #21464 from eileenmcnaughton/test_hunt
colemanw [Tue, 14 Sep 2021 20:15:57 +0000 (16:15 -0400)]
Merge pull request #21464 from eileenmcnaughton/test_hunt

dev/core#2650 dev/core#2832 add support & testing for preferred token format

3 years agodev/core#2817 remove call to getTokenDetails
Eileen McNaughton [Tue, 14 Sep 2021 15:09:49 +0000 (03:09 +1200)]
dev/core#2817 remove call to getTokenDetails

Removes the call to getTokenDetails as discussed on
https://github.com/civicrm/civicrm-core/pull/21445

As discussed on that PR & related gitlabs I
created an extension to try to allow people to have
this functionality transitionally if they needed
(based on copying code from 5.41 over) - but
per the readme https://github.com/eileenmcnaughton/legacytokenhelper/blob/master/README.md
the issues I found (under 'known issues') were enough
to make me conclude no-one would actually
want to install the extension to restore pre-5.43
functionality

3 years agofix cancel button when sending an individual email
Jon Goldberg [Tue, 14 Sep 2021 18:43:32 +0000 (14:43 -0400)]
fix cancel button when sending an individual email

3 years agoMerge pull request #21468 from mattwire/flushcachepermit
demeritcowboy [Tue, 14 Sep 2021 16:12:00 +0000 (12:12 -0400)]
Merge pull request #21468 from mattwire/flushcachepermit

flushCaches should respect permitCacheFlushMode

3 years agoMerge pull request #21445 from eileenmcnaughton/case_replace
demeritcowboy [Tue, 14 Sep 2021 16:11:34 +0000 (12:11 -0400)]
Merge pull request #21445 from eileenmcnaughton/case_replace

dev/core#2817 Use token processor to resolve caseTokens for pdfs

3 years agoMerge pull request #21465 from eileenmcnaughton/cont_tok
colemanw [Tue, 14 Sep 2021 14:30:56 +0000 (10:30 -0400)]
Merge pull request #21465 from eileenmcnaughton/cont_tok

[Ref] Cleanup on SelectValues::contributeTokens

3 years agoMerge pull request #21466 from eileenmcnaughton/mem
colemanw [Tue, 14 Sep 2021 14:17:17 +0000 (10:17 -0400)]
Merge pull request #21466 from eileenmcnaughton/mem

[Ref] Remove pass-by-reference

3 years agodev/core#2817 Use token processor to resolve caseTokens for pdfs
Eileen McNaughton [Sun, 12 Sep 2021 23:04:29 +0000 (11:04 +1200)]
dev/core#2817 Use token processor to resolve caseTokens for pdfs

3 years agoflushCaches should respect permitCacheFlushMode
Matthew Wire [Tue, 14 Sep 2021 09:36:33 +0000 (10:36 +0100)]
flushCaches should respect permitCacheFlushMode

3 years agoMerge pull request #21338 from totten/master-msgtpl-api
Eileen McNaughton [Tue, 14 Sep 2021 09:11:29 +0000 (21:11 +1200)]
Merge pull request #21338 from totten/master-msgtpl-api

(dev/mail#83) Introduce WorkflowMessage APIs with CaseActivity example

3 years agoCaseActivity - Temporarily move to tests/phpunit
Tim Otten [Tue, 14 Sep 2021 06:40:51 +0000 (23:40 -0700)]
CaseActivity - Temporarily move to tests/phpunit

This is mostly to circumvent near-term questions on reviewing CaseActivity while still allowing it as an example-case.

3 years ago(REF-2) Convert WorkflowMessage examples to use ExampleData classes
Tim Otten [Tue, 14 Sep 2021 00:06:06 +0000 (17:06 -0700)]
(REF-2) Convert WorkflowMessage examples to use ExampleData classes

3 years ago(REF-1) Convert Civi/WorkflowMessage/Examples.php to Civi/Test/ExampleDataLoader.php
Tim Otten [Tue, 14 Sep 2021 00:05:24 +0000 (17:05 -0700)]
(REF-1) Convert Civi/WorkflowMessage/Examples.php to Civi/Test/ExampleDataLoader.php

3 years agoUse html format for hook rows
Eileen McNaughton [Tue, 14 Sep 2021 05:16:16 +0000 (17:16 +1200)]
Use html format for hook rows

3 years agoAdd 'mock tokens' to force load of needed values
Eileen McNaughton [Mon, 13 Sep 2021 06:07:01 +0000 (18:07 +1200)]
Add 'mock tokens' to force load of needed values

3 years agodev/core#2814 Fix tokenCompatSubscriber to conditionally evaluate legacy hook tokens
Eileen McNaughton [Mon, 13 Sep 2021 01:45:38 +0000 (13:45 +1200)]
dev/core#2814 Fix tokenCompatSubscriber to conditionally evaluate legacy hook tokens

3 years agodev/core#2650 add support & testing for preferred token format
Eileen McNaughton [Mon, 13 Sep 2021 06:24:31 +0000 (18:24 +1200)]
dev/core#2650 add support & testing for preferred token format

This fixes the membership token processor to support the preferred
token format style in scheduled reminders
and adds test cover

Next step is to upgrade the old tokens out of the scheduled reminders
and remove support for them. For the legacy token handler
it is just used from one place from core so we can add a rule
to prevent them from being 'requested' & switch them
off the legacy method.

The test cover in this is more thorough than pre-existing tests
but here is a list of them

api_v3_JobTest.testCallSendReminderSuccessMoreThanDefaultLimit
api_v3_JobTest.testCallSendReminderLimitToSMS
api_v3_JobTest.testCallSendReminderLimitToSMSWithDeletedProvider
CRM_Core_BAO_ActionScheduleTest.testMembershipDateMatch
CRM_Core_BAO_ActionScheduleTest.testMembershipJoinDateNonMatch
CRM_Core_BAO_ActionScheduleTest.testMembershipEndDateRepeat
CRM_Core_BAO_ActionScheduleTest.testMembershipEndDateRepeatChangedEndDate_CRM_15376
CRM_Core_BAO_ActionScheduleTest.testMembershipEndDateMatch
CRM_Core_BAO_ActionScheduleTest.testMultipleMembershipEndDateMatch
CRM_Core_BAO_ActionScheduleTest.testMembershipEndDateNoMatch
CRM_Core_BAO_ActionScheduleTest.testMembershipLimitToNone
CRM_Core_BAO_ActionScheduleTest.testMembershipWithReferenceDate
CRM_Core_BAO_ActionScheduleTest.testMembershipOnMultipleReminder
CRM_Core_BAO_ActionScheduleTest.testRepetitionFrequencyUnit
CRM_Core_BAO_ActionScheduleTest.testInheritedMembershipPermissions
CRM_Core_BAO_ActionScheduleTest.testMembershipScheduleWithAbsoluteDate

3 years ago[Ref] Remove pass-by-reference
Eileen McNaughton [Tue, 14 Sep 2021 03:10:09 +0000 (15:10 +1200)]
[Ref] Remove pass-by-reference

3 years agoMerge pull request #21463 from eileenmcnaughton/mem
Eileen McNaughton [Tue, 14 Sep 2021 03:08:33 +0000 (15:08 +1200)]
Merge pull request #21463 from eileenmcnaughton/mem

[Ref] Remove unnecessary pass-by-reference

3 years ago[Ref] Cleanup on SelectValues::contributeTokens
Eileen McNaughton [Tue, 14 Sep 2021 03:05:55 +0000 (15:05 +1200)]
[Ref] Cleanup on SelectValues::contributeTokens

This has 100% test cover in the ByTypeTest::testTokenRendering test

The change means we no longer need the recently-added function
to be public & hence it is switched to protected.

Note this is the same as the equivalent contactTokens function

3 years agoMerge pull request #21458 from eileenmcnaughton/badge_of_honor
Seamus Lee [Tue, 14 Sep 2021 02:40:35 +0000 (12:40 +1000)]
Merge pull request #21458 from eileenmcnaughton/badge_of_honor

dev/core#2834 Preliminary test on badge

3 years agoMerge pull request #21042 from eileenmcnaughton/uf
Eileen McNaughton [Tue, 14 Sep 2021 01:39:15 +0000 (13:39 +1200)]
Merge pull request #21042 from eileenmcnaughton/uf

[REF] Use OO when determining what to suggest for settings.php prefixes for drupal/backdrop views, instead of scattered "if cms =="

3 years ago[Ref] Remove unnecessary pass-by-reference
Eileen McNaughton [Tue, 14 Sep 2021 01:26:12 +0000 (13:26 +1200)]
[Ref] Remove unnecessary pass-by-reference

3 years agoMerge pull request #21459 from eileenmcnaughton/mem
Eileen McNaughton [Tue, 14 Sep 2021 01:19:11 +0000 (13:19 +1200)]
Merge pull request #21459 from eileenmcnaughton/mem

[Ref] Remove no-longer-used variables

3 years agoExampleData - Declare the PK field to be 'name'. Add 'type=>Extra' for heavy fields.
Tim Otten [Fri, 10 Sep 2021 04:17:32 +0000 (21:17 -0700)]
ExampleData - Declare the PK field to be 'name'. Add 'type=>Extra' for heavy fields.

3 years agoMerge pull request #21461 from eileenmcnaughton/render_array
Eileen McNaughton [Tue, 14 Sep 2021 00:38:00 +0000 (12:38 +1200)]
Merge pull request #21461 from eileenmcnaughton/render_array

Ensure TokenSmary::render returns an array

3 years ago[NFC] Cleanup on test class
Eileen McNaughton [Mon, 13 Sep 2021 21:19:08 +0000 (09:19 +1200)]
[NFC] Cleanup on test class

3 years agoMerge pull request #21436 from colemanw/afformWarning
Eileen McNaughton [Mon, 13 Sep 2021 23:13:35 +0000 (11:13 +1200)]
Merge pull request #21436 from colemanw/afformWarning

Afform - gracefully handle missing html files

3 years ago[Ref] Remove no-longer-used variables
Eileen McNaughton [Mon, 13 Sep 2021 19:53:47 +0000 (07:53 +1200)]
[Ref] Remove no-longer-used variables

3 years agoEnsure TokenSmary::render returns an array
Eileen McNaughton [Mon, 13 Sep 2021 23:01:06 +0000 (11:01 +1200)]
Ensure TokenSmary::render returns an array

If there are no messages it should return an empty array

3 years ago(REF) Rename WorkflowMessageExample => ExampleData
Tim Otten [Fri, 10 Sep 2021 03:51:29 +0000 (20:51 -0700)]
(REF) Rename WorkflowMessageExample => ExampleData

3 years ago(REF) WorkflowMessageExample - Set data_type=Array. Remove serialization bits.
Tim Otten [Thu, 9 Sep 2021 04:13:05 +0000 (21:13 -0700)]
(REF) WorkflowMessageExample - Set data_type=Array. Remove serialization bits.

3 years ago(NFC) CaseActivity Msg - Clarify `contactId` vs `clientId`
Tim Otten [Wed, 1 Sep 2021 22:25:25 +0000 (15:25 -0700)]
(NFC) CaseActivity Msg - Clarify `contactId` vs `clientId`