[koha-commits] main Koha release repository branch 17.05.x updated. v17.05.00-73-ga486fcf

Git repo owner gitmaster at git.koha-community.org
Thu Jun 22 09:53:14 CEST 2017


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, 17.05.x has been updated
       via  a486fcf4de6ed1b54289f93542258df2f0f20d97 (commit)
       via  c3fb7e80a9f38b6714b5c27660add9f9a47c805d (commit)
       via  845a41b2bab1b9d85221143cf59c9b58ff5a810b (commit)
       via  7540d6b28224914e9be84e2ead3045a2d00a0a0c (commit)
       via  48e490be283124d1076c867ec5940dc93a214110 (commit)
       via  67eafdb2515b98d03e6bb0c9d512d1e2a4b5fac9 (commit)
       via  37b02f63d8cdab77f4cffd6d38c8e67dc61d20a3 (commit)
       via  45bc82bb7df4f27d3a9930ee72840aba464b7268 (commit)
       via  e5f05f2634f2a0ca5e90eb38cdba20e3ab6aee62 (commit)
       via  e7bbda6b23fdc2409d199da0a2e655c2a6395b25 (commit)
      from  e36297e861e4a45ec6fdbc7c9205a9b4db75ffbe (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 a486fcf4de6ed1b54289f93542258df2f0f20d97
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Wed Jun 21 14:14:09 2017 -0300

    Bug 18651: Do no LOCK/UNLOCK the table
    
    We cannot LOCK the old_issues table here, other tables are accessed and DBIx::Class rename it with "me":
    DBD::mysql::st execute failed: Table 'me' was not locked with LOCK
    TABLES [for Statement "SELECT `me`.`issue_id`, `me`.`borrowernumber`,
    `me`.`itemnumber`, `me`.`date_due`, `me`.`branchcode`,
    `me`.`returndate`, `me`.`lastreneweddate`, `me`.`renewals`,
    `me`.`auto_renew`, `me`.`auto_renew_error`, `me`.`timestamp`,
    `me`.`issuedate`, `me`.`onsite_checkout`, `me`.`note`, `me`.`notedate`
    FROM `old_issues` `me` WHERE ( `me`.`issue_id` = ? )" with ParamValues:
    0='2'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
    
    Consequence: We could have a checkin refused if there is a race, but
    this is the simplest and safest way to fix it.
    
    (cherry picked from commit 905572910b3af03d86fdbd3e52c72614f41c978b)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit c3fb7e80a9f38b6714b5c27660add9f9a47c805d
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Wed Jun 21 11:05:59 2017 -0300

    Bug 18651: Fix tests if no circ rule exist
    
    The following test is failing on Jenkins:
     # Subtest: Handle ids duplication
        1..4
        ok 1 - No account lines should exist on old issue_id
        not ok 2 - Two account lines should exist on new issue_id
        ok 3 - AddReturn should return the issue with the new issue_id
        ok 4 - If an item is checked-in, it should be moved to old_issues even if the issue_id already existed in the table
    not ok 4 - Handle ids duplication
    
    When no circ rule exist
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 66f435149a8f2e116070ed28c34bdd5cd627a30f)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 845a41b2bab1b9d85221143cf59c9b58ff5a810b
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Tue Jun 20 15:03:35 2017 +0200

    Bug 18651: [QA Follow-up] Fix the MAX(issue_id) calculation
    
    Found this by inserting the same issue_id in old_issues before checkin:
    The call to ->search( )->get_column is in scalar context and will
    return the number of results, i.e. always 1.
    If you have an issue_id 2 in old_issues, it will crash:
        DBIx::Class::Storage::DBI::_dbh_execute(): Duplicate entry '2' for key 'PRIMARY'
    
    The fix is fairly simple: Put get_column in list context and pick the first
    array entry.
    NOTE: Using DBIx's get_column()->max here might look simpler here.
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    (cherry picked from commit ee7969d3461e6ce08b4fbfd982c90f263f19f693)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 7540d6b28224914e9be84e2ead3045a2d00a0a0c
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Tue Jun 20 14:19:12 2017 +0200

    Bug 18651: [QA Follow-up] Remove unused variable
    
    Variable $original_issue_id is not used. The id is retrieved later from
    $issue when updating accountlines.
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    (cherry picked from commit 4906d58f7c507613c9ad20c4524afd278fca467c)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 48e490be283124d1076c867ec5940dc93a214110
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Thu Jun 15 20:25:18 2017 -0300

    Bug 18651: Limit the life span of the LOCK
    
    We only need the table to be locked for the fetch, increment, store sequence
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    (cherry picked from commit 26957fea0d438046aa5d08c117099f5d2d57406d)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 67eafdb2515b98d03e6bb0c9d512d1e2a4b5fac9
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Wed May 24 12:24:53 2017 -0300

    Bug 18651: Use a READ and WRITE LOCK
    
    For more info, see:
      commit be156d9ad9e5bcfadab34d44f90e04fd61e256ad
        Bug 15854: Use a READ and WRITE LOCK on message_queue
    and
      commit b40456f7dd4b8a988f9c6a5718452936101cb8ff
        Bug 18364: Do not LOCK/UNLOCK tables from tests
    
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    (cherry picked from commit 59fcad685e8143bfaeb7a148f248cc7b7f80b742)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 37b02f63d8cdab77f4cffd6d38c8e67dc61d20a3
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Tue May 23 10:27:31 2017 -0300

    Bug 18651: Copy the row before modify the id
    
    If the "max(issue_id) from old_issue + 1" already exists in issues, the
    move fails.
    
    For instance we have
    1, 2, 3, 4 in issues
    
    checkin 4
    1, 2, 3 in issues (AI=5)
    4 in old_issues
    
    Restart mysql => AI is reset to MAX(issue_id) => 4
    
    checkout a new one
    1, 2, 3, 4 in issues (AI=5)
    4 in old_issues
    
    checkin 4 (will get id 5 in old_issues)
    1, 2, 3 in issues (AI=5)
    4, 5 in old_issues
    
    => This works with and without this patch
    
    Now we have
    1, 2, 3 in issues (AI=5)
    4, 5 in old_issues
    
    Restart mysql => AI is reset to MAX(issue_id) => 4
    
    checkout 2 new ones
    1, 2, 3, 4, 5 in issues (AI=7)
    4, 5 in old_issues
    
    checkin 4 (4 becomes 6 in old_issues)
    1, 2, 3, 5 in issues (AI=6)
    4, 5, 6 in old_issues
    
    => This did not work without with patch
    The update of the issue_id was made before the move (so in the issues
    table), the PK did not allow it
    
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    (cherry picked from commit 79cb157b3b4bee9f1c079937bd13019c7b7f650f)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 45bc82bb7df4f27d3a9930ee72840aba464b7268
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Mon May 22 14:30:48 2017 -0300

    Bug 18651: Update accountlines.issue_id is the issue_id has been changed during the move
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    (cherry picked from commit be3d39c8b1e2671790ee5cb5cc7295eec3774a35)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit e5f05f2634f2a0ca5e90eb38cdba20e3ab6aee62
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Mon May 22 14:26:25 2017 -0300

    Bug 18651: Do not charge if the checkin failed
    
    2. If the move fails for whatever reason (see
    https://lists.katipo.co.nz/pipermail/koha/2017-May/048045.html for an
    example), fines can be charged. It should not
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    (cherry picked from commit acb7a717482c2a47f7da6a0d883784415bf3b8d5)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit e7bbda6b23fdc2409d199da0a2e655c2a6395b25
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Mon May 22 12:02:20 2017 -0300

    Bug 18651: Update issue_id in AddReturn
    
    1. AddReturn returns a $issue hashref with the old issue_id value
    => At first glance it does not affect anything, but would be good to fix
    it for future uses.
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    (cherry picked from commit c3c9d61570b61ec49d508261f0500463a73925d6)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

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

Summary of changes:
 C4/Circulation.pm                    |   46 ++++++++++++++++++++--------------
 t/db_dependent/Circulation/Returns.t |   41 +++++++++++++++++++++++++-----
 2 files changed, 62 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list