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

Block invalid policy combinations #3474

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rjlynch
Copy link
Contributor

@rjlynch rjlynch commented Dec 20, 2024

The business rules state that certain policy combinations aren't
permitted, eg if a claimant has made an ECP claim they can't make a
second claim for FE in the same academic year. In such an invalid claim
scenario the requirement is to disable the approve button so admins
can't approve the claim.

@rjlynch rjlynch added the deploy Deploy a review app for this PR label Dec 20, 2024
@rjlynch rjlynch force-pushed the CAPT-2078/prevent-invalid-policy-combos branch from fa4e1a9 to ba4561c Compare December 20, 2024 16:06
@rjlynch rjlynch force-pushed the CAPT-2078/prevent-invalid-policy-combos branch from ba4561c to 8a968ac Compare December 20, 2024 16:54
@rjlynch rjlynch force-pushed the CAPT-2078/prevent-invalid-policy-combos branch from 8a968ac to bcfc533 Compare December 23, 2024 13:23
@rjlynch rjlynch force-pushed the CAPT-2078/prevent-invalid-policy-combos branch from bcfc533 to 873157f Compare December 23, 2024 13:31
@rjlynch rjlynch marked this pull request as ready for review December 23, 2024 16:31
@rjlynch rjlynch force-pushed the CAPT-2078/prevent-invalid-policy-combos branch from 873157f to 328e296 Compare December 23, 2024 16:32
app/models/policies.rb Outdated Show resolved Hide resolved
@rjlynch rjlynch force-pushed the CAPT-2078/prevent-invalid-policy-combos branch 3 times, most recently from 3c2c709 to 4ed4605 Compare December 23, 2024 17:04
The business rules state that certain policy combinations aren't
permitted, eg if a claimant has made an ECP claim they can't make a
second claim for FE in the same academic year. In such an invalid claim
scenario the requirement is to disable the approve button so admins
can't approve the claim.
@rjlynch rjlynch force-pushed the CAPT-2078/prevent-invalid-policy-combos branch from 4ed4605 to 278d3d7 Compare December 23, 2024 17:05
While it requires twice as many elements to check were not working with
that many and using permutation avoids needed to ensure the list is
sorted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy Deploy a review app for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants