]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1844365: fix initialization of stat cats in patron registration form
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 22 Jun 2020 15:40:08 +0000 (11:40 -0400)
committerChris Burton <cburton@nflibrary.ca>
Thu, 10 Sep 2020 16:01:35 +0000 (12:01 -0400)
commitd24e4233d20ff1a08d5e26354c9f9383dcc6fbf4
tree1db5b6765c6f15f4dc93a55ed1e8381b37dc0da2
parent9f444dc14720d5f8f84cf9ba737ef904c4734472
LP#1844365: fix initialization of stat cats in patron registration form

If you edit a patron and it has (or gets added) a stat cat entry,
then from the registration form click on its inline patron search
link, fetch a patron that has no stat cats, then edit it, the
first patron's stat cats can show up in the registration form.
If the second patron does have stat cats, but not values set
for all of them, then the first patron's stat cat entries can
fill in cases where no entry was previously set.

This patch fixes patronRegSvc's initialization when loading
an existing patron record to avoid this.

To test
-------
[1] Edit a patron and ensure that it has at least one
    statistical category set.
[2] From the patron search link in the patron app tab
    bar, NOT the Search | Patron menu item, search for
    and retrieve a patron that has no stat cats assigned.
[3] Edit the patron. Observe that the first patron's
    stat cat entry displays in the second patron's
    registration form.
[4] Apply the patch and repeats steps 1-3. This time,
    the previous patron's stat cats should not infect
    the second patron's registration form.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Mike Risher <mrisher@catalyte.io>
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js