As reported in https://bugs.launchpad.net/evergreen/+bug/695526,
the attempt to retrieve all of the config.bib_source values using
openils.PermaCrud was failing because the retrieveAll() method
relies on fieldmapper.IDL's setting of the
fieldmapper[hint].Identifier property for each class - but in the
1.6 releases, we're still using fmclasses in XUL instead of
fieldmapper.AutoIDL.
So, to fix the direct problem, we can simply set the property
ourselves on the desired class before invoking retrieveAll();
this avoids touching code paths that might have wider unintended
consequences.
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@19088
dcc99617-32d9-48b4-a31d-
7c20da2025e4
-// vim: noet:sw=4:ts=4:
+// vim: et:sw=4:ts=4:
var xmlDeclaration = /^<\?xml version[^>]+?>/;
var serializer = new XMLSerializer();
* exist - this is specifically in the case of Z39.50 imports. Right now
* we just avoid populating and showing the config.bib_source list
*/
- if (!recId) {
- return false;
- }
+ if (!recId) {
+ return false;
+ }
var bib = xulG.record.bre;
// cbsList = the XUL menulist that contains the available bib sources
var cbsList = dojo.byId('bib-source-list');
+ // The openils.PermaCrud.retrieveAll call needs to have this property set
+ // to function properly; normally set via fieldmapper.IDL but in 1.6.2.x
+ // we're still relying on fmclasses
+ fieldmapper['cbs'].Identifier = 'id';
+
// bibSources = an array containing all of the bib source objects
var bibSources = new openils.PermaCrud({"authtoken": authtoken}).retrieveAll('cbs');