You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the coming Low-income / CalFresh enrollment flow, we'll need a way to display certain information and apply logic in-code for discounts that expire, e.g.
Does the discount / eligibility type expire at all?
How long after enrollment does the discount expire?
How long before expiration can a user re-enroll?
For CalFresh, this will be used in a number of places, e.g.
We need a relatively simple way to make these decisions without (ideally) having to hardcode this logic into the templates / views, and to make this more modular for future, non-CalFresh flows that expire (e.g. students, enhancements to Agency cards).
Acceptance criteria
The following fields are added to the EligibilityType model:
supports_expiration: a BooleanField indicating if the EligibiltyType supports expiration, default to False
thekaveman
changed the title
Enhance EligibilityType model with a field indicating if expiration is supported
Enhance EligibilityType model with expiration-related field(s)
Mar 11, 2024
With the coming Low-income / CalFresh enrollment flow, we'll need a way to display certain information and apply logic in-code for discounts that expire, e.g.
For CalFresh, this will be used in a number of places, e.g.
Enrollment success
: Add expiration date text #1919, we'll display the date of expirationEnrollment error
state for users already enrolled, not expired yet / not within re-enrollment window #1921, we'll display the date of expiration and the date at which re-enrollment can occurWe need a relatively simple way to make these decisions without (ideally) having to hardcode this logic into the templates / views, and to make this more modular for future, non-CalFresh flows that expire (e.g. students, enhancements to Agency cards).
Acceptance criteria
The following fields are added to the
EligibilityType
model:supports_expiration
: aBooleanField
indicating if theEligibiltyType
supports expiration, default toFalse
expiration_days
: aPositiveSmallIntegerField
indicating how many days after enrollment the associated discount expires, allownull
but requiring a value> 0
whensupports_expiration == True
; see Django docs on Cleaning and validating fields that depend on each other and Validating model instancesexpiration_reenrollment_days
: aPositiveSmallIntegerField
indicating how many days before expiration a user is allowed to re-enroll for the discount, allownull
but requiring a value> 0
whensupports_expiration == True
; see Django docs on Cleaning and validating fields that depend on each other and Validating model instancesThe text was updated successfully, but these errors were encountered: