LP#1724052: move stat-cat cache initialization to patron search service user/gmcharlt/lp1724052_sth_with_patron_stat_cats
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 9 Jan 2018 21:51:54 +0000 (16:51 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 9 Jan 2018 22:05:58 +0000 (17:05 -0500)
commit880de44d061b020761a0976eaacd77fb406b1b37
tree286940e1917dd720f21046b908c5cb7a9c3353a8
parentbfd5b2f43a0d603972440d727310c7f03a5583e1
LP#1724052: move stat-cat cache initialization to patron search service

When the patron search was split out of the patron app per bug 1701001,
the startup code that copied the current patron stat-cat list into
egCore.env was not moved over as well and remained in the patron app. As
a consequence, the patron search-to-hold dialog would fail to display
any patrons in the results list that had statistical categories assigned.
This patch moves that bit of initialization into the service.

To test
-------
[1] Ensure that some patron records have statistical categories assigned.
[2] In the web staff client, perform a catalog search, place a hold,
    then use the 'Patron Search' button. Perform a search; note that
    patrons with statistical categories are not displayed and that
    errors are present in the browser debug console.
[3] Apply the patch and repeat step #2. This time, patrons that have
    stat cats should be included in the results.
[4] Perform a patron search in the main patron search interface;
    verify that patrons with statistical categories are retrieved.
[5] Directly go to the page listing stat cats for a patron (e.g.,
    /eg/staff/circ/patron/$ID/stat_cats). Verify that the name
    of the OU that owns the stat cat is displayed.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/circ/patron/app.js
Open-ILS/web/js/ui/default/staff/services/patron_search.js