Bug 24166 - Barcode removal breaks circulation.pl/moremember.pl
Summary: Barcode removal breaks circulation.pl/moremember.pl
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-03 22:07 UTC by Christopher Brannon
Modified: 2020-01-15 22:17 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02, 19.05.07, 18.11.13


Attachments
Bug 24166: Do not hang when displaying checkout list if barcode is not set (1.80 KB, patch)
2019-12-18 10:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24166: Do not hang when displaying checkout list if barcode is not set (1.85 KB, patch)
2019-12-18 12:08 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24166: Do not hang when displaying checkout list if barcode is not set (1.91 KB, patch)
2019-12-22 22:00 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2019-12-03 22:07:31 UTC
If an item is checked out, and the barcode is removed from that item, it is impossible to show checked out items on circulation.pl or moremember.pl.  The loading of the table is broken by the missing barcodes.

And yes, it is a possible scenario.  Apparently we have a library that will check damaged items out to an internal account while it is under repairs, and they will remove the barcode if the item is going to be replaced, and put a new barcode in place when the item is in.

I know this isn't the best procedure, but you can be sure it will happen to someone else if this hole isn't plugged.

We need to either have Koha not allow the removal of a barcode once it is in place, without being replaced with something else, or an item should not be allowed to have an item barcode changed while checked out, or the table needs to load whether the item has a barcode or not.
Comment 1 Jonathan Druart 2019-12-18 10:18:21 UTC
Created attachment 96409 [details] [review]
Bug 24166: Do not hang when displaying checkout list if barcode is not set

If a barcode is not set, there is a JS error in the log:
  TypeError: oObj.barcode is null
We should not call escapeHtml() on it if not barcode is set for a given
item.

Test plan:
Check an item out
Remove its barcode
Load the checkout list
=> Without this patch you get the "loading" popup and the table is never
displayed
=> With this patch applied you see the checkout list
Comment 2 Owen Leonard 2019-12-18 12:08:01 UTC
Created attachment 96413 [details] [review]
Bug 24166: Do not hang when displaying checkout list if barcode is not set

If a barcode is not set, there is a JS error in the log:
  TypeError: oObj.barcode is null
We should not call escapeHtml() on it if not barcode is set for a given
item.

Test plan:
Check an item out
Remove its barcode
Load the checkout list
=> Without this patch you get the "loading" popup and the table is never
displayed
=> With this patch applied you see the checkout list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2019-12-22 22:00:34 UTC
Created attachment 96590 [details] [review]
Bug 24166: Do not hang when displaying checkout list if barcode is not set

If a barcode is not set, there is a JS error in the log:
  TypeError: oObj.barcode is null
We should not call escapeHtml() on it if not barcode is set for a given
item.

Test plan:
Check an item out
Remove its barcode
Load the checkout list
=> Without this patch you get the "loading" popup and the table is never
displayed
=> With this patch applied you see the checkout list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2019-12-23 12:09:32 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-01-12 19:21:48 UTC
Pushed to 19.11.x branch for 19.11.02
Comment 6 Lucas Gass 2020-01-15 17:58:07 UTC
backported to 19.05.x for 19.05.07
Comment 7 Hayley Mapley 2020-01-15 22:17:19 UTC
Backported to 18.11.x for 18.11.13