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

--- Comment #29 from David Nind <[email protected]> ---
Created attachment 202855
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202855&action=edit
Bug 29168: (follow-up) respect explicit article request denial in search
results

guess_article_requestable_itemtypes now fetches all article_requests
rules (not just non-'no' ones) and records explicit denials as 0 in the
returned hash. This ensures that a specific itemtype set to 'no' is not
overridden by a wildcard 'yes' rule.

The lookup in opac-search.pl, opac-shelves.pl, and opac-tags.pl is
changed from || (or) to // (defined-or) so that an explicit 0 in the
hash is respected rather than falling through to the wildcard.

Test plan:
1. Apply patch
2. ktd --shell
   k$ prove
t/db_dependent/Koha/CirculationRules/guess_article_requestable_itemtypes.t
=> SUCCESS: All tests pass
3. Set a default article request rule to 'yes' (all itemtypes)
4. Add a specific rule for one itemtype set to 'no'
5. Search for a record with that itemtype in the OPAC
=> SUCCESS: No 'Request article' link in search results
6. Sign off :-D

Signed-off-by: David Nind <[email protected]>

-- 
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