Hi, I am hoping to get some help with an issue I am having with our Koha(v3.00.05.003) installation. This is a new installation and biblio/item data has been imported via MARC records. All of our items imported correctly, we imported patrons and manually populated the issues table with data from the previous system. The problem we are having is, in the search screen (ie cgi-bin/koha/opac-search.pl?q=test). The books are ALL reported to be on loan. (Availability: No items available: Checked out (1)) The reality is, some are available, some are not. This is ACCURATELY(and contradictory to the search screen) reflected in the details screen for each book (cgi-bin/koha/opac-detail.pl?biblionumber=733), this will list the items with their correct status, available or checked out. In my research I found that Availability is calculated based on 5 fields, notforloan(0); damaged(0); itemlost(0); wthdrawn(0) and onloan(null). These are all accurately set in our data. I looked into the code (/usr/share/koha/lib/C4/Search.pm line 1249) and it seems that the availability is retrieved from the Zebra index for the search screen, and not the data, unless I am misinterpreting the comment. # 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) # In English: # all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0 The scenario of a 'Zebra onloan register' not being populated would 'fit' my problem in my mind, as it is only on the search screen that availability is wrongly presented. My question is how can I populate this 'register'? I have run zebra_rebuild -v -b -w , this has had no effect. -- Regards, Scott Daniels TechnologyWise Ltd, Tauranga, NZ scott@tw.co.nz ph: +64 (0)7 571 1060 fax: +64 (0)7 571 1061
I have not encountered such an issue before, but you may try running rebuild_zebra -a -b -r <--The -r is for resetting the Zebra db. Hope someone helps you out, try the Koha chat also. Regards, On Wed, Apr 21, 2010 at 8:19 AM, Scott Daniels <scott@tw.co.nz> wrote:
Hi,
I am hoping to get some help with an issue I am having with our Koha(v3.00.05.003) installation. This is a new installation and biblio/item data has been imported via MARC records. All of our items imported correctly, we imported patrons and manually populated the issues table with data from the previous system.
The problem we are having is, in the search screen (ie cgi-bin/koha/opac-search.pl?q=test). The books are ALL reported to be on loan. (Availability: No items available: Checked out (1))
The reality is, some are available, some are not. This is ACCURATELY(and contradictory to the search screen) reflected in the details screen for each book (cgi-bin/koha/opac-detail.pl?biblionumber=733), this will list the items with their correct status, available or checked out.
In my research I found that Availability is calculated based on 5 fields, notforloan(0); damaged(0); itemlost(0); wthdrawn(0) and onloan(null). These are all accurately set in our data.
I looked into the code (/usr/share/koha/lib/C4/Search.pm line 1249) and
it seems that the availability is retrieved from the Zebra index for the search screen, and not the data, unless I am misinterpreting the comment.
# 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) # In English: # all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0
The scenario of a 'Zebra onloan register' not being populated would 'fit' my problem in my mind, as it is only on the search screen that availability is wrongly presented.
My question is how can I populate this 'register'?
I have run zebra_rebuild -v -b -w , this has had no effect.
-- Regards, Scott Daniels
TechnologyWise Ltd, Tauranga, NZ scott@tw.co.nz ph: +64 (0)7 571 1060 fax: +64 (0)7 571 1061
_______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Le 21/04/2010 06:19, Scott Daniels a écrit :
Hi,
I am hoping to get some help with an issue I am having with our Koha(v3.00.05.003) installation. This is a new installation and biblio/item data has been imported via MARC records. All of our items imported correctly, we imported patrons and manually populated the issues table with data from the previous system.
The problem we are having is, in the search screen (ie cgi-bin/koha/opac-search.pl?q=test). The books are ALL reported to be on loan. (Availability: No items available: Checked out (1))
The reality is, some are available, some are not. This is ACCURATELY(and contradictory to the search screen) reflected in the details screen for each book (cgi-bin/koha/opac-detail.pl?biblionumber=733), this will list the items with their correct status, available or checked out.
In my research I found that Availability is calculated based on 5 fields, notforloan(0); damaged(0); itemlost(0); wthdrawn(0) and onloan(null). These are all accurately set in our data.
I looked into the code (/usr/share/koha/lib/C4/Search.pm line 1249) and it seems that the availability is retrieved from the Zebra index for the search screen, and not the data, unless I am misinterpreting the comment.
# 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) # In English: # all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0
The scenario of a 'Zebra onloan register' not being populated would 'fit' my problem in my mind, as it is only on the search screen that availability is wrongly presented.
My question is how can I populate this 'register'?
I have run zebra_rebuild -v -b -w , this has had no effect. Hi This problem occurs when you have never had any current loan indexed. Indeed the index in zebra is created only when a data is found for this index. Therefore, when you are on a brand new database, where you donot have any lost item or any date on loan, the index is not created. Two workarounds possible : a) create a fake item attached to a fake biblio with lost and onloan set to 0000-00-00 b) find a way to enable the search even though the index does not exist... I know quite a bit of zebra queries, but that would require some tweaking of the code. idea anyone ? -- Henri-Damien LAURENT BibLibre
* Scott Daniels (scott@tw.co.nz) wrote:
Thank you for the suggestions.... I appreciate your replies
@Susan, I tried the running the ./rebuild_zebra with a '-r' switch, this didn't help my situation. The command runs successfully and exports the biblios and rebuilds the index, but it makes no difference to the availability on the search results.
@ Laurent I can't grasp what you are suggesting here. I would like to understand more about what you mean.
"Indeed the index in zebra is created only when a data is found for this index. Therefore, when you are on a brand new database, where you donot have any lost item or any date on loan, the index is not created."
Hi Scott Have you tried running the fix_onloan.pl script? in misc/migration_tools/fix_onloan.pl Then rebuild the indexes and see if that fixes it. Chris
I have imported data from the previous library system for those books that are currently checked out, I created an import script to reformat/migrate the issued data into the 'issues' table. When this table was populated, the corresponding item had its 'onloan' field updated in the 'items' table. Koha itself seems to be happy with this, but the search screen is not :(
I have attached two CSV files containing a random 30 records from these two tables.
I think I have missed something, can I trigger Zebra to index the availability by inserting the biblios into the zebraqueue table in Koha? Is this a process that has been missed by manually inserting my data into the issues table?
Regards, Scott Daniels
TechnologyWise Ltd, Tauranga, NZ scott@tw.co.nz ph: +64 (0)7 571 1060 fax: +64 (0)7 571 1061
LAURENT Henri-Damien wrote:
Le 21/04/2010 06:19, Scott Daniels a ecrit :
Hi,
I am hoping to get some help with an issue I am having with our Koha(v3.00.05.003) installation. This is a new installation and biblio/item data has been imported via MARC records. All of our items imported correctly, we imported patrons and manually populated the issues table with data from the previous system.
The problem we are having is, in the search screen (ie cgi-bin/koha/opac-search.pl?q=test). The books are ALL reported to be on loan. (Availability: No items available: Checked out (1))
The reality is, some are available, some are not. This is ACCURATELY(and contradictory to the search screen) reflected in the details screen for each book (cgi-bin/koha/opac-detail.pl?biblionumber=733), this will list the items with their correct status, available or checked out.
In my research I found that Availability is calculated based on 5 fields, notforloan(0); damaged(0); itemlost(0); wthdrawn(0) and onloan(null). These are all accurately set in our data.
I looked into the code (/usr/share/koha/lib/C4/Search.pm line 1249) and it seems that the availability is retrieved from the Zebra index for the search screen, and not the data, unless I am misinterpreting the comment.
# 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) # In English: # all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0
The scenario of a 'Zebra onloan register' not being populated would 'fit' my problem in my mind, as it is only on the search screen that availability is wrongly presented.
My question is how can I populate this 'register'?
I have run zebra_rebuild -v -b -w , this has had no effect.
Hi This problem occurs when you have never had any current loan indexed. Indeed the index in zebra is created only when a data is found for this index. Therefore, when you are on a brand new database, where you donot have any lost item or any date on loan, the index is not created. Two workarounds possible : a) create a fake item attached to a fake biblio with lost and onloan set to 0000-00-00 b) find a way to enable the search even though the index does not exist... I know quite a bit of zebra queries, but that would require some tweaking of the code. idea anyone ?
"borrowernumber";"itemnumber";"date_due";"branchcode";"issuingbranch";"returndate";"lastreneweddate";"return";"renewals";"timestamp";"issuedate" "6";"12666";"2010-04-29";"TPS";;"0000-00-00";"2010-04-15";;"1";"2010-04-15 13:43:15";"2010-04-15" "6";"13451";"2010-04-29";"TPS";;"0000-00-00";"2010-04-15";;"1";"2010-04-15 13:43:15";"2010-04-15" "6";"10401";"2010-04-29";"TPS";;"0000-00-00";"2010-04-15";;"1";"2010-04-15 13:43:15";"2010-04-15" "6";"11605";"2010-04-29";"TPS";;"0000-00-00";"2010-04-15";;"1";"2010-04-15 13:43:14";"2010-04-15" "6";"14182";"2010-04-29";"TPS";;"0000-00-00";"2010-04-15";;"1";"2010-04-15 13:43:14";"2010-04-15" "6";"13823";"2010-04-29";"TPS";;"0000-00-00";"2010-04-15";;"1";"2010-04-15 13:43:14";"2010-04-15" "6";"10377";"2010-04-29";"TPS";;"0000-00-00";"2010-04-15";;"1";"2010-04-15 13:43:14";"2010-04-15" "6";"14272";"2010-04-29";"TPS";;"0000-00-00";"2010-04-15";;"1";"2010-04-15 13:43:14";"2010-04-15" "6";"13199";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:43:29";"2010-04-15" "6";"12043";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:43:33";"2010-04-15" "6";"11514";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:43:37";"2010-04-15" "6";"11502";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:43:43";"2010-04-15" "6";"14758";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:43:48";"2010-04-15" "6";"12963";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:43:52";"2010-04-15" "6";"13241";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:43:55";"2010-04-15" "6";"10158";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:43:59";"2010-04-15" "6";"14053";"2010-04-29";"TPS";;"0000-00-00";"0000-00-00";;"0";"2010-04-15 13:44:05";"2010-04-15" "159";"12612";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:49:06";"2010-04-20" "159";"13722";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:49:13";"2010-04-20" "155";"13066";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:51:40";"2010-04-20" "155";"13747";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:51:45";"2010-04-20" "6";"10672";"2010-05-20";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:52:45";"2010-04-20" "6";"10732";"2010-05-20";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:52:48";"2010-04-20" "160";"12498";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:53:26";"2010-04-20" "146";"10275";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:53:58";"2010-04-20" "146";"12501";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:54:01";"2010-04-20" "210";"10138";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:54:13";"2010-04-20" "151";"10417";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:54:30";"2010-04-20" "97";"10863";"2010-05-04";"TPS";"NULL";"NULL";"NULL";"NULL";"NULL";"2010-04-20 10:54:50";"2010-04-20"
"itemnumber";"biblionumber";"biblioitemnumber";"barcode";"dateaccessioned";"booksellerid";"homebranch";"price";"replacementprice";"replacementpricedate";"datelastborrowed";"datelastseen";"stack";"notforloan";"damaged";"itemlost";"wthdrawn";"itemcallnumber";"issues";"renewals";"reserves";"restricted";"itemnotes";"holdingbranch";"paidfor";"timestamp";"location";"onloan";"cn_source";"cn_sort";"ccode";"materials";"uri";"itype";"more_subfields_xml";"enumchron";"copynumber" "9815";"1";"4031";"B005591";"2006-06-27";"NULL";"TPS";"19.95";"19.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"780";"0";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"780";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 0" "9816";"2";"4032";"B003436";"2000-10-30";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"FLE";"2";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 17:01:12";"NULL";"NULL";"dds";"FLE";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 2" "9817";"3";"4033";"B006186";"2008-11-17";"NULL";"TPS";"26.99";"26.99";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"C S";"2";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"C_S";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 2" "9818";"4";"4034";"B000802";"2000-07-21";"NULL";"TPS";"9.95";"9.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"JEN";"26";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"JEN";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 26" "9819";"5";"4035";"B001697";"2000-07-21";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"T";"16";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"T";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 16" "9820";"6";"4036";"B000904";"2000-07-21";"NULL";"TPS";"7.95";"7.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"MAR";"4";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"MAR";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 4" "9821";"7";"4037";"B001762";"2000-07-21";"NULL";"TPS";"9.95";"9.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"W";"13";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"W";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 13" "9822";"8";"4038";"B005136";"2005-05-26";"NULL";"TPS";"9.99";"9.99";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"ODG";"32";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"ODG";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 32" "9823";"9";"4039";"B001881";"2000-07-21";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"DEA";"9";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"DEA";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 9" "9824";"10";"4040";"B000199";"2000-07-21";"NULL";"TPS";"19.95";"19.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"551.3 NZ";"9";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"551_300000000000000_NZ";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 9" "9825";"11";"4041";"B004166";"2001-09-24";"NULL";"TPS";"17.95";"17.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"SNI";"36";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"SNI";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 36" "9826";"12";"4042";"B002081";"2000-07-21";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"KIN";"8";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"KIN";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 8" "9827";"13";"4043";"B004254";"2001-11-12";"NULL";"TPS";"9.95";"9.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"CHE";"22";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"CHE";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 22" "9828";"14";"4044";"B005369";"2007-06-18";"NULL";"TPS";"9.95";"9.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"808.88";"15";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-21 14:15:45";"NULL";"2010-03-11";"dds";"808_880000000000000";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 15" "9829";"15";"4045";"B003827";"2000-07-21";"NULL";"TPS";"15.95";"15.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"DUD NZ";"2";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"DUD_NZ";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 2" "9830";"16";"4046";"B004986";"2004-10-22";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"798.73";"35";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"798_730000000000000";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 35" "9831";"17";"4047";"B003062";"2000-07-21";"NULL";"TPS";"5.95";"5.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"513";"2";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"513";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 2" "9832";"18";"4048";"B005642";"2007-09-11";"NULL";"TPS";"19.99";"19.99";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"797.3";"3";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"797_300000000000000";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 3" "9833";"19";"4049";"B005103";"2005-07-08";"NULL";"TPS";"14.99";"14.99";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"CAM";"19";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"CAM";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 19" "9834";"20";"4050";"B004232";"2001-11-09";"NULL";"TPS";"9.95";"9.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"CAM";"31";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"CAM";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 31" "9835";"21";"4051";"B003416";"2000-07-21";"NULL";"TPS";"5.00";"5.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"BEA NZ";"8";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"BEA_NZ";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 8" "9836";"22";"4052";"B001288";"2000-07-21";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"BOY";"5";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"BOY";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 5" "9837";"23";"4053";"B001175";"2000-07-21";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"N";"8";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"N";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 8" "9838";"24";"4054";"B004306";"2001-11-08";"NULL";"TPS";"16.95";"16.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"507";"9";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"507";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 9" "9839";"25";"4055";"B000070";"2000-07-21";"NULL";"TPS";"19.95";"19.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"388";"4";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"388";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 4" "9840";"25";"4055";"B001522";"2000-07-21";"NULL";"TPS";"14.95";"14.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"308.2";"1";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"308_200000000000000";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 1" "9841";"25";"4055";"B000071";"2000-07-21";"NULL";"TPS";"19.95";"19.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"388";"8";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"388";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 8" "9842";"26";"4056";"B005417";"2007-08-07";"NULL";"TPS";"10.99";"10.99";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"BAU";"3";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"BAU";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 3" "9843";"27";"4057";"B001481";"2008-04-15";"NULL";"TPS";"0.00";"0.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"G";"4";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-21 14:15:45";"NULL";"2010-03-29";"dds";"G";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"4" "9844";"28";"4058";"B003739";"2000-07-21";"NULL";"TPS";"5.00";"5.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"909";"51";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-21 14:15:45";"NULL";"2010-03-31";"dds";"909";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 51" "9845";"29";"4059";"B006130";"2008-07-08";"NULL";"TPS";"12.95";"12.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"M";"5";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"M";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"5" "9846";"30";"4060";"B003737";"2000-07-21";"NULL";"TPS";"5.00";"5.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"920.02 NZ";"3";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"920_020000000000000_NZ";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 3" "9847";"31";"4061";"B005546";"2007-04-27";"NULL";"TPS";"19.00";"19.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"B S";"2";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"B_S";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 2" "9848";"32";"4062";"B005608";"2007-09-11";"NULL";"TPS";"26.99";"26.99";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"WIL";"3";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-21 14:15:46";"NULL";"2010-04-01";"dds";"WIL";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 3" "9849";"33";"4063";"B004175";"2001-10-29";"NULL";"TPS";"10.35";"10.35";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"S NZ";"19";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"S_NZ";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 19" "9850";"34";"4064";"B000458";"2008-11-27";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"B";"0";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"B";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 0" "9851";"35";"4065";"B003594";"2000-07-21";"NULL";"TPS";"19.95";"19.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"700";"10";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"700";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 10" "9852";"36";"4066";"B000119";"2000-07-21";"NULL";"TPS";"19.95";"19.95";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"567.91";"15";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"567_910000000000000";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"1 | 15" "9853";"37";"4067";"B002094";"2000-07-21";"NULL";"TPS";"10.00";"10.00";"2010-04-16";"NULL";"2010-04-16";"NULL";"0";"0";"0";"0";"LEW";"6";"NULL";"NULL";"0";"NULL";"TPS";"NULL";"2010-04-20 16:42:16";"NULL";"NULL";"dds";"LEW";"NULL";"NULL";"NULL";"BK";"NULL";"NULL";"3 | 6"
_______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
-- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand
* Scott Daniels (scott@tw.co.nz) wrote:
Hi Chris,
I did run this script during my attempts to fix this, although I didn't do an index afterwards. What I found when I ran this script is it 'broke' the display on the 'details' screen. The book items, instead of displaying 'Available' as they had, would now display nothing at all ie, blank. I found this was because the details screen looks for a 'null' value in order(in onloan) to display available, whereas the script replaced all the null values with 0000-00-00. I thought I was on the wrong track at this point and reverted to a backup.
I'm happy to try this on your advice... I just have one question first, if I run this script, followed by the reindex, will this correct the display of the availability with the detail screen? Do I run a query to replace all 0000-00-00 with null after indexing?
Sorry that was two questions. :)
What I would do, is the fix_onloan.pl script, run the reindex, then if the detail looks mucked up, run your query. Chris -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand
Scott, 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: update items set onloan = NULL WHERE onloan = '0000-00-00' I've reported this as bug 4392. Hope this helps! Chris Chris Hobbs Director, Technology New Haven Unified School District
Scott Daniels <scott@tw.co.nz> 04/20/10 9:19 PM >>> Hi,
I am hoping to get some help with an issue I am having with our Koha(v3.00.05.003) installation. This is a new installation and biblio/item data has been imported via MARC records. All of our items imported correctly, we imported patrons and manually populated the issues table with data from the previous system. The problem we are having is, in the search screen (ie cgi-bin/koha/opac-search.pl?q=test). The books are ALL reported to be on loan. (Availability: No items available: Checked out (1)) The reality is, some are available, some are not. This is ACCURATELY(and contradictory to the search screen) reflected in the details screen for each book (cgi-bin/koha/opac-detail.pl?biblionumber=733), this will list the items with their correct status, available or checked out. In my research I found that Availability is calculated based on 5 fields, notforloan(0); damaged(0); itemlost(0); wthdrawn(0) and onloan(null). These are all accurately set in our data. I looked into the code (/usr/share/koha/lib/C4/Search.pm line 1249) and it seems that the availability is retrieved from the Zebra index for the search screen, and not the data, unless I am misinterpreting the comment. # 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) # In English: # all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0 The scenario of a 'Zebra onloan register' not being populated would 'fit' my problem in my mind, as it is only on the search screen that availability is wrongly presented. My question is how can I populate this 'register'? I have run zebra_rebuild -v -b -w , this has had no effect. -- Regards, Scott Daniels TechnologyWise Ltd, Tauranga, NZ scott@tw.co.nz ph: +64 (0)7 571 1060 fax: +64 (0)7 571 1061 _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha -- This message was scanned by ESVA and is believed to be clean. Click here to report this message as spam. http://mx.nhusd.k12.ca.us/cgi-bin/learn-msg.cgi?id=92E702AC5F.A08C0 -- This message was scanned by ESVA and is believed to be clean.
I also had this problem, but for me it was because the item field in biblioitems was not filled in. Solved it by making an extra table and transfering items from another table (sorry, am far from my computer, can't remember which one) via my extra table (just in case Chris's solution is not the right one for your situation)) --- On Fri, 4/23/10, Chris Hobbs <chobbs@nhusd.k12.ca.us> wrote: From: Chris Hobbs <chobbs@nhusd.k12.ca.us> Subject: Re: [Koha] Availability (& Zebra?) To: koha@lists.katipo.co.nz, "Scott Daniels" <scott@tw.co.nz> Received: Friday, April 23, 2010, 2:48 PM Scott, 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: update items set onloan = NULL WHERE onloan = '0000-00-00' I've reported this as bug 4392. Hope this helps! Chris Chris Hobbs Director, Technology New Haven Unified School District
Scott Daniels <scott@tw.co.nz> 04/20/10 9:19 PM >>> Hi,
I am hoping to get some help with an issue I am having with our Koha(v3.00.05.003) installation. This is a new installation and biblio/item data has been imported via MARC records. All of our items imported correctly, we imported patrons and manually populated the issues table with data from the previous system. The problem we are having is, in the search screen (ie cgi-bin/koha/opac-search.pl?q=test). The books are ALL reported to be on loan. (Availability: No items available: Checked out (1)) The reality is, some are available, some are not. This is ACCURATELY(and contradictory to the search screen) reflected in the details screen for each book (cgi-bin/koha/opac-detail.pl?biblionumber=733), this will list the items with their correct status, available or checked out. In my research I found that Availability is calculated based on 5 fields, notforloan(0); damaged(0); itemlost(0); wthdrawn(0) and onloan(null). These are all accurately set in our data. I looked into the code (/usr/share/koha/lib/C4/Search.pm line 1249) and it seems that the availability is retrieved from the Zebra index for the search screen, and not the data, unless I am misinterpreting the comment. # 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) # In English: # all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0 The scenario of a 'Zebra onloan register' not being populated would 'fit' my problem in my mind, as it is only on the search screen that availability is wrongly presented. My question is how can I populate this 'register'? I have run zebra_rebuild -v -b -w , this has had no effect. -- Regards, Scott Daniels TechnologyWise Ltd, Tauranga, NZ scott@tw.co.nz ph: +64 (0)7 571 1060 fax: +64 (0)7 571 1061 _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha -- This message was scanned by ESVA and is believed to be clean. Click here to report this message as spam. http://mx.nhusd.k12.ca.us/cgi-bin/learn-msg.cgi?id=92E702AC5F.A08C0 -- This message has been checked by ESVA and is believed to be clean. -----Inline Attachment Follows----- _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
participants (6)
-
Chris Cormack -
Chris Hobbs -
LAURENT Henri-Damien -
Marty -
Scott Daniels -
Susan Mustafa