EDI order pusher fails if ordering agency has no mailing address
Bug #2016188 reported by
Jeff Davis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
EG 3.9.1
I was trying to run edi_order_pusher.pl in test mode for a specific purchase order, and it failed with this error message:
Can't call method "san" on an undefined value at /usr/local/
I believe the reason for the error was this line in the EDIWriter.pm compile_po subroutine:
org_unit_san => $po->ordering_
If your ordering agency doesn't have a mailing address (it's not a required field), this will give an error.
Fix forthcoming.
Changed in evergreen: | |
assignee: | nobody → Jeff Davis (jdavis-sitka) |
Changed in evergreen: | |
assignee: | nobody → Chris Sharp (chrissharp123) |
tags: | added: signedoff |
To post a comment you must log in.
Working branch user/jeffdavis/ lp2016188- edi-order- pusher- mailing- address has an inelegant but hopefully effective fix:
https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ jeffdavis/ lp2016188- edi-order- pusher- mailing- address
To test:
1. Create a PO where the ordering agency is an org unit with no mailing address. bin/edi_ order_pusher. pl --test-mode --po-id $PO_ID
2. Generate EDI output for the PO: perl /openils/
Expected behavior: EDI is printed to stdout.
Actual behavior: You get an error message: Can't call method "san" on an undefined value.
After applying the fix, try step 2 again, and it should give you the expected EDI output.