When loading an EDIFACT invoice file, if the process finds a problematic order (usually a cancelled order or a deleted bibliographic or item record) the load process gets stuck and displays as 'Processing' in the EDFACT messages page. This usually means that the remainder of the orders in the file have to be manually receipted by library staff as vendors are reluctant to re-process part invoices. It would be preferable if the process could skip, and report any problem orders but complete all other receipts.
Created attachment 174406 [details] [review] Bug 38423: Code more defensively in process_invoice We re-arrange the logic of process_invoice a little here to ensure we skip order lines in invoices that do not have corresponding bib records.
Created attachment 174408 [details] [review] Bug 38423: Code more defensively in process_invoice We re-arrange the logic of process_invoice a little here to ensure we skip order lines in invoices that do not have corresponding bib records.
Any resource for how to test this? Or a test plan? After trying find resources on EDI for Koha it seems the easiest path would be: > If you set the EdifactInvoiceImport preference to ‘Don’t’ you can load invoice files manually. But I don't know where that should be uploaded ^^" Or maybe it's about having them in "EDIFACT messages" and manually clicking on loading them. Then I think I would need matching order and invoice message files to test. There doesn't seem to be an EDIFACT test plan in the whole git history :o To know what's the minimal setup for EDI accounts to just pick files locally from a directory. And there is no t/db_dependent/Koha/Edifact/Invoice.t what would help test at a lower level. Only t/db_dependent/Koha/Edifact/Order.t
Editfact is hard to test as you need test edifact files.. I tend to rely heavily on Kyle to look at these ones to date as he's one of the few remaining people here with the knowledge of such messages to review these.