Of course, I suppose if a column "deletedbiblionumber" is added in acqorders, we won't be able to make a "union all" between biblio and deletedbiblio...
But that's not the more complex part of the problem.
M. Saby

Le 15/09/2013 15:41, Mathieu Saby a écrit :
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@univ-rennes2.fr


_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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