Issue #30 invalid

Problem in reservation

Anonymous created an issue

A problem occured in following use case:

A member (A) reserved a book which is currently out (member B). Now member B brings book back. The state of the book is set to 'hold'. But now member B don't want the book any longer. → It's not possible to change the state to 'in'. Maybe fixed by the following:


  • require_once("../classes/BiblioQuery.php");

  • require_once("../classes/BiblioCopyQuery.php");

// we need to also insert into status history table

$holdQ = new BiblioHoldQuery();

  • $biblioCopy = new BiblioCopy();

  • $biblioCopyQ = new BiblioCopyQuery();

  • If there are no more reservations an the book

    state is hold then set the state to in

  • if (is_null($holdQ->maybeGetFirstHold($bibid,$copyid))){

  • $biblioCopy = $biblioCopyQ->doQuery($bibid,$copyid);

  • if ($biblioCopy->getStatusCd() == OBIB_STATUS_ON_HOLD){

  • $biblioCopy->setStatusCd(OBIB_STATUS_IN);

  • $biblioCopy->setRenewalCount(0);

  • $biblioCopy->setStatusBeginDt("");

  • $biblioCopyQ->updateStatus($biblioCopy);

  • }

  • }


Comments (4)

  1. Anonymous

    Sorry. I made a mistake in my explanation. It must be: But now member A don't want the book any longer.

  2. Hans van der Weij

    This must be about 0.7.0, I haven't experienced problems deleting a hold request and checking with older versions.

    When using 0.7.0 on PHP 5.0.2: Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /opt/lampp/htdocs/obiblio/classes/Date.php on line 79

    Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/obiblio/classes/Date.php:79) in /opt/lampp/htdocs/obiblio/circ/shelving_cart.php on line 46

    I don't think the suggested code will fix that.

    Found additional issue: when checking in, time in Date of Status Change is always 00:00:00 and not the actual time. Older versions correctly show actual time.

  3. Hans van der Weij

    Anonymous said: It's not possible to change the state to 'in'.

    This sounds like Anonymous used Cataloging - Edit Copy to change status from 'hld' to 'in'. This was possible in OpenBiblio versions before 0.7.0, but it was a bug:

    The correct procedure after deleting a hold request for an item with status 'hld' is to use Circulation - Check In. Then new status will be 'crt' (and the item can be checked out to any member), or 'hld' again if there is another hold request that hasn't expired.

    So I think this is not really an issue.

    Created new issue and published a fix for the Check In problems I found:

  4. Log in to comment