]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 23974: Improve readability
Jonathan Druart [Tue, 5 Nov 2019 14:18:38 +0000 (15:18 +0100)]
Bug 23974: Improve readability

This patch does not change anything, just a bit of cleaning

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21959: Add sponsor details
Martin Renvoize [Thu, 9 Jan 2020 16:52:23 +0000 (16:52 +0000)]
Bug 21959: Add sponsor details

Sponsored-by: City of Nîmes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24255: Add summation methods to Koha::Account::Lines
Martin Renvoize [Tue, 17 Dec 2019 15:58:21 +0000 (15:58 +0000)]
Bug 24255: Add summation methods to Koha::Account::Lines

This patch adds a number of summation methods to Koha::Account::Lines
giving quick access to overall total, total credits and total debits.

Test plan
1) Run the included tests

Signed-off-by: Kyle M 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 24257: Fix close of modal on 'Yes, print slip'
Jonathan Druart [Wed, 18 Dec 2019 09:37:00 +0000 (10:37 +0100)]
Bug 24257: Fix close of modal on 'Yes, print slip'

When a item-transfer-modal is prompted by returns.tt and the option
"Yes, print slip" is selected the transfer is not initiated and the
modal does not disappear.

The print_slip hidden input must be in the same form as the
submit/button .print, otherwise the browser logs
  this.form.print_slip is undefined

Test plan:
1. set AutomaticItemReturn to "don't"
2. Check out an item and attempt to check it in at a branch it doesn't
belong to.
3. When the popup modal appears select 'Yes, print slip'.
=> Observe that the transfer does initiate and the modal closes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18731: (QA follow-up) Spelling and POD corrections
Martin Renvoize [Thu, 9 Jan 2020 16:24:13 +0000 (16:24 +0000)]
Bug 18731: (QA follow-up) Spelling and POD corrections

Just a coulpe of very minor tweaks to keep the QA scripts happy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18731: OpenAPI definitions
Tomas Cohen Arazi [Wed, 4 Oct 2017 18:43:03 +0000 (15:43 -0300)]
Bug 18731: OpenAPI definitions

This patch introduces the OpenAPI definitions required for the orders
endpoint. It matches the voted RFC.

Sponsored-by: Camden County
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18731: Use the stashed koha.embed in objects.search
Tomas Cohen Arazi [Mon, 6 Jan 2020 16:00:26 +0000 (13:00 -0300)]
Bug 18731: Use the stashed koha.embed in objects.search

This patch makes the objects.search helper use the koha.embed structure
that is embedded in the authenticate_api_request step.

This way, any controller using it will benefit from automatic embed
handling.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18731: Add API mappings to K::A::{Basket,Invoice}
Tomas Cohen Arazi [Mon, 30 Dec 2019 18:36:57 +0000 (15:36 -0300)]
Bug 18731: Add API mappings to K::A::{Basket,Invoice}

This patch adds to_api_mapping definitions to the following classes:

- Koha::Acquisition::Basket
- Koha::Acquisition::Invoice

They are implemented following the proposed RFCs:
https://wiki.koha-community.org/wiki/Acquisitions_baskets_endpoint_RFC
https://wiki.koha-community.org/wiki/Acquisitions_invoices_endpoint_RFC

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18731: /acquisitions/orders endpoint
Tomas Cohen Arazi [Tue, 5 Sep 2017 19:44:43 +0000 (16:44 -0300)]
Bug 18731: /acquisitions/orders endpoint

This patches implement the /acquisitions/orders endpoint.

The attribute names are consistent with the voted RFC

To test:
1. Apply this patchset
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/acquisitions_orders.t
=> SUCCESS: Tests pass!
3. Test the API with your favourite tool (Postman?)
=> SUCCESS: It works as expected!
4 Sign off :-D

Sponsored-by: Camden County
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18731: Unit tests
Tomas Cohen Arazi [Tue, 5 Nov 2019 14:37:57 +0000 (11:37 -0300)]
Bug 18731: Unit tests

This patch implements unit tests for the orders endpoint.

Sponsored-by: Camden County
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18731: Make authenticate_api_request stash the embed structure
Tomas Cohen Arazi [Mon, 30 Dec 2019 18:34:43 +0000 (15:34 -0300)]
Bug 18731: Make authenticate_api_request stash the embed structure

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24302: Add a way to specify nested objects to embed in OpenAPI
Tomas Cohen Arazi [Mon, 23 Dec 2019 13:26:04 +0000 (10:26 -0300)]
Bug 24302: Add a way to specify nested objects to embed in OpenAPI

This patch introduces a helper for handling x-koha-embed headers on API
requests. It reads the embed definitions and adds them to the stash for
later use (either manually on the controllers, or in the objects.search
helper.

x-koha-embed needs to be defined as a list on the OpenAPI spec.

It throws an exception when invalid combinations are found.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Query.t
=> SUCCESS: Tests pass!
3.Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24228: Make ->to_api params a hashref
Tomas Cohen Arazi [Mon, 23 Dec 2019 15:03:12 +0000 (12:03 -0300)]
Bug 24228: Make ->to_api params a hashref

This patch makes the parameters for Koha::Object(s)->to_api a hashref
preparing the ground for new parameters. The proposed syntax is:

$object->to_api(
    {
        embed => {
            'items' => {
                'children' => {
                    'homebranch' => {}
                }
            }
        }
    }
);

Tests are added for the Koha::Objects implementation and tests for
Koha::Object are adjusted to the new syntax, and a test for the single
result accessor is added as well.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Object.t t/db_dependent/Koha/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24228: Add parameters to Koha::Object(s)->to_api to automatically embed objects
Agustin Moyano [Thu, 19 Dec 2019 18:50:49 +0000 (15:50 -0300)]
Bug 24228: Add parameters to Koha::Object(s)->to_api to automatically embed objects

This patch makes Koha::Object(s)->to_api have an 'embeds' parameter that
using dot notation (e.g. resource.related_resource.another_one) allows
embedding objects recursively.

To test:
1. Apply this patch
2. prove t/db_dependent/Koha/Object.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24252: Add relations to Koha::Account::Line
Martin Renvoize [Fri, 13 Sep 2019 13:03:11 +0000 (14:03 +0100)]
Bug 24252: Add relations to Koha::Account::Line

This patch adds two new relationships to the Koha::Account::Line object.

* credit_offsets - returns all credit type Koha::Account::Offsets
  related to this Koha::Account::Line.
* debit_offsets - returns all debit type Koha::Account::Offsets related
  to this Koha::Account::Line.
* credits - returns all credits related to this Koha::Account::Line.
* debits - returns all debits related to this Koha::Account::Line.

Signed-off-by: Kyle M 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 24321: (follow-up) Fix number of tests in t/db_dependent/Koha/Objects.t
Josef Moravec [Tue, 7 Jan 2020 11:30:53 +0000 (11:30 +0000)]
Bug 24321: (follow-up) Fix number of tests in t/db_dependent/Koha/Objects.t

Test plan:
prove t/db_dependent/Koha/Objects.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /patrons
Tomas Cohen Arazi [Thu, 2 Jan 2020 14:04:10 +0000 (11:04 -0300)]
Bug 24321: Clean /patrons

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /holds
Tomas Cohen Arazi [Tue, 31 Dec 2019 15:53:26 +0000 (12:53 -0300)]
Bug 24321: Clean /holds

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /patrons/{patron_id}/account
Tomas Cohen Arazi [Tue, 31 Dec 2019 15:35:43 +0000 (12:35 -0300)]
Bug 24321: Clean /patrons/{patron_id}/account

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /items
Tomas Cohen Arazi [Tue, 31 Dec 2019 15:31:24 +0000 (12:31 -0300)]
Bug 24321: Clean /items

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /biblios
Tomas Cohen Arazi [Tue, 31 Dec 2019 15:26:46 +0000 (12:26 -0300)]
Bug 24321: Clean /biblios

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /checkouts
Tomas Cohen Arazi [Tue, 31 Dec 2019 14:50:36 +0000 (11:50 -0300)]
Bug 24321: Clean /checkouts

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /libraries
Tomas Cohen Arazi [Tue, 31 Dec 2019 14:07:37 +0000 (11:07 -0300)]
Bug 24321: Clean /libraries

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /acquisitions/vendors
Tomas Cohen Arazi [Tue, 31 Dec 2019 13:50:15 +0000 (10:50 -0300)]
Bug 24321: Clean /acquisitions/vendors

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /acquisitions/funds
Tomas Cohen Arazi [Tue, 31 Dec 2019 13:42:38 +0000 (10:42 -0300)]
Bug 24321: Clean /acquisitions/funds

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Clean /cities
Tomas Cohen Arazi [Tue, 31 Dec 2019 13:35:15 +0000 (10:35 -0300)]
Bug 24321: Clean /cities

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Make objects.search use mappings from Koha::Object(s)
Tomas Cohen Arazi [Tue, 31 Dec 2019 13:23:44 +0000 (10:23 -0300)]
Bug 24321: Make objects.search use mappings from Koha::Object(s)

This patch simplifies the objects.search helper so it relies entirely on
the result set object for the attribute mappings.

The result is no more to_api or to_model mappings are passed. The
controllers need to be cleaned up after this patch.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Note: the original version of this helpers accepted arbitrary mappings
and are now constrianed to real mappings on the Koha::Object level. As
such, the number of tests got reduced.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Make dbic_merge_sorting accept a result set as parameter
Tomas Cohen Arazi [Tue, 31 Dec 2019 12:48:54 +0000 (09:48 -0300)]
Bug 24321: Make dbic_merge_sorting accept a result set as parameter

This patch makes dbic_merge_sorting accept a result set as parameter and
solves a FIXME in _build_order_atom.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Query.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24321: Add Koha::Objects->attributes_from_api
Tomas Cohen Arazi [Tue, 31 Dec 2019 12:16:17 +0000 (09:16 -0300)]
Bug 24321: Add Koha::Objects->attributes_from_api

This patch makes the 'attributes_from_api' method from the singular
class available from the result set class.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Objects.t
=> SUCCESS: Tests pass!
4. Sign off :-D
5. Yeah, I skipped 3 :-P

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: Catch dt_from_string exceptions
Tomas Cohen Arazi [Fri, 27 Dec 2019 18:21:30 +0000 (15:21 -0300)]
Bug 23893: Catch dt_from_string exceptions

This patch adds exception handling to the attributes_from_api() method.
This can happen with invalid date/datetimes, for example.

Tests are added:

1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: Remove Overloaded method from Koha::Patron
Jonathan Druart [Fri, 27 Dec 2019 16:03:16 +0000 (17:03 +0100)]
Bug 23893: Remove Overloaded method from Koha::Patron

That way we are dealing with any date fields for any Koha::Object

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: (QA follow-up) Explicit date format
Tomas Cohen Arazi [Fri, 27 Dec 2019 15:15:39 +0000 (12:15 -0300)]
Bug 23893: (QA follow-up) Explicit date format

This patch makes the input date format explicit. It also adds a missing
POD.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: No special care for booleans
Jonathan Druart [Fri, 27 Dec 2019 14:21:27 +0000 (15:21 +0100)]
Bug 23893: No special care for booleans

Tests pass without that changes. If we need them they should be at
Koha::Object anyway.

About the date, I also think that that should be moved to Koha::Object
(we can guess it, like we do in Koha::Object->store, retrieve the
datatype and adjust). Also we can send a DT object to DBIC, no need for
an sql formatted date

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: Use in /patrons
Tomas Cohen Arazi [Tue, 12 Nov 2019 13:00:14 +0000 (10:00 -0300)]
Bug 23893: Use in /patrons

This patch makes the patrons endpoint use the new methods from
Koha::Object.

To test:
1. Apply this patch
2. Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: Use in /cities
Tomas Cohen Arazi [Tue, 12 Nov 2019 12:59:53 +0000 (09:59 -0300)]
Bug 23893: Use in /cities

This patch makes the cities controller use the new methods from
Koha::Object.

To test:
1. Apply this patch
2. Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: Add new_from_api and set_from_api to Koha::Object
Tomas Cohen Arazi [Mon, 11 Nov 2019 19:07:03 +0000 (16:07 -0300)]
Bug 23893: Add new_from_api and set_from_api to Koha::Object

This patch introduces the following methods to the Koha::Object class:
- set_from_api
- new_from_api

This methods are going to be used when writing API controllers that map
to the attributes to the DB schema ones.

To test:
1. Apply this patchset
2. Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: Implement Koha::Object->from_api_mapping
Tomas Cohen Arazi [Mon, 11 Nov 2019 18:03:28 +0000 (15:03 -0300)]
Bug 23893: Implement Koha::Object->from_api_mapping

This patch implements the from_api_mapping method, that calculates (and
caches) the reserve mapping from the to_api_mapping method.

A generic to_api_mapping is added to simplify things a bit in the generic
to_api method and so the mappings are reusable in the way they are in
from_api_mapping.

To test:
1. Apply this patches
2. Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23893: Unit tests
Tomas Cohen Arazi [Mon, 11 Nov 2019 18:03:29 +0000 (15:03 -0300)]
Bug 23893: Unit tests

This patch introduces tests for the implemented methods.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21959: allow only i and g regex modifiers
Alex Arnaud [Tue, 2 Apr 2019 14:14:39 +0000 (16:14 +0200)]
Bug 21959: allow only i and g regex modifiers

Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21959: use a link instead of a checkbox
Alex Arnaud [Tue, 2 Apr 2019 13:20:34 +0000 (15:20 +0200)]
Bug 21959: use a link instead of a checkbox

Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21959: Batch item modification - ability to apply regular expression on text...
Alex Arnaud [Thu, 6 Dec 2018 08:43:42 +0000 (09:43 +0100)]
Bug 21959: Batch item modification - ability to apply regular expression on text fields

Test plan:
  - go to Tools > Batch item modification,
  - select items to modify,
  - for one or some text fields, check the second checkbox (Use regular
    expression) and type your regex,
  - check the regex has been applied.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24308: Suggestions table on suggestions.pl should have separate columns for dates
Lucas Gass [Thu, 26 Dec 2019 17:12:25 +0000 (17:12 +0000)]
Bug 24308: Suggestions table on suggestions.pl should have separate columns for dates

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 24277: Fix date received editing when receiving an order
Jonathan Druart [Mon, 23 Dec 2019 15:19:47 +0000 (16:19 +0100)]
Bug 24277: Fix date received editing when receiving an order

Bug 8417 added the ability to edit the date received, but a merge
conflict was wrongly resolved during a rebase of
  commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
  Bug 13321: Rename variables

Test plan:
Create an order
Receive it
Set a date (different from today)
=> The date you picked should have been set in DB for the order

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24277: Regression tests
Tomas Cohen Arazi [Wed, 8 Jan 2020 13:55:40 +0000 (10:55 -0300)]
Bug 24277: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24263: DBRev 19.12.00.006
Martin Renvoize [Wed, 8 Jan 2020 14:21:23 +0000 (14:21 +0000)]
Bug 24263: DBRev 19.12.00.006

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24263: (QA follow-up) Atomic update fixes
Tomas Cohen Arazi [Wed, 8 Jan 2020 13:11:07 +0000 (10:11 -0300)]
Bug 24263: (QA follow-up) Atomic update fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24263: Replace borrowers.relationship with NULL when was empty string
Jonathan Druart [Wed, 18 Dec 2019 13:04:58 +0000 (14:04 +0100)]
Bug 24263: Replace borrowers.relationship with NULL when was empty string

When you create a new patron, its relationship field is populated with
an empty string when we are expecting NULL.

Otherwise the about page will display a warning about a missing/wrong
relationship in data (that is not in the syspref)

Test plan:
0/ Do not apply the patches from this bug report
1/ Create a new patron (child)
2/ Notice that relationship column in DB is set to an empty string
3/ Go to the about page, notice the invalid warning about relationship
values not in the syspref
4/ Apply DB changes and tests
5/ Execute the update DB entry
=> The value in DB is now NULL when was ""
6/ Execute the tests
=> It fails
7/ Apply the last patch
8/ Add and edit a patron (child)
=> relationship is set to NULL in DB
9/ Execute the tests
=> They pass!

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 24263: DB changes
Jonathan Druart [Wed, 18 Dec 2019 13:08:34 +0000 (14:08 +0100)]
Bug 24263: DB changes

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 24263: Add tests
Jonathan Druart [Wed, 18 Dec 2019 13:04:35 +0000 (14:04 +0100)]
Bug 24263: Add tests

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 24327: Redirect to the login form if AnonSuggestion misconfigured
Jonathan Druart [Thu, 2 Jan 2020 10:38:18 +0000 (11:38 +0100)]
Bug 24327: Redirect to the login form if AnonSuggestion misconfigured

Test plan:
Turn on AnonSuggestion but set AnonymousPatron to an invalid value
Go to /cgi-bin/koha/opac-suggestions.pl?op=add
=> You see the login form

Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24327: Add warning to the about page is AnonSugggestions but AnonymousPatron
Jonathan Druart [Thu, 2 Jan 2020 10:26:49 +0000 (11:26 +0100)]
Bug 24327: Add warning to the about page is AnonSugggestions but AnonymousPatron

This patch adds a warning to the about page if AnonSuggestions is set
but AnonymousPatron.

Test plan:
Turn on AnonSuggestions and set AnonymousPatron to 0
=> You see a warning on the about page
Turn on AnonSuggestions and set AnonymousPatron to an invalid value
=> You see a warning on the about page
Turn off AnonSuggestions
=> No warning
Turn on AnonSuggestions and set AnonymousPatron to a valid value
=> No warning

Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24054: Typo in ClaimReturnedWarningThreshold system preference
Bernardo Gonzalez Kriegel [Sun, 29 Dec 2019 10:40:37 +0000 (07:40 -0300)]
Bug 24054: Typo in ClaimReturnedWarningThreshold system preference

Fixed type: cliams -> claims

To test:
1) Apply the patch
2) Go to System preferences > Circulation preferences > ClaimReturnedWarningThreshold
3) Check the text is fixed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24104: Item search - Prevent "Edit" dropdown button to overflow
Jonathan Druart [Mon, 25 Nov 2019 15:48:15 +0000 (16:48 +0100)]
Bug 24104: Item search - Prevent "Edit" dropdown button to overflow

