[Koha-devel] RFC: Multiple hold requests (revisited)

Stephen G. Edwards sedwards at alloycomputing.com
Thu Feb 5 17:36:46 CET 2009


I am a new developer working on some 3.2 items for the Howard County  
Library.  I'm trying to tackle an RFC that was published a while ago.   
It specifies the ability to request holds on multiple items at one  
time.  I have just updated the wiki with new details:

	http://wiki.koha.org/doku.php?id=en:development:rfcs3.2:rfc32_place_hold_multiple_items

After studying the code a while, I think I have a handle on an  
approach.  I wanted to give the community the opportunity to offer  
warnings, advice, or ridicule, as warranted.  As the wiki implies,  
these are the things I thought I would need to change to implement the  
biggest piece, which is to allow multiple holds from the search  
results page:

1. Add a "Place Hold" button to the search results page.  I did this  
in my sandbox by tweaking "opac-results.tmpl" and "basket.js" (trying  
to mirror the flow of the "Save" button's functionality).  Use this to  
pass the list of checked biblio numbers to the "opac-reserve.pl" script.

2. Redesign the "opac-reserve.tmpl" template to allow for a list of  
biblio items, rather than just one.  For each biblio, allow the  
selection of "next available" or "particular item" (if allowed).

3. Update "opac-reserve.pl" to handle multiple biblio numbers and the  
new template.

Is there any reason I shouldn't proceed (carefully) along these lines?

I've also noticed what appear to be some irregularities in the  
behavior of this feature as it is currently implemented in 3.2.  I  
don't know if it is due to the code or my lack of understanding.

First, when selecting a "Place Hold" link on the results page, the  
"opac-reserve.pl" script appears to get called twice on the server  
with the same arguments.  I understand that several round trips are  
made through the same script to implement the overall flow, but I  
cannot figure out why just one click causes it to be called twice.   
The second call appears to be redundant, unless I'm missing something.

Also, the end of the "opac-reserve.tmpl" template has a section that  
appears to be dead code.  It is guarded by a check for the  
"item_types_selected" template variable, but I can't find anyplace  
that this could be set.  The second official trip through the perl  
script results in a redirect to "opac-user.pl", so the "opac- 
reserve.tmpl" never even gets used more than once during the flow (at  
least as far as I can see).

Any thoughts on all this are appreciated.

-Steve

---
Stephen Edwards
Alloy Computing, LLC
sedwards at alloycomputing.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20090205/aed780db/attachment-0003.htm>


More information about the Koha-devel mailing list