[koha-commits] main Koha release repository branch 19.05.x updated. v19.05.06-3-g3de45aa
Git repo owner
gitmaster at git.koha-community.org
Mon Jan 6 22:18:28 CET 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, 19.05.x has been updated
via 3de45aad29d4ef9b2fd3dc7b4f1d700d4f9b8c30 (commit)
via d9ec59f191f8256e6961af290eb35cae673298e9 (commit)
via 99ad6cac3068621ff72c02f4f7ae4916124f52d5 (commit)
from 902ee6b7a3764290db463fb259fe18938fd24afa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3de45aad29d4ef9b2fd3dc7b4f1d700d4f9b8c30
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date: Mon Dec 9 15:31:36 2019 -0300
Bug 24191: Make objects.search pass to_model to dbic_merge_sorting
This patch makes objects.search pass the to_mode method reference so it
can be used to map API attributes to column names when building the
sorting portion of the query.
To test:
1. Apply the regression tests on this patchset
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests fail!
3. Apply the rest of the patchset
4. Run:
k$ prove t/Koha/REST/Plugin/Query.t
=> SUCCESS: Tests pass! changes to the methods work as expected!
5. Run:
k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
6. Sign off :-D
Sponsored-by: ByWater Solutions
Signed-off-by: Owen Leonard <oleonard at myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Signed-off-by: Joy Nelson <joy at bywatersolutions.com>
(cherry picked from commit 32ded5069184a004855ab732798c0171f98790fa)
Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>
commit d9ec59f191f8256e6961af290eb35cae673298e9
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date: Mon Dec 9 14:48:48 2019 -0300
Bug 24191: Add to_model param to _build_order_atom and dbic_merge_sorting
This patch adds a to_model parameter to dbic_merge_sorting so it is
passed when used (for example from objects.search). The to_model param
is passed along to the _build_order_atom method where it is finally
used.
In the process I wrote tests that reflected some problems in the current
code:
- Mojolicious automatically returns a scalar if a query parameter only
happens once on a request. The code expected an arrayref in every case.
- There's a design issue that forced me to use some hacky code in
_build_order_atom.
The first issue is dealth with, by using Scalar::Util::reftype as the
Perl docs recommend.
The second issue, I don't plan to clean it here, as there's ongoing work
on a Koha::Objects->search_from_api method that will obsolete this code
most probably (see bug 23893 for a better picture of where the mappings
will be living soon).
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/Koha/REST/Plugin/Query.t
=> SUCCESS: Tests pass!!
3. Sign off :-D
Sponsored-by: ByWater Solutions
Signed-off-by: Owen Leonard <oleonard at myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Signed-off-by: Joy Nelson <joy at bywatersolutions.com>
(cherry picked from commit 46895911d4668c343446104df41afb151dd2fae3)
Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>
commit 99ad6cac3068621ff72c02f4f7ae4916124f52d5
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date: Mon Dec 9 14:41:35 2019 -0300
Bug 24191: Regression tests
This patch adds missing tests for calling objects.search with
non-existent column names for sorting, that should be mapped using
to_model for that matter.
Tests should fail as there's no current use of to_model for building the
order_by portion of the query.
Sponsored-by: ByWater Solutions
Signed-off-by: Owen Leonard <oleonard at myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Signed-off-by: Joy Nelson <joy at bywatersolutions.com>
(cherry picked from commit f38519b0638f620d0faeebdc2f0e0c74085c5838)
Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>
-----------------------------------------------------------------------
Summary of changes:
Koha/REST/Plugin/Objects.pm | 3 +-
Koha/REST/Plugin/Query.pm | 30 ++++++++++++-----
t/Koha/REST/Plugin/Query.t | 51 ++++++++++++++++++++++++++++-
t/db_dependent/Koha/REST/Plugin/Objects.t | 43 +++++++++++++++++++++++-
4 files changed, 116 insertions(+), 11 deletions(-)
hooks/post-receive
--
main Koha release repository
More information about the koha-commits
mailing list