[WIP]#3090 Allow essential banks to review their distribution before submitting it
Resolves #3090
PR up early to take advantage of github action bot :)
@dorner Early thoughts on my implementation here? It's "working", but still need to work on it to get it passing tests
I'm a little concerned at storing it in the session - things like "comment" and line items could be really large and might blow past the cookie size. I wonder if we can instead do something like
- Create the distribution, but add a state like "in creation" or "pending"
- Update the default scope to exclude these
- Send the ID forward to the confirmation page
- On confirmation, update the state to "scheduled"
This does mean we might end up with some garbage data - maybe we could add a cleanup session to delete any "in creation" distributions that are more than a month old or something.
@cielf thoughts?
@dorner ok that makes sense. Not exactly sure what a cleanup session would look like: to delete unscheduled distributions after a certain period of time
One question being what is a reasonable amount of time for these to hang around in an unconfirmed state? I can (barely) see someone walking away over a weekend, but not over a week.
Do we have any scopes that currently work with an exclusion that would have to be expanded to also exclude these?
Well... technically we could leave it forever :stuck_out_tongue: it's just garbage to clean up at some point.
It does not appear that there are any current scopes other than the ones already provided (scheduled, complete). We might need to update the one place that uses the scheduled scope :smile:
Yeah, technically we could leave it forever, but I'd prefer to make it a rather short time. What would the consequence be if someone walked away from the confirmation screen and the cleanup job ran in the meantime?
That's why we should give it at least some time. If someone walked away and came back a week later, they'd have lost their entries, which I think is probably OK :grin:
Sorry I've been very busy - gonna get cooking on this again tmmr :)
Closing this due to inactivity.