[koha-commits] main Koha release repository branch 20.05.x updated. v20.05.02-19-gac5fbb0f51

Git repo owner gitmaster at git.koha-community.org
Sat Jul 25 00:28:25 CEST 2020


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, 20.05.x has been updated
       via  ac5fbb0f510b277a3554c7140dd4ecf7ca1815bd (commit)
       via  6d675b61ad2dfd8fa6cfd0f58a9ebb8d534bd358 (commit)
      from  797af6754455b9c029679e8d3c345c8a09ee9b30 (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 ac5fbb0f510b277a3554c7140dd4ecf7ca1815bd
Author: Lucas Gass <lucas at bywatersolutions.com>
Date:   Fri Jul 24 21:55:44 2020 +0000

    Bug 24379: DBRev 20.05.02.001
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

commit 6d675b61ad2dfd8fa6cfd0f58a9ebb8d534bd358
Author: Nick Clemens <nick at bywatersolutions.com>
Date:   Wed Jan 8 20:59:38 2020 +0000

    Bug 24379: Make login_attempts not nullable
    
    While the column defaults to 0 in Koha::Object->store we set to NULL if NULLABLE
    
    When trying to reset a patrons password we check that the account is not administratively locked:
    login_attempts != -1
    
    This query does not return rows where login_attempts IS NULL. It will return accounts where login_attempts = 0
    
    Let's default to 0 like we intend
    
    To test:
    1 - Create a new patron
    2 - Note their login_attempts is NULL
        SELECT login_attempts FROM borrowers ORDER BY borrowernumber DESC LIMIT 1
    3 - Enable  OpacResetPassword
    4 - Attempt to reset password before logging in, you cannot
    5 - Apply patch, updatedatabase, restart_all, update schema
    6 - Create another patron
    7 - Their login attempts should be 0
    8 - Attempt to reset password, it works!
    
    Bug 24379: Fix the test
    
    First we create a patron using TestBuilder to get a hashref of valid
    info. Then we delete it and create a new patron using Koha::Patron->new
    Once stored, we should call discard_changes to make the calculated
    values available in the currenct object.
    
    Bug 24379: Don't drop default of 0 for login attempts
    
    When moving the column we drop the default, this means that DBs upgraded form earlier versions
    get the wrong values set
    
    To test:
    1 - Checkout 16.11.x
    2 - Reset all
    3 - Checkout master
    4 - updatedatabase
    5 - SHOW CREATE TABLE borrowers;
    6 - Note the column login_attempts defaults to NULL
    7 - Apply patch(es)
    8 - Repeat
    9 - Now it defaults ot 0 (and has NOT NULL if applied all)
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>
    
    Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 7bb31cffae27dc398a7b4a4decf3623ec65478ac)
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

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

Summary of changes:
 Koha.pm                                |  2 +-
 installer/data/mysql/kohastructure.sql |  4 ++--
 installer/data/mysql/updatedatabase.pl | 13 +++++++++++--
 t/db_dependent/Koha/Patron.t           | 21 ++++++++++++++++++++-
 4 files changed, 34 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list