[koha-commits] main Koha release repository branch 18.05.x updated. v18.05.02-40-ga73d455

Git repo owner gitmaster at git.koha-community.org
Thu Aug 2 19:18:42 CEST 2018


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, 18.05.x has been updated
       via  a73d45534fe578ab3b425506aa5701ecb36065d9 (commit)
       via  66faf4dd1c0397e7873985a446f536e36694716f (commit)
       via  477cee1ae93307a0257001514d8f2d693fe2dcdd (commit)
       via  2dd7b408b3844d4b6a3d808c69f0a5d520132e29 (commit)
       via  ac321e17d9e0f106eebdc809e1b790da56326949 (commit)
       via  6ee9d8a888fa32a737116c15e9e5e5cae2f6653d (commit)
       via  d5ab20c1c9a6feaba592700ed4b4be87ae6f8ff2 (commit)
       via  1739fbf44b659d7a3891f2d3aea740552cd9b0a2 (commit)
       via  3e1519beccd65550763f664ce5c734a39610ccac (commit)
       via  266f6f55bf4ba26c287d2258825463861456bf86 (commit)
       via  2105982b1a1c2b4e5ebbb8968679fd47b43f5670 (commit)
       via  8063bec2a87ecab7e5bd6d58ea7b1add9a5986f3 (commit)
       via  450a2e75927d2aff4b7ad2d4643dd253972c9f1c (commit)
       via  3572fd14045ddf0d5025c932c23380671d623569 (commit)
       via  665faa45e7178d0fe916125246986f81bc8e1103 (commit)
       via  359a045cfc331cf2a928fbe0cff11792c8a6959c (commit)
      from  9bbc1fc7b10000e65ba68b51781b01c9bba4ec7d (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 a73d45534fe578ab3b425506aa5701ecb36065d9
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Mon Jul 2 16:18:33 2018 -0300

    Bug 20942: (QA follow-up) Use $lines->total_outstanding
    
    This patch makes the controller code use $lines->total_outstanding
    instead of expecting ->outstanding_debits and ->outstanding_credits
    return the total.
    
    Tests should pass as before. No behaviour change is expected.
    
    To test:
    - Run:
      $ kshell
     k$ prove t/db_dependent/api/v1/patrons_accounts.t
    => SUCCESS: Tests still pass, no behaviour change.
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 6672b26d16065d877d6d7300830fc3d619b09898)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 66faf4dd1c0397e7873985a446f536e36694716f
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Mon Jun 25 14:55:30 2018 -0300

    Bug 20942: Split debit and credit lines
    
    This patch splits the balance to match this object schema:
    
    {
        balance             => #,
        outstanding_credits => {
            total => #,
            lines => [ credit_line_1, ..., credit_line_n ]
        },
        outstanding_debits  => {
            total => #,
            lines => [ debit_line_1, ..., debit_line_m ]
        }
    }
    
    This change is made to ease usage from the UI. Also because the
    outstanding credits need to be applied to outstanding debits in order to
    the balance value to make sense. So we still need to have each total.
    
    Tests are added for this change, and the schema files are adjusted as
    well.
    
    To test:
    - Apply this patch
    - Run:
      $ kshell
     k$ prove t/db_dependent/api/v1/patrons_accounts.t
    => SUCCESS: Tests pass!
    - Sign off :-D
    
    staff_id is changed into user_id as voted on the dev meeting the RFC got
    approved.
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit bb7c908dc06697a4ebbf8633897d24e26798cb6d)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 477cee1ae93307a0257001514d8f2d693fe2dcdd
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Wed Jun 13 14:02:44 2018 -0300

    Bug 20942: Add route to get patron's account balance
    
    This patch implements the /patrons/{patron_id}/account endpoint. It can
    be used to get the patron's balance information, including outstanding
    lines.
    
    To test:
    - Apply this patchset
    - Run:
      $ kshell
     k$ prove t/db_dependent/api/v1/patrons_accounts.t
    => SUCCESS: tests pass!
    - Make your favourite REST testing tool (RESTer on Firefox?) do:
      GET /api/v1/patrons/{patron_id}/account
    to a valid patron_id. Play with Koha's UI to add credits/payments and
    notice the endpoint returns the right info following the voted RFC. [1]
    - Sign off :-D
    
    [1] https://wiki.koha-community.org/wiki/Patrons_account_lines_endpoint_RFC
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit d079c80b05b36a177c80d8f585ae1515092e6ddb)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 2dd7b408b3844d4b6a3d808c69f0a5d520132e29
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Wed Jun 13 14:02:30 2018 -0300

    Bug 20942: Unit tests for /patrons/{patron_id}/account
    
    This patch adds tests for the /patrons/{patron_id}/account endpoint.
    To test:
    
    - Run:
      $ kshell
     k$ prove t/db_dependent/api/v1/patrons_accounts.t
    => FAIL: Tests should fail because the endpoint is not implemented.
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 7cbff1bce1608016e8b8ceded7633678189b75cc)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit ac321e17d9e0f106eebdc809e1b790da56326949
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Fri Jun 1 16:04:35 2018 -0300

    Bug 20942: OpenAPI spec for /patrons/{patron_id}/account
    
    This patch adds the OpenAPI spec for the following paths:
    - /patrons/{patron_id}/account
    
    It also adds object definitions for:
    - balance
    - account line
    
    Account line is to be used on both /account/lines (when implemented)
    and for embeding the outstanding lines in the balance endpoint
    (/patrons/{patron_id}/account).
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit d383b49987b8e5471cb9f30ed879e1311e762b26)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 6ee9d8a888fa32a737116c15e9e5e5cae2f6653d
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Mon Jul 2 15:59:54 2018 -0300

    Bug 20990: (QA follow-up) make outstanding_credits return the account lines only
    
    This patch was discussed with Jonathan on a QA conversation. It is
    better to keep this simpler and more reusable. And is the right approach
    in this case.
    
    This patch makes Koha::Account::outstanding_credits return the account
    lines, code that used the $total value, will just use
    
        $lines->total_outstanding;
    
    Tests are adjusted accordingly.
    
    To test:
    - Run:
      $ kshell
     k$ prove t/db_dependent/Koha/Account.t
    => SUCCESS: Test pass.
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 9bfb3bc3782dd6b516d0144074b57e55cbefae2e)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit d5ab20c1c9a6feaba592700ed4b4be87ae6f8ff2
Author: Kyle M Hall <kyle at bywatersolutions.com>
Date:   Tue Jun 26 14:31:40 2018 +0000

    Bug 20990: Make same changes that were made to outstanding_debits
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 3e0aa0f3191a570dceb834e4036932d9af3c820e)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 1739fbf44b659d7a3891f2d3aea740552cd9b0a2
Author: Josef Moravec <josef.moravec at gmail.com>
Date:   Mon Jun 25 18:57:20 2018 +0000

    Bug 20990: (follow-up) Fix test description
    
    Test plan:
    prove -v t/db_dependent/Koha/Account.t
    --> Test message of first test of subtest outtanding_credits correctly says
    "Outstanding credits total..."
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 9d596553369b2500d0e629aec1b085aa3836190a)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 3e1519beccd65550763f664ce5c734a39610ccac
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Mon Jun 25 11:15:14 2018 -0300

    Bug 20990: Add Koha::Account->outstanding_credits
    
    This patch adds a method that retrieves (for a patron's account) the
    outstanding credits (i.e. those that haven't been applied to any debit.
    
    To test:
    - Apply this patches
    - Run:
      $ kshell
     k$ prove t/db_dependent/Koha/Account.t
    => SUCCESS: Tests pass!
    - Sign off :-D
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 4ee390cbb7ce0726c4d80c4581ef1a387abb47ce)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 266f6f55bf4ba26c287d2258825463861456bf86
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Mon Jun 25 11:15:08 2018 -0300

    Bug 20990: Unit tests for Koha::Account->outstanding_credits
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 0fb5019b7142396f0cd2cec1132dba767b0c64b2)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 2105982b1a1c2b4e5ebbb8968679fd47b43f5670
Author: Nick Clemens <nick at bywatersolutions.com>
Date:   Fri Jul 6 12:56:54 2018 +0000

    Bug 20980: DBRev 18.05.02.001
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 64761e56ccfbf98844d2fc8c7aa68ee608a2b162)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 8063bec2a87ecab7e5bd6d58ea7b1add9a5986f3
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Fri Jul 6 09:22:29 2018 -0300

    Bug 20980: (QA follow-up) Do not delete existing data on tests fix
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 8a83f1e1a975368c006c698f94357975333fd2d6)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 450a2e75927d2aff4b7ad2d4643dd253972c9f1c
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Sat Jun 23 07:41:15 2018 -0300

    Bug 20980: (follow-up) Offset name consistency
    
    This patch makes 'credit' account types generate 'Manual Credit' offset.
    The original patch used 'Payment' but I think the code wants to
    distinguish between payments and manually added credits (otherwise they
    would've picked the same accounttype value, and they don't.
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 65aacc1b1ded569a259f45c3abd5d1a73c3f37e6)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 3572fd14045ddf0d5025c932c23380671d623569
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Fri Jun 22 12:24:33 2018 -0300

    Bug 20980: (follow-up) Only use UpdateStats for 'payment' and 'writeoff'
    
    This patch makes Koha::Account::add_credit record statistics logs
    (through C4::Stats::UpdateStats) only for the 'payment' and 'writeoff'
    credit types.
    
    Both credit types are whitelisted in UpdateStats, so we keep the current
    behaviour. Another option would've been to add new account types to the
    white list, but with the account offsets it seems that using the
    statistics table for account changes won't be useful for too long, as
    offsets contain the same (and more) information.
    
    To test:
    - Apply the patch
    - Run:
      $ kshell
     k$ prove t/db_dependent/Koha/Account.t
    => SUCCESS: Tests pass!
    - Sign off :-D
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 7b6c242d972e3edf5b4d75d6023a0ae1dc9d1f9d)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 665faa45e7178d0fe916125246986f81bc8e1103
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Fri Jun 22 12:23:47 2018 -0300

    Bug 20980: Make mancredit.pl use Koha::Account::add_credit
    
    This patch makes creating a manual credit from the UI record the account
    offset as 'Manual Credit', and properly set account_offsets.credit_id
    instead of account_offsets.debit_id.
    
    To test:
    - Create a manual credit (of 'Credit' type) for a known patron (acevedo?)
    - Run:
      $ sudo koha-mysql kohadev
      > SELECT * FROM account_offsets;
    => FAIL: The account offset for the manual credit has type=Manual Debit,
        credit_id=NULL and debit_id=accountlines_id
    - Run the atomic update:
      $ updatedatabase
    - Run:
      $ sudo koha-mysql kohadev
      > SELECT * FROM account_offsets;
    => SUCCESS: The account offset has been corrected and now has
    type=Manual Credit, credit_id=accountlines_id and debit_id=NULL
    - Create a new manual credit (of 'Forgiven' type) for a known patron
    - Run:
      $ sudo koha-mysql kohadev
      > SELECT * FROM account_offsets;
    => SUCCESS: The account offset has been stored correctly as a credit!
    - Sign off :-D
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit cc30dc39bf3c8f627865c1a4891fac534266dc03)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 359a045cfc331cf2a928fbe0cff11792c8a6959c
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Thu Jun 21 14:43:34 2018 -0300

    Bug 20980: Add 'Manual Credit' and fix existing offsets
    
    This patch adds a new offset type 'Manual Credit'. And adds an atomic
    update for fixing existing offsets.
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit f7ed22d25372bb7a68dcbf1a744b81aeb8657b0a)
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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

Summary of changes:
 Koha.pm                                            |    2 +-
 Koha/Account.pm                                    |  160 ++++++++++++++++++
 Koha/REST/V1/Patrons/Account.pm                    |  165 ++++++++++++++++++
 api/v1/swagger/definitions.json                    |    7 +-
 api/v1/swagger/definitions/account_line.json       |   81 +++++++++
 api/v1/swagger/definitions/patron_balance.json     |   40 +++++
 api/v1/swagger/paths.json                          |    3 +
 api/v1/swagger/paths/patrons_account.json          |   65 +++++++
 installer/data/mysql/account_offset_types.sql      |    1 +
 installer/data/mysql/updatedatabase.pl             |   40 +++++
 .../prog/en/includes/account_offset_type.inc       |    1 +
 .../prog/en/modules/members/mancredit.tt           |    4 +-
 members/mancredit.pl                               |   32 ++--
 t/db_dependent/Koha/Account.t                      |  112 +++++++++++-
 t/db_dependent/api/v1/patrons_accounts.t           |  178 ++++++++++++++++++++
 15 files changed, 875 insertions(+), 16 deletions(-)
 create mode 100644 Koha/REST/V1/Patrons/Account.pm
 create mode 100644 api/v1/swagger/definitions/account_line.json
 create mode 100644 api/v1/swagger/definitions/patron_balance.json
 create mode 100644 api/v1/swagger/paths/patrons_account.json
 create mode 100644 t/db_dependent/api/v1/patrons_accounts.t


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list