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

MMB-284: Handle Multiple Current Memberships #83

Merged

Conversation

shahrukh-compuco
Copy link
Contributor

Overview

Handle multiple active memberships for a contact while evaluating the token values in such a way that the earliest start date and lattest end date is selected from all the currently active memberships.

Before

N/A

After

N/A

@@ -65,16 +71,63 @@ public function prefetch(TokenValueEvent $e) {
return $resolvedTokens;
}

private function getMembershipDates(TokenValueEvent $e): array {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @shahrukh-compuco Given that these new tokens are related to the membership entity, I believe they are better moved to and resolved in the membership token class https://github.com/compucorp/uk.co.compucorp.certificate/blob/master/CRM/Certificate/Token/Membership.php

Copy link
Contributor Author

@shahrukh-compuco shahrukh-compuco Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Ola
As discussed that there might be a new ticket from Pallavi to transfer all the work to membership type only, I think then not only this but other work in this workstream will be transffered at once to the membership classes

@shahrukh-compuco shahrukh-compuco force-pushed the MMB-284-multiple-current-memberships branch from d814f20 to 66dea7d Compare November 27, 2023 12:09
@olayiwola-compucorp
Copy link
Contributor

PR approved with the note that the highlighted issues will be addressed in a separate PR

@shahrukh-compuco shahrukh-compuco merged commit e37e80f into MMB-78-workstream Dec 5, 2023
2 checks passed
@shahrukh-compuco shahrukh-compuco deleted the MMB-284-multiple-current-memberships branch December 5, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants