[Koha-bugs] [Bug 20985] CanBookBeReserved and CanItemBeReserved should check 'On shelf holds allowed' policy

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 16 13:28:18 CEST 2020


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

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA
                 CC|                            |david at davidnind.com

--- Comment #11 from David Nind <david at davidnind.com> ---
Sorry Arthur, I found this one very confusing to test as I am not very familiar
with setting circulation rules and the "On shelf holds allowed". I wasn't sure
what this bug fixes or what we are testing for (no explanation before the
test). So probably better if someone else more familiar tests this.

1. At first I thought these were system preferences, but these are the Perl
code names variable/routine used to check the rules.

2. Are you supposed to test with the staff interface or using ILS-DI, or both?
I only tested using the staff interface.

3. I wasn't really sure what was different between before the patch was applied
and after - the only behaviour change I could see was the text appearing in the
hold column (red X vs red "X onShelfHoldsNotAllowed"), which didn't seem to be
useful to me as a "normal" user.

My notes
--------

Expected behaviour for "On shelf holds allowed" setting for the circulation
rules (Koha administration > Patrons and circulation > Circulation and fines
rules): 
- Allow holds only on items that are currently checked out or otherwise
unavailable.
- If set to "Yes", patrons can place holds on items currently checked in.
- If set to "If any unavailable", patrons can only place holds on items that
are not unavailable. 
- If set to "If all unavailable", patrons can only place holds on items where
*all* items on the record  are unavailable.
(Adapted from
https://bywatersolutions.com/education/preparing-for-library-closures)

Testing using staff interface:
1. Go to Koha administration > Patrons and circulation > Circulation and fines
rules.
2. Set "On shelf holds allowed" to "Yes" for all libraries/patron
categories/item types.
3. Place a hold on a record with a single item (where the item is available for
loan) 
  . I placed a hold for an item and patron both in/belonging to the Centerville
library.
  . Information column in the item table displays "Not on hold".
4. The hold is placed.
5. Cancel the hold.
6. Set "On shelf holds allowed" to either "If any unavailable" or "If all
unavailable" for all patrons/patron categories/item types.
7. The hold is not placed:
   . Message is "Cannot place hold. No items are available to be placed on
hold."
   . Item table: Hold column displays in red "X onShelfHoldsNotAllowed" and the
information column displays "Not on hold".
8. Run the tests prove t/db_dependent/Reserves.t - these should pass

Tests fail
----------

Also, the tests fail 8-( :

prove t/db_dependent/Reserves.t
t/db_dependent/Reserves.t .. 24/63 Use of uninitialized value in string eq at
/kohadevbox/koha/C4/Reserves.pm line 597.
Use of uninitialized value in string eq at /kohadevbox/koha/C4/Reserves.pm line
597.
Use of uninitialized value $opacitemholds in string eq at
/kohadevbox/koha/C4/Reserves.pm line 440.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/C4/Reserves.pm line 451.
Use of uninitialized value $opacitemholds in string eq at
/kohadevbox/koha/C4/Reserves.pm line 440.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/C4/Reserves.pm line 451.
t/db_dependent/Reserves.t .. 58/63 Use of uninitialized value in numeric eq
(==) at /kohadevbox/koha/C4/Reserves.pm line 451.

        #   Failed test 'record-level holds should not be possible with
opacitemholds set to "Force"'
        #   at t/db_dependent/Reserves.t line 1012.
        #          got: 'OK'
        #     expected: 'RecordHoldNotAllowed'
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/C4/Reserves.pm line 451.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/C4/Reserves.pm line 451.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/C4/Reserves.pm line 451.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/C4/Reserves.pm line 451.
        # Looks like you failed 1 test of 6.

    #   Failed test 'test opacitemholds rules'
    #   at t/db_dependent/Reserves.t line 1080.
    # Looks like you planned 2 tests but ran 3.
    # Looks like you failed 1 test of 3 run.
t/db_dependent/Reserves.t .. 61/63 
#   Failed test 'reserves.item_level_hold'
#   at t/db_dependent/Reserves.t line 1081.
t/db_dependent/Reserves.t .. 63/63 # Looks like you failed 1 test of 63.
t/db_dependent/Reserves.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/63 subtests 

Test Summary Report
-------------------
t/db_dependent/Reserves.t (Wstat: 256 Tests: 63 Failed: 1)
  Failed test:  61
  Non-zero exit status: 1
Files=1, Tests=63,  6 wallclock secs ( 0.04 usr  0.00 sys +  5.40 cusr  0.71
csys =  6.15 CPU)
Result: FAIL

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


More information about the Koha-bugs mailing list