Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFC Add parameter definition to membershipstatus.calc #16370

Merged
merged 1 commit into from
Jan 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CRM/Member/BAO/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -2259,10 +2259,9 @@ public static function updateAllMembershipStatus() {

// CRM-7248: added excludeIsAdmin param to the following fn call to prevent moving to admin statuses
//get the membership status as per id.
$newStatus = civicrm_api('membership_status', 'calc',
$newStatus = civicrm_api3('membership_status', 'calc',
[
'membership_id' => $dao2->membership_id,
'version' => 3,
'ignore_admin_only' => TRUE,
], TRUE
);
Expand Down
3 changes: 3 additions & 0 deletions api/v3/MembershipStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,7 @@ function civicrm_api3_membership_status_calc($membershipParams) {
function _civicrm_api3_membership_status_calc_spec(&$params) {
$params['membership_id']['api.required'] = 1;
$params['membership_id']['title'] = 'Membership ID';
$params['ignore_admin_only']['title'] = 'Ignore admin only statuses';
$params['ignore_admin_only']['description'] = 'Ignore statuses that are for admin/manual assignment only';
$params['ignore_admin_only']['type'] = CRM_Utils_Type::T_BOOLEAN;
}