Description
What type(s) of user does this feature affect?
- volunteer
Description
#5414 introduced the potential for case contact drafts to not be attached to a Casa Case (or cases). In this situation, if a user leaves step 1 without selecting at least one casa case, they will not be able to return to that draft.
We need to introduce a way to clean these up periodically (delete them). They should be any case contacts that meet the following criteria:
draft_case_ids
is empty- case contact was created more than 1 days ago
We also want to delete old drafts in general.
- Any draft older than a week should get deleted.
Make sure to write tests!!!
As part of this work
- You may need to introduce a tool to run rake tasks or jobs periodically. One such tool is the whenever gem (but you could use a different one).
- If introduces a tool (like above) then incorporate with Add notifications for volunteer birthdays (#5316) #5328 to make sure this runs on the 15th of every month
Alternatively similar to #5328 this could be done as a rake task that will then be run using the heroku scheduler
Screenshots of current behavior, if any
You can paste images on the clipboard here
How to access the QA site
Login Details:
Link to QA site
Login Emails:
- volunteer1@example.com view site as a volunteer
- supervisor1@example.com view site as a supervisor
- casa_admin1@example.com view site as an admin
- all_casa_admin1@example.com view site as an all casa admin
- go to
/all_casa_admins/sign_in
- go to
password for all users: 12345678
Questions? Join Slack!
We highly recommend that you join us in slack #casa channel to ask questions quickly. And discord for office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.
Metadata
Assignees
Type
Projects
Status
Todo
Status
Needs Stakeholder Info