Membership-Essentials-App
Membership-Essentials-App copied to clipboard
Automate Primary Contact lookup management
ACs:
- The Primary Contact lookup on the Membership is synchronized with the Is Primary field on the Membership Contact Role
Design:
- Create triggers on Membership and on Membership Contact Role that maintains this field (insert, update, and delete)
Reopened - when a second Contact Role is set as Primary, the original 'primary' contact role is not marked as not primary and there are 2 primary contact roles.
AC:
- A membership may only have 1 primary contact role at a time
- When a non-primary contact role has the 'primary' box checked, all other contact roles should be marked as NOT primary, and the Primary Contact lookup on Membership should be updated to the Contact of the MCR that was newly updated to 'primary'
hope to find time for this (this week), so far extended tests in scratch org to test it
This has an open PR specific to the issue, but in Metecho the issue is related to this branch https://github.com/SFDO-Community-Sprints/MembershipSchemaAndBenefits/tree/metecho/june-2021-emea-sprint__ensure-only-one-primary-contact-role-at-a-time-on-membership which was never merged.
https://metecho.herokuapp.com/projects/membership-schema-and-benefits/epics/june-2021-emea-sprint/tasks/ensure-only-one-primary-contact-role-at-a-time-on-
I will reroll this in a new epic in Metecho