Bug 36772

Summary: OPAC self checkout accepts wrong or partial barcodes
Product: Koha Reporter: Jan Kissig <bibliothek>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, lucas, martin.renvoize
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:
24.05.00,23.11.06
Attachments: Bug 36772: OPAC Self checkout accepts wrong or partial barcodes
Bug 36772: OPAC Self checkout accepts wrong or partial barcodes
Bug 36772: OPAC Self checkout accepts wrong or partial barcodes

Description Jan Kissig 2024-05-03 11:57:57 UTC
When using the opac trusted checkout feature it is possible to enter non existant or partial barcodes to check out items. 

Testplan:
a) set  System preference OpacTrustedCheckout  to Allow 
b) go to http://localhost:8080/ and login with koha / koha
c) click Self Checkout in navigation bar
d) enter barcode 1234
e) result is: Item '39999000011234' was checked out

Expected behaviour: The selfcheck should show an error that barcode 1234 is not existing.
Comment 1 Jan Kissig 2024-05-03 12:13:39 UTC
Created attachment 166118 [details] [review]
Bug 36772: OPAC Self checkout accepts wrong or partial barcodes

When using the opac trusted checkout feature it is possible to enter non existant or partial barcodes to check out items.

    Testplan:
    a) set  System preference OpacTrustedCheckout  to Allow
    b) go to http://localhost:8080/ and login with koha / koha
    c) click Self Checkout in navigation bar
    d) enter barcode 1234
    e) result: Item '39999000011234' was checked out

    apply patch and reload the page

    a) now enter barcode 1234
    b) result: Item '1234' not found
    c) enter 39999000011234
    d) result: Item '39999000011234' was checked out
Comment 2 Matt Blenkinsop 2024-05-03 12:36:03 UTC
Created attachment 166119 [details] [review]
Bug 36772: OPAC Self checkout accepts wrong or partial barcodes

When using the opac trusted checkout feature it is possible to enter non existant or partial barcodes to check out items.

    Testplan:
    a) set  System preference OpacTrustedCheckout  to Allow
    b) go to http://localhost:8080/ and login with koha / koha
    c) click Self Checkout in navigation bar
    d) enter barcode 1234
    e) result: Item '39999000011234' was checked out

    apply patch and reload the page

    a) now enter barcode 1234
    b) result: Item '1234' not found
    c) enter 39999000011234
    d) result: Item '39999000011234' was checked out

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 3 Martin Renvoize 2024-05-13 10:36:41 UTC
Created attachment 166629 [details] [review]
Bug 36772: OPAC Self checkout accepts wrong or partial barcodes

    When using the opac trusted checkout feature it is possible to enter non existant or partial barcodes to check out items.

    Testplan:
    a) set  System preference OpacTrustedCheckout  to Allow
    b) go to http://localhost:8080/ and login with koha / koha
    c) click Self Checkout in navigation bar
    d) enter barcode 1234
    e) result: Item '39999000011234' was checked out

    apply patch and reload the page

    a) now enter barcode 1234
    b) result: Item '1234' not found
    c) enter 39999000011234
    d) result: Item '39999000011234' was checked out

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2024-05-13 10:37:14 UTC
Doh, this is a mistake on my part, thanks for the fix Jan.

All works as intended now, Passing QA
Comment 5 Katrin Fischer 2024-05-14 13:35:22 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-05-29 12:37:35 UTC
Pushed to 23.11.x for 23.11.06