Bug 38689 - EDIFACT errors should log to a staff accessible location
Summary: EDIFACT errors should log to a staff accessible location
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 38423 38818
Blocks: 37248
  Show dependency treegraph
 
Reported: 2024-12-12 15:35 UTC by Martin Renvoize (ashimema)
Modified: 2025-01-16 10:13 UTC (History)
6 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 38689: Add edifact_errors table (1.50 KB, patch)
2024-12-19 16:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: DBIC Schema Update (3.46 KB, patch)
2024-12-19 16:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on invoice processing (2.79 KB, patch)
2024-12-19 16:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: DBIC Schema Update (3.46 KB, patch)
2024-12-19 17:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on invoice processing (2.79 KB, patch)
2024-12-19 17:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add Koha::Edifact::File::Error(s) classes (5.09 KB, patch)
2024-12-19 17:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add basic rendering for errors in edifact messages display (2.60 KB, patch)
2024-12-19 17:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Current state of display (27.53 KB, image/png)
2024-12-19 17:45 UTC, Martin Renvoize (ashimema)
Details
Bug 38689: Display errors in a modal (6.05 KB, patch)
2024-12-20 08:45 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Display errors in a modal (6.41 KB, patch)
2024-12-20 08:49 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Updated display using Modal (21.35 KB, image/png)
2024-12-20 08:50 UTC, Martin Renvoize (ashimema)
Details
Bug 38689: Add edifact_errors table (1.50 KB, patch)
2024-12-20 09:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: DBIC Schema Update (3.46 KB, patch)
2024-12-20 09:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on invoice processing (6.29 KB, patch)
2024-12-20 09:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add Koha::Edifact::File::Error(s) classes (5.09 KB, patch)
2024-12-20 09:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Display errors in a modal (6.41 KB, patch)
2024-12-20 09:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Update unit test (2.23 KB, patch)
2024-12-20 09:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add edifact_errors table (1.50 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: DBIC Schema Update (3.46 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on invoice processing (6.29 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add Koha::Edifact::File::Error(s) classes (5.09 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Display errors in a modal (6.41 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Update unit test (2.23 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on quote processing (11.53 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add logging tests for process_quote (6.57 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add edifact_errors table (1.50 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: DBIC Schema Update (3.46 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on invoice processing (6.29 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add Koha::Edifact::File::Error(s) classes (5.09 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Display errors in a modal (6.41 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Update unit test (2.23 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on quote processing (11.53 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add logging tests for process_quote (6.57 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Improve logging of section (8.63 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add section to output (1.45 KB, patch)
2025-01-07 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Display of errors (64.29 KB, image/png)
2025-01-07 11:24 UTC, Martin Renvoize (ashimema)
Details
Bug 38689: Add edifact_errors table (1.56 KB, patch)
2025-01-10 17:24 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: DBIC Schema Update (3.51 KB, patch)
2025-01-10 17:24 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Record errors on invoice processing (6.34 KB, patch)
2025-01-10 17:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Add Koha::Edifact::File::Error(s) classes (5.15 KB, patch)
2025-01-10 17:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Display errors in a modal (6.47 KB, patch)
2025-01-10 17:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Update unit test (2.29 KB, patch)
2025-01-10 17:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Record errors on quote processing (11.52 KB, patch)
2025-01-10 17:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Add logging tests for process_quote (6.62 KB, patch)
2025-01-10 17:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Improve logging of section (8.68 KB, patch)
2025-01-10 17:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Add section to output (1.50 KB, patch)
2025-01-10 17:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 38689: Add edifact_errors table (1.56 KB, patch)
2025-01-14 17:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: DBIC Schema Update (3.51 KB, patch)
2025-01-14 17:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on invoice processing (6.52 KB, patch)
2025-01-14 17:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add Koha::Edifact::File::Error(s) classes (5.15 KB, patch)
2025-01-14 17:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Display errors in a modal (6.47 KB, patch)
2025-01-14 17:17 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Update unit test (2.29 KB, patch)
2025-01-14 17:17 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on quote processing (11.52 KB, patch)
2025-01-14 17:17 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add logging tests for process_quote (6.62 KB, patch)
2025-01-14 17:17 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add section to output (13.09 KB, patch)
2025-01-14 17:17 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Improve test coverage (34.59 KB, patch)
2025-01-14 17:17 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add edifact_errors table (3.13 KB, patch)
2025-01-16 09:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: DBIC Schema Update (3.51 KB, patch)
2025-01-16 09:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on invoice processing (6.52 KB, patch)
2025-01-16 09:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add Koha::Edifact::File::Error(s) classes (5.15 KB, patch)
2025-01-16 09:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Display errors in a modal (6.47 KB, patch)
2025-01-16 09:56 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Update unit test (2.29 KB, patch)
2025-01-16 09:56 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Record errors on quote processing (11.52 KB, patch)
2025-01-16 09:56 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add logging tests for process_quote (6.62 KB, patch)
2025-01-16 09:56 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Add section to output (13.09 KB, patch)
2025-01-16 09:56 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38689: Improve test coverage (39.13 KB, patch)
2025-01-16 09:56 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 Martin Renvoize (ashimema) 2024-12-12 15:35:00 UTC
We currently log a lot of detail using the editrace log, but it all goes onto server side only files.

We should do similar to what we do for email delivery failures and log to a table and display user friendly errors in the UI so that end users are a) aware of such issues and b) may be able to resolve such issue's by updating their config and/or mappings.
Comment 1 Martin Renvoize (ashimema) 2024-12-19 16:57:16 UTC Comment hidden (obsolete)
Comment 2 Martin Renvoize (ashimema) 2024-12-19 16:57:18 UTC Comment hidden (obsolete)
Comment 3 Martin Renvoize (ashimema) 2024-12-19 16:57:20 UTC Comment hidden (obsolete)
Comment 4 Martin Renvoize (ashimema) 2024-12-19 17:39:06 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize (ashimema) 2024-12-19 17:39:09 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize (ashimema) 2024-12-19 17:39:11 UTC Comment hidden (obsolete)
Comment 7 Martin Renvoize (ashimema) 2024-12-19 17:39:13 UTC Comment hidden (obsolete)
Comment 8 Martin Renvoize (ashimema) 2024-12-19 17:42:12 UTC
This is an initial proof of concept.. we add a new table to store edifact processing errors and then we expose those on the API and finally in the edifact messages page for display.

Currently, I've only dealt with basic processing errors that appear for invoices as a proof of concept and we could also do with working on the display of errors which is currently a tooltip on hover for the new 'with errors' that appears in the status column.

I'm not really looking for a signoff here yet.. more looking for input on the approach
Comment 9 Martin Renvoize (ashimema) 2024-12-19 17:45:29 UTC Comment hidden (obsolete)
Comment 10 Martin Renvoize (ashimema) 2024-12-20 08:45:08 UTC Comment hidden (obsolete)
Comment 11 Martin Renvoize (ashimema) 2024-12-20 08:49:03 UTC Comment hidden (obsolete)
Comment 12 Martin Renvoize (ashimema) 2024-12-20 08:50:17 UTC Comment hidden (obsolete)
Comment 13 Martin Renvoize (ashimema) 2024-12-20 09:05:19 UTC Comment hidden (obsolete)
Comment 14 Martin Renvoize (ashimema) 2024-12-20 09:05:21 UTC Comment hidden (obsolete)
Comment 15 Martin Renvoize (ashimema) 2024-12-20 09:05:24 UTC Comment hidden (obsolete)
Comment 16 Martin Renvoize (ashimema) 2024-12-20 09:05:27 UTC Comment hidden (obsolete)
Comment 17 Martin Renvoize (ashimema) 2024-12-20 09:05:30 UTC Comment hidden (obsolete)
Comment 18 Martin Renvoize (ashimema) 2024-12-20 09:08:03 UTC
Test plan

The simplest way to test this is to comment the database rollback line in the EDI.t unit test and run the unit test to generate some errors and leave them in the database.  Then you can view them by enabling the Edifact system preference and navigating to Acquisitions > EDI Messages.
Comment 19 Ray Delahunty 2024-12-20 09:32:40 UTC
(In reply to Martin Renvoize (ashimema) from comment #8)

> I'm not really looking for a signoff here yet.. more looking for input on
> the approach
Making problems easily visible would be good. We have a report on our Acquisitions homepage that tries to find problems with EDI but if staff don't run the report, nothing gets done. This bug triggered me running that report and I've seen a recent QUOTE message that errored, and the titles in it are not in our database, suggesting the report isn't routinely being run. (Maybe I should have used the Patron Emailer or runreport.pl in some way to routinely get problems made visible!).
Comment 20 Martin Renvoize (ashimema) 2024-12-20 09:52:59 UTC
Created attachment 175817 [details] [review]
Bug 38689: Update unit test

We switch out the carp for a logger call in process_invoice, so we need
ot update the unit test to compensate for that.
Comment 21 Martin Renvoize (ashimema) 2025-01-03 16:35:30 UTC
Created attachment 176127 [details] [review]
Bug 38689: Add edifact_errors table
Comment 22 Martin Renvoize (ashimema) 2025-01-03 16:35:33 UTC
Created attachment 176128 [details] [review]
Bug 38689: DBIC Schema Update
Comment 23 Martin Renvoize (ashimema) 2025-01-03 16:35:35 UTC
Created attachment 176129 [details] [review]
Bug 38689: Record errors on invoice processing
Comment 24 Martin Renvoize (ashimema) 2025-01-03 16:35:38 UTC
Created attachment 176130 [details] [review]
Bug 38689: Add Koha::Edifact::File::Error(s) classes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 25 Martin Renvoize (ashimema) 2025-01-03 16:35:40 UTC
Created attachment 176131 [details] [review]
Bug 38689: Display errors in a modal

This patch adds a `(with errors)` link next to the status of any edifact
messages that produced errors on processing.  The link will popup a
modal containing the error details recorded for that message.
Comment 26 Martin Renvoize (ashimema) 2025-01-03 16:35:43 UTC
Created attachment 176132 [details] [review]
Bug 38689: Update unit test

We switch out the carp for a logger call in process_invoice, so we need
ot update the unit test to compensate for that.
Comment 27 Martin Renvoize (ashimema) 2025-01-03 16:35:46 UTC
Created attachment 176133 [details] [review]
Bug 38689: Record errors on quote processing
Comment 28 Martin Renvoize (ashimema) 2025-01-03 16:35:48 UTC
Created attachment 176134 [details] [review]
Bug 38689: Add logging tests for process_quote

This adds missing tests for the Koha::Logger based logging of messages
in the process_quote process.  We also tidy up the log lines a tiny bit
for consistency.
Comment 29 Martin Renvoize (ashimema) 2025-01-07 11:23:00 UTC
Created attachment 176173 [details] [review]
Bug 38689: Add edifact_errors table
Comment 30 Martin Renvoize (ashimema) 2025-01-07 11:23:04 UTC
Created attachment 176174 [details] [review]
Bug 38689: DBIC Schema Update
Comment 31 Martin Renvoize (ashimema) 2025-01-07 11:23:06 UTC
Created attachment 176175 [details] [review]
Bug 38689: Record errors on invoice processing
Comment 32 Martin Renvoize (ashimema) 2025-01-07 11:23:10 UTC
Created attachment 176176 [details] [review]
Bug 38689: Add Koha::Edifact::File::Error(s) classes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 33 Martin Renvoize (ashimema) 2025-01-07 11:23:12 UTC
Created attachment 176177 [details] [review]
Bug 38689: Display errors in a modal

This patch adds a `(with errors)` link next to the status of any edifact
messages that produced errors on processing.  The link will popup a
modal containing the error details recorded for that message.
Comment 34 Martin Renvoize (ashimema) 2025-01-07 11:23:16 UTC
Created attachment 176178 [details] [review]
Bug 38689: Update unit test

We switch out the carp for a logger call in process_invoice, so we need
ot update the unit test to compensate for that.
Comment 35 Martin Renvoize (ashimema) 2025-01-07 11:23:18 UTC
Created attachment 176179 [details] [review]
Bug 38689: Record errors on quote processing
Comment 36 Martin Renvoize (ashimema) 2025-01-07 11:23:21 UTC
Created attachment 176180 [details] [review]
Bug 38689: Add logging tests for process_quote

This adds missing tests for the Koha::Logger based logging of messages
in the process_quote process.  We also tidy up the log lines a tiny bit
for consistency.
Comment 37 Martin Renvoize (ashimema) 2025-01-07 11:23:24 UTC
Created attachment 176181 [details] [review]
Bug 38689: Improve logging of section

We attempt to add the relevant part of the EDI message to the 'section'
field of the edifact_errors record.
Comment 38 Martin Renvoize (ashimema) 2025-01-07 11:23:27 UTC
Created attachment 176182 [details] [review]
Bug 38689: Add section to output
Comment 39 Martin Renvoize (ashimema) 2025-01-07 11:24:29 UTC
Created attachment 176183 [details]
Display of errors
Comment 40 Martin Renvoize (ashimema) 2025-01-07 11:26:25 UTC
Let me know what you think of the two output options.. one including the section of the edifact message that's throwing the error or the original without the message line split out.
Comment 41 Kyle M Hall (khall) 2025-01-10 17:24:23 UTC
Created attachment 176373 [details] [review]
Bug 38689: Add edifact_errors table

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 42 Kyle M Hall (khall) 2025-01-10 17:24:58 UTC
Created attachment 176374 [details] [review]
Bug 38689: DBIC Schema Update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 43 Kyle M Hall (khall) 2025-01-10 17:25:00 UTC
Created attachment 176375 [details] [review]
Bug 38689: Record errors on invoice processing

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 44 Kyle M Hall (khall) 2025-01-10 17:25:02 UTC
Created attachment 176376 [details] [review]
Bug 38689: Add Koha::Edifact::File::Error(s) classes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 45 Kyle M Hall (khall) 2025-01-10 17:25:05 UTC
Created attachment 176377 [details] [review]
Bug 38689: Display errors in a modal

This patch adds a `(with errors)` link next to the status of any edifact
messages that produced errors on processing.  The link will popup a
modal containing the error details recorded for that message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 46 Kyle M Hall (khall) 2025-01-10 17:25:07 UTC
Created attachment 176378 [details] [review]
Bug 38689: Update unit test

We switch out the carp for a logger call in process_invoice, so we need
ot update the unit test to compensate for that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 47 Kyle M Hall (khall) 2025-01-10 17:25:09 UTC
Created attachment 176379 [details] [review]
Bug 38689: Record errors on quote processing

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 48 Kyle M Hall (khall) 2025-01-10 17:25:11 UTC
Created attachment 176380 [details] [review]
Bug 38689: Add logging tests for process_quote

This adds missing tests for the Koha::Logger based logging of messages
in the process_quote process.  We also tidy up the log lines a tiny bit
for consistency.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 49 Kyle M Hall (khall) 2025-01-10 17:25:13 UTC
Created attachment 176381 [details] [review]
Bug 38689: Improve logging of section

We attempt to add the relevant part of the EDI message to the 'section'
field of the edifact_errors record.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 50 Kyle M Hall (khall) 2025-01-10 17:25:16 UTC
Created attachment 176382 [details] [review]
Bug 38689: Add section to output

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 51 Martin Renvoize (ashimema) 2025-01-14 17:16:49 UTC
Created attachment 176524 [details] [review]
Bug 38689: Add edifact_errors table

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 52 Martin Renvoize (ashimema) 2025-01-14 17:16:53 UTC
Created attachment 176525 [details] [review]
Bug 38689: DBIC Schema Update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 53 Martin Renvoize (ashimema) 2025-01-14 17:16:56 UTC
Created attachment 176526 [details] [review]
Bug 38689: Record errors on invoice processing

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

error message improvement
Comment 54 Martin Renvoize (ashimema) 2025-01-14 17:16:59 UTC
Created attachment 176527 [details] [review]
Bug 38689: Add Koha::Edifact::File::Error(s) classes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 55 Martin Renvoize (ashimema) 2025-01-14 17:17:03 UTC
Created attachment 176528 [details] [review]
Bug 38689: Display errors in a modal

This patch adds a `(with errors)` link next to the status of any edifact
messages that produced errors on processing.  The link will popup a
modal containing the error details recorded for that message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 56 Martin Renvoize (ashimema) 2025-01-14 17:17:06 UTC
Created attachment 176529 [details] [review]
Bug 38689: Update unit test

We switch out the carp for a logger call in process_invoice, so we need
ot update the unit test to compensate for that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 57 Martin Renvoize (ashimema) 2025-01-14 17:17:09 UTC
Created attachment 176530 [details] [review]
Bug 38689: Record errors on quote processing

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 58 Martin Renvoize (ashimema) 2025-01-14 17:17:12 UTC
Created attachment 176531 [details] [review]
Bug 38689: Add logging tests for process_quote

This adds missing tests for the Koha::Logger based logging of messages
in the process_quote process.  We also tidy up the log lines a tiny bit
for consistency.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 59 Martin Renvoize (ashimema) 2025-01-14 17:17:15 UTC
Created attachment 176532 [details] [review]
Bug 38689: Add section to output

We attempt to add the relevant part of the EDI message to the 'section'
field of the edifact_errors record and then display this alongside the
error details.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 60 Martin Renvoize (ashimema) 2025-01-14 17:17:19 UTC
Created attachment 176533 [details] [review]
Bug 38689: Improve test coverage

This patch drastically enhances the existing tests.  We add tests for
the various codepaths for handling EDI QUOTES including LIN segment
splitting for multi-fund orders.
Comment 61 Martin Renvoize (ashimema) 2025-01-16 09:55:50 UTC
Created attachment 176605 [details] [review]
Bug 38689: Add edifact_errors table

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 62 Martin Renvoize (ashimema) 2025-01-16 09:55:53 UTC
Created attachment 176606 [details] [review]
Bug 38689: DBIC Schema Update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 63 Martin Renvoize (ashimema) 2025-01-16 09:55:56 UTC
Created attachment 176607 [details] [review]
Bug 38689: Record errors on invoice processing

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

error message improvement
Comment 64 Martin Renvoize (ashimema) 2025-01-16 09:55:59 UTC
Created attachment 176608 [details] [review]
Bug 38689: Add Koha::Edifact::File::Error(s) classes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 65 Martin Renvoize (ashimema) 2025-01-16 09:56:03 UTC
Created attachment 176609 [details] [review]
Bug 38689: Display errors in a modal

This patch adds a `(with errors)` link next to the status of any edifact
messages that produced errors on processing.  The link will popup a
modal containing the error details recorded for that message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 66 Martin Renvoize (ashimema) 2025-01-16 09:56:06 UTC
Created attachment 176610 [details] [review]
Bug 38689: Update unit test

We switch out the carp for a logger call in process_invoice, so we need
ot update the unit test to compensate for that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 67 Martin Renvoize (ashimema) 2025-01-16 09:56:09 UTC
Created attachment 176611 [details] [review]
Bug 38689: Record errors on quote processing

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 68 Martin Renvoize (ashimema) 2025-01-16 09:56:12 UTC
Created attachment 176612 [details] [review]
Bug 38689: Add logging tests for process_quote

This adds missing tests for the Koha::Logger based logging of messages
in the process_quote process.  We also tidy up the log lines a tiny bit
for consistency.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 69 Martin Renvoize (ashimema) 2025-01-16 09:56:15 UTC
Created attachment 176613 [details] [review]
Bug 38689: Add section to output

We attempt to add the relevant part of the EDI message to the 'section'
field of the edifact_errors record and then display this alongside the
error details.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 70 Martin Renvoize (ashimema) 2025-01-16 09:56:18 UTC
Created attachment 176614 [details] [review]
Bug 38689: Improve test coverage

This patch drastically enhances the existing tests.  We add tests for
the various codepaths for handling EDI QUOTES including LIN segment
splitting for multi-fund orders.
Comment 71 Martin Renvoize (ashimema) 2025-01-16 10:13:16 UTC
Fully covered by tests now :)