Lazy Circ (AKA partial barcode lookup)
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 13 May 2011 19:43:52 +0000 (15:43 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 17 May 2011 17:48:51 +0000 (13:48 -0400)
commit29a874a1f9c99d2eb69b048631d4e5b0dc51a813
tree76fdfa6206cab83433a086aff73b4197e0e6ac0f
parentd6f8124b33f738bd06e0e83f7b2ba815ad3165bf
Lazy Circ (AKA partial barcode lookup)

Database tables/access functions for prefix/suffix info

    Table: config.barcode_completion

    Function: evergreen.get_barcodes
        Takes org unit, context, and input barcode
        Context is a string and can contain:
            asset - asset.copy barcodes
            serial - serial.unit barcodes
            actor - actor.usr (via actor.card) barcodes
            booking - booking.resource barcodes
        Special case: asset and serial both in context
            Returns non-serial asset entries as asset
            Returns serial entries as serial
    Type for function return: evergreen.barcode_set

    With editing interface: Admin->Local Admin->Barcode Completion

    OpenSRF Call: open-ils.actor.get_barcodes
        Basically a passthrough to the database function
        Checks for permissions:
            STAFF_LOGIN - To do anything
            VIEW_USER - At home_ou of the user owning the returned
                        barcode when in actor context

Add get_barcode to menu.js and to xulG in a number of places
    Takes a window handle, a context, and an input barcode
    Passes the current OU, the context, and the input barcode to the db
    If multiple results come back it pops up a dialog
    Returns boolean false on no results
    Returns "user_false" on dialog cancel
    Returns an object with type, id, barcode on success
    If dialog was brought up, returns data used to populate button

Add option for looking up actors at checkout
    Org unit setting: Load patron from Checkout. Default: Don't.

Call sites for get_barcode:
    Lookup Patron By Barcode (actor only)
    OPAC's Staff Client Place Hold (actor only)
    Checkout (asset only by default, with actor if above option set)
    Checkin (asset only)
    Item Status (asset only)

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
21 files changed:
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/020.schema.functions.sql
Open-ILS/src/sql/Pg/800.fkeys.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.lazy_circ.sql [new file with mode: 0644]
Open-ILS/web/js/ui/default/conify/global/config/barcode_completion.js [new file with mode: 0644]
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/web/opac/skin/default/js/holds.js
Open-ILS/web/templates/default/conify/global/config/barcode_completion.tt2 [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/cat/opac.js
Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/checkout.js
Open-ILS/xul/staff_client/server/circ/copy_status.js
Open-ILS/xul/staff_client/server/patron/barcode_entry.xul
Open-ILS/xul/staff_client/server/patron/display.js