Bug 28672

Summary: Improve EDI debug logging
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, kyle, lucas, olivier.hubert, pedro.amorim, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
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
Bug 28672: Pass itemnumber instead of item object
Bug 28672: (QA follow-up) Method calls cannot be interpolated directly
Bug 28672: (QA follow-up) Method calls cannot be interpolated directly

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