eileen [Sat, 14 Mar 2020 00:29:28 +0000 (13:29 +1300)]
Fix bug where tax_amount is miscalculated on membership renewals
In order to replicate
1) enable tax & invoicing
2) configure a financial type with sales tax
3) renew a membership, entering an amount other than the default membership amount.
4) view the membership - tax amount will be the same as it would be if the default amount had been used.
Tangental bugs I noticed
1) regression in master on adding financial accounts - I will do a separate PR
2) tax term not assigned to the template - out of scope for now but I believe a pre-hook type
structure should exist, assigning this to the template when enabled (as part of moving some code to
a core-extension).
3) the form shows the tax amount & does not update it - this is pretty big already so that is also out of scope for now
This bug affects both membership & membership renewal pages. This PR only fixes for membership renewal
but the goal is to fix for membership too once this is merged. It is a fairly 'bug' fix in that it
introduces a new class with new methods to get the information otherwise provided by
CRM_Price_BAO_PriceSet::processAmount. processAmount is one of those functions that is hard to read
and understand & has been hacked to do various things. Code that calls it is hard
to read because of this. Having a cleaner way to operate has been a goal for a while. We
have plans to build up the Order api to be much more usable and used. However, we really
need to build up sensible helpers before we can address that. This PR adds a class
that has a whole lot of functions that are more readable to do what the processAmount otherwise
does. The goal is to deprecate processAmount.
I started on MembershipRenewal as
1) it has a bug currently and
2) it is pretty simple in that it doesn't actually support pricesets - which is especially
helpful when testing :-)
Yashodha Chaku [Fri, 13 Mar 2020 12:04:23 +0000 (17:34 +0530)]
Merge pull request #16695 from mattwire/pcpshortcodes
Add shortcodes for Personal Campaign Pages
Seamus Lee [Fri, 13 Mar 2020 11:14:52 +0000 (22:14 +1100)]
Merge pull request #16767 from civicrm/5.24
5.24
Seamus Lee [Fri, 13 Mar 2020 10:03:53 +0000 (21:03 +1100)]
Merge pull request #16766 from seamuslee001/5_23_2_release_notes
release-notes/5.23.2.md
Tim Otten [Fri, 13 Mar 2020 09:50:04 +0000 (02:50 -0700)]
release-notes/5.23.2.md
Tim Otten [Fri, 13 Mar 2020 09:38:46 +0000 (02:38 -0700)]
Merge pull request #16761 from eileenmcnaughton/joomla
dev/financial#120 - Fix CiviCRM base url on Joomla frontend
Seamus Lee [Fri, 13 Mar 2020 07:37:44 +0000 (18:37 +1100)]
Merge pull request #16759 from eileenmcnaughton/fatal2
Remove instances of fatal
Seamus Lee [Fri, 13 Mar 2020 07:36:39 +0000 (18:36 +1100)]
Merge pull request #16764 from eileenmcnaughton/mem_tax
[NFC] cleanup in test class
eileen [Fri, 13 Mar 2020 04:35:50 +0000 (17:35 +1300)]
[NFC] cleanup in test class
Eileen McNaughton [Fri, 13 Mar 2020 01:57:37 +0000 (14:57 +1300)]
Merge pull request #16710 from colemanw/arrayValue2
[REF] Use ?? operator instead of CRM_Utils_Array::value()
eileen [Fri, 13 Mar 2020 00:56:06 +0000 (13:56 +1300)]
Alternate Joomla! fix - move to CMS override
Eileen McNaughton [Thu, 12 Mar 2020 20:50:29 +0000 (09:50 +1300)]
Merge pull request #16758 from pradpnayak/priceSetSchema
add pseudoconstant for location type
eileen [Thu, 12 Mar 2020 20:42:56 +0000 (09:42 +1300)]
Remove instances of fatal
Pradeep Nayak [Thu, 12 Mar 2020 17:33:09 +0000 (17:33 +0000)]
add pseudoconstant for location type
Eileen McNaughton [Thu, 12 Mar 2020 04:22:40 +0000 (17:22 +1300)]
Merge pull request #16730 from demeritcowboy/unused-activitytypename
[REF] dev/core#1116 - Remove unused misnamed activityTypeName variable
Eileen McNaughton [Thu, 12 Mar 2020 04:10:36 +0000 (17:10 +1300)]
Merge pull request #16754 from pradpnayak/priceSetSchema
Added pseudoconstant for priceset
Pradeep Nayak [Thu, 12 Mar 2020 01:57:30 +0000 (01:57 +0000)]
iAdded pseudoconstant for priceset
Pradeep Nayak [Thu, 12 Mar 2020 01:56:12 +0000 (01:56 +0000)]
Added pseudoconstant for priceset
Seamus Lee [Thu, 12 Mar 2020 00:59:16 +0000 (11:59 +1100)]
Merge pull request #16694 from eileenmcnaughton/dedupebug
Fix bug where a % in a serialized array can lead to the data being broken
eileen [Wed, 11 Mar 2020 00:09:42 +0000 (13:09 +1300)]
Fix bug where a % in a serialized array can lead to the data being broken
It turns out that is a field in a serialized array has a %2 (for example) this gets swapped in executeQuery for the
%2 value (in this case srcID - rendering the serialized array invalid. This proposes that we
explicitly handle arrays as a data type in compose query.
Some thoughts
1) we could make serialized arrays valid types in validate (not done here)
2) we could iterate through the array keys & values escaping them -
at this stage it's left in the calling function
3) there are whole bikeshed factories to keep in business on discussion of whether
'Array-1', 'Array-2' etc are the right format
Coleman Watts [Sun, 8 Mar 2020 21:53:37 +0000 (17:53 -0400)]
Use ?? operator instead of CRM_Utils_Array::value() in array assignments with null-ish defaults
Coleman Watts [Sun, 8 Mar 2020 19:35:34 +0000 (15:35 -0400)]
Use ?? operator instead of CRM_Utils_Array::value() in array assignments
Coleman Watts [Sat, 7 Mar 2020 18:28:11 +0000 (13:28 -0500)]
Use ?? operator instead of CRM_Utils_Array::value() when fetching ids
Mathieu Lu [Wed, 11 Mar 2020 22:34:27 +0000 (18:34 -0400)]
Merge pull request #16691 from mattwire/eventcart_cleanup
Event Cart cleanup
Eileen McNaughton [Wed, 11 Mar 2020 22:03:00 +0000 (11:03 +1300)]
Merge pull request #16749 from civicrm/5.24
5.24
Seamus Lee [Wed, 11 Mar 2020 21:55:33 +0000 (08:55 +1100)]
Merge pull request #16750 from eileenmcnaughton/sgroups
Fix smart group custom field check to cope with api error
Seamus Lee [Wed, 11 Mar 2020 19:42:09 +0000 (06:42 +1100)]
Merge pull request #16741 from mattwire/addrecurid2
Add recurring contribution ID to doCancelRecurring
Seamus Lee [Wed, 11 Mar 2020 19:27:06 +0000 (06:27 +1100)]
Merge pull request #16678 from seamuslee001/php_7_1_bump
Bump Minimum Install version to be 7.1 (Do not merge until 5.24 RC is cut)
Matthew Wire [Wed, 11 Mar 2020 17:41:29 +0000 (17:41 +0000)]
Merge pull request #16651 from kartik1000/core-1613
dev/core#1613/Updated Misleading labels
Kartik Kathuria [Wed, 11 Mar 2020 14:57:02 +0000 (20:27 +0530)]
Rebased
Signed-off-by: Kartik Kathuria <kathuriakartik0@gmail.com>
Matthew Wire [Tue, 10 Mar 2020 21:27:35 +0000 (21:27 +0000)]
Add recur ID to doCancelRecurring
eileen [Wed, 11 Mar 2020 06:01:24 +0000 (19:01 +1300)]
Fix smart group custom field check to cope with api error
As we have added new fields to the saved_search table this will lead to a fatal if it runs before
the database update. This catches that error and handles it
Seamus Lee [Wed, 11 Mar 2020 05:40:06 +0000 (16:40 +1100)]
Merge pull request #16748 from seamuslee001/5_23_1_release_notes
5 23 1 release notes
Tim Otten [Wed, 11 Mar 2020 05:35:00 +0000 (22:35 -0700)]
Update 5.23.1.md
Tim Otten [Wed, 11 Mar 2020 05:08:53 +0000 (22:08 -0700)]
Add release-notes/5.23.1.md
Seamus Lee [Wed, 11 Mar 2020 03:35:25 +0000 (14:35 +1100)]
Merge pull request #16744 from civicrm/5.24
5.24
Eileen McNaughton [Wed, 11 Mar 2020 00:40:45 +0000 (13:40 +1300)]
Merge pull request #16740 from mattwire/addrecurid
REF Switch to getter on cancelSubscription form
Eileen McNaughton [Wed, 11 Mar 2020 00:22:52 +0000 (13:22 +1300)]
Merge pull request #16743 from mlutfy/dev547c
dev/core#547 Fix Event financial_type_id getOptions
Seamus Lee [Wed, 11 Mar 2020 00:07:06 +0000 (11:07 +1100)]
Merge pull request #16735 from totten/5.24-paths
dev/core#1637 - Multiple fixes for Civi/Core/Paths.php
Mathieu Lutfy [Tue, 10 Mar 2020 21:08:04 +0000 (17:08 -0400)]
dev/core#547 Fix Event financial_type_id getOptions
Eileen McNaughton [Tue, 10 Mar 2020 22:15:49 +0000 (11:15 +1300)]
Merge pull request #16734 from eileenmcnaughton/array2
[REF] Minor code simplification
Matthew Wire [Tue, 10 Mar 2020 21:19:20 +0000 (21:19 +0000)]
Switch to getter function for subscriptionDetails
Tim Otten [Tue, 10 Mar 2020 21:13:30 +0000 (14:13 -0700)]
E2E_Extern_CliRunnerTest - Update to match change in `./`
Per 16735, the interpretation of `getPath('[foo]/.`)` changed
slightly - from:
* 5.22: Inconsistent/undefined tail end (may or may not have trailing `/`)
* 5.23.0: Defined to always end with `/`
* #16735: Defined to never end with `/`
Matthew Wire [Tue, 10 Mar 2020 21:08:35 +0000 (21:08 +0000)]
Merge pull request #16501 from eileenmcnaughton/cancel_recur
Update cancelSubscription form to use updated methodology
colemanw [Tue, 10 Mar 2020 19:06:15 +0000 (15:06 -0400)]
Merge pull request #16732 from demeritcowboy/conformance
[REF] Hopefully fix regularly failing conformance test
Eileen McNaughton [Tue, 10 Mar 2020 18:56:41 +0000 (07:56 +1300)]
Merge pull request #16718 from colemanw/respond
Improve conditional in api3 ChainSubscriber
eileen [Tue, 10 Mar 2020 09:29:36 +0000 (22:29 +1300)]
[REF] Minor code simplification
Move the return earlier, simplify the IF
colemanw [Tue, 10 Mar 2020 14:49:47 +0000 (10:49 -0400)]
Merge pull request #16737 from artfulrobot/artfulrobot-array-values-followup
CRM_Utils_Array::values follow up from #16699
Rich Lott / Artful Robot [Tue, 10 Mar 2020 12:19:56 +0000 (12:19 +0000)]
Fix array value accessing non existent properties on an ArrayAccess object
Rich Lott / Artful Robot [Tue, 10 Mar 2020 12:06:23 +0000 (12:06 +0000)]
add failing test
colemanw [Tue, 10 Mar 2020 11:21:17 +0000 (07:21 -0400)]
Merge pull request #16699 from eileenmcnaughton/array
Support PropertyBag in CRM_Utils_Array
Tim Otten [Tue, 10 Mar 2020 10:44:32 +0000 (03:44 -0700)]
CRM_Core_I18n - Fix usage of `getPath('[foo]/.')`
The interpretation of `/.` is evolving per #16735:
* When this code was first written, it was unspecified/variable whether the value `[foo]/.` would end in `/`
* During most of the testing of 5.23.beta1, this was defined to always return `/`
* During a regression fix in 5.23.1, we're flipping it back the other way so that `[foo]/.` never ends in `/`.
eileen [Fri, 6 Mar 2020 09:29:37 +0000 (22:29 +1300)]
Support PropertyBag in CRM_Utils_Array
We now use the PropertyBag in payment processors - but as @mattwire discovered the CRM_Utils_Array::value
function is commonly used to access values now potentially 'in the bag' and the 'is_array'
filtering here means it is not being returned
Eileen McNaughton [Tue, 10 Mar 2020 08:57:41 +0000 (21:57 +1300)]
Merge pull request #16729 from colemanw/arrayValue4
[REF] Use empty() instead of CRM_Utils_Array::value() in inline conditionals
Eileen McNaughton [Tue, 10 Mar 2020 08:43:01 +0000 (21:43 +1300)]
Merge pull request #16728 from civicrm/5.24
5.24
Tim Otten [Tue, 10 Mar 2020 07:23:45 +0000 (00:23 -0700)]
dev/core#1637 - Multiple fixes for Civi/Core/Paths.php
For a full write-up, see PR
Tim Otten [Tue, 10 Mar 2020 07:23:45 +0000 (00:23 -0700)]
dev/core#1637 - PathsTest - Redefine "[foo]/", "[foo]/0", "[foo]/."
The rationale will be discussed more via PR description.
Tim Otten [Tue, 10 Mar 2020 07:23:45 +0000 (00:23 -0700)]
(NFC) PathsTest - Make it easier to identify/debug test cases
When browsing the list of outputs from this test class, each of the test
cases was identified by its numerical position in the list of `$exs`. This
makes it hard to keep track of the failures.
1. Add a symbolic name to each case (that's easier to search on)
2. Add more verbose output for failed assertions
Tim Otten [Tue, 10 Mar 2020 07:23:45 +0000 (00:23 -0700)]
(NFC) dev/core#1637 - Add E2E test for generation of Civi-WP backend URLs without trailing /
Tim Otten [Tue, 10 Mar 2020 07:23:45 +0000 (00:23 -0700)]
Revert "Revert "Make $civicrm_paths less sensitive to trailing slashes. Add tests.""
This reverts commit
cbcbfd69d34c9895342e3d813a42f97d93dbb76d.
demeritcowboy [Tue, 10 Mar 2020 01:25:29 +0000 (21:25 -0400)]
hopefully fix failing test
colemanw [Tue, 10 Mar 2020 00:22:04 +0000 (20:22 -0400)]
Merge pull request #16727 from pradpnayak/priceSetSchema
pseudoconstant for bounce type
colemanw [Tue, 10 Mar 2020 00:21:15 +0000 (20:21 -0400)]
Merge pull request #16719 from colemanw/arrayValue3
[REF] Use ?? operator instead of CRM_Utils_Array::value() in return statements
demeritcowboy [Mon, 9 Mar 2020 23:52:17 +0000 (19:52 -0400)]
remove unused misnamed variable
Coleman Watts [Mon, 9 Mar 2020 23:15:12 +0000 (19:15 -0400)]
Use empty() instead of CRM_Utils_Array::value() in inline conditionals
Seamus Lee [Mon, 9 Mar 2020 23:04:06 +0000 (10:04 +1100)]
Merge pull request #16720 from agh1/5.24.0-release-notes
5.24.0 release notes: initial run
Pradeep Nayak [Mon, 9 Mar 2020 22:57:46 +0000 (22:57 +0000)]
pseudoconstant for bounce type
colemanw [Mon, 9 Mar 2020 22:46:02 +0000 (18:46 -0400)]
Merge pull request #16711 from eileenmcnaughton/deprecated
Fix another instance of NULL being passed to CRM_Utils_Array::value
Seamus Lee [Mon, 9 Mar 2020 21:39:44 +0000 (08:39 +1100)]
Merge pull request #16725 from civicrm/5.24
5.24
Seamus Lee [Mon, 9 Mar 2020 21:38:43 +0000 (08:38 +1100)]
Merge pull request #16721 from seamuslee001/524_1637
dev/core#1637 Revert "Make $civicrm_paths less sensitive to trailing slashes. Add t…
Seamus Lee [Mon, 9 Mar 2020 20:13:48 +0000 (07:13 +1100)]
Merge pull request #16692 from MegaphoneJon/financial-119
Fix PayPal Express on events
eileen [Mon, 9 Mar 2020 05:01:36 +0000 (18:01 +1300)]
Revert "Make $civicrm_paths less sensitive to trailing slashes. Add tests."
This is currently causing breakage on wordpress sites where clean urls are not enabled.
Compare the 2 urls below - the top one has an extra (breaking) slash added by this PR.
I propose a quick revert & patch release followed by 'the right' fix at a slower pace
/wp-admin/admin.php/?page=CiviCRM&q=civicrm%2Fupgrade%2Fqueue%2Fajax%2FrunNext
/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fupgrade%2Fqueue%2Fajax%2FrunNext
This reverts commit
232fdd3dfac4ea09749d7f178818139514e48e38.
Andrew Hunt [Mon, 9 Mar 2020 17:56:21 +0000 (13:56 -0400)]
5.24.0 release notes: added boilerplate
Andrew Hunt [Mon, 9 Mar 2020 17:54:49 +0000 (13:54 -0400)]
5.24.0 release notes: raw from script
Coleman Watts [Mon, 9 Mar 2020 15:50:45 +0000 (11:50 -0400)]
Use ?? operator instead of CRM_Utils_Array::value() in return statements
Coleman Watts [Mon, 9 Mar 2020 13:58:41 +0000 (09:58 -0400)]
Improve conditional in api3 ChainSubscriber
colemanw [Mon, 9 Mar 2020 13:36:31 +0000 (09:36 -0400)]
Merge pull request #16713 from eileenmcnaughton/regress
dev/core#1637 regression fix on WP urls
Seamus Lee [Mon, 9 Mar 2020 06:25:40 +0000 (17:25 +1100)]
Merge pull request #16712 from eileenmcnaughton/dep2
Fix another instance of silly use of CRM_Utils_Array::value
Seamus Lee [Mon, 9 Mar 2020 06:23:16 +0000 (17:23 +1100)]
Merge pull request #16693 from eileenmcnaughton/prior
[NFC] Fix comments, use single quotes
eileen [Mon, 9 Mar 2020 05:01:36 +0000 (18:01 +1300)]
Revert "Make $civicrm_paths less sensitive to trailing slashes. Add tests."
This is currently causing breakage on wordpress sites where clean urls are not enabled.
Compare the 2 urls below - the top one has an extra (breaking) slash added by this PR.
I propose a quick revert & patch release followed by 'the right' fix at a slower pace
/wp-admin/admin.php/?page=CiviCRM&q=civicrm%2Fupgrade%2Fqueue%2Fajax%2FrunNext
/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fupgrade%2Fqueue%2Fajax%2FrunNext
This reverts commit
232fdd3dfac4ea09749d7f178818139514e48e38.
eileen [Mon, 9 Mar 2020 01:25:42 +0000 (14:25 +1300)]
Fix another instance of silly use of CRM_Utils_Array::value
Eileen McNaughton [Mon, 9 Mar 2020 01:53:40 +0000 (14:53 +1300)]
Merge pull request #16703 from pradpnayak/priceSetSchema
Added pseudoconstant for civicrm_tag.parent_id
eileen [Mon, 9 Mar 2020 01:17:10 +0000 (14:17 +1300)]
Fix another instance of NULL being passed to CRM_Utils_Array::value
Note that the test has only cosmetic changes picked up while running the test to identify the bug
Seamus Lee [Mon, 9 Mar 2020 01:01:08 +0000 (12:01 +1100)]
Merge pull request #16709 from civicrm/5.24
5.24
Eileen McNaughton [Sun, 8 Mar 2020 22:13:42 +0000 (11:13 +1300)]
Merge pull request #16707 from demeritcowboy/smartgroup-warning
dev/core#1636 - In system status check avoid E_NOTICEs for smart groups that don't have form_values[0]
colemanw [Sun, 8 Mar 2020 22:00:37 +0000 (18:00 -0400)]
Merge pull request #16706 from eileenmcnaughton/array2
Remove an instance of passing non-arraay to CRM_Utils_Array::value(
colemanw [Sun, 8 Mar 2020 19:30:31 +0000 (15:30 -0400)]
Merge pull request #16704 from colemanw/arrayValue1
[REF] CRM_Utils_Array::value() -> empty()
demeritcowboy [Sun, 8 Mar 2020 15:39:19 +0000 (11:39 -0400)]
skip smart groups that don't have a form_values[0]
eileen [Sun, 8 Mar 2020 08:55:36 +0000 (21:55 +1300)]
Remove an instance of passing non-arraay to CRM_Utils_Array::value(
colemanw [Sun, 8 Mar 2020 00:12:37 +0000 (19:12 -0500)]
Merge pull request #16696 from eileenmcnaughton/remove
Remove calls & deprecate CRM_Core_BAO_PrevNextCache::setItem
colemanw [Sun, 8 Mar 2020 00:05:56 +0000 (19:05 -0500)]
Merge pull request #16705 from mlutfy/api4-ajax-perm
Api4 AJAX endpoint: change required permission to access AJAX API.
Coleman Watts [Sat, 7 Mar 2020 17:48:11 +0000 (12:48 -0500)]
CRM_Utils_Array::value() -> empty()
Replaces CRM_Utils_Array::value() with empty() when the value is immediately cast to boolean.
The two statements have identical meaning but the latter is faster & easier to read.
Mathieu Lutfy [Sat, 7 Mar 2020 21:39:11 +0000 (16:39 -0500)]
Api4 AJAX endpoint: change required permission to access AJAX API.
Coleman Watts [Sat, 7 Mar 2020 18:50:25 +0000 (13:50 -0500)]
Flush pseudoconstant cache when saving a tag
colemanw [Sat, 7 Mar 2020 18:09:06 +0000 (13:09 -0500)]
Merge pull request #16701 from eileenmcnaughton/array2
Fix passing a non-array to CRM_Utils_Array::value
Seamus Lee [Wed, 4 Mar 2020 00:18:21 +0000 (11:18 +1100)]
Bump Minimum Install version to be 7.1
eileen [Fri, 6 Mar 2020 20:33:02 +0000 (09:33 +1300)]
Fix passing a non-array to CRM_Utils_Array::value
As surfaced in https://test.civicrm.org/job/CiviCRM-Core-PR/32543/console when we tested deprecating
passing in a non-array
Pradeep Nayak [Fri, 6 Mar 2020 22:19:09 +0000 (22:19 +0000)]
Added pseudoconstant for civicrm_tag.parent_id
Eileen McNaughton [Fri, 6 Mar 2020 08:13:21 +0000 (21:13 +1300)]
Merge pull request #16690 from kartik1000/Shift_Update_Membership
Shifted UpdateMemberhsip to BAO Layer
Seamus Lee [Fri, 6 Mar 2020 07:00:19 +0000 (18:00 +1100)]
Merge pull request #16689 from pradpnayak/priceSetSchema
Use dbAlias to generate where clause for date field in activity report