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

Prototype new Filing status #533

Open
jcadam14 opened this issue Dec 16, 2024 · 1 comment · May be fixed by #540
Open

Prototype new Filing status #533

jcadam14 opened this issue Dec 16, 2024 · 1 comment · May be fixed by #540
Assignees

Comments

@jcadam14
Copy link
Contributor

There is the concept of needing to have the frontend tell when a Filing is OPEN/CLOSED

Do the following to create this status:

  • Add a new REOPEN UserActionType
  • Add a new /reopen endpoint for a filing that will create the REOPEN user action on the filing object
    • Use the filing_validator.py to add checks for the endpoint to make sure the filing exists (valid_filing_exists) and add a new check to verify the filing is not already open (use latest user action to determine)
  • Add a @model_validator(mode="after") to the FilingDTO to set a "state" field on the FilingDTO based on the following:
    • If the latest user action is SIGN, state should be CLOSED. Otherwise, state is OPEN
  • Add pytests
@jcadam14 jcadam14 self-assigned this Dec 16, 2024
@guffee23 guffee23 self-assigned this Dec 16, 2024
@jcadam14 jcadam14 removed their assignment Dec 16, 2024
@guffee23
Copy link
Contributor

After talks, the potential implementation of this has been modified.

Considering the following for this change:

  • Add a new REOPEN UserActionType
  • Make changes to the FilingDao and FilingDto
    • Add a new field called state (table should default to None)
    • Add a new state enum with OPEN and CLOSED values and set the new state field in the Dao/Dto to this.
    • Update alembic scripts to include new table changes
  • Add a new /reopen endpoint for a filing that will create the REOPEN user action on the filing object
    • Check state of filing using the filing_validator.py to add checks for the endpoint to make sure the filing exists (valid_filing_exists) and add a new check to verify the filing is not already open using the new state field added to the table
      • If OPEN, add a reopen user action and set new state to OPEN
      • If CLOSED, throw an error using filing validator
  • In the /post_filing endpoint
    • Set filing state to OPEN when filing is created
  • In the /sign_filing endpoint
    • Set filing state to CLOSED after signing is completed
  • Add pytests

@guffee23 guffee23 linked a pull request Jan 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants