[Koha] New Report Update

Cab Vinton bibliwho at gmail.com
Sat May 11 06:21:35 NZST 2013


 Holds Queue Workaround

   - *Developer:* George H. Williams - Latah County Library District
   - *Module:* Holds
   - *Purpose:* In Koha 3.10 there is a bug that is making the built in
   "Holds queue" report in the circulation module work incorrectly (bug 9950).
   This report can act as a replacement for the built in report until the bug
   is fixed.
   - *Status:* Complete

SELECT items.location, authorised_values.lib_opac AS 'COLLECTIONCODE',
items.itemcallnumber, items.enumchron, biblio.author, biblio.title,
     items.barcode
  FROM reserves JOIN biblio ON reserves.biblionumber = biblio.biblionumber
     JOIN borrowers ON reserves.borrowernumber = borrowers.borrowernumber
     JOIN items ON biblio.biblionumber = items.biblionumber
     LEFT JOIN hold_fill_targets ON reserves.biblionumber =
hold_fill_targets.biblionumber
     AND reserves.borrowernumber = hold_fill_targets.borrowernumber
     LEFT JOIN branchtransfers ON items.itemnumber = branchtransfers.itemnumber
     LEFT JOIN authorised_values ON items.ccode =
authorised_values.authorised_value
  WHERE ((authorised_values.category)="ccode")
     AND ((reserves.reservedate)<=now())
     AND ((reserves.suspend)=0)
     AND ((reserves.waitingdate) IS NULL)
     AND ((reserves.priority)=1)
     AND ((items.notforloan)=0)
     AND ((items.damaged)=0)
     AND ((items.itemlost)=0)
     AND ((items.wthdrawn)=0)
     AND ((items.onloan) IS NULL)
     AND ((reserves.itemnumber) IS NOT NULL
     AND (reserves.itemnumber)=items.itemnumber)
     AND ((items.itype)<>"REF")
     AND ((hold_fill_targets.itemnumber) IS NULL)
     OR (authorised_values.category="ccode"
     AND hold_fill_targets.itemnumber=items.itemnumber)
  GROUP BY items.holdingbranch, authorised_values.lib_opac,
items.itemcallnumber, items.enumchron, biblio.author, biblio.title,
items.barcode, reserves.branchcode
  HAVING items.holdingbranch=<<Branch filled at|branches>>
     AND Count(branchtransfers.datesent)=Count(branchtransfers.datearrived)
  ORDER BY items.location, authorised_values.lib_opac,
items.itemcallnumber, items.enumchron, biblio.author, biblio.title ASC


More information about the Koha mailing list