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

Nick Clemens <[email protected]> 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 <[email protected]> ---
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 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to