[OPEN-ILS-DEV] Passing parameters to patron search in staff client

Jason Etheridge jason at esilibrary.com
Fri Sep 23 06:03:48 EDT 2011


> I'm relatively new to Evergreen development and I'm having some problems sending a predefined search to the patron screen in the staff client. The code I'm using to pass the parameters (in a modified version of barcode_entry.xul) is:

Depending on your version of Evergreen, I'd do this instead, which is
what the patron editor uses when you click on potential duplicates:

xulG.new_patron_tab( {}, { 'doit' : 1, 'query' : s } );

Where s would look like (for example) this:

{
   'first_given_name' : { 'value' : 'John', 'group' : 0 },
   'family_name' : { 'value' : 'Doe', 'group' : 0 }
}

The value for group helps the underlying search method figure out how
to handle a given field.  Group 0 for fields directly on the user
object that aren't handled by other groups.  Group 1 for address
fields.  Group 2 for phone and ident fields.  And group 3 for library
card barcode.

-- 
Jason Etheridge
 | Equinox Software, Inc. / Your Library's Guide to Open Source
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  jason at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list