Comment 5 for bug 1911786

Revision history for this message
Galen Charlton (gmc) wrote (last edit ):

I think Bill's patch is part of the solution, but not quite enough. I think Tiffany's idea of defaulting to 24 hours makes sense, and that could be done in conjunction with a --order-age flag. My emphasis would be on _defaulting_ to 24 hours or the like, as otherwise the foot-gun remains open.

(Also: one hole with the --min-date flag: it would be fragile in the case where different providers start out not using EDI but subsequently start using EDI, but on different dates.)

To suggest a different direction (that shouldn't get in the way of our putting in some sort of date/age constraint sooner rather than later), perhaps the state of ready-to-send-via-EDI should be made somewhat orthogonal to the order's activation state. For example, by adding a ready_to_send Boolean flag that defaults to false and gets actively set to true only when the order is activated _and_ the provider has an active EDI profile.

EDIT: And ready_to_send might be better as a edi_order_status column on acq.purchase_order that has several values:

- null: order has not and does not participate in EDI, either because it's not ready yet or the provider doesn't have an active EDI profile
- ready_to_send
- sent
- ready_to_resend