[koha-commits] main Koha release repository branch master updated. v16.11.00-836-g36fd404
Git repo owner
gitmaster at git.koha-community.org
Fri Apr 14 16:44:30 CEST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, master has been updated
via 36fd40468950950c605b82fd918a5e932e2c6734 (commit)
via 1a7a27a1c8d5e2960debd72381065cae86c3a715 (commit)
via cb0e33f046547c919aff6684c47dcee282ab4d16 (commit)
via 72dd80fae9acedab5bc9512bbbbfa79e0f57aa99 (commit)
via 8d5b4306e07a594cd102fcce85f912ab3a5661e9 (commit)
via 53ce807f6e6becc1e305d7743b8be9d5605a8c9a (commit)
via 80018625cf03ccd00957035f99065ed5793b80e3 (commit)
from 7df47b48ba8a7241f062d14fb9f32770b80694d9 (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 36fd40468950950c605b82fd918a5e932e2c6734
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date: Fri Apr 14 08:58:30 2017 +0200
Bug 17835: [QA Follow-up] Fix opac-search.pl
Resolves:
Global symbol "$itemtypes_nocategory" requires explicit package name.
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Tested the added line with a debug statement. See itemtype facets in the
search results.
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 1a7a27a1c8d5e2960debd72381065cae86c3a715
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date: Thu Feb 9 09:15:29 2017 +0100
Bug 17835: Mock language pref value
That way if prefs contain other languages, the test will still pass.
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Lari Taskula <lari.taskula at jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit cb0e33f046547c919aff6684c47dcee282ab4d16
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date: Tue Jan 3 13:35:46 2017 +0100
Bug 17835: Add an additional LEFT JOIN condition using DBIx::Class
The previous query was wrong. If an item type did not contain the
translation in the interface's language, the ->search_with_localization
did not return it at all.
What we need is definitely to add a second condition on the join.
For reference:
http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/Relationship/Base.pm#condition
https://blog.afoolishmanifesto.com/posts/dbix-class-parameterized-relationships/
That sounds hacky but seems to be the DBIx::Class path to follow.
Bug 17835: follow-up
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Lari Taskula <lari.taskula at jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 72dd80fae9acedab5bc9512bbbbfa79e0f57aa99
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date: Tue Jan 3 11:36:25 2017 +0100
Bug 17835: Remove the subroutine GetItemTypes
At this point the subroutine is no longer in used.
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Lari Taskula <lari.taskula at jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 8d5b4306e07a594cd102fcce85f912ab3a5661e9
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date: Tue Jan 3 11:05:15 2017 +0100
Bug 17835: Replace GetItemTypes with Koha::ItemTypes
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Lari Taskula <lari.taskula at jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 53ce807f6e6becc1e305d7743b8be9d5605a8c9a
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date: Tue Jan 3 09:22:48 2017 +0100
Bug 17835: Do not reselect translated_description if comes from search_with_localization
If the Koha::ItemType object has been instanciated from a call to
Koha::ItemTypes->search_with_localization, we already have the
translated_description value. So there is no need to fetch it again from
the DB. This is what this trick does: if the translated_description
column exist in the DBIx::Class result source's column list, that means
the value has already been retrieved.
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Lari Taskula <lari.taskula at jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 80018625cf03ccd00957035f99065ed5793b80e3
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date: Mon Jan 2 17:29:32 2017 +0100
Bug 17835: Create a ItemtypeLocalization view
To properly move C4::Koha::GetItemTypes to Koha::ItemTypes we need
DBIx::Class to make a join on the localization table to retrieve the
possible translated description of the item types.
To do so there are 2 possibilities. The first one would have been to
rename the localization table to something like itemtype_localization.
That way we could have had a relationship between
itemtype_localization.code and itemtypes.itemtype
That would have meant to create one table per "entity" (here an entity
is itemtype) we allow the translability. There are pros and cons for
this choice, so I opt for another solution.
The other solution is to create a view on top of this localization
table. With this new view we can define the missing relationship.
That sounds like a quite clean solution and easy to implement.
Once we have this relationship, the
Koha::ItemTypes->search_with_localization will join on this view an
return the same result as GetItemTypes( style => 'array' ).
To replace
GetItemtypes( style => 'hash' )
which is the default behavior of this subroutine, we can do something like:
my $itemtypes = Koha::ItemTypes->search_with_localization;
my %itemtypes = map { $_->{itemtype} => $_ } @{ $itemtypes->unblessed };
This patchset must not introduce big changes but it changes certain
behaviors (which were wrong) in some scripts. Indeed sometimes the
descriptions of the item types were not the translated ones. Moreover it
happens that the item types displayed in a dropdown list were not
ordered by translated description, but by description of code
(itemtypes.itemtype value). These 2 behaviors are what we expect.
Test plan:
Bugs will be hard to catch since these patches change a lot of file, it
will be easier to read the diff and catch possible typos or logic
errors.
However signoffers can focus on modified files and the item types
values.
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Lari Taskula <lari.taskula at jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
-----------------------------------------------------------------------
Summary of changes:
C4/Items.pm | 9 +-
C4/Koha.pm | 86 +-------------------
C4/Search.pm | 4 +-
C4/XSLT.pm | 3 +-
Koha/ItemType.pm | 8 ++
Koha/ItemTypes.pm | 25 +++++-
Koha/Schema/Result/Itemtype.pm | 17 +++-
Koha/Schema/Result/ItemtypeLocalization.pm | 32 ++++++++
Koha/Template/Plugin/ItemTypes.pm | 5 +-
acqui/basketgroup.pl | 4 +-
acqui/orderreceive.pl | 1 -
admin/smart-rules.pl | 5 +-
authorities/authorities.pl | 9 +-
catalogue/detail.pl | 5 +-
catalogue/moredetail.pl | 3 +-
catalogue/search.pl | 7 +-
cataloguing/addbiblio.pl | 9 +-
cataloguing/additem.pl | 9 +-
circ/view_holdsqueue.pl | 13 +--
course_reserves/add_items.pl | 5 +-
.../prog/en/modules/reports/bor_issues_top.tt | 4 +-
.../prog/en/modules/reports/cat_issues_top.tt | 4 +-
.../prog/en/modules/reports/catalogue_out.tt | 4 +-
.../prog/en/modules/reports/issues_stats.tt | 4 +-
.../prog/en/modules/reports/itemslost.tt | 7 +-
.../prog/en/modules/reports/reserves_stats.tt | 4 +-
.../intranet-tmpl/prog/en/modules/tools/export.tt | 8 +-
labels/label-item-search.pl | 13 +--
opac/opac-ISBDdetail.pl | 3 +-
opac/opac-detail.pl | 5 +-
opac/opac-readingrecord.pl | 4 +-
opac/opac-reserve.pl | 13 +--
opac/opac-search.pl | 3 +-
opac/opac-topissues.pl | 2 -
opac/opac-user.pl | 3 +-
reports/acquisitions_stats.pl | 6 +-
reports/bor_issues_top.pl | 14 +---
reports/cat_issues_top.pl | 12 +--
reports/catalogue_out.pl | 19 +----
reports/catalogue_stats.pl | 3 +-
reports/issues_avg_stats.pl | 3 +-
reports/issues_stats.pl | 9 +-
reports/itemslost.pl | 13 +--
reports/reserves_stats.pl | 13 +--
reserve/request.pl | 3 +-
serials/subscription-add.pl | 4 +-
serials/subscription-bib-search.pl | 5 +-
suggestion/suggestion.pl | 2 +-
svc/bib_profile | 3 +-
t/db_dependent/Koha.t | 11 +--
t/db_dependent/Koha/ItemTypes.t | 52 +++++++++++-
tools/batchMod.pl | 9 +-
tools/export.pl | 14 +---
53 files changed, 268 insertions(+), 267 deletions(-)
create mode 100644 Koha/Schema/Result/ItemtypeLocalization.pm
hooks/post-receive
--
main Koha release repository
More information about the koha-commits
mailing list