]> git.evergreen-ils.org Git - Evergreen.git/commit
LP857460: Get the generic class scheme when adding vols
authorDan Scott <dscott@laurentian.ca>
Fri, 23 Sep 2011 14:55:28 +0000 (10:55 -0400)
committerDan Wells <dbw2@calvin.edu>
Tue, 27 Sep 2011 20:07:07 +0000 (16:07 -0400)
commit54a691aa0206e9f4d4d9cba24bd4c1e49e774b83
tree03c55550e8d4a87c0a37bd85dc3a8e31836ae2cf
parent250ec72283a24e4aec4f672f4bbc51dfa2b7e211
LP857460: Get the generic class scheme when adding vols

In a default Evergreen instance, in the "Add Volumes" interface for a
bib record with both LC and Dewey call numbers, the list of call numbers
from which you can select appears to be limited to Dewey, even though
the "Bib Call #" field is populated with an LC call number.

The problem is that here we're grabbing the first entry from the
asset.call_number_classification table, and you might expect that to be
the "Generic" entry - however, it turns out to be the "Dewey" entry
because the entries are ordered alphabetically by .name(), not by
database ID. (You can test this be changing the name of "Dewey" to
"Vicious" and see that the "Generic" entry is chosen instead).

This commit changes the process to first search the acnc array for a
name() = "Generic"; and then if we don't find that, fall back to the
first entry in the classification scheme.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js