[Bug 38423] New: EDIFACT invoice files should skip orders that cannot be receipted rather than failing to complete
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Bug ID: 38423 Summary: EDIFACT invoice files should skip orders that cannot be receipted rather than failing to complete Change sponsored?: --- Product: Koha Version: 23.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: lucy.vaux-harvey@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 174406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174406&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174406|0 |1 is obsolete| | --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 174408 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174408&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|23.11 |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> --- 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174408|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 175267 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175267&action=edit 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. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Is it possible to keep such test messages somewhere so anyone needing to test EDIFACT stuff can use them? After changing their content if there is record data that is intellectual property of a vendor. So I could signoff and Kyle could QA. Otherwise we might be a bit stuck. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22415 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22415 [Bug 22415] Koha::EDI should not use Log::Log4perl directly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175267|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 175405 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175405&action=edit 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. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 175406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175406&action=edit Bug 38423: Add unit tests Sponsored-by: PTFS Europe <https://ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175405|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 175407 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175407&action=edit 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. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175406|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 175408 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175408&action=edit Bug 38423: Add unit tests Sponsored-by: PTFS Europe <https://ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Unit tests added and these include an example INVOICE.CEI file with cases for each of the failures we now skip over with this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38689 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38689 [Bug 38689] EDIfact errors should log to a staff accessible location -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175407|0 |1 is obsolete| | --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 175485 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175485&action=edit 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. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175408|0 |1 is obsolete| | --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 175486 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175486&action=edit Bug 38423: Add unit tests Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works! :) Thanks Martin for the tests :D When having only the test commit applied (minor conflict on the `carp "Cannot find[..]`), the test fail with: "Can't call method "biblionumber" on an undefined value" That's in line with the implementation being about defensive coding. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175486|0 |1 is obsolete| | --- Comment #15 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 176344 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176344&action=edit Bug 38423: Add unit tests Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes loading EDIFACT release notes| |invoice files so that it | |skips a problematic order | |(usually a cancelled order | |or a deleted bibliographic | |or item record), reports | |any problem orders, and | |completes the processing of | |other orders. Previously, | |the EDIFACT page would get | |"stuck" and display as | |"Processing" for | |problematic orders, then | |the remainder of the orders | |in the file had to be | |manually receipted by | |library staff (as vendors | |are reluctant to re-process | |part invoices). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.05.00 |25.05.00,24.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 --- Comment #17 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 24.11.x for 24.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38423 Bug 38423 depends on bug 22415, which changed state. Bug 22415 Summary: Koha::EDI should not use Log::Log4perl directly https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22415 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org