human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

[WIP]#3090 Allow essential banks to review their distribution before submitting it

Open lokisk1155 opened this issue 2 years ago • 9 comments

Resolves #3090

PR up early to take advantage of github action bot :)

lokisk1155 avatar Jun 30 '23 18:06 lokisk1155

@dorner Early thoughts on my implementation here? It's "working", but still need to work on it to get it passing tests

lokisk1155 avatar Jul 11 '23 14:07 lokisk1155

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 avatar Jul 12 '23 18:07 dorner

@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

lokisk1155 avatar Jul 12 '23 19:07 lokisk1155

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.

cielf avatar Jul 12 '23 19:07 cielf

Do we have any scopes that currently work with an exclusion that would have to be expanded to also exclude these?

cielf avatar Jul 12 '23 19:07 cielf

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:

dorner avatar Jul 12 '23 20:07 dorner

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?

cielf avatar Jul 13 '23 16:07 cielf

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:

dorner avatar Jul 14 '23 19:07 dorner

Sorry I've been very busy - gonna get cooking on this again tmmr :)

lokisk1155 avatar Jul 19 '23 02:07 lokisk1155

Closing this due to inactivity.

dorner avatar Mar 08 '24 21:03 dorner