Nick Clemens
105750acb1
There are several places in the code where we precalculate ItemsAnyAvailableAndNotRestricted to avoid looping on this routine when calling IsAvailableForItemLevelRequest on a list of items form a biblio The value of ItemsAnyAvailableAndNotRestricted is only used when there is a circulation rule for 'onshelfholds' with a value of '2' (If all unavailable) Rather than calculate a value that may never be used, let's cache this value per request when we do calculate it - and reuse the cached value To test: 1 - Apply patch 2 - Set circulation rule 'On shelf holds allowed' as 'If all unavailable' make sure the rule applies to all of the items/patrons you test with 3 - Find a record with two items that are available 4 - Try to place a hold for a patron - not allowed 5 - Check out one item to another patron 6 - Attempt hold - still not allowed 7 - Check out second item to another patron 8 - Attempt hold - allowed! 9 - Apply patch 10 - Cancel and replace hold - it is allowed! 11 - Check in one item, and cancel hold 12 - Place hold - not allowed! 13 - Check in second item 14 - Place hold - not allowed! 15 - prove -v t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
.. | ||
clubs | ||
errors | ||
external/overdrive | ||
sci | ||
sco | ||
svc | ||
ilsdi.pl | ||
maintenance.pl | ||
oai.pl | ||
opac-account-pay-return.pl | ||
opac-account-pay.pl | ||
opac-account.pl | ||
opac-addbybiblionumber.pl | ||
opac-alert-subscribe.pl | ||
opac-article-request-cancel.pl | ||
opac-authorities-home.pl | ||
opac-authoritiesdetail.pl | ||
opac-basket.pl | ||
opac-blocked.pl | ||
opac-browse.pl | ||
opac-browser.pl | ||
opac-changelanguage.pl | ||
opac-course-details.pl | ||
opac-course-reserves.pl | ||
opac-curbside-pickups.pl | ||
opac-detail.pl | ||
opac-discharge.pl | ||
opac-dismiss-message.pl | ||
opac-downloadcart.pl | ||
opac-downloadshelf.pl | ||
opac-export.pl | ||
opac-holdshistory.pl | ||
opac-ics.pl | ||
opac-idref.pl | ||
opac-illrequests.pl | ||
opac-image.pl | ||
opac-imageviewer.pl | ||
opac-ISBDdetail.pl | ||
opac-issue-note.pl | ||
opac-library.pl | ||
opac-main.pl | ||
opac-MARCdetail.pl | ||
opac-memberentry.pl | ||
opac-messaging.pl | ||
opac-modrequest-suspend.pl | ||
opac-modrequest.pl | ||
opac-mymessages.pl | ||
opac-news-rss.pl | ||
opac-overdrive-search.pl | ||
opac-page.pl | ||
opac-passwd.pl | ||
opac-password-recovery.pl | ||
opac-patron-consent.pl | ||
opac-patron-image.pl | ||
opac-privacy.pl | ||
opac-ratings.pl | ||
opac-readingrecord.pl | ||
opac-recall.pl | ||
opac-recalls.pl | ||
opac-registration-verify.pl | ||
opac-renew.pl | ||
opac-reportproblem.pl | ||
opac-request-article.pl | ||
opac-reserve.pl | ||
opac-reset-password.pl | ||
opac-restrictedpage.pl | ||
opac-retrieve-file.pl | ||
opac-review.pl | ||
opac-routing-lists.pl | ||
opac-search-history.pl | ||
opac-search.pl | ||
opac-sendbasket.pl | ||
opac-sendshelf.pl | ||
opac-serial-issues.pl | ||
opac-shareshelf.pl | ||
opac-shelves.pl | ||
opac-showmarc.pl | ||
opac-showreviews.pl | ||
opac-suggestions.pl | ||
opac-tags.pl | ||
opac-tags_subject.pl | ||
opac-topissues.pl | ||
opac-user.pl | ||
tracklinks.pl | ||
unapi |