LP#1950468: make Replace Barcode from Item Status detect duplicate barcodes user/gmcharlt/lp1950468_fix_replace_barcode
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 10 Nov 2021 15:06:36 +0000 (10:06 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 10 Nov 2021 15:06:36 +0000 (10:06 -0500)
commit5e4c2872db2bd87119dd7d9d528df9ef217776c4
tree91b9aa77e228a86753a0c3e3c867ab1eac92e31b
parent4e2d6a2011a90b545062f2de53289f475c5fffa0
LP#1950468: make Replace Barcode from Item Status detect duplicate barcodes

This patch makes the Replace Barcode action when invoked from
Item Status properly detect and warn if the replacement barcode
is a duplicate of one already found in the system. This is a complement
to the fix for bug 1890498.

To test
-------

[1] Enter an item barcode into Item Status.
[2] Try 'Replace Barcode' from detail view and set the
    replacement barcode to one that is already active in
    Evergreen. Note that the dialog closes without
    updating the barcode or warning about the duplicate and
    that a error is logged in the browser console.
[3] Repeat step 2, but this time from list view. Note
    the problem remains the same.
[4] Apply the patch and repeat steps 2 and 3. Note that
    now the dialog will remain open and will display an
    error message complaining about the duplicate barcode.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/templates/staff/cat/share/t_replace_barcode.tt2
Open-ILS/web/js/ui/default/staff/circ/services/item.js