Making it displays on the left fixes the problem.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24329: DBRev 19.12.00.005
Martin Renvoize [Wed, 8 Jan 2020 11:09:54 +0000 (11:09 +0000)]
Bug 24329: DBRev 19.12.00.005

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24329: Add a test
Jonathan Druart [Sun, 5 Jan 2020 22:08:28 +0000 (23:08 +0100)]
Bug 24329: Add a test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24329: Prevent update of timestamp on action_logs updates
Martin Renvoize [Thu, 2 Jan 2020 13:03:07 +0000 (13:03 +0000)]
Bug 24329: Prevent update of timestamp on action_logs updates

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24329: Correction to updatedatabase
Martin Renvoize [Thu, 2 Jan 2020 12:56:19 +0000 (12:56 +0000)]
Bug 24329: Correction to updatedatabase

Ensure timestamp is not overwriteen during upgrade when applying updates
for bug 3820

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24361: (RM follow-up) Restore 0 handling in CalcFine
Martin Renvoize [Wed, 8 Jan 2020 10:02:02 +0000 (10:02 +0000)]
Bug 24361: (RM follow-up) Restore 0 handling in CalcFine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24350: Fix Branches.pickup_locations
Jonathan Druart [Mon, 6 Jan 2020 21:10:16 +0000 (22:10 +0100)]
Bug 24350: Fix Branches.pickup_locations

