Skip to content

Periodically cleanup case contact drafts #5442

Open
@schoork

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:

  1. draft_case_ids is empty
  2. 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

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:

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

No one assigned

    Type

    No type

    Projects

    • Status

      Needs Stakeholder Info

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions