https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39419

--- Comment #65 from Brendan Lawlor <[email protected]> ---
(In reply to Pedro Amorim (ammopt) from comment #57)
> Hi Brendan, it appears there is a regression here, it's causing the
> following tests file to fail:
> prove t/db_dependent/Koha/Holds.t

Thanks for testing Pedro!

I've attached two follow-ups for test failures caused by the change to
AddReserve.

These patches change what the expiration_date parameter of AddReserve does:
- Before: it set patron_expiration_date.
- Now: it sets expirationdate. There is a new patron_expiration_date parameter.
Some code still used the old meaning.


1. Update tests for change to AddReserve

The subtest 'set_waiting+patron_expiration_date' in t/db_dependent/Koha/Holds.t
passed expiration_date and expected patron_expiration_date to be set. It was
empty, so 9 tests failed.

This follow-up changes both AddReserve calls in that subtest to pass
patron_expiration_date. expirationdate is still filled in, because
Koha::Hold::store copies patron_expiration_date into it when it is empty.


2. Set patron_expiration_date for Club and ILS-DI holds

These callers passed the requester's date only as expiration_date, so
patron_expiration_date was no longer set:
- Koha/Club/Hold.pm, add()
- C4/ILSDI/Services.pm, HoldTitle() and HoldItem()

This follow-up passes the date to both parameters, like the OPAC and staff
interface do. SIP does not need a change, because it does not pass an expiry
date to AddReserve.

With this patch set all the tests pass now.

Note: a possible separate bug, not a blocker

If a hold has a manually set expiration date, it is lost if the hold goes to
waiting and is then reverted. revert_found recalculates expirationdate from
patron_expiration_date (or DefaultHoldExpirationdate), which is right for the
hold shelf deadline but drops a date set by hand.

This already happened before this bug, because staff could set the expiration
date in the staff interface or with PATCH. This bug only adds a way to set it
when the hold is created. If people think it matters, it could be a separate
bug.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to