This will fix the following error:
Template process failed: undef error - Not a HASH reference at
/home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96.
 at /home/vagrant/kohaclone/C4/Templates.pm line 122

Koha::Libraries->pickup_locations does not always return an array, but
arrayref if $biblio is not a Koha::Biblio object.

I do not think it's the correct fix, the pattern in
Koha::Libraries->pickup_locations is wrong: we should not expect 2
different types for a given parameter, biblio should always be a
Koha::Biblio (idem for item btw).
That could be fixed easily if the template had the Koha::Biblio object
sent.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21684: Fix Hold.t
Jonathan Druart [Tue, 7 Jan 2020 15:06:38 +0000 (16:06 +0100)]
Bug 21684: Fix Hold.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21684: Koha::Object->delete must return a Koha::Object
Jonathan Druart [Tue, 7 Jan 2020 12:30:32 +0000 (13:30 +0100)]
Bug 21684: Koha::Object->delete must return a Koha::Object

Not a DBIx::Class object.

Tests have been added, add Bookseller.t fixed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21684: Fix UploadedFile[s]->delete
Jonathan Druart [Tue, 7 Jan 2020 11:10:05 +0000 (12:10 +0100)]
Bug 21684: Fix UploadedFile[s]->delete

Tests were failing with:
 #   Failed test 'Test delete via UploadedFile as well as UploadedFiles'
 #   at t/db_dependent/Upload.t line 193.
 DBIx::Class::Row::delete(): Not in database at /kohadevbox/koha/Koha/Object.pm line 219

