<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">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...<br>
      But that's not the more complex part of the problem.<br>
      M. Saby<br>
      <br>
      Le 15/09/2013 15:41, Mathieu Saby a écrit :<br>
    </div>
    <blockquote cite="mid:5235B8FF.5090004@univ-rennes2.fr" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      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
        moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:mathieu.saby@univ-rennes2.fr">mathieu.saby@univ-rennes2.fr</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Koha-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></pre>
    </blockquote>
    <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>