Bug 38423 - EDIFACT invoice files should skip orders that cannot be receipted rather than failing to complete
Summary: EDIFACT invoice files should skip orders that cannot be receipted rather than...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-12 11:40 UTC by Lucy Vaux-Harvey
Modified: 2024-12-04 10:07 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 38423: Code more defensively in process_invoice (9.84 KB, patch)
2024-11-12 12:43 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38423: Code more defensively in process_invoice (9.72 KB, patch)
2024-11-12 12:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucy Vaux-Harvey 2024-11-12 11:40:54 UTC
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.
Comment 1 Martin Renvoize (ashimema) 2024-11-12 12:43:36 UTC
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.
Comment 2 Martin Renvoize (ashimema) 2024-11-12 12:57:50 UTC
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.
Comment 3 Victor Grousset/tuxayo 2024-11-29 06:05:30 UTC
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
Comment 4 Martin Renvoize (ashimema) 2024-12-04 10:07:51 UTC
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.