I am not sure this patch is perfect, a set of uploaded files should be
deleted in a transaction, which would be rollback if something is wrong.
But it will be tricky to restore the files after they have been deleted.
It seems that we should deal with that with a more complicated process
and should be part of a separate bug.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24150: Prevent random failure comparing updated_on
Jonathan Druart [Tue, 7 Jan 2020 15:02:36 +0000 (16:02 +0100)]
Bug 24150: Prevent random failure comparing updated_on

Jenkins is currently failing (slow server, datetime comparison, etc.)

koha_1       |     #   Failed test at t/db_dependent/Koha/Old.t line 48.
koha_1       |     #     Structures begin differing at:
koha_1       |     #          $got->{updated_on} = '2020-01-07 14:15:22'
koha_1       |     #     $expected->{updated_on} = '2020-01-07 14:15:21'
koha_1       |     # Looks like you failed 1 test of 1.
koha_1       |
koha_1       | #   Failed test 'Koha::Old::Patrons'
koha_1       | #   at t/db_dependent/Koha/Old.t line 49.
koha_1       | # Looks like you failed 1 test of 2.
koha_1       | [14:15:22] t/db_dependent/Koha/Old.t ...............................................

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24328: Fix bibliographic frameworks install (linkid)
Jonathan Druart [Thu, 2 Jan 2020 12:12:58 +0000 (13:12 +0100)]
Bug 24328: Fix bibliographic frameworks install (linkid)

With strict mode enabled (tested with MariaDB 10.4.11)

ERROR 1366 (22007) at line 8029: Incorrect integer value: '' for column
`koha_kohadev`.`auth_subfield_structure`.`linkid` at row 769

Test plan:
Insert the .sql files from this patch and confirm that you can now
insert them correctly

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24314: Update de-DE MARC21 frameworks for updates 28+29 (May and November 2019)
Katrin Fischer [Sun, 29 Dec 2019 03:36:35 +0000 (03:36 +0000)]
Bug 24314: Update de-DE MARC21 frameworks for updates 28+29 (May and November 2019)

This updates the MARC framework files in the de-DE (German) installer
to the latest MARC standard. The files also include some translation
changes and fixes.

Files have been generated using the po files on translate.koha-community.org.

To test:
- Run the de-DE installer on a fresh database
- Verify that all files are installed without errors
- Verify that the frameworks are correctly in place

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
MARC21 files load without problems, no qa errors.
Loaded into 'en' install (delete fw then load) all frameworks look good.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24312: Update MARC21 frameworks to Updates 28+29 (May and November 2019)
Bernardo Gonzalez Kriegel [Fri, 27 Dec 2019 13:09:22 +0000 (10:09 -0300)]
Bug 24312: Update MARC21 frameworks to Updates 28+29 (May and November 2019)

MARC21 format changes

Bibliographic
-------------
Update 28 (May 2019)

New subfield f in 540
New subfield g in 506,540
New subfield q in 506,540
New subfield 2 in 540
New subfield 2 in 100,110,111,130,240,
                  700,710,711,730,758
                  800,810,811,830
New subfield 7 in 856
New code b in 007/01 Sound Recording

Update 29 (November 2019)

New field 688
New subfield i in 041
New subfield t in 041
New subfield g in 751
Renamed subfield g in 041

Authority
---------
Update 28 (May 2019)

New subfield 0 and 1 in 024
Renamed subfield 2 in 024
New subfield 7 in 856

Update 29 (November 2019)
No changes

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24365: (bug 24217 follow-up) Fix encoding issue for translator script
Jonathan Druart [Tue, 7 Jan 2020 14:47:14 +0000 (15:47 +0100)]
Bug 24365: (bug 24217 follow-up) Fix encoding issue for translator script

I am not sure what happened here, but adding strict for TmplTokenizer.pm
breaks a test for translation.

It has been caught by a failing test:
 % prove xt/author/translatable-templates.t
will display lines "invalid multibyte sequence"

I did a diff between the generated files and found:
< msgid "àrbok"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24361: (bug 24217 follow-up) Fix several warnings in C4 modules
Jonathan Druart [Tue, 7 Jan 2020 11:26:01 +0000 (12:26 +0100)]
Bug 24361: (bug 24217 follow-up) Fix several warnings in C4 modules

With bug 24217 pushed, lot of warnings appears during the tests are run.
Most of them are "Use of uninitialized value in "

Test plan:
Take a look at the output of run 1049
https://jenkins.koha-community.org/job/Koha_Master_D9/1049/consoleFull

Most of the warnings from this run will be removed by this patch

At least 2 are not fixed:
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/C4/Reserves.pm line 791.
t/db_dependent/Items_DelItemCheck.t => see 23463

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24361: Fix warning in C4::Record line 435
Jonathan Druart [Tue, 7 Jan 2020 11:26:01 +0000 (12:26 +0100)]
Bug 24361: Fix warning in C4::Record line 435

Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Record.pm line 435

Caught by a failing test:
    #   Failed test 'Export csv with wrong marcxml should raise a warning'
    #   at t/db_dependent/Exporter/Record.t line 113.
    # found warning:  problem with :721 : :1: parser error : Start tag expected, '<' not found
    # found warning: Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Record.pm line 435.
    # expected to find warning: (?^u:.*Start tag expected.*)

