edi_order_pusher.pl blindly pushes ancient orders

Bug #1803734 reported by Blake GH on 2018-11-16
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Evergreen
Critical
Unassigned
3.1
Critical
Unassigned
3.2
Critical
Unassigned

Bug Description

We ran into an issue turning on edi_order_pusher.pl. It sent hundreds of old PO's. The PO's were closed and finished. Namely, the state was "received" for all of them. But none of them had a row in acq.edi_message because they were either migrated PO's or didn't use EDI at that point in time.

I think this script needs to either:

1. Not collect PO's with state "received"
2. Include some sane value for order_date. Maybe configurable as a bash argument. Like '3 months' or default to '3 months' with an override from a bash argument.
3. Both 1 and 2.

Thoughts?

Jane Sandberg (sandbej) on 2018-11-16
tags: added: acq edi
Bill Erickson (berick) wrote :

Another option (like #1) would be to only collect PO's whose state is 'on-order'. This has the added effect of avoiding "canceled" PO's.

Blake GH (bmagic) on 2018-11-16
Changed in evergreen:
importance: Undecided → High
Changed in evergreen:
status: New → Confirmed
Tiffany Little (tslittle) wrote :

+1 to Bill's suggestion of only sending PO's with an 'on-order' state. That seems like a logical argument to be included as part of the script.

Changed in evergreen:
importance: High → Critical
Terran McCanna (tmccanna) wrote :

Bumped to Critical. This caused an old PO of ours to be re-sent that wasn't caught until after items arrived and invoices were received from the vendor.

Jason Stephenson (jstephenson) wrote :

I put up a quick branch to possibly fix this, based on Bill's comment #1.

user/dyrcona/lp1803734_push_only_on-order_orders in the working repo.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1803734_push_only_on-order_orders

Changed in evergreen:
milestone: none → 3.3-beta1
tags: added: pullrequest
Jason Stephenson (jstephenson) wrote :

I meant to add that I have NOT tested my branch, but it seemed like a no-brainer.

Chris Sharp (chrissharp123) wrote :

Been running this in PINES production since 1/10 with no errors. Pushed to rel_3_1, rel_3_2, and master.

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
Changed in evergreen:
status: Fix Released → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers