[Koha-bugs] [Bug 25024] New: OPAC incorrectly marks branch as invalid pickup location when similarly named branch is blocked

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 31 15:32:28 CEST 2020


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

            Bug ID: 25024
           Summary: OPAC incorrectly marks branch as invalid pickup
                    location when similarly named branch is blocked
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: OPAC
          Assignee: oleonard at myacpl.org
          Reporter: andrew at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org

When you've got branches with similar branchcodes, the OPAC can get confused
about which should be blocked by transfer limits.

To test:
- have a branch whose code contains the code for another branch, like "TOWN"
and "TOWNSCHOOL"
- Have a third branch with an unrealated code. I'll use "COUNTRY"
- Have an item of item type BOOK, owned by branch COUNTRY
- Set branch transfer limit to not allow BOOKs to go from COUNTRY to TOWNSCHOOL
- confirm that no transfer limit exists for BOOKS from COUNTRY to TOWN
- On staff client, confirm item allows hold for pickup at TOWN but not at
TOWNSCHOOL
- On OPAC, confirm hold is not allowed for pickup at TOWN or TOWNSCHOOL

This seems to be the problematic bit of code:
[% SET pickup_available_at =
bibitemloo.not_available_at.grep(library.branchcode).size ? 0 : 1 %]

So when we grep "TOWN" it also finds "TOWNSCHOOL," sees that block for
TOWNSCHOOL, and applies it to TOWN in error.

This has come to light as library systems deal with closures of some of their
libraries due to coronavirus and start using branch transfer limits more
intensively.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list