koha-equinox.git
4 years agoBug 23655: Restore debian Jessie support
Martin Renvoize [Sat, 26 Oct 2019 10:58:18 +0000]
Bug 23655: Restore debian Jessie support

Bug 14570 inadveratntly introduced the use of selectall_array; A feature
that was introduced to DBI version 1.635 which is not available in
debian jessie at the time of writing.

This patch replaces the call with selectall_arrayref which is supported
and works with the rest of the existing code.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: Use floating time zone to prevent tests to fail because of DST
Jonathan Druart [Fri, 25 Oct 2019 13:28:49 +0000]
Bug 23382: Use floating time zone to prevent tests to fail because of DST

Today Friday Oct 25th, DST next Sunday => Date math are wrong, 96 hours
diff becomes 95.
To avoid that we use the floating timezone

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: (follow-up) Ensure closed day is inside charge window
Martin Renvoize [Fri, 25 Oct 2019 10:29:58 +0000]
Bug 23382: (follow-up) Ensure closed day is inside charge window

We're testing with an hourly loan of 96 hours to catch a closed day.
However, our closed day was hard coded to be a Wednesday so if you ran
the tests on a Friday the 96 hour loan would not catch a Wednesday.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: hours_between should match the logic of days_between
Martin Renvoize [Wed, 16 Oct 2019 12:10:43 +0000]
Bug 23382: hours_between should match the logic of days_between

The loops for subtraction holiday dates in hours_between and
days_between differed and as such their handling of start and end
boundaries for days also differed.  This patch makes them handle the
boundary days consistently.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: Truncate dates to minutes for comparison.
Martin Renvoize [Wed, 16 Oct 2019 12:08:23 +0000]
Bug 23382: Truncate dates to minutes for comparison.

It's somewhat of a mess in C4::Circulation as to when dates are
truncated and when they are not and as such Koha::Charges::Fees could
not reliably assume that the dates passed in were consistent with each
other. As such, we take the approach of always truncating to the
greatest minute smaller than the passed in dates so we are comparing
like for like.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: (follow-up) Further improve test coverage
Martin Renvoize [Wed, 16 Oct 2019 10:44:11 +0000]
Bug 23382: (follow-up) Further improve test coverage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: (follow-up) Ensure tests pass on Wednesdays
Martin Renvoize [Wed, 2 Oct 2019 10:20:27 +0000]
Bug 23382: (follow-up) Ensure tests pass on Wednesdays

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: (follow-up) Clarify variable names
Martin Renvoize [Thu, 19 Sep 2019 13:48:45 +0000]
Bug 23382: (follow-up) Clarify variable names

This patch updates the variable name '$branch' to '$branchcode' in a
number of places to make it clearer what the variable contains.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: Fix logic in C4::Circulation::CanBookBeIssued
Martin Renvoize [Fri, 16 Aug 2019 07:32:55 +0000]
Bug 23382: Fix logic in C4::Circulation::CanBookBeIssued

It looks like over progressive rebases of bug 20912 a clause was lost
within CanBookBeIssued such that a fatal error may be triggered if an
item with no corresponding itemtype was passed into the routine.

Additionally the we were passing a Koha::Library object to CalcDateDue
rather than a branchcode which resulted in a different duedate being
used in 'CanBookBeIssued' when compared to 'AddIssue'.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: Add hourly tests for Circulation
Martin Renvoize [Thu, 15 Aug 2019 13:57:08 +0000]
Bug 23382: Add hourly tests for Circulation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: Add tests for hourly calculations
Martin Renvoize [Tue, 6 Aug 2019 14:23:39 +0000]
Bug 23382: Add tests for hourly calculations

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23382: Improve test coverage
Martin Renvoize [Tue, 6 Aug 2019 13:38:28 +0000]
Bug 23382: Improve test coverage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: (follow-up) Database update corrections
Martin Renvoize [Sat, 26 Oct 2019 06:48:49 +0000]
Bug 23805: (follow-up) Database update corrections

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: (QA follow-up) Only remove guarantor relationship if not Child AND not...
Nick Clemens [Fri, 25 Oct 2019 18:22:01 +0000]
Bug 17168: (QA follow-up) Only remove guarantor relationship if not Child AND not Professional

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: (RM follow-up) Update for bug 14570
Martin Renvoize [Fri, 25 Oct 2019 16:02:59 +0000]
Bug 17168: (RM follow-up) Update for bug 14570

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: (follow-up) QA concerns and rebase issues
Nick Clemens [Fri, 19 Jul 2019 21:21:06 +0000]
Bug 17168: (follow-up) QA concerns and rebase issues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: Remove j2a.pl
Nick Clemens [Thu, 25 Apr 2019 19:23:58 +0000]
Bug 17168: Remove j2a.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: Add Koha:Script -cron, remove Dumper
Nick Clemens [Thu, 25 Apr 2019 19:23:36 +0000]
Bug 17168: Add Koha:Script -cron, remove Dumper

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: (follow-up) Address QA concerns and update for strict mode
Nick Clemens [Thu, 28 Feb 2019 13:56:04 +0000]
Bug 17168: (follow-up) Address QA concerns and update for strict mode

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: (follow-up) Clean up QA errors
Nick Clemens [Mon, 16 Jul 2018 11:03:57 +0000]
Bug 17168: (follow-up) Clean up QA errors

Cleanup variable names
Remove Dumper

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: (follow-up) Tidy, clean params/options, use date tools
Nick Clemens [Thu, 31 May 2018 10:55:18 +0000]
Bug 17168: (follow-up) Tidy, clean params/options, use date tools

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 17168: Add a command line script for updating patron category based on status
Nick Clemens [Wed, 15 Feb 2017 16:34:04 +0000]
Bug 17168: Add a command line script for updating patron category based on status

This patch adds a new script update_patrons_category.pl which allows for
updating patron categories in a batch upon meeting provided criteria.
This script additionally can replace j2a.pl.

To test:
1 - perl update_patrons_category.pl -h
2 - Ensure help text makes sense and covers all options
3 - Test converting patrons supplying only fromcat and tocat
    perl update_patrons_category.pl -f PT -t J -v --confirm
    perl update_patrons_category.pl -f J -t PT -v --confirm
4 - All patrons should have been switched to and from Juveniles
5 - Try without --confirm switch
    perl update_patrons_category.pl -f PT -t J -v
6 - Should list all patrons but not update
7 - Set the age for juvenile patrons to be outside the range provided in
categories (or set the upper age limit for juveniles to '2')
8 - Test with verbosity and with without --confirm
    perl update_patrons_category.pl -f J -a -t PT -v
    perl update_patrons_category.pl -f J -a -t PT -v --confirm
9 - Repeat above and verify linked/unlinked guarantors are removed in above scenario
10 - Test various fine and registration limits
11 - Test matching on specific fields i.e. --field surname=acosta
12 - Sign off

