[open-ils-commits] r18857 - branches/rel_1_6_1/Open-ILS/xul/staff_client/server/patron (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Nov 29 12:45:59 EST 2010


Author: miker
Date: 2010-11-29 12:45:56 -0500 (Mon, 29 Nov 2010)
New Revision: 18857

Modified:
   branches/rel_1_6_1/Open-ILS/xul/staff_client/server/patron/holds.js
Log:
Patch from Jeff Godin, backported from trunkified version:

In the staff client, the holds context menu option "Edit PickupLibrary" displays and allows selection of org units that it shouldn't.

Org units whose type has can_have_users = FALSE are not valid pickup locations.

Using the default types as an example, CONS and SYS1 are invalid pickup locations.

The OPAC enforces this when allowing patrons to edit a hold.

The staff client does not enforce this when staff edit a hold.

The can_have_users() method of the au object returns a string 't' or 'f' which is then compared to 0.

The attached patch corrects this issue. ( foo == 0 becomes !isTrue(foo) ).



Modified: branches/rel_1_6_1/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- branches/rel_1_6_1/Open-ILS/xul/staff_client/server/patron/holds.js	2010-11-29 17:45:17 UTC (rev 18856)
+++ branches/rel_1_6_1/Open-ILS/xul/staff_client/server/patron/holds.js	2010-11-29 17:45:56 UTC (rev 18857)
@@ -346,7 +346,7 @@
                                         return [
                                             o.name() ? sname + ' ' + o.name() : o.shortname(),
                                             o.id(),
-                                            ( obj.data.hash.aout[ o.ou_type() ].can_have_users() == 0),
+                                            ( !isTrue(obj.data.hash.aout[ o.ou_type() ].can_have_users()) ),
                                             ( obj.data.hash.aout[ o.ou_type() ].depth() * 2),
                                         ]; 
                                     }



More information about the open-ils-commits mailing list