]> 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:28 +0000 (14:17 -0400)
commit267002b26c7dcf6717cf323b66e9c8162aba82c3
treedb9bef15dad013dfe40fe3d0407980dd8d6f7ee4
parentb1dd97777db5fee5c88872ad02ebf36858c674f0
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