Bug 28672 - Improve EDI debug logging
Summary: Improve EDI debug logging
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Martin Renvoize (ashimema)
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-07 11:39 UTC by Martin Renvoize (ashimema)
Modified: 2023-12-28 20:44 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.03,22.05.10,21.11.18
Circulation function:


Attachments
Bug 28672: Pass itemnumber instead of item object (1.02 KB, patch)
2021-07-07 11:45 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 28672: Pass itemnumber instead of item object (1.08 KB, patch)
2023-02-01 11:54 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 28672: (QA follow-up) Method calls cannot be interpolated directly (989 bytes, patch)
2023-02-01 11:54 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 28672: (QA follow-up) Method calls cannot be interpolated directly (990 bytes, patch)
2023-02-01 11:56 UTC, Kyle M Hall (khall)
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) 2021-07-07 11:39:19 UTC
There are a few cases where EDI passes a bare object to the logs.. we should update those cases to log identifiable information instead.
Comment 1 Martin Renvoize (ashimema) 2021-07-07 11:45:04 UTC
Created attachment 122648 [details] [review]
Bug 28672: Pass itemnumber instead of item object

The warn call here was passing the full item object which leads to
HASH() in the logs.. this patch updates it to pass the itemnumber which
is more helpful.
Comment 2 Olivier Hubert 2023-01-31 20:47:13 UTC
The patch applies but I am unsure of how to proceed in order to confirm that this works as intended. Can you provide a test plan?
Comment 3 Kyle M Hall (khall) 2023-02-01 11:54:09 UTC
Created attachment 145931 [details] [review]
Bug 28672: Pass itemnumber instead of item object

The warn call here was passing the full item object which leads to
HASH() in the logs.. this patch updates it to pass the itemnumber which
is more helpful.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Kyle M Hall (khall) 2023-02-01 11:54:19 UTC
Created attachment 145932 [details] [review]
Bug 28672: (QA follow-up) Method calls cannot be interpolated directly

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Kyle M Hall (khall) 2023-02-01 11:56:05 UTC
Created attachment 145933 [details] [review]
Bug 28672: (QA follow-up) Method calls cannot be interpolated directly

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Kyle M Hall (khall) 2023-02-01 11:57:57 UTC
(In reply to Olivier Hubert from comment #2)
> The patch applies but I am unsure of how to proceed in order to confirm that
> this works as intended. Can you provide a test plan?

Testing this patch requires importing an EDI invoice with a partially received quantity. This is trivial and hard to test so I am passing qa directly.
Comment 7 Martin Renvoize (ashimema) 2023-02-01 12:02:07 UTC
Thanks for tackling this one Kyle, and thanks for the follow-up.. just reading it this morning I thought we probably needed that.
Comment 8 Tomás Cohen Arazi (tcohen) 2023-02-08 12:05:55 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 9 Pedro Amorim 2023-02-09 13:14:12 UTC
Nice work everyone!

Pushed to 22.11.x for next release
Comment 10 Lucas Gass (lukeg) 2023-02-15 21:46:19 UTC
Technically an enhancement. However, better logging is always good so I choose to backport.

Backported to 22.05.x for upcoming 22.05.10
Comment 11 Arthur Suzuki 2023-02-17 13:05:30 UTC
same as lucas, applied to 21.11.x for 21.11.18
Comment 12 Wainui Witika-Park 2023-03-15 02:18:27 UTC
Not backported to 21.05.x