[Koha-bugs] [Bug 30860] Add option for CanBookBeReserved to return all item values
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Mar 28 12:58:29 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30860
Nick Clemens <nick at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #145581|0 |1
is obsolete| |
Attachment #145582|0 |1
is obsolete| |
Attachment #145583|0 |1
is obsolete| |
Attachment #145584|0 |1
is obsolete| |
Attachment #147695|0 |1
is obsolete| |
Attachment #148562|0 |1
is obsolete| |
--- Comment #32 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 148812
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148812&action=edit
Bug 30860: Cache CanItemBeReserved return value
This patch caches the return value of CanItemBeReserved that could
be then returned *on
demand*
We don't want to introduce side-effects hard to catch from this simple
change, so let's return the cache value only from the 2 scripts we are
dealing with.
This patch requests all item values from CanBookBeReserved on request.pl
Before this we either:
- Looped every item to find out that book could not be reserved
- Looped until we found an item that could be reserved, then looped all items
to get statuses
In the worst case we avoid double processing a single item, in the best case we
avoid double
processing all items (if only last on record is holdable)
To test:
1 - Find a record in staff client with several items
2 - Set AllowHoldsOnDamagedItems to 'Dont allow'
3 - Add a damaged item to record
4 - Set a hold rule to only allow holds form homebranch and ensure record has
items from other branches
5 - Setup things to prevent more items from being held
6 - Attempt hold for patron
7 - Note item statuses
8 - Apply patch
9 - Confirm statuses are as they were before
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list