]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1781235: fix changing primary user barcode in web client
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 5 Sep 2018 14:56:43 +0000 (10:56 -0400)
committerJason Stephenson <jason@sigio.com>
Wed, 5 Sep 2018 18:17:41 +0000 (14:17 -0400)
commit90c716e3bd4be9c449a9e5d71849abd8d4f07e4f
tree89d43c1e7b81f46bb92e72c5c6178d7c497c9701
parent55f5d3cd9e7bffbad8856b7328280b23eae0a0b8
LP#1781235: fix changing primary user barcode in web client

This patch fixes a bug where the patron card dialog would
not allow the user to change the primary barcode under certain
circumstances. The fix is to ensure that the radio buttons
controlling the selection of the primary card are bound to
exactly one scope variable; otherwise, the /last/ barcode in the
list that had a primary value set after user interaction would
be the winner.

To test
-------
[1] Use the 'replace barcode' feature in the patron editor to
    create a test patron with 3 barcodes:

    - barcode A
    - barcode B
    - barcode C (which as last created, would be primary)

[2] Attempt to make barcode A the primary barcode again using
    the 'See All' patron card dialog in the patron editor.
[3] Note that the change of primary barcode doesn't stick
    upon saving the patron record.
[4] Apply the patch and repeat steps 1-3. This time, the
    primary barcode should be changed as expected.
[5] Verify that other patron edit actions and registering a
    new patron record continue to work as expected.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/templates/staff/circ/patron/t_patron_cards_dialog.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js