Test plan:
Make sure the tests pass now

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24150: Add missing koha_object[s]_class methods and skip for deletedborrowers
Jonathan Druart [Mon, 6 Jan 2020 22:49:37 +0000 (23:49 +0100)]
Bug 24150: Add missing koha_object[s]_class methods and skip for deletedborrowers

deletedborrowers does not have a PK, and adding it is out of the scope
of this patchset. Indeed we will have to handle possible duplication of
borrowernumber values, which does not seem trivial.
Having bug 20271 in mind, we will have to deal with this problematic
anyway later.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24080: DBRev 19.12.00.004
Martin Renvoize [Fri, 3 Jan 2020 16:46:23 +0000 (16:46 +0000)]
Bug 24080: DBRev 19.12.00.004

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24080: (QA follow-up) Remove processing for removed field
Martin Renvoize [Mon, 23 Dec 2019 14:58:48 +0000 (14:58 +0000)]
Bug 24080: (QA follow-up) Remove processing for removed field

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24080: Adjust text in modal
Kelly McElligott [Mon, 23 Dec 2019 13:03:00 +0000 (10:03 -0300)]
Bug 24080: Adjust text in modal

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24080: Add payout option to patron account page
Martin Renvoize [Thu, 21 Nov 2019 13:59:43 +0000 (13:59 +0000)]
Bug 24080: Add payout option to patron account page

This enhancement adds a refined workflow to allow librarians to pay out
money to patrons and record these payouts on the patrons account.

The use case is that a patron has somehow accrued credit, through a
refund perhaps, and the library wants to be able to physically hand over
some money to balance the patrons account.

Test plan:
1) Undertake a series of transactions that result in some outstanding
   credit on a patrons account.
2) Note that a new 'Issue payout' button appears next to a credit with
   an outstanding balance (but only if your user has the payout
   permission or is a superlibrarian)
3) Click the 'Issue payout' button and a modal should appear
   pre-populated with the amountoutstanding.
4) You should be able to edit the amount you wish to payout, make
   payment or cancel.
5) Signoff

Signed-off-by: Kyle M 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 24080: Add updatecharge payout permission
Martin Renvoize [Thu, 21 Nov 2019 14:28:03 +0000 (14:28 +0000)]
Bug 24080: Add updatecharge payout permission

Add a new subpermission called 'payout' to the 'updatecharges'
permission group which will allow/prevent payout actions to be performed
by staff.

Signed-off-by: Kyle M 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 24080: Add 'payout' method to Koha::Account::Line
Martin Renvoize [Thu, 21 Nov 2019 13:22:39 +0000 (13:22 +0000)]
Bug 24080: Add 'payout' method to Koha::Account::Line

This enhancement adds a 'payout' method to Koha::Account::Line which can
be used to 'pay out' a credit to a patron.

When such a credit is 'paid out' this method will create a corresponding
account debit line with an amount equal to the amountoutstanding on the
original credit and the two acocuntlines will be immediately applied against
each other.

Test Plan:
1) Run the included tests and verify they pass.
2) Signoff

Signed-off-by: Kyle M 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 24080: Payout account debit type
Martin Renvoize [Thu, 21 Nov 2019 14:50:12 +0000 (14:50 +0000)]
Bug 24080: Payout account debit type

Signed-off-by: Kyle M 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 10469: Display more when editing subfields in frameworks
Owen Leonard [Fri, 13 Dec 2019 23:42:28 +0000 (23:42 +0000)]
Bug 10469: Display more when editing subfields in frameworks

This patch removes the accordion feature from the MARC subfields
structure editor. The form is not long, and I think in this case the
accordion makes the process more difficult to navigate.

To test, apply the patch and go to Administration -> MARC frameworks ->
Framework structure -> Subfield structure -> Edit. Choose a tag with
multiple subfields to best test the changes.

The whole form should apppear, and tabs functionality should work
correctly. Test that making changes under multiple tabs works correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7882: (follow-up) Only show sortable icon for sortable tags
Owen Leonard [Tue, 17 Dec 2019 15:19:56 +0000 (15:19 +0000)]
Bug 7882: (follow-up) Only show sortable icon for sortable tags

Only tags which can be repeated can be sorted, so the "bars" icon should
not display by these tags.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7882: (follow-up) Update sorting interaction
Owen Leonard [Mon, 16 Dec 2019 19:06:57 +0000 (19:06 +0000)]
Bug 7882: (follow-up) Update sorting interaction

This follow-up modifies the CSS for the sortable fields so that a
different icon is used. Elsewhere in Koha (stock rotation stage sorting)
we use the "bars" icon to indicate a sortable element. I think it would
be good to continue to use this. The cursor is now styled as a "Move"
cursor.

The configuration of the sortable function in the script has been
updated in two ways: 1. The movement of the element is constrained along
the y-axis, and 2. The movement of the element is contstrained to the
container within which it can be moved (for the tag, the tab, and for
the subfield, the tag).

To test, apply the patch and edit a MARC record in the basic cataloging
editor.

Confirm that the new icon is used, and that the "Move" cursor shows when
you hover over the icon.

Confirm that a tag can be dragged up and down within the constraints of
the visible section. A subfield should be only movable within its parent
tag.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7882: Add ability to move and reorder fields in MARC editor
Maryse Simard [Wed, 23 Oct 2019 19:34:39 +0000 (15:34 -0400)]
Bug 7882: Add ability to move and reorder fields in MARC editor

