[koha-commits] main Koha release repository branch 3.22.x updated. v3.22.02-20-g31ab3b2

Git repo owner gitmaster at git.koha-community.org
Fri Jan 29 11:41:04 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 3.22.x has been updated
       via  31ab3b277c51c5ae8c3b6ccdfa2a9e007b85a0e3 (commit)
      from  69fd29942c843b8b15df1bb75cd25451344341ba (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 31ab3b277c51c5ae8c3b6ccdfa2a9e007b85a0e3
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Tue Jan 19 16:58:07 2016 +0000

    Bug 15391: Fix HoldsQueue.t tests
    
    Prior to this patch, in HoldsQueue.t:
     63 my @item_types = C4::ItemType->all;
     64 my $itemtype = grep { $_->{notforloan} == 1 } @item_types
     65   or BAIL_OUT("No adequate itemtype");
    
    Then we use the $itemtype variable (which contains the number of item types not for loan):
    
     92 $dbh->do("INSERT INTO biblioitems (biblionumber, marcxml, itemtype)
     93           VALUES                  ($biblionumber, '', '$itemtype')");
    
    There is obviously something wrong here.
    
    The code should be
    
     64 my @not_for_loan = grep { $_->{notforloan} == 1 } @item_types
     65   or BAIL_OUT("No adequate itemtype");
     66 my $itemtype = $not_for_loan[0]->{itemtype};
    
    But then some tests don't pass:
    
    Actually the problem comes from:
    commit bfbc646fdd9ca4b90a0bc2751d0faa95d9e93ba1
      Bug 10336: HoldsQueue.t needs to create its own data
    
    -my $itemtype = $dbh->selectrow_array("SELECT min(itemtype) FROM itemtypes WHERE notforloan = 0")
    +my @item_types = C4::ItemType->all;
    +my $itemtype = grep { $_->{notforloan} == 1 } @item_types
    
    The line should have been:
    my $itemtype = grep { $_->{notforloan} == 0 } @item_types
    
    Test plan:
    Confirm that the tests still pass after this patch applied.
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    All tests pass pre and post patch
    
    Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
    
    Signed-off-by: Brendan A Gallagher <brendan at bywatersolutions.com>
    (cherry picked from commit b340d1f5bd02e1ddb535db13e321e6b07a166725)
    Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>

-----------------------------------------------------------------------

Summary of changes:
 t/db_dependent/HoldsQueue.t |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list