[Koha-bugs] [Bug 9809] Get rid of reserveconstraints

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 10 12:06:02 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9809

--- Comment #2 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 37638
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37638&action=edit
Bug 9809: Get rid of reserveconstraints

First, to be honest, I am not completely sure this patch won't
introduce regression.
We need several pairs of eyes, and if possible from someone in place for
a long time in the project :)

Once again this looks vestige of Koha 2, and comments like "FIXME",
"This does not make sense", "probably never reached" appears all around
this code.
Confirmed, reserveconstraints was in
  commit d0374d003716dfb40796caad6390a4d69bfb0376
  Author: rangi <rangi>
  Date:   Tue Dec 19 23:45:51 2000 +0000
      Initial revision

This patch is not complete, the reserves.constrainttype should be removed
too (to confirm?), and all call to *Reserves using it be updated.

What I understood:
This feature has never been finished, and has never worked. Developers try
not touch the code not to break something.
The only place something could be inserted in this table is in
C4::Reserves::AddReserve, if the parameter "constraint" starts with an
"o" or "e" (hum...). The only place (I found) where it is possible is in
the quite muddled serials/routing-preview.pl script (if
RoutingListAddReserves is set). This parameter is set to 'o' since the
beginning of the history and it's not clear why.
I suspect a simple wrong c/p.

There are 2 places where something could be retrieved from this table:
- C4::Reserves::GetReservesFromBiblionumber. I did not find any calls
  using something else than the number of reserves or data from the
  reserves table.
  Looking at the number of FIXME in this area, not sure it has already worked.
- _Findgroupreserve: I let you have a look at the sql query but to me
  this cannot return anything if the reserveconstraints table is empty.

Test plan:
0/ Don't apply this patch
1/ Try to add something in the reserveconstraints table ( :D )

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list