Use jQueryUI sortable to make fields and subfields moveable in the
MARC editor for both records and authorities.

This patch convert items from div's to ul's and consequently alter css
and js to match. It also replace the up arrow with a more adapted icon
(from font awesome).

Primary authorship by Elliott Davis.

To Test:

1. Add or edit a record in cataloguing module.
2. You should be able to move the fields and subfields around.
    - You can click on any part of the element to drag it, the move
    icon to the left of the item is a good place to do it.
    => You can only change the order of fields of the same tag.
3. Make sure all of the javascript driven fonctionnality still work :
    - Duplicate fields/subfields
    - Remove fields/subfields
    - Using the tag editor for control fields or to link authorities
    - etc
4. Reorder some fields/subfields and save the record.
5. Edit the record again.
6. The order in the editor should match the changes which were saved.
    - Empty subfields should appear after the ones with content.
7. Repeat steps 1-6 with the authority editor.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24173: Advanced Editor: Show subtitle & published date on the search page
Cori Lynn Arnold [Wed, 18 Dec 2019 18:18:59 +0000 (18:18 +0000)]
Bug 24173: Advanced Editor: Show subtitle & published date on the search page

To test:

Prior to patch:
1/Verify that EnableAdvancedCatalogingEditor syspref is set to "enable"
2/Go to Cataloging
3/Click on "Advanced Editor" button
4/In left hand box put "specious" under Keywords and hit "enter"
5/verify that "Library of Congress" (or some other server) Z39.50 is checked
6/Verify that there are no headings for "Subtitle" and "Published"

Apply Patch
1/Go to Administration->Koha to MARC mapping
2/Add or verify that there are entries for "biblio.subtitle" and
"biblio.copyrightdate"
3/Go to Cataloging
4/Click on "Advanced Editor" button
5/In left hand box put "specious" under Keywords and hit "enter"
6/verify that "Library of Congress" (or some other server) Z39.50 is checked
7/Verify that there are headings for "Subtitle" and "Published" and the
data matches with the fields from Koha to MARC mapping when you click on
"View MARC" link for that record.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24059: Remove unused Greybox assets from detail.tt
Owen Leonard [Mon, 18 Nov 2019 18:21:52 +0000 (18:21 +0000)]
Bug 24059: Remove unused Greybox assets from detail.tt

This patch removes reference to the Greybox include file because it is
unused.

To test, apply the patch and view the bibliographic details page. Test
various JavaScript-driven interactions to make sure no functionality has
been broken: Menus, tabs, table filters, MARC Preview, etc.

Searching for "gb-" or "GB_" should return no results in any files
related to the details page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24212: Increase size of OPAC 'send list' dialog box for IE
Aleisha Amohia [Wed, 11 Dec 2019 05:07:31 +0000 (05:07 +0000)]
Bug 24212: Increase size of OPAC 'send list' dialog box for IE

To test:
1) Create a list and view it in the OPAC (ensure you are using Internet
    Explorer as a browser)
2) Click Send list
3) Notice the dialog box cuts off the content in the window
4) Close the popup, apply the patch
5) Click Send list again
6) Confirm the dialog box shows the entire window
7) Confirm the box is resizable and has scrollbars

Sponsored-by: Toi Ohomai Institute of Technology
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 24063: Add Sami language characters to Zebra
Pasi Kallinen [Tue, 19 Nov 2019 09:26:01 +0000 (11:26 +0200)]
Bug 24063: Add Sami language characters to Zebra

Some Sami languages need few more characters to be mapped, or
are otherwise very hard to search for.

Test plan:

1) Catalogue a new record with title "Ǩoǯeŋa"
2) Make sure zebra indexed that record, then try to search for
   it with the text "kozena"
3) Apply patch
4) Redo 2, now the record should be found.

Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24181: Compiled CSS
Martin Renvoize [Fri, 3 Jan 2020 15:53:18 +0000 (15:53 +0000)]
Bug 24181: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24181: Move the icon back into the input
Jonathan Druart [Thu, 5 Dec 2019 15:33:00 +0000 (16:33 +0100)]
Bug 24181: Move the icon back into the input

Signed-off-by: Lucas Gass <lucas@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 24181: Make our datepicker inputs sexy
Jonathan Druart [Thu, 5 Dec 2019 15:27:35 +0000 (16:27 +0100)]
Bug 24181: Make our datepicker inputs sexy

They are skinny and different from others.
Not that a problem, I am too.
But I do not think it is what they need.

Test plan:
Edit a patron and take a look at the input for "Date of birth"
=> Before this patch they are not looking great
=> After this patch they are beautiful

Signed-off-by: Lucas Gass <lucas@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 24089: Upgrade jQuery Validate plugin in the staff client
Owen Leonard [Fri, 22 Nov 2019 13:23:21 +0000 (13:23 +0000)]
Bug 24089: Upgrade jQuery Validate plugin in the staff client

This patch upgrades the jQuery Validate plugin in the staff client from
v1.10.0 to v1.19.1.

To test, apply the patch and clear your browser cache if necessary.

