[Koha-devel] Need advice for Bug 10758 - Show bibliographic information of deleted records in acquisitions

Mathieu Saby mathieu.saby at univ-rennes2.fr
Sun Sep 15 15:41:19 CEST 2013


Hello
Currently, when a biblio is deleted, it is moved to deletedbiblio (and 
biblioitems to deletedbiblioitems).
Acquisition pages (basket.pl for example) are looking for bibliographic 
information about orders only in biblio and biblioitems table. So, if 
the biblio is deleted, the title cannot be found, while it is present in 
database, in deletedbiblio table.
Same thing for statistics guided reports : if the biblio is deleted, the 
reports are unable to get information on the document.

This is *very *annoying for us librarians, and taking into account the 
deleted records would be nice for us.

So I am planning to make some patches to improve that: bug 
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10758
Katrin Fisher has taken part to the discussion on this bug, but we are 
not sure of the best way of improving Koha's behavior.

I suppose we could make a "union all" between (biblio and deletedbiblio) 
and (biblio and deletedbiblio) in the subs getting information about 
orders in C4::Acquisitions.
...BUT we cannot do that currently, because of the "ON DELETE SET NULL" 
constraint in table aqorders for biblio.biblionumber column (the 
biblionumber is deleted when the biblio is deleted...)
So, I suppose we need to change the structure of aqorders
- either by removing the foreign key from acqorders.biblionumber to 
biblio.biblionumber
- or editing the constraint (I don't think it is possible)
- or by creating a new column 'deletedbiblionumber" in acqorders

I would prefer the 3d option (the "cleaner" for me, as I suppose 
removing foreign key is not good for integrity of DB), but I am very 
very far from being a database expert or a real developer.

So, what is your opinion on that subject?

Regards,
M. Saby


-- 
Mathieu Saby
Service d'Informatique Documentaire
Service Commun de Documentation
Université Rennes 2
Téléphone : 02 99 14 12 65
Courriel : mathieu.saby at univ-rennes2.fr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20130915/cc887984/attachment.html>


More information about the Koha-devel mailing list