Partial success

Circulation functionality is now working in our system. I’m not completely sure of all of the workflows, but the functionality to check items in and out is working. The circulation module also hooks into the display of item records to provide links to circulation functions for those items (including an option to view circulation history, and a link to begin the check-out or check-in procedure for that item).

First I made the general circulation form, which outputs a table view of all items currently checked out of the library. Each item in this table is followed by history and check-in links.

The circulation history form requires an item’s node-id as an argument in the URI, and outputs a history of all loans for that item.

Building the check-in form was fairly simple: again, a node-id is given as an argument in the URI, meaning that check-in links can be easily generated whenever an item’s node-id is known (which is anytime we’re dealing with item records). An additional URI argument is used for confirmation. If the confirmation argument is missing, a check-in confirmation link is output.

Building the check-out form was more complicated. It required the ability to take node- and user-ids as arguments, as well as autocomplete-based text fields for selecting the item being checked-out and the user the item is being issued to. The user module already contains AJAX autocomplete functions for usernames, but I wanted to extend this functionality to allow lookup based not only on the user->name field, but also based on the name fields which we have included in user’s profiles using nodeprofile module. I included this new autocomplete function in the circulation module. At present, I have hardcoded a complex, three-way join statement to link the ‘users’ table with the ‘content_type_user’ table via the ‘node’ table (this will be changed). Now, if our system has a user with username ‘big_genie’ but with the name ‘James Woods’ in their user profile, the username autocomplete function will retrieve ‘big_genie’ even when ‘James’ is typed into the username field. I think this greatly increases functionality.

I also needed to build a new autocomplete function, this time for item codes. Using the user-autocomplete function as an example this was not too difficult. As with the new user-autocomplete function, I wanted to allow item codes to be loaded even when a zine title was entered. A similar three-way-join statement accomplishes this. Now, if the issuing librarian types the name of a zine into the item-code field, a dynamic list of items related to that zine (that is, all of the copies of the zine) will be output. This provides more points of access to the volunteer librarians while still remaining passively instructive.

What remains is to hook circulation into the display of user records, in order to display a table of current loans for that user. Following this, secondary functions (various circulation reports) can be implemented.

Blog type:

Catalogue blog tags:
, ,