[koha-commits] main Koha release repository branch 3.14.x updated. v3.14.01-84-g87cd69d

Git repo owner gitmaster at git.koha-community.org
Fri Jan 3 09:51:30 CET 2014


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.14.x has been updated
       via  87cd69d35158869e27cfa310cf41d2f2f144f214 (commit)
       via  c65a5d73a7678cb4757566181d566e903a264aee (commit)
      from  71b9096034cbc68e28d2db7c389ae341bd96e323 (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 87cd69d35158869e27cfa310cf41d2f2f144f214
Author: Fridolyn SOMERS <fridolyn.somers at biblibre.com>
Date:   Wed Dec 4 17:05:32 2013 +0100

    Bug 11338: prevent deletion of items that are captured for holds
    
    In C4::Items::DelItemCheck, there are two SQL queries: one to check
    if item is on loan, the other if item is reserved.
    
    Those two queries use "SELECT * FROM table", fetch the data with
    "$var = $sth->fetchrow", and use "$var" as a boolean condition.
    
    This is not correct, SQL query should be "SELECT COUNT(*) FROM table".
    
    As a consequence, it was possible to delete an item without warning to
    the operator even if it was waiting on the hold shelf or in transit to
    fill a hold.
    
    This patch corrects the SQL queries and sets my ($var) to show that
    fetchrow returns an array.
    
    Test plan :
    - Set an item A onloan
    - Set an item B reserved and the reserve waiting
    - Go to items cataloguing : cgi-bin/koha/cataloguing/additem.pl?biblionumber=XXX
    - Try to delete item A
    => You get an alert and item is not deleted
    - Try to delete item B
    => You get an alert and item is not deleted
    
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Works, and has the added bonus of being a tiny bit faster.
    
    Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
    Passes t, xt and QA script tests.
    Also tried deleting via batch delete - correct warnings are displayed.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit d000a716352fb61dc0dae7715eda15896b53b4e7)
    Signed-off-by: Fridolin SOMERS <fridolin.somers at biblibre.com>

commit c65a5d73a7678cb4757566181d566e903a264aee
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Wed Dec 25 17:07:53 2013 +0000

    Bug 11338: add unit tests for DelItemCheck
    
    This patch adds unit tests for two parts of DelItemCheck: checking
    if the item is on loan, and checking if it is waiting on the hold
    shelf.
    
    To test:
    
    [1] Verify that prove -v t/db_dependent/Circulation/IsItemIssued.t
        is successful.
    [2] Verify that prove -v t/db_dependent/Reserves.t is *not*
        successful -- as it turns out, there was a latent bug where items
        waiting on the hold shelf or in transit to fill a hold could still
        be deleted without any warning.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    (cherry picked from commit 18888359b6744a1e65e34649c927e7c146f628f8)
    Signed-off-by: Fridolin SOMERS <fridolin.somers at biblibre.com>

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

Summary of changes:
 C4/Items.pm                               |   15 +++++++++++----
 t/db_dependent/Circulation/IsItemIssued.t |   17 ++++++++++++++++-
 t/db_dependent/Reserves.t                 |   16 +++++++++++++++-
 3 files changed, 42 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list