Test various pages to confirm that form validation works as expected:

 - Patron password change form:
   - Password must conform to minPasswordLength
   - Password must not contain leading/trailing spaces
   - Passwords must match

 - Administration -> Add or edit budget:
   - Description, start date, and end date are required
   - Start date must be before end date

 - Administration -> Add or edit Z39.50/SRU server:
   - Server name, hostname, port, and database are required
   - Port, rank, and timeout must be a number

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23957: Compiled CSS
Martin Renvoize [Fri, 3 Jan 2020 15:44:09 +0000 (15:44 +0000)]
Bug 23957: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23957: (follow-up) Disable both place hold buttons
Owen Leonard [Tue, 10 Dec 2019 13:36:19 +0000 (13:36 +0000)]
Bug 23957: (follow-up) Disable both place hold buttons

This follow-up adds the correct markup to the second of two "Place hold"
buttons so that it is disabled when the first is disabled.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23957: Remove button style with famfamfam icon background and replace with Font...
Owen Leonard [Sun, 3 Nov 2019 23:45:44 +0000 (23:45 +0000)]
Bug 23957: Remove button style with famfamfam icon background and replace with Font Awesome

The patch modifies the markup and CSS related to the holds template in
the staff client when holds policy override is necessary. The CSS
background image is replaced with a Font Awesome icon. <input>s are
replaced with <button>s to allow for the icon markup.

To test, apply the patch and regenerate the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Enable the AllowHoldPolicyOverride system preference.
 - Start the process of placing a hold for a patron on a title which
   would not normally be available for hold. For instance: The patron
   already has too many holds.
 - On the hold confirmation screen the "Place hold" buttons should
   appear with a little yellow "warning" icon.
 - Clicking either of the two "Place hold" buttons should trigger a
   confirmation dialog. Test both the "Confirm" and "Cancel" options.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23956: Compiled CSS
Martin Renvoize [Fri, 3 Jan 2020 15:42:12 +0000 (15:42 +0000)]
Bug 23956: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23956: Replace famfamfam calendar icon in staff client with CSS data-url
Owen Leonard [Sun, 3 Nov 2019 22:31:39 +0000 (22:31 +0000)]
Bug 23956: Replace famfamfam calendar icon in staff client with CSS data-url

This patch modifies the staff client CSS so that the backround image for
datepicker input fields is defined as a data-url rather than a reference
to an image file.

To test, apply the patch and regenerate the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - In the staff client, view any form which includes a datepicker-styled
   input. For instance, patron entry: date of birth, expiry; Aquisitions
   -> Late orders -> Filter results.
 - Confirm that the calendar icon looks correct.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22284: DBRev 19.12.00.003
Martin Renvoize [Fri, 3 Jan 2020 13:05:39 +0000 (13:05 +0000)]
Bug 22284: DBRev 19.12.00.003

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22284: (QA follow-up) Make pickup locations be Koha::Library objects
Tomas Cohen Arazi [Sat, 21 Dec 2019 03:14:10 +0000 (00:14 -0300)]
Bug 22284: (QA follow-up) Make pickup locations be Koha::Library objects

This patch makes the following methods return array references of
Koha::Library objects instead or unblessed objects;

- Koha::Item->pickup_locations
- Koha::Biblio->pickup_locations
- Koha::Libraries->pickup_locations

Bonus:

- The template plugin is adjusted to unbless things to keep behavior
- Tests are moved to the right .t file.
- Tests for the new behavior are added.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22284: (follow-up) Anotate boolean values in Koha::Schema::Result::LibraryGroup
Agustin Moyano [Wed, 18 Dec 2019 17:50:31 +0000 (14:50 -0300)]
Bug 22284: (follow-up) Anotate boolean values in Koha::Schema::Result::LibraryGroup

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22284: Schema update
Josef Moravec [Wed, 3 Jul 2019 22:29:42 +0000 (22:29 +0000)]
Bug 22284: Schema update

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22284: (follow-up) Squash multiple follow-ups
Agustin Moyano [Wed, 29 May 2019 05:06:46 +0000 (02:06 -0300)]
Bug 22284: (follow-up) Squash multiple follow-ups

  * Bug 22284: (follow-up) Use GetReserveControlBranch in Koha::Item->pickup_locations
  * Bug 22284: (follow-up) Fix tests
  * Bug 22284: (follow-up) Fix typo in request.tt
  * Bug 22284: (follow-up) Filter pickup on specific item click
  * Bug 22284: (follow-up) Fix typos transfered -> transferred

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22284: Add "patron's hold group" as new hold_fulfillment_policy option
Agustin Moyano [Tue, 28 May 2019 02:49:05 +0000 (23:49 -0300)]
Bug 22284: Add "patron's hold group" as new hold_fulfillment_policy option

This patch adds "patron's hold group" as a new option to Hold pickup library match

To test:
1. Set ReservesControlBranch preference to item.
2. Create a hold group
3. Go to circulation and fines rules
SUCCESS => in 'Hold pickup library match' there is a new option called "patron's hold group"
4. In a library not in hold group set 'Hold policy' to "any" and 'Hold pickup library match' to "patron's hold group"
5. Search for a user in the hold group
6. 'Search to hold' for items of the library of step 4
7. Select an item and 'Place hold for [user]'
SUCCESS => in 'Pickup at' you should see patron's hold group as options
8. In OPAC sign in as the same user of step 5
9. Search for the item in step 7
SUCCESS => in 'Pick up locations' you should see patron's hold group as options
10. Sign off

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>