<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello<br>
    Currently, when a biblio is deleted, it is moved to deletedbiblio
    (and biblioitems to deletedbiblioitems).<br>
    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.<br>
    Same thing for statistics guided reports : if the biblio is deleted,
    the reports are unable to get information on the document.<br>
    <br>
    This is <b>very </b>annoying for us librarians, and taking into
    account the deleted records would be nice for us.<br>
    <br>
    So I am planning to make some patches to improve that: bug
    <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10758">http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10758</a><br>
    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.<br>
    <br>
    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.<br>
    ...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...)<br>
    So, I suppose we need to change the structure of aqorders <br>
    - either by removing the foreign key from acqorders.biblionumber to
    biblio.biblionumber<br>
    - or editing the constraint (I don't think it is possible) <br>
    - or by creating a new column 'deletedbiblionumber" in acqorders<br>
    <br>
    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.<br>
    <br>
    So, what is your opinion on that subject?<br>
    <br>
    Regards,<br>
    M. Saby<br>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Mathieu Saby
Service d'Informatique Documentaire
Service Commun de Documentation
Université Rennes 2
Téléphone : 02 99 14 12 65
Courriel : <a class="moz-txt-link-abbreviated" href="mailto:mathieu.saby@univ-rennes2.fr">mathieu.saby@univ-rennes2.fr</a></pre>
  </body>
</html>