Reservation / Loan SQL/Perl Required
Here at Sunderland we have enabled the option for students to borrower a reserved item for a week. This in principle is fine however our students, well some of them, have learnt how to abuse this and retain popular items. Using self return they simply return the item and re-issue it, unless spotted by a staff member they can do this for as long as they require the item. An example from yesterday was a reserved item with 8 reservations waiting to be satisfied yet a student had returned and re-issued the items some 5 times prior to a staff member spotting his activities.
What I would like is a script that will highlight if an item has been issued more than say twice since an active reservation was placed. Then our staff can use the output to place the item into a query status to force the item to come to the desk, allowing them to satisfy the reservation.
Does anyone have any pointers about how to go about creating this script? Could business objects do this?
Many Thanks
Ian



I've knocked a script
I've knocked a script together which I think is doing what I require, however when it comes to works with multiple items I only get the barcode of the 1st item, how do I get the script to report all item barcodes?
IT Officer (Systems) @ University of Sunderland
reservations and renewals
It is possible to get a list from Talis Decisions but it would require joining two queries. One from the Reservation universe and one from the Circulation universe to get both reservation and loan data for items.
I have done a quick experiment on a basic report and it seems to work but there may be some assumptions I've made that don't match your requirements.
However by using a batch script, and I would tend to favour using PERL, you could get messages added to the items automatically as well and this would not be possible in Decisions.
In terms of reporting on all items it is difficult to say without seeing the code but you should be able to get a list of items attached to a reservation by going through the RESERVED_LNK table. For the reservation ids in question you wan the TARGET_IDs where TYPE=0. If using Perl this list of items can be stored in an array and then each item in the array can then be checked for the number of renewals since a specified date.
I realise I'm being a bit vague but without knowing what approach you are taking with your code it is difficult to be be precise. If you want to post the code of your script or send it to me directly I may be able to be more specific.
Thanks
Brian Crampton
Developer, Talis
Hello Have you tried setting
Hello
Have you tried setting the TAL_ISSUE_WHEN_RESERVED to No, which should stop borrowers from issuing a reserved item.