-
Notifications
You must be signed in to change notification settings - Fork 9
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
Refactor: move EligibilityType fields to EnrollmentFlow #2299
Conversation
8115035
to
0ec024b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, few cleanups needed to keep the analytics consistent for now.
|
681176c
to
ab62c92
Compare
These are the only tests that are still failing (they're in
and I'm having a hard time getting them to work. The current state of the PR has the original code (to use as a reference) so these tests still use |
ab62c92
to
021ab15
Compare
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
Preview url: https://benefits-2299--cal-itp-previews.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright so this is looking great logic-wise! Congrats on getting the tests to pass 🎉
My comments are all stylistic / syntactic in nature, but things we can clean up now since we're doing this refactor.
Nearly there 💪
021ab15
to
e807f90
Compare
e807f90
to
903f76f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Champion 🌟 🥇 🏆
Thanks so much! |
Closes #2283
EligibilityType
are moved toEnrollmentFlow
EligibilityType.name
toEnrollmentFlow.name
in the migration filelabel
field is used as the Admin display field forEnrollmentFlow
instancesTransitAgency.eligibility_types
field (and all related calculated fields) are removedEligibilityType
model is removedsession.eligibility_types
is removedsession.eligible
(getbool
) used to indicate if the user was found eligible for their selectedflow
, updated throughsession.update(eligible=bool)
like other session dataEligibilityType
read-only fields are moved to the new modeleligibility_types
properties (event/user) now useenrollment_flows.eligibility_name
for theeligibility_types
property valuesTesting locally
main
branchlocal_fixtures.json
(or whatever fixture you are using) has anEnrollmentFlow
that has a foreign key reference to anEligibilityType
.bin/reset_db.sh
(now your local DB mirrors the structure of thedev
environment)bin/init.sh
(running this PR's migration on top of existing DB structure)