<html>
<head>
<style type="text/css">
<!--
body { margin-bottom: 1px; margin-right: 4px; margin-left: 4px; margin-top: 4px; line-height: normal; font-variant: normal }
p { margin-bottom: 0; margin-top: 0 }
-->
</style>
</head>
<body style="margin-bottom: 1px; margin-right: 4px; margin-left: 4px; margin-top: 4px">
<p style="margin-top: 0; margin-bottom: 0">
<font face="Lucida Grande" size="3">Scott,</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Lucida Grande" size="3">I had a similar problem (see the thread titled "All items checked out in OPAC"). What I found was that the onloan field in the items table had been populated with '0000-00-00' instead of NULL for iterms during the import with bulkmarcimport.pl. I was able to fix it by running the following in my database:</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Lucida Grande" size="3">update items set onloan = NULL WHERE onloan = '0000-00-00'</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Lucida Grande" size="3">I've reported this as bug 4392.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Lucida Grande" size="3">Hope this helps!</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Lucida Grande" size="3">Chris</font><br><br><br>Chris Hobbs<BR>Director, Technology<BR>New Haven Unified School District<BR><br><br>>>> Scott Daniels <scott@tw.co.nz> 04/20/10 9:19 PM >>><br>Hi,<br><br>I am hoping to get some help with an issue I am having with our<br>Koha(v3.00.05.003) installation. This is a new installation and<br>biblio/item data has been imported via MARC records. All of our items<br>imported correctly, we imported patrons and manually populated the<br>issues table with data from the previous system.<br><br>The problem we are having is, in the search screen (ie<br>cgi-bin/koha/opac-search.pl?q=test).<br>The books are ALL reported to be on loan. (Availability: No items<br>available: Checked out (1))<br><br>The reality is, some are available, some are not. This is ACCURATELY(and<br>contradictory to the search screen) reflected in the details screen for<br>each book (cgi-bin/koha/opac-detail.pl?biblionumber=733), this will list<br>the items with their correct status, available or checked out.<br><br>In my research I found that Availability is calculated based on 5<br>fields, notforloan(0); damaged(0); itemlost(0); wthdrawn(0) and<br>onloan(null). These are all accurately set in our data.<br><br>I looked into the code (/usr/share/koha/lib/C4/Search.pm line 1249) and<br>it seems that the availability is retrieved from the Zebra index for the<br>search screen, and not the data, unless I am misinterpreting the comment.<br><br># 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0)<br># In English:<br># all records not indexed in the onloan register (zebra) and all records<br>with a value of lost equal to 0<br><br>The scenario of a 'Zebra onloan register' not being populated would<br>'fit' my problem in my mind, as it is only on the search screen that<br>availability is wrongly presented.<br><br>My question is how can I populate this 'register'?<br><br>I have run zebra_rebuild -v -b -w , this has had no effect.<br><br>--<br>Regards,<br>Scott Daniels<br><br>TechnologyWise Ltd, Tauranga, NZ<br>scott@tw.co.nz<br>ph: +64 (0)7 571 1060<br>fax: +64 (0)7 571 1061<br><br>_______________________________________________<br>Koha mailing list<br>Koha@lists.katipo.co.nz<br><a href="http://lists.katipo.co.nz/mailman/listinfo/koha">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br><br>--<br>This message was scanned by ESVA and is believed to be clean.<br>Click here to report this message as spam.<br><a href="http://mx.nhusd.k12.ca.us/cgi">http://mx.nhusd.k12.ca.us/cgi</a>-bin/learn-msg.cgi?id=92E702AC5F.A08C0<br><br><br>
</p>
--
This message has been checked by ESVA and is believed to be clean.
</body>
</html>