Bug 31087 - Undefined notes in returns claims get stringified to 'null'
Summary: Undefined notes in returns claims get stringified to 'null'
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks: 28854
  Show dependency treegraph
 
Reported: 2022-07-01 14:41 UTC by Martin Renvoize
Modified: 2023-06-08 22:26 UTC (History)
4 users (show)

See Also:
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


Attachments
Bug 31087: Prevent stringification of null in return claims (2.00 KB, patch)
2022-07-01 14:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 31087: Prevent stringification of null in return claims (2.06 KB, patch)
2022-07-01 15:24 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 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 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 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 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.