[Koha-devel] Orphaned biblioitems
Paul A
paul.a at navalmarinearchive.com
Thu May 1 02:22:08 CEST 2014
At 10:51 AM 5/1/2014 +1200, Robin Sheat wrote:
>Paul A schreef op wo 30-04-2014 om 10:03 [-0400]:
> > Can anyone please suggest where I could start looking in the code for
> > what
> > might cause orphaned biblioitems?
>
>You're going to have to define what an orphaned biblioitem record is,
>because that SQL query doesn't seem to do anything that I'd relate to
>that term. Do you mean duplicate biblios?
Sort of... sorry to be vague, so here's an example, the tail of the query
(simplified to remove the html:
mysql> SELECT GROUP_CONCAT(biblionumber SEPARATOR ', ') AS BibNums,
-> EXTRACTVALUE(marcxml,'//controlfield[@tag="001"]') AS Id FROM
biblioitems
-> GROUP BY Id HAVING count(Id) > 1;
+---------------------+--------------+
| BibNums | Id |
+---------------------+--------------+
[snip]
| 22969, 19151 | 8914106 |
+---------------------+--------------+
31 rows in set (0.89 sec)
gives me 2 biblio numbers (22969, 19151), both for John Toland's book "The
flying tigers" which has the Library of Congress 001. A search in the staff
page and the OPAC confirm that we only have one -- both show "The Flying
Tigers / (Record no. 22969)"
If I search for the other number as
cgi-bin/koha/catalogue/search.pl?q=biblionumber=19151 in the staff page I
get "No results found No results match your search for 'biblionumber=19151'
in NMA Catalog."
BUT... if I specifically go to
/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=19151, I get a biblio
that our cataloguers either overwrote or deleted or whatever... And,
because it's not "findable" in the staff page, it cannot be deleted without
direct intervention in the MySQL db.
I called it an "orphaned biblioitem" because, without looking for that LoC
001 in biblioitems, I would have had no clue that an unused record was
"floating around."
>All it's doing is finding the first biblionumber of a set where members
>have the same 001. This could just be cataloguing the same thing twice,
>or records with badly generated 001 entries, or something along those
>lines.
I'm convinced that your thought "cataloguing the same thing twice" is
correct -- quite often our cataloguers use Z39.50 to update/overwrite a
biblio, but they swear blind that they always delete any previous record
that still appears after re-indexing.
That's why I'm intrigued about these "orphans"
Thanks for your interest and best regards -- Paul
More information about the Koha-devel
mailing list