Bug 31087

Summary: Undefined notes in returns claims get stringified to 'null'
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: CirculationAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, gmcharlt, kyle.m.hall, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.04, 21.11.11
Circulation function:
Bug Depends on:    
Bug Blocks: 28854    
Attachments: Bug 31087: Prevent stringification of null in return claims
Bug 31087: Prevent stringification of null in return claims

Description Martin Renvoize (ashimema) 2022-07-01 14:41:32 UTC
The returns claims tables available on checkout and details pages display the null values stringified for notes.

This was found whilst testing bug 28854 and fixed inline there, but we felt it should be split out as it's own minor bug.
Comment 1 Martin Renvoize (ashimema) 2022-07-01 14:45:27 UTC
Created attachment 136977 [details] [review]
Bug 31087: Prevent stringification of null in return claims

The return claims table was stringifying 'null'. This patch updates the
code to check for definition so we don't stringify incorrectly

Note: This patch was split out from a follow-up on bug 28854 as we felt
it should be treated separately for backportability.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 2 Kyle M Hall (khall) 2022-07-01 15:24:51 UTC
Created attachment 137025 [details] [review]
Bug 31087: Prevent stringification of null in return claims

The return claims table was stringifying 'null'. This patch updates the
code to check for definition so we don't stringify incorrectly

Note: This patch was split out from a follow-up on bug 28854 as we felt
it should be treated separately for backportability.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Tomás Cohen Arazi (tcohen) 2022-07-01 19:43:54 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 4 Arthur Suzuki 2022-08-12 07:06:24 UTC
this bz was applied to 22.05.x for 22.05.04.
applied as well to 21.11.x for 21.11.11.
Comment 5 Victor Grousset/tuxayo 2022-08-17 19:22:01 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.