Sponsored by: Round Rock Public Library
(https://www.roundrocktexas.gov/departments/library/)
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23529: (QA follow-up) Fix closing bracket, add label
Nick Clemens [Fri, 25 Oct 2019 11:31:46 +0000]
Bug 23529: (QA follow-up) Fix closing bracket, add label

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23529: (follow-up) Fix syntax error
Andrew Isherwood [Thu, 24 Oct 2019 11:26:44 +0000]
Bug 23529: (follow-up) Fix syntax error

As mentioned by Magnus in comment #8

Sorry Magnus, definitely fixed this time!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23529: Narrow scope of changed
Andrew Isherwood [Mon, 2 Sep 2019 08:29:14 +0000]
Bug 23529: Narrow scope of changed

Whilst working on something else, it came to light that the previous fix
in bug 23229 was waaaaay too heavy handed and basically kills all ILL
related JS :( This is obviously a big problem, this patch fixes that.

The main problem is that all the ILL related JS is in a single file,
which isn't ideal as bits of it are used on different pages. Ideally,
we'd refactor it out into more manageable chunks which can be included
as required. Until such a time, this patch will do, it just prevents the
"get all requests" AJAX request unless you're on the ILL list page.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 18743: Correct number of pending suggestions (acq home page)
Jonathan Druart [Sun, 20 Oct 2019 08:16:51 +0000]
Bug 18743: Correct number of pending suggestions (acq home page)

This patch could be moved to its own bug report if we want to adjust
tests.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 18743: Fix suggestion listing when organized by library
Jonathan Druart [Wed, 16 Oct 2019 14:43:46 +0000]
Bug 18743: Fix suggestion listing when organized by library

There are some weird behaviors happening when using the "Organize by:
library" dropdown along with the library filter (in the "Acquisition
information" box).

I am suggesting the following test plan:
0. Create several suggestion from different libraries

A. You are superlibrarian and IndependentBranches is not set (=No)
1. Hit /suggestion/suggestion.pl
=> Default view shows the suggestions from your library
2. Filter by another library
=> You see the suggestions from this library
3. Filter by "Any" libraries
=> You see all the suggestions
4. "Organize by library"
=> You see all the suggestions, organized by library
5. Filter by a specific library
=> You see the suggestion from your library, all in one tab

B. You are not superlibrarian and IndependentBranches is not set (=No)
Same as A.

C. You are superlibrarian and IndependentBranches is set
Same as A.

D. You are not superlibrarian and IndependentBranches is set
You will never see suggestions coming from outside your library

QA: To be clear: the whole script needs a rewrite, but here we are just
trying to fix weird behaviors.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23579: (RM follow-up) Fix failing tests
Martin Renvoize [Fri, 25 Oct 2019 12:12:38 +0000]
Bug 23579: (RM follow-up) Fix failing tests

Removing the default on changed_fields leads to the requirement for
tests to specify data to add to said field when mocking data.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23579: Remove default value for MEDIUMTEXT borrower_modifications.changed_fields
Jonathan Druart [Fri, 25 Oct 2019 08:15:42 +0000]
Bug 23579: Remove default value for MEDIUMTEXT borrower_modifications.changed_fields

Installation under Ubuntu 18.04 is blocked:
install.pl: DBD::mysql::st execute failed: BLOB, TEXT, GEOMETRY or JSON
column 'changed_fields' can't have a default value at
/usr/local/share/perl5/DBIx/RunSQL.pm line 273.

https://dev.mysql.com/doc/refman/5.7/en/data-type-defaults.html
"""
 The BLOB, TEXT, GEOMETRY, and JSON data types cannot be assigned a
 default value.
"""

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23413: Fix tests
Jonathan Druart [Fri, 25 Oct 2019 09:42:50 +0000]
Bug 23413: Fix tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: (RM follow-up) Correction to sql installer file
Martin Renvoize [Fri, 25 Oct 2019 08:36:59 +0000]
Bug 23805: (RM follow-up) Correction to sql installer file

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: DBRev 19.06.00.044
Martin Renvoize [Thu, 24 Oct 2019 16:30:43 +0000]
Bug 23805: DBRev 19.06.00.044

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: (QA follow-up) Add missing mappings in Koha::Account::Line
Tomas Cohen Arazi [Thu, 24 Oct 2019 15:53:11 +0000]
Bug 23805: (QA follow-up) Add missing mappings in Koha::Account::Line

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: (follow-up) Handle unexpected types
Martin Renvoize [Tue, 15 Oct 2019 11:00:41 +0000]
Bug 23805: (follow-up) Handle unexpected types

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Update mancredit to use the new credit types
Martin Renvoize [Tue, 15 Oct 2019 08:45:33 +0000]
Bug 23805: Update mancredit to use the new credit types

Test plan
Ensure the manual credit page continues to work as it did before this
patchset.

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: (follow-up) Lowercase credit type for UpdateStats
Martin Renvoize [Mon, 14 Oct 2019 17:19:18 +0000]
Bug 23805: (follow-up) Lowercase credit type for UpdateStats

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Drop type lookup as it's now a foreign key
Martin Renvoize [Mon, 14 Oct 2019 17:01:55 +0000]
Bug 23805: Drop type lookup as it's now a foreign key

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Update 'W' to 'WRITEOFF' for consistency
Martin Renvoize [Mon, 14 Oct 2019 16:07:11 +0000]
Bug 23805: Update 'W' to 'WRITEOFF' for consistency

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Update 'Pay' to 'PAYMENT' for consistency
Martin Renvoize [Mon, 14 Oct 2019 15:54:56 +0000]
Bug 23805: Update 'Pay' to 'PAYMENT' for consistency

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Update 'lost_item_return' to 'LOST_RETURN' for consistency
Martin Renvoize [Mon, 14 Oct 2019 15:36:34 +0000]
Bug 23805: Update 'lost_item_return' to 'LOST_RETURN' for consistency

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Update 'FOR' to 'FORGIVEN' for consistency
Martin Renvoize [Mon, 14 Oct 2019 15:33:43 +0000]
Bug 23805: Update 'FOR' to 'FORGIVEN' for consistency

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Update 'C' to 'CREDIT' for consistency
Martin Renvoize [Mon, 14 Oct 2019 15:20:31 +0000]
Bug 23805: Update 'C' to 'CREDIT' for consistency

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Update accounttype references in tests
Martin Renvoize [Mon, 14 Oct 2019 10:42:57 +0000]
Bug 23805: Update accounttype references in tests

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Update references to accounttype to credit_type_code
Martin Renvoize [Mon, 14 Oct 2019 10:27:31 +0000]
Bug 23805: Update references to accounttype to credit_type_code

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: DBIC Classes
Martin Renvoize [Tue, 15 Oct 2019 08:43:46 +0000]
Bug 23805: DBIC Classes

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23805: Add account_credit_types tables
Martin Renvoize [Mon, 14 Oct 2019 09:57:13 +0000]
Bug 23805: Add account_credit_types tables

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: DBRev 19.06.00.043
Martin Renvoize [Thu, 24 Oct 2019 16:28:40 +0000]
Bug 23049: DBRev 19.06.00.043

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (follow-up) Remove duplicate of mandatory data
Martin Renvoize [Thu, 24 Oct 2019 08:41:52 +0000]
Bug 23049: (follow-up) Remove duplicate of mandatory data

This patchset originally introduced the manadatory data into
/en/mandatory/account_debit_types.sql. However, it was later decided to
maintain the system types description strings in the templates and as
such the database data file was moved to the top level.  This patch
removes the now superflous /en/mandatory version.

Once we have the sql files easily translated via the standard
translate.koha-community.org toolchain we should restore this approach
and update the templates to use the descriptions from the database.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Catch '0' case debits
Martin Renvoize [Wed, 23 Oct 2019 15:40:31 +0000]
Bug 23049: (QA follow-up) Catch '0' case debits

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Explicitly set accounttype/debit_type in tests
Martin Renvoize [Wed, 23 Oct 2019 15:39:39 +0000]
Bug 23049: (QA follow-up) Explicitly set accounttype/debit_type in tests

This patch corrects an incorrect ternary and move the definitions into
the test_data array to clarify their intent.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Silence noisy warnings
Martin Renvoize [Wed, 23 Oct 2019 15:23:48 +0000]
Bug 23049: (QA follow-up) Silence noisy warnings

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Add DBIC Classes
Martin Renvoize [Wed, 23 Oct 2019 13:51:28 +0000]
Bug 23049: Add DBIC Classes

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Fix for missing types in test inserts
Martin Renvoize [Wed, 23 Oct 2019 13:16:20 +0000]
Bug 23049: (QA follow-up) Fix for missing types in test inserts

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) ILSDI test data correction
Martin Renvoize [Wed, 23 Oct 2019 12:22:12 +0000]
Bug 23049: (QA follow-up) ILSDI test data correction

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Fix swagger spec for account line
Martin Renvoize [Tue, 22 Oct 2019 10:14:43 +0000]
Bug 23049: (QA follow-up) Fix swagger spec for account line

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Check constraint test corrections
Martin Renvoize [Mon, 21 Oct 2019 17:37:07 +0000]
Bug 23049: (QA follow-up) Check constraint test corrections

TestBuilder adds random data which breaks the check constraint rule. The
simplest way to correct this situation is to override testbuilder by
passing in explicit undefs for accounttype or debit_type_code in the
tests.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Correction for missed archived filter
Martin Renvoize [Mon, 21 Oct 2019 13:51:39 +0000]
Bug 23049: (QA follow-up) Correction for missed archived filter

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Correction to patrons_accounts.t
Martin Renvoize [Fri, 18 Oct 2019 12:24:48 +0000]
Bug 23049: (QA follow-up) Correction to patrons_accounts.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) Correction for 'M' => 'MANUAL'
Martin Renvoize [Fri, 18 Oct 2019 12:12:39 +0000]
Bug 23049: (QA follow-up) Correction for 'M' => 'MANUAL'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (QA follow-up) DB Update Improvements
Martin Renvoize [Fri, 18 Oct 2019 12:02:16 +0000]
Bug 23049: (QA follow-up) DB Update Improvements

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (follow-up) Types should not be deletable
Martin Renvoize [Thu, 17 Oct 2019 11:28:18 +0000]
Bug 23049: (follow-up) Types should not be deletable

This patch rmeoves the 'delete' option from the debit_types system and
replaces it with an 'archive/restore' workflow. This will help
maintained referential integrity.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (follow-up) Handle unexpected types
Martin Renvoize [Tue, 15 Oct 2019 11:00:24 +0000]
Bug 23049: (follow-up) Handle unexpected types

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (follow-up) Correction to includes
Martin Renvoize [Mon, 14 Oct 2019 10:30:48 +0000]
Bug 23049: (follow-up) Correction to includes

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: (follow-up) VARCHAR(80) + ac -> account
Martin Renvoize [Fri, 11 Oct 2019 11:33:55 +0000]
Bug 23049: (follow-up) VARCHAR(80) + ac -> account

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: More thorough param checking
Martin Renvoize [Fri, 11 Oct 2019 07:20:24 +0000]
Bug 23049: More thorough param checking

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Update API
Martin Renvoize [Thu, 10 Oct 2019 16:09:21 +0000]
Bug 23049: Update API

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Drop type lookup as it's now a foreign key
Martin Renvoize [Thu, 10 Oct 2019 15:58:23 +0000]
Bug 23049: Drop type lookup as it's now a foreign key

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Update 'N' to 'NEW_CARD' for consistency
Martin Renvoize [Thu, 10 Oct 2019 15:53:52 +0000]
Bug 23049: Update 'N' to 'NEW_CARD' for consistency

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Capitalise type passed to add_debit for `overdue`
Martin Renvoize [Thu, 10 Oct 2019 15:48:41 +0000]
Bug 23049: Capitalise type passed to add_debit for `overdue`

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Remove manual_debit as it's never called
Martin Renvoize [Thu, 10 Oct 2019 15:43:48 +0000]
Bug 23049: Remove manual_debit as it's never called

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Capitalise type passed to add_debit for lost_item
Martin Renvoize [Thu, 10 Oct 2019 15:41:22 +0000]
Bug 23049: Capitalise type passed to add_debit for lost_item

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Update 'HE' to 'RESERVE_EXPIRED' for consistency
Martin Renvoize [Thu, 10 Oct 2019 15:38:24 +0000]
Bug 23049: Update 'HE' to 'RESERVE_EXPIRED' for consistency

This patch updates all cases where debit_type_code was 'HE' to
'RESERVE_EXPIRED' which is more informative and consistent with the
new style guidelines.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Capitalise type passed to add_debit for `account`
Martin Renvoize [Thu, 10 Oct 2019 15:31:17 +0000]
Bug 23049: Capitalise type passed to add_debit for `account`

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Update 'PF' to 'PROCESSING' for consistency
Martin Renvoize [Thu, 10 Oct 2019 16:15:39 +0000]
Bug 23049: Update 'PF' to 'PROCESSING' for consistency

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Capitalise type passed to add_debit for `rent`
Martin Renvoize [Thu, 10 Oct 2019 15:17:48 +0000]
Bug 23049: Capitalise type passed to add_debit for `rent`

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Update debit_type_code 'Res' to 'RESERVE'
Martin Renvoize [Thu, 10 Oct 2019 15:10:07 +0000]
Bug 23049: Update debit_type_code 'Res' to 'RESERVE'

This patch updates all cases where debit_type_code was 'Res' to
'RESERVE' which is more informative and consistent with the new style
guidelines.

The patch also ensure all calls to add_debit with a type or 'reserve'
now pass the capitalised code instead.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Update existing code to use debit_type
Martin Renvoize [Thu, 10 Oct 2019 16:15:10 +0000]
Bug 23049: Update existing code to use debit_type

* Update C4::Accounts::chargelostitem
* Update C4::Accounts::manualinvoice
* Update C4::Circulation::_FixOverduesOnReturn
* Update C4::Circulation::_FixAccountForLostAndReturned
* Update C4::Overdues::UpdateFine
* Update C4::Overdues::GetFine
* Update C4::Overdues::GetOverduesForBranch
* Update Koha::Account->pay
* Update Koha::Account->add_debit
* Update Koha::Account->non_issues_charges
* Update Koha::Account::Line->apply
* Update Koha::Account::Line->adjust
* Update controller scripts
* Update reports scripts
* Update tests

Test Plan
1) Run the test suit and ensure everything still passes
2) Test reports/cash_register_stats still works
3) Test that adding manual invoices still works
4) Test that making payments still works
5) Test that lost item fee handling still works
6) Test that invoice printing still works
7) Test that the sco still works

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Add tests
Martin Renvoize [Thu, 10 Oct 2019 16:14:47 +0000]
Bug 23049: Add tests

Test plan:
  prove t/db_dependent/Koha/Account/DebitType.t
  prove t/db_dependent/Koha/Account/DebitTypes.t

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Update maninvoice to reference debit types
Martin Renvoize [Thu, 10 Oct 2019 16:14:39 +0000]
Bug 23049: Update maninvoice to reference debit types

Test plan:
1) Naviage to a patron record and select the accounts > manual invoice
   tab
2) Add some manual invoices and confirm they are working as expected
3) Signoff

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Filter out system types by default
Martin Renvoize [Thu, 10 Oct 2019 08:08:55 +0000]
Bug 23049: Filter out system types by default

Test Plan
1) Navigate to the debit types management page added in previous patches
2) Note that system types are now filtered out by default
3) Click on the new unfilter button to include system types
4) Signoff

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Account types configuration - Admin page
Martin Renvoize [Thu, 10 Oct 2019 16:14:23 +0000]
Bug 23049: Account types configuration - Admin page

Test plan:
1) Go to admin home, note there is new Debit types page in Accounting
   section
2) Go to any other admin page and confirm there is link to Debit types
   in the admin menu as well
3) Go to Debit types page
4) You should see a datatable listing existing debit types, ensure they
   are working as expected.
5) Try to create, edit and delete some debit types. Note: Some debit
   types cannot be deleted as they are needed for koha functionality.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Add CHECK constraint to accountlines
Martin Renvoize [Thu, 26 Sep 2019 13:36:06 +0000]
Bug 23049: Add CHECK constraint to accountlines

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23049: Add debit_type
Martin Renvoize [Thu, 28 Feb 2019 16:58:06 +0000]
Bug 23049: Add debit_type

* Add account_debit_types table
* Add ac_debit_types_branches table
* Add account_debit_types defaults
* Add Koha::Account::DebitType and Koha::Account::DebitTypes
* Prevent deletion of defaults
* Migrate MANUAL_INV values
* Remove MANUAL_INV references
* Migrate accounttype values

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23152: Fix more pluralisation (and add tests)
Jonathan Druart [Tue, 25 Jun 2019 22:26:13 +0000]
Bug 23152: Fix more pluralisation (and add tests)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23413: Remove wrong return
Nick Clemens [Thu, 24 Oct 2019 15:40:47 +0000]
Bug 23413: Remove wrong return

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23413: Update tests to use build_sample_biblio
Nick Clemens [Tue, 3 Sep 2019 11:20:24 +0000]
Bug 23413: Update tests to use build_sample_biblio

Before these changes the tests fail if run under Elasticsearch

This makes sure they pass either way

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23413: (follow-up) Rename variables
Nick Clemens [Tue, 3 Sep 2019 11:14:24 +0000]
Bug 23413: (follow-up) Rename variables

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23863: Add signoff line for recognition
Martin Renvoize [Thu, 24 Oct 2019 12:50:35 +0000]
Bug 23863: Add signoff line for recognition

Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23633: Hide paid transactions by default on the OPAC
Martin Renvoize [Tue, 22 Oct 2019 11:38:50 +0000]
Bug 23633: Hide paid transactions by default on the OPAC

This patch adds filtering on paid for type transactions to the OPAC
accounts page.  The filtering is enabled by default but may be toggled
to show historical transactions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23392: Don't display private notes in MARC21
Nick Clemens [Mon, 29 Jul 2019 13:19:19 +0000]
Bug 23392: Don't display private notes in MARC21

To test:
1 - Add some notes to a record in fields 541,542,561,583,590
2 - Ensure all of these are visible in the frameworks
3 - Note they appear in the 'Title notes'/'Description' tabs on OPAC/Staff client
4 - Mark first indicator '0' on all notes
5 - They still display
6 - Apply patch
7 - Notes no longer show on OPAC
8 - Notes still show on Staff client
9 - prove -v t/Biblio/GetMarcNotes.t

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23863: (QA follow-up) Add missing html filter
Katrin Fischer [Mon, 21 Oct 2019 22:08:45 +0000]
Bug 23863: (QA follow-up) Add missing html filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23863: Editing a basket clears create_items value
Kyle M Hall [Tue, 22 Oct 2019 18:07:46 +0000]
Bug 23863: Editing a basket clears create_items value

Test Plan:
1) Create a basket with a non-default value for aqbasket.create_items
2) Click Edit from basket.pl
3) Click Save without changing anything
4) Note that aqbasket.create_items is no longer set
5) Apply this patch
6) Restart all the things!
7) Repeat steps 1-3
8) Note create_items is unchanged!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23855: Fix "Mark selected suggestion as" status
Jonathan Druart [Mon, 21 Oct 2019 15:55:17 +0000]
Bug 23855: Fix "Mark selected suggestion as" status

On the suggestions management page (suggestion/suggestion.pl) you can
select suggestions and change their status.
But it only works for "ACCEPTED" or "REJECTED".

Maybe caused by bug 22905.

Test plan:
Select at least one suggestion on the screen and select the "Pending"
status.
=> The status of the selected suggestions must have been updated

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23843: Add mapping to Koha::Acquisition::Fund
Tomas Cohen Arazi [Mon, 21 Oct 2019 16:47:50 +0000]
Bug 23843: Add mapping to Koha::Acquisition::Fund

This patch adds a to_api_mapping method to the class. This in effect
enables calling ->to_api on the object. The mapping is borrowed from the
API controller. It is not removed from the controller so we are able to
verify (through the tests) that there is no behavior change.
Once this is pushed we need to implement the counter-wise methods and
clean the controllers.
To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/acquisitions_funds.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23843: Add mapping to Koha::Acquisition::Bookseller
Tomas Cohen Arazi [Mon, 21 Oct 2019 16:29:47 +0000]
Bug 23843: Add mapping to Koha::Acquisition::Bookseller

This patch adds a to_api_mapping method to the class. This in effect
enables calling ->to_api on the object. The mapping is borrowed from the
API controller. It is not removed from the controller so we are able to
verify (through the tests) that there is no behavior change.
Once this is pushed we need to implement the counter-wise methods and
clean the controllers.
To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23843: Add mapping to Koha::Item
Tomas Cohen Arazi [Mon, 21 Oct 2019 16:27:25 +0000]
Bug 23843: Add mapping to Koha::Item

This patch adds a to_api_mapping method to the class. This in effect
enables calling ->to_api on the object. The mapping is borrowed from the
API controller. It is not removed from the controller so we are able to
verify (through the tests) that there is no behavior change.
Once this is pushed we need to implement the counter-wise methods and
clean the controllers.
To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/items.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23843: Add mapping to Koha::Patron
Tomas Cohen Arazi [Mon, 21 Oct 2019 16:27:11 +0000]
Bug 23843: Add mapping to Koha::Patron

This patch adds a to_api_mapping method to the class. This in effect
enables calling ->to_api on the object. The mapping is borrowed from the
API controller. It is not removed from the controller so we are able to
verify (through the tests) that there is no behavior change.
Once this is pushed we need to implement the counter-wise methods and
clean the controllers.
To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23843: Add mapping to Koha::Library
Tomas Cohen Arazi [Mon, 21 Oct 2019 16:26:57 +0000]
Bug 23843: Add mapping to Koha::Library

This patch adds a to_api_mapping method to the class. This in effect
enables calling ->to_api on the object. The mapping is borrowed from the
API controller. It is not removed from the controller so we are able to
verify (through the tests) that there is no behavior change.
Once this is pushed we need to implement the counter-wise methods and
clean the controllers.
To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/libraries.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23843: Add mapping to Koha::Hold
Tomas Cohen Arazi [Mon, 21 Oct 2019 16:26:07 +0000]
Bug 23843: Add mapping to Koha::Hold

This patch adds a to_api_mapping method to the class. This in effect
enables calling ->to_api on the object. The mapping is borrowed from the
API controller. It is not removed from the controller so we are able to
verify (through the tests) that there is no behavior change.
Once this is pushed we need to implement the counter-wise methods and
clean the controllers.
To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23843: Add mapping to Koha::Club::Holds
Tomas Cohen Arazi [Mon, 21 Oct 2019 16:25:34 +0000]
Bug 23843: Add mapping to Koha::Club::Holds

This patch adds a to_api_mapping method to the class. This in effect
enables calling ->to_api on the object. The mapping is borrowed from the
API controller. It is not removed from the controller so we are able to
verify (through the tests) that there is no behavior change.
Once this is pushed we need to implement the counter-wise methods and
clean the controllers.
To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/clubs_holds.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>