Skip to content

Commit

Permalink
PROJ-2290 Change scheduled job to only update membership end date for…
Browse files Browse the repository at this point in the history
… memberships with status: New, Current or Grace. 1.3.1
  • Loading branch information
agileware-justin committed Jun 3, 2022
1 parent 8b9e2f7 commit 4bfcc0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This feature is useful if you want to have all membership end dates occur on the

This feature can be enabled or disabled on the `CiviCRM > Administer > Membership Utilities Settings` page, `/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fmembershiputils`.

If you have existing memberships that need to be updated, then execute the Scheduled Job, `Adjust Membership End Date`. This will also update the membership end date for all memberships, setting the end date to the end of month.
If you have existing memberships that need to be updated, then execute the Scheduled Job, `Adjust Membership End Date`. This will also update the membership end date for **New**, **Current** and **Grace** memberships, setting the end date to the end of month.

# Installation

Expand Down
1 change: 1 addition & 0 deletions api/v3/Membershiputils/Adjustmembershipenddate.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function civicrm_api3_membershiputils_Adjustmembershipenddate($params) {
// Get all memberships
$memberships = Membership::get()
->addSelect('id', 'end_date')
->addWhere('status_id:name', 'IN', ['New', 'Current', 'Grace'])
->execute()->getArrayCopy();
foreach ($memberships as $membership) {
// Calculate the end of month date for the membership
Expand Down
4 changes: 2 additions & 2 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<url desc="Support">https://agileware.com.au/contact</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2022-05-31</releaseDate>
<version>1.3</version>
<releaseDate>2022-06-03</releaseDate>
<version>1.3.1</version>
<develStage>beta</develStage>
<compatibility>
<ver>5.0</ver>
Expand Down

0 comments on commit 4bfcc0b

Please sign in to comment.