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

Feat: EligibilityType model fields for expiration #1955

Closed
wants to merge 6 commits into from

Conversation

angela-tran
Copy link
Member

@angela-tran angela-tran commented Mar 14, 2024

Closes #1938

This PR adds fields to the EligibilityType model that will be needed to support expiration of benefits.

Since these fields can be edited in the admin interface, this PR also configures what form should be used so that we can perform custom validation as specified on #1938.

@angela-tran angela-tran self-assigned this Mar 14, 2024
@github-actions github-actions bot added back-end Django views, sessions, middleware, models, migrations etc. migrations [auto] Review for potential model changes/needed data migrations updates deployment-dev [auto] Changes that will trigger a deploy if merged to dev tests Related to automated testing (unit, UI, integration, etc.) labels Mar 14, 2024
Copy link

github-actions bot commented Mar 14, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  benefits/core
  admin.py
  models.py
Project Total  

This report was generated by python-coverage-comment-action

@angela-tran angela-tran marked this pull request as ready for review March 14, 2024 20:47
@angela-tran angela-tran requested a review from a team as a code owner March 14, 2024 20:47
@angela-tran angela-tran marked this pull request as draft March 14, 2024 20:48
`supports_expiration` serves as a toggle for expiration functionality.
the other fields are for configuring the duration before expiration and
reenrollment.
this is to prepare for implementing custom validation
@angela-tran angela-tran marked this pull request as ready for review March 14, 2024 20:52
@@ -26,6 +27,33 @@
admin.site.register(model)


class EligibilityTypeForm(forms.ModelForm):
Copy link
Member

Choose a reason for hiding this comment

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

I was hoping this could be done without a custom admin form?

I think implementing clean() in the model class should be enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I see now that it could be done that way too and that we don't need the custom admin form. I'll put this back in draft and move the logic to be done on the model

@angela-tran angela-tran marked this pull request as draft March 14, 2024 21:18
@angela-tran
Copy link
Member Author

Superseded by #1957

@angela-tran angela-tran deleted the feat/expiration branch March 19, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end Django views, sessions, middleware, models, migrations etc. deployment-dev [auto] Changes that will trigger a deploy if merged to dev migrations [auto] Review for potential model changes/needed data migrations updates tests Related to automated testing (unit, UI, integration, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance EligibilityType model with expiration-related field(s)
2 participants