]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 21911: Regression test
Josef Moravec [Fri, 30 Nov 2018 07:09:23 +0000 (07:09 +0000)]
Bug 21911: Regression test

This tests usuall cases, but note, that administrator could make a
branch with code "%%%" or so, which this test does not cover, and some
functionalities will not work in that case: opac limit override,
                holdinbranch facet

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e5585a10d5f2ee24cad94b2cf17df1ce13e8a01a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21911: Fix OPAC scoping to work with new group system
Nick Clemens [Thu, 29 Nov 2018 14:17:37 +0000 (14:17 +0000)]
Bug 21911: Fix OPAC scoping to work with new group system

To test:

0 - Apply patch
1 - Create a library group enabled for opac search limits and add some
libraries
2 - Check the DB (or advanced search dropdown) to get the id of the
group (using 7 as example below)
3 - Add to apache configuration (OPAC virtualhost)
   SetEnv OPAC_SEARCH_LIMIT branch:multibranchlimit-7
   SetEnv OPAC_LIMIT_OVERRIDE 1
   RequestHeader add X-Koha-SetEnv "OPAC_SEARCH_LIMIT
   branch:multibranchlimit-7"
   RequestHeader add X-Koha-SetEnv "OPAC_LIMIT_OVERRIDE 1"
4 - Ensure OpacAddMastheadLibraryPulldown is disabled
5 - Restart all the things
6 - Visit the opac
7 - Perform a search, confirm it is scoped to the branches in the group

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4c0682f5598d53992b6966a217b10f71a9cdaebb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21910: Does not deal with call context, ->search does already
Jonathan Druart [Thu, 6 Dec 2018 15:53:24 +0000 (12:53 -0300)]
Bug 21910: Does not deal with call context, ->search does already

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 21372f78f825c0ec439ea4a7cfe7dff6656467b9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21910: Remove duplicated lines in tests
Jonathan Druart [Thu, 6 Dec 2018 15:52:54 +0000 (12:52 -0300)]
Bug 21910: Remove duplicated lines in tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ee96d18b2cee07aa64d5e68078bc898d36e22146)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21910: Koha::Library::Groups->get_search_groups should return the groups
Nick Clemens [Thu, 29 Nov 2018 14:11:36 +0000 (14:11 +0000)]
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups

To test:
 1 - Add a library group (Admin->Library groups)
 2 - Enable use as an opac and staff search limit
 3 - Add some libraries to the group
 4 - Visit advanced search on staff and opac
 5 - Note the dropdown has as many empty rows as there are libraries
  in the group
 6 - Apply patch, restart all the things
 7 - Visit staff and opac advanced search
 8 - Confirm the group dropdowns are correct
 9 - Enable OpacMastheadLibraryPulldown
10 - Ensure the dropdown on opac shows groups correctly
11 - Confirm earchign groups works from all three locations
12 - prove -v t/db_dependent/LibraryGroups.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f3b8c66392098d69bca48bbf04b7e93fa2100280)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21778: Sort user list by surname,firstname unless user cannot manage patron lists...
Nick Clemens [Wed, 7 Nov 2018 01:32:26 +0000 (01:32 +0000)]
Bug 21778: Sort user list by surname,firstname unless user cannot manage patron lists OR edit patrons

To test:
1 - Create four users:
    1 superlibrarian (or with both edit patrons and manage patron
            lists)
    1 with only edit patrons and catalogue
    1 with only add to list and catalogue
    1 with catalogue but neither edit patrons or manage patron lists
2 - Search patrons signed in as each user
3 - Note different sorting
4 - Apply patch
5 - Try searching with each patron
6 - Results should always be sorted by surname, firstname
7 - Only in the case of neither extra permission should the checkboxes
be absent

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 96b3889390f8efe9851aaa9c2cafa9e20bda3f43)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21955: Remove Cache::Memory as fallback for L2 cache
Jonathan Druart [Wed, 5 Dec 2018 19:39:02 +0000 (16:39 -0300)]
Bug 21955: Remove Cache::Memory as fallback for L2 cache

If Plack is running with several workers we must not use Cache::Memory
as L2 cache.

If a value is set from a worker, it will not be available from other
workers as the Cache::Memory instance is not shared (of course!)

Moreover we now have Koha::Cache::Memory::Lite that does the same job,
so we should not expect performance regressions by removing it.

See also the email sent to koha-devel for more info
http://lists.koha-community.org/pipermail/koha-devel/2018-December/045004.html

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4bf033c6d6b2a8bf4d5597b3fdf6355fb7060b60)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18805: Add ability to use up account credits
Tomas Cohen Arazi [Tue, 27 Nov 2018 23:28:29 +0000 (20:28 -0300)]
Bug 18805: Add ability to use up account credits

This patch introduces a new button in the 'Pay fines' tab  on the
patron's account page. This button, labeled 'Normalize account' is only
displayed when outstanding credits are available, that could be used to
pay up existing debts.

When clicking the button, the Koha::Account::normalize_balance method
(bug 21896) is used for the purpose.

To test:
- Apply this patch (on top of 21896)
- On a patron's 'Fines' tab, create a 'manual invoice' (maybe more than
  one)
- Go to the 'Pay fines' tab
=> SUCCESS: No 'Apply credits' button is displayed.
- On the 'create manual credit' tab, create a couple credits.
- Go to the 'Pay fines'
=> SUCCESS: 'Apply credits' button is displayed
- Click on 'Apply credits'
=> SUCCESS: Outstanding credits have been used to pay up debts.
- Play with different options (credit excedes debts and vice-versa, they
        match, etc)
=> SUCCESS: They all work as expected
- Sign off :-D

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a3036b4760d80dd3d2188f5f95c6f4279ecef74b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21896: RM follow-up - fix tests
Nick Clemens [Fri, 30 Nov 2018 21:27:44 +0000 (21:27 +0000)]
Bug 21896: RM follow-up - fix tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b4580bff5ba7753f9db2513c3b87ecb9bba5258c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21896: (QA follow-up) Document and Test for FIFO behaviour
Martin Renvoize [Thu, 29 Nov 2018 13:49:27 +0000 (13:49 +0000)]
Bug 21896: (QA follow-up) Document and Test for FIFO behaviour

A short dicussion lead to the decision to make it explictly clear that
this method will implicitly apply credits against debits in a 'First In
First Out' manor, meaning oldest outstanding debits will be paid off
first.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 99535e0fda491d2e1d704dd80f6613c0a7b8d06b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21896: (QA follow-up) Add tests for FIFO behaviour
Tomas Cohen Arazi [Thu, 29 Nov 2018 13:55:51 +0000 (10:55 -0300)]
Bug 21896: (QA follow-up) Add tests for FIFO behaviour

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4302bdda5c1c348e63003589795af3d37249c167)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21896: (QA follow-up) normalize_balance -> reconcile_balance rename
Tomas Cohen Arazi [Wed, 28 Nov 2018 13:24:36 +0000 (10:24 -0300)]
Bug 21896: (QA follow-up) normalize_balance -> reconcile_balance rename

This was requested on the QA review and I agree.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5fc2ccd7332ca53dfe07bd079cc446d1df923496)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21896: Add Koha::Account::normalize_balance
Tomas Cohen Arazi [Tue, 27 Nov 2018 22:34:29 +0000 (19:34 -0300)]
Bug 21896: Add Koha::Account::normalize_balance

This patch adds the normalize_balance() method to Koha::Account. Its
purpose is to apply outstanding credits (i.e. manual ones ore remaining
amounts like in the case of refunds) to outstanding debts.

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

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1176947b42342ca725020455361fe092255e4d04)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21896: Add unit tests for Koha::Account::normalize_balance
Tomas Cohen Arazi [Tue, 27 Nov 2018 20:06:20 +0000 (17:06 -0300)]
Bug 21896: Add unit tests for Koha::Account::normalize_balance

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 98bfe5d93cb6715b3095309082b241aaafe869da)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 7143: Update about page for Nazlı
Nazlı Çetin [Thu, 29 Nov 2018 14:50:29 +0000 (14:50 +0000)]
Bug 7143: Update about page for Nazlı

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 52b52ab896be2831309a6c3f3401a4118c7b0f33)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 7143: Update OpenHub link for Fridolin Somers in about page
Fridolin Somers [Wed, 28 Nov 2018 15:07:57 +0000 (16:07 +0100)]
Bug 7143: Update OpenHub link for Fridolin Somers in about page

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d0e72b437332b1ef0b3bcee98616ac8fef3f1e7a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21736: Allow translating the localization widget messages
Pasi Kallinen [Wed, 31 Oct 2018 12:04:33 +0000 (14:04 +0200)]
Bug 21736: Allow translating the localization widget messages

The widget used to translate the item type names to other
languages has few javascript messages that cannot be translated.
Add the mechanism to enable their translation.

Test plan:

1) Install and update a language
2) Check the po-files, there's no msgid for
   "A translation already exists for this language."
3) Apply the patch
4) Install and update a language
5) There should be a msgid for the one in 2, and
   couple other messages from localization.tt
6) Translate those messages, update the translated templates
7) Go to Administration -> Item types -> Modify item type ->
   Translate into other languages
   Add a new translation, check that the message given by the widget
   was in correct language.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5cacb502392aaebaef84339233227eb261d45277)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectl...
Kyle M Hall [Wed, 28 Nov 2018 18:41:53 +0000 (13:41 -0500)]
Bug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectly filtered

The new plugin hook intranet_catalog_biblio_enhancements_toolbar_button is rendered useless due to the outputted html being escaped using the html filter. It should be using the raw filter instead.

Test Plan:
1) Enable plugins
2) Download and install the latest version of the Kitchen Sink plugin
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.21/koha-plugin-kitchen-sink-v2.1.21.kpz
3) Browse to catalogue/detail.pl for a record
4) Note you see the raw html of the plugin output in the toolbar
5) Apply this patch
6) Restart all the things
7) Reload the page
8) Note the html is now correctly rendered as a button

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ed22c5fc0f65cc3736a8dbabb159b6b4b9b2f7c4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21861: (follow-up) replace onchange() with jQuery equivalent
Andreas Roussos [Thu, 22 Nov 2018 13:55:25 +0000 (15:55 +0200)]
Bug 21861: (follow-up) replace onchange() with jQuery equivalent

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f44a4f1d2a13735c52948df29e773728d04ab991)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21861: The MARC modification template actions editor does not always validate...
Andreas Roussos [Sat, 17 Nov 2018 18:03:36 +0000 (20:03 +0200)]
Bug 21861: The MARC modification template actions editor does not always validate user input

The MARC modification template actions editor does not validate
user input when adding a conditional clause, making it possible
to save a modification action without filling in all necessary
fields.

This patch fixes that.

Test plan:
1) Create a MARC modification template and add a new action,
   e.g. "Copy All field(s) 200$a to field 600$a".
   Add a condition ("if" or "unless") but leave the relevant
   field and subfield textboxes empty.
   Add "matches" or "doesn't match" as a comparison operator.
   Check the "RegEx" checkbox, leave the regex textbox empty.
2) Click on "Add action" and notice how it accepts your input.
   Also notice the extra space in the Action column RegEx.
3) Edit your modification action and notice the missing "m/"
   before the conditional RegEx.

4) Apply the patch and hit CTRL-F5 to reload the relevant JS.

5) Edit the modification action you added previously (or add
   a new one). Try leaving the textboxes mentioned above empty
   and then submit your changes. You should get pop-up windows
   informing you about missing fields.
6) Now try typing a value in the conditional regex textbox and
   Update your action. In the Action column, there should be
   no spaces between the delimiters of the matching operator
   and the value you just entered.
7) Edit your action: notice how the "m/" before the regular
   expression and the "/" after it are now showing correctly.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e1e1448e9132dce81571a4c3f31eb67816f14f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21897: Typo in postinst
Mirko Tietgen [Wed, 28 Nov 2018 10:18:09 +0000 (11:18 +0100)]
Bug 21897: Typo in postinst

Small typo (missing space)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f99b9b5b3d88d8ed2eed0f64da0f5ef2a1483f3e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21895: Fix path to POT file
Julian Maurice [Wed, 28 Nov 2018 09:05:19 +0000 (10:05 +0100)]
Bug 21895: Fix path to POT file

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d8531b8fcbfc8fe09540ddb940149a7d7dbb4fb9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21895: Fix translation for package install
Julian Maurice [Tue, 27 Nov 2018 23:51:45 +0000 (00:51 +0100)]
Bug 21895: Fix translation for package install

The string extraction process was not taking into account the fact that
standard/package install have a completely different directory structure
than the dev install

This patch tries to keep the exact same behaviour for dev installs,
while making it work for standard install by using opachtdocs,
intrahtdocs, opacdir and intranetdir from $KOHA_CONF

Test plan:
1. Follow test plan in
https://gitlab.com/koha-community/Koha/commit/d708255c7a4d981c7c7bdd0644a75202ec43b297
2. Do a standard install and repeat step 1 on this new install
3. If you know how to build the Debian package, build it, install it and
verify that koha-translate works as expected
4. prove t/LangInstaller.t

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bd81f0418c14af82cdd9f4858c32b18d76a90b49)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoCorrect release notes encoding issues v18.11.00
Nick Clemens [Tue, 27 Nov 2018 12:04:15 +0000 (12:04 +0000)]
Correct release notes encoding issues

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoUpdate version in Koha.pm
Nick Clemens [Tue, 27 Nov 2018 11:43:45 +0000 (11:43 +0000)]
Update version in Koha.pm

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoUpdate release notes for 18.11.00 release
Nick Clemens [Tue, 27 Nov 2018 02:00:58 +0000 (02:00 +0000)]
Update release notes for 18.11.00 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoIncrement version for 18.11.00 release
Nick Clemens [Tue, 27 Nov 2018 01:39:26 +0000 (20:39 -0500)]
Increment version for 18.11.00 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoTranslation updates for Koha 18.11.00
Koha translators [Tue, 27 Nov 2018 01:22:14 +0000 (22:22 -0300)]
Translation updates for Koha 18.11.00

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21867: Replace remaining document.element.onchange calls in marc_modification_tem...
Marcel de Rooy [Tue, 20 Nov 2018 15:45:17 +0000 (16:45 +0100)]
Bug 21867: Replace remaining document.element.onchange calls in marc_modification_templates.js

Replace onchange() by jQuery change().

Test plan:
Go to marc mod templates. Add, edit and delete. Check if works and no js
errors.
git grep -l -E "onchange\(" should not have occurrences outside lib.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19365: (QA follow-up) Ensure we use a modern enough perl
Martin Renvoize [Tue, 20 Nov 2018 10:06:43 +0000 (10:06 +0000)]
Bug 19365: (QA follow-up) Ensure we use a modern enough perl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19365: Clean up, fix and add new tests.
Martin Renvoize [Tue, 20 Nov 2018 10:06:24 +0000 (10:06 +0000)]
Bug 19365: Clean up, fix and add new tests.

Moved db_dependent tests to the proper directory in the hierarchy, fixed tests to check correct results now that the authority query builder works better and added several new tests to cover changed functionality.

Sponsored-by: National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19365: Index authority fields as phrases
Ere Maijala [Tue, 13 Nov 2018 14:53:30 +0000 (16:53 +0200)]
Bug 19365: Index authority fields as phrases

Followup change to the mappings syntax from bug 19893. Indexing as phrases allows to properly search for matching headings comprised of multiple subfields (e.g. author name with year of birth).

Sponsored-by: National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19365: Fix search for duplicate authorities with Elasticsearch
Ere Maijala [Sun, 16 Sep 2018 21:10:22 +0000 (00:10 +0300)]
Bug 19365: Fix search for duplicate authorities with Elasticsearch

Sponsored-by: National Library of Finland
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19365: Fix several issues with the Elasticsearch code
Ere Maijala [Fri, 14 Sep 2018 03:40:24 +0000 (06:40 +0300)]
Bug 19365: Fix several issues with the Elasticsearch code

Also optimize it so it's actually usable.

Test plan:

1. To test it properly you need biblio and authority data. You might get away with enabling AutoCreateAuthorities and BiblioAddsAuthorities so that authorities are created in the process. Another option would be to import authorities first e.g. from LoC.
2. Make sure the authority index has been properly created with "misc/search_tools/rebuild_elastic_search.pl -a -d"
3. Run "misc/link_bibs_to_authorities.pl -v -l" twice and observe the results.

Sponsored-by: National Library of Finland
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21869: Fix incorrect value setting in DB update
Nick Clemens [Mon, 26 Nov 2018 13:08:05 +0000 (13:08 +0000)]
Bug 21869: Fix incorrect value setting in DB update

To test:
1 - Set some value for MarkLostAsReturned syspref
2 - Set your db version to 17.12.00.035 (or load an older db)
3 - updatedatabase
4 - Note your values are lost and db is incorrectly set
5 - Apply patch
6 - Reset values
7 - Reset DB version
8 - Run updatedatabase
9 - Original values are retained

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21878: (follow-up) Fix a few uri filter in facets
Marcel de Rooy [Mon, 26 Nov 2018 09:30:12 +0000 (10:30 +0100)]
Bug 21878: (follow-up) Fix a few uri filter in facets

We need to adjust a few query_cgi | uri filters here too.
Note that sort_by should be filtered by uri, not url.

Similar change on staff side.

Test plan:
Toggle Show all items/Limit available items.
Check: git grep -l "query_cgi | uri"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21878: (follow-up) Fix a few query_cgi filters in opac-search-history
Marcel de Rooy [Mon, 26 Nov 2018 09:10:37 +0000 (10:10 +0100)]
Bug 21878: (follow-up) Fix a few query_cgi filters in opac-search-history

We need to replace the uri filter on query_cgi to make some URLs work.

Test plan:
Check if the links on user page, search history work for biblio and auth
in current and previous release.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21878: To fix pagination problem in OPAC
Nazlı Çetin [Fri, 23 Nov 2018 14:23:07 +0000 (14:23 +0000)]
Bug 21878: To fix pagination problem in OPAC

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21644: better UNIMARC XSLT display of 210 in intranet
Fridolin Somers [Wed, 24 Oct 2018 12:23:02 +0000 (14:23 +0200)]
Bug 21644: better UNIMARC XSLT display of 210 in intranet

In intranet default UNIMARC XSLT display of 210 is tricky.
It tests each subfield with a complex conditional prefix.
In OPAC default UNIMARC XSLT display 210 is simply displayed with a loop on all subfields.

I propose to use the same code as OPAC in intranet.
It allows to display $f and removes strange middle-score character.

Test plan:
1) Doni't apply patch
2) Use an UNIMARC database
3) Use default XSLT in all displays
4) Configure a framework to allow 210 subfields from 'a' to 'h'
5) Edit a record with this framework
6) In each 210 subfield enter its letter : $a a, $b b ...
7) Save record
8) Look at record in OPAC, you see : "Publication: a, b : c, d, e, f : g, h"
9) Look at record in intranet
10) You see : ""Publication: a, b : c, d - e : g, h
11) Apply patch
12) Look at record in intranet
13) You see : "Publication: a, b : c, d, e, f : g, h"

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch makes intranet consistent with staff again on this area.
Note that we loose some punctuation like "- e".

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21730: DBRev 18.06.00.062
Nick Clemens [Mon, 26 Nov 2018 12:49:25 +0000 (12:49 +0000)]
Bug 21730: DBRev 18.06.00.062

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21730: Add missing PA_CLASS authorized values categories
Jonathan Druart [Wed, 31 Oct 2018 20:42:43 +0000 (17:42 -0300)]
Bug 21730: Add missing PA_CLASS authorized values categories

PA_CLASS is missing from the list of AV category

Test plan:
Execute the update DB entry
Confirm that you now have PA_CLASS in the AV category list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21874: (QA follow-up) Fix intranet sendshelf
Marcel de Rooy [Fri, 23 Nov 2018 11:02:51 +0000 (12:02 +0100)]
Bug 21874: (QA follow-up) Fix intranet sendshelf

Move encode line below regex line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21874: Fix encoding of cart and list email subjects
Katrin Fischer [Fri, 23 Nov 2018 10:30:49 +0000 (11:30 +0100)]
Bug 21874: Fix encoding of cart and list email subjects

The subject of the cart and list emails is not correctly
encoded and displays incorrectly in some email clients.

To test:

Lists:
- Create a list, name it using umlauts or other diacritics
  Example:  Jugendbücher (books for youths in German)
- Add some items to your list
- Email yourself the list
- Verify that the email subject is broken

Cart:
- Install another language with non-latin characters like Greek
- Fill the cart with some titles
- Send yourself the cart
- Verify that the email subject is broken

Note: Some email clients display correctly, others not.
      It's known to be incorrect in Outlook and web.de,
      displaying nicely in Thunderbird.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested all four scripts by manipulating the cart text too in templates.
Follow-up handles intranet sendshelf.

Note: I asked Katrin to remove the encode UTF-8 statements, since we
convert to MIME and the subject line should never be UTF-8.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21649: Pass guarantee info to template when adding child
Nick Clemens [Mon, 19 Nov 2018 14:47:04 +0000 (14:47 +0000)]
Bug 21649: Pass guarantee info to template when adding child

To test:
1 - Find an adult patron
2 - Click 'Add child'
3 - Note address/phone info does not carry over
4 - Apply patch
5 - Repeat
6 - Note information populates

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Todd <tgoatley@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
It works, but the code is ugly and hard to maintain.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21758: Navigation in Z39.50 result pages not working in Acquisitions
Owen Leonard [Wed, 21 Nov 2018 16:42:03 +0000 (16:42 +0000)]
Bug 21758: Navigation in Z39.50 result pages not working in Acquisitions

This patch makes markup corrections to the acquisitions Z39.50 search
results template so that the navigation form works correctly.

Also changed: Removed invalid type attributes from style and script
tags.

To test, apply the patch and go to Acquisitions -> Vendor -> Basket.

- Add to basket -> From an external source
- Perform a Z39.50 search which will return multiple pages of results
- On the search results page, use the form at the bottom of the page to
  navigate through results. Confirm that both the "Go" form and the
  next/previous buttons work.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21774: Cloned item subfields disappear when editing an item
Marcel de Rooy [Thu, 8 Nov 2018 13:49:10 +0000 (14:49 +0100)]
Bug 21774: Cloned item subfields disappear when editing an item

Bug 10306 changed behavior on cloning item subfields by no longer splitting
constructions like 'A | B' in item fields like ccode.

If it is really recommended to clone item subfields, I am not so sure
about. But this patch at least restores the possibility to do so while
we discuss if we should ;)

Test plan:
[1] Run Items.t
[2] Make an item subfield repeatable in framework. And test edit items.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Also fixes the display of collections on the items
table (on editing items).

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21819: (QA follow-up) Replace onchange() in touched code
Marcel de Rooy [Tue, 20 Nov 2018 15:32:46 +0000 (16:32 +0100)]
Bug 21819: (QA follow-up) Replace onchange() in touched code

AFAIK we should not call document...onchange() and assume that it works.
Apparently, it does at least in some browsers. But we are not sure.
We could easily replace them here by the documented jQuery counterpart.

Note: If you try git grep -l -E "onchange\(" you will find some
occurrences in two libraries and only in one js file (this one).
We should replace all occurrences here; will open a new report for that.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Verified that the change event was triggered: span should expand/collapse.

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21819: Marc modification templates action always checks Regexp checkbox
Andreas Roussos [Sat, 17 Nov 2018 09:35:00 +0000 (11:35 +0200)]
Bug 21819: Marc modification templates action always checks Regexp checkbox

When editing a MARC modification template action, the 'RegEx'
checkbox to the right of the 'to field' textboxes will always
appear checked, even if no regular expression has been added.

This patch fixes that.

Test plan (steps 1-5 are copied from the original report -- thanks Pasi!):
1) Go to Tools > Marc modification templates, and create a new template
2) Add a new action to the template
3) Edit the action so it's "Move" field to another field.
   Do not check the RegEx checkbox after the "To" field.
4) Save the action.
5) Edit the same action again. The checkbox is now checked.
6) Apply the patch and hit Ctrl-F5 to do a hard refresh in your browser.
7) Edit the action you saved in 4): this time the 'RegEx' checkbox
   should be unchecked.
8) For completeness, add a regular expression to the "Move" action
   created in 3) and click on 'Update action'. When you re-edit this
   action the 'RegEx' checkbox should be checked.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21615: Move stock rotation in the tools menu
Isobel Graham [Mon, 19 Nov 2018 12:08:33 +0000 (12:08 +0000)]
Bug 21615: Move stock rotation in the tools menu

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21854: Use template plugin to display category description
Nick Clemens [Fri, 16 Nov 2018 17:23:14 +0000 (17:23 +0000)]
Bug 21854: Use template plugin to display category description

Rather than getting the description in the script and passing, we should
just use the tmeplate plugin to get the description from the category
code.

To test:
1 - Find a patron, note their category
2 - Visit Tools - Batch patron modification
3 - Enter barcode of patron above
4 - Note category does not show in the display of patrons to be modified
5 - Apply patch
6 - Reload the page, note the patron category displays
7 - Modify the patron (anything but category)
8 - Check that category still diplays correctly in results

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21837: Don't set holdingbranch filter using selected homebranch filter
Nick Clemens [Wed, 14 Nov 2018 19:08:09 +0000 (19:08 +0000)]
Bug 21837: Don't set holdingbranch filter using selected homebranch filter

To recreate:
1 - Open the overdues report (don't worry if you don't have results)
2 - Choose to filter by homebranch
3 - Note the holdingbranch filter is set to the selected homebranch
4 - Apply patch
5 - Clear filters
6 - repeat
7 - only homebranch is set

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21529: (bug 13618 follow-up) Display print notices with HTML tags
Jonathan Druart [Mon, 22 Oct 2018 20:52:46 +0000 (17:52 -0300)]
Bug 21529: (bug 13618 follow-up) Display print notices with HTML tags

Replace a wrong html filter with raw.

Test plan:
Define a HOLD or DISCHARGE notice template, with html tags.
Generate them and confirm that html tags are displayed (which restore
the existing behaviour prior to bug 13618)

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21529: (follow-up) USE raw filter
Andrew Isherwood [Mon, 29 Oct 2018 14:10:42 +0000 (14:10 +0000)]
Bug 21529: (follow-up) USE raw filter

In order to be able to make use of the $raw filter, we need to USE it
first

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21853: (follow-up) to solve printpdf error
Mark Tompsett [Sun, 18 Nov 2018 05:36:44 +0000 (05:36 +0000)]
Bug 21853: (follow-up) to solve printpdf error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Theoretically this follow-up makes no difference. All modules only export
printpdf and now we are just asking explicitly for printpdf. But if it
resolves some exception on the rule..

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21853: Fix PDF export of basketgroups
Julian Maurice [Sat, 17 Nov 2018 10:58:02 +0000 (11:58 +0100)]
Bug 21853: Fix PDF export of basketgroups

In recent versions of Perl, '.' is not included by default in @INC. This
breaks PDF export of basketgroups.

This patch moves acqui/pdfformat/*.pm files in Koha namespace so that
they can be 'require'd without manipulating @INC

Test plan:
1. Turn off Plack/Starman and test PDF export for every value of
   OrderPdfFormat system preference
2. Turn on Plack/Starman and test PDF export for every value of
   OrderPdfFormat system preference
3. Test on a dev install and a standard/package install

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21823: Force creation of POT file even if there is no messages
Julian Maurice [Tue, 13 Nov 2018 16:00:23 +0000 (17:00 +0100)]
Bug 21823: Force creation of POT file even if there is no messages

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21835: (QA follow-up) Fix failing test
Martin Renvoize [Fri, 16 Nov 2018 15:10:05 +0000 (15:10 +0000)]
Bug 21835: (QA follow-up) Fix failing test

The illrequest api response should always be augmented with an id_prefix
field which is not part of the core illrequest object

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21567: Remove Koha_ExternalContent_RecordedBooks.t
Tomas Cohen Arazi [Wed, 14 Nov 2018 18:11:07 +0000 (15:11 -0300)]
Bug 21567: Remove Koha_ExternalContent_RecordedBooks.t

This patch removes this file. The included tests are similar to those in
the db_dependent section, with the difference that this have some things
mocked. But the tests still require name resolution and connecting to
the RB servers. This situation breaks package building without any
noticeable gain.

The feature could be better tested by mocking WebService::ILS calls (so
no external world contact), but it belongs to a separate bug report.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21567: Move Koha_ExternalContent_OverDrive.t to db_dependent
Mirko Tietgen [Thu, 15 Nov 2018 23:07:14 +0000 (00:07 +0100)]
Bug 21567: Move Koha_ExternalContent_OverDrive.t to db_dependent

This tests pass on the build step only because they are skipped, due to
the absense of Test::DBIx::Class library.

It makes sense for them to be in the db_dependent directory, as they are
not completely mocked (re: external world interactions).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21815: Rephrase HidePersonalPatronDetailOnCirculation
Katrin Fischer [Sat, 3 Nov 2018 08:29:39 +0000 (08:29 +0000)]
Bug 21815: Rephrase HidePersonalPatronDetailOnCirculation

Makes it a little easier to translate, also fixes whitespace and capitalization.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21839: Fix capitalization of "Print Label" link
Katrin Fischer [Wed, 14 Nov 2018 21:17:13 +0000 (22:17 +0100)]
Bug 21839: Fix capitalization of "Print Label" link

Fixed the spelling to follow Koha's capitalization rules to
"Print label".

To test:
- Edit an item in the GUI
- Look at the Actions pull down in the table above
  the item form

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21516: Compiled CSS
Nick Clemens [Fri, 16 Nov 2018 12:57:46 +0000 (12:57 +0000)]
Bug 21516: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21516: (ALTERNATE) Request notes CSS bug makes them unreadable
Owen Leonard [Tue, 9 Oct 2018 14:34:55 +0000 (14:34 +0000)]
Bug 21516: (ALTERNATE) Request notes CSS bug makes them unreadable

This alternate patch makes multiple markup corrections to the ILL
requests templates. It reformats the request details to use a list,
making it consistent with similar interfaces (see patron details,
baskets in acquisitions). The display of notes has been changed so that
it uses a paragraph tag instead of <pre>.

To test, apply the patch and rebuild the staff client CSS.

- Manage an ILL request which has staff and OPAC notes. Everything
  should look readable.
- Running validation on the HTML should only return warnings coming from
  global include files (js_includes.inc).

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21838: Wrong alignment of instructors in course reserves
Owen Leonard [Thu, 15 Nov 2018 13:39:33 +0000 (13:39 +0000)]
Bug 21838: Wrong alignment of instructors in course reserves

This patch adds CSS to course reserve pages so that multiple instructors
on a course are displayed well.

To test, apply the patch and:

 - Add or edit a course.
   - Test adding and removing instructors, saving, and adding and removing
     again.
 - View a course with multiple instructors and confirm that they are
   displayed well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Awesome, Owen :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20598: Update number of tests
Nick Clemens [Fri, 16 Nov 2018 12:51:27 +0000 (12:51 +0000)]
Bug 20598: Update number of tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20598: (QA follow-up) Tiny fixes
Marcel de Rooy [Fri, 16 Nov 2018 09:37:55 +0000 (10:37 +0100)]
Bug 20598: (QA follow-up) Tiny fixes

[1] Correct POD for _FixOverduesOnReturn
Is called by AddReturn, AddRenewal and LostItem.
Also tested in Circulation.t btw

[2] $dbh is not used in _FixOverduesOnReturn
[3] Moving all parameters to the first line.
[4] Variable $uquery is not used too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20598: Unit test
Kyle M Hall [Mon, 5 Nov 2018 13:31:40 +0000 (13:31 +0000)]
Bug 20598: Unit test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20598: Accruing fines not closed out by longoverdue.pl if WhenLostForgiveFine...
Kyle M Hall [Tue, 17 Apr 2018 18:11:41 +0000 (14:11 -0400)]
Bug 20598: Accruing fines not closed out by longoverdue.pl if WhenLostForgiveFine is not enabled

Test Plan:
1) Ensure WhenLostForgiveFine is disabled
2) Create an overdue with a fine
3) Mark it lost with longoverdue.pl
4) Note it is still marked as an accruing fine
5) Apply this patch
6) Repeat steps 1-3
7) Note it is no longer an accruing fine!

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18677: (QA follow-up) Trivial fixes to Chargelostitem.t
Marcel de Rooy [Fri, 16 Nov 2018 09:04:55 +0000 (10:04 +0100)]
Bug 18677: (QA follow-up) Trivial fixes to Chargelostitem.t

Kind of funny that we did not touch this test here. But it passed!
Trivial fixes:
[1] Typo precessfee
[2] Typo the linked
[3] Add rollback

Test plan:
Run t/db_dependent/Circulation/Chargelostitem.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18677: Remove new issue_id param from charlostitem
Jonathan Druart [Thu, 1 Nov 2018 14:47:47 +0000 (11:47 -0300)]
Bug 18677: Remove new issue_id param from charlostitem

We have the itemnumber no need to pass the issue_id, we can retrieve it
from chargelostitem

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18677: Make the tests pass
Jonathan Druart [Thu, 1 Nov 2018 14:47:16 +0000 (11:47 -0300)]
Bug 18677: Make the tests pass

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18677: issue_id is not added to accountlines for lost item fees
Kyle M Hall [Wed, 11 Apr 2018 18:08:57 +0000 (14:08 -0400)]
Bug 18677: issue_id is not added to accountlines for lost item fees

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Accounts.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michal Denar <black23@gmail.com>
[EDIT:]
Patch should have increased the number of tests obviously.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21835: Fix display of request ID
Andrew Isherwood [Wed, 14 Nov 2018 16:08:32 +0000 (16:08 +0000)]
Bug 21835: Fix display of request ID

We now populate the id_prefix property in the API response. It turns out
that explicitly casting to a string wasn't necessary as JS does "the
right thing" when concatenating a string and an integer

Test plan:

- Before applying the patch view the ILL requests table
- TEST: Observe that the Request number column displays as NaN
- Apply the patch
- Refresh the page
- TEST: Observe that the request number now displays correctly
- Add the following block to your koha-conf.xml:

<branch>
    <code>**The code of a branch that has an ILL request attached to
    it**</code>
    <prefix>YAY</prefix>
</branch>

- Refresh the page
- TEST: Observe the request made on the branch that you specified in the
config are now prefixed with "YAY-"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21796: Don't unlock checkouts if restriction exists but fines are below limit
Katrin Fischer [Thu, 1 Nov 2018 13:01:48 +0000 (13:01 +0000)]
Bug 21796: Don't unlock checkouts if restriction exists but fines are below limit

The checkout form will be removed if various conditions are
met: Restrictions, a fine above noissuescharge etc.

Bug 19933 changed the conditions, so a restriction will no longer
block checkouts, if the fines are below the set limit.

To test:

- Add a restriction
- Confirm the checkouts form is replaced by a message
- Add a fine below the noissuescharge limit
- Confirm that the form reappears
- Apply the patch
- Check that the checkout form is gone now
- Remove restriction - form should reappear
- Add to the fine, so it's above the limit
- Form should disappear

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21814: Compiled CSS
Nick Clemens [Fri, 16 Nov 2018 12:33:43 +0000 (12:33 +0000)]
Bug 21814: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21814: (follow-up) System preferences save button can be hidden by language menu
Owen Leonard [Thu, 15 Nov 2018 17:20:52 +0000 (17:20 +0000)]
Bug 21814: (follow-up) System preferences save button can be hidden by language menu

This follow-up implements the same change by defining a variable to be
used as the minimum height of the language footer navbar. A calculation
is done on this value to set the bottom margin of the main area of the
page.

To test, apply the patch and rebuild the staff client CSS. Clear your
browser cache if necessary. View the system preferences page again and
confirm that the bug is still fixed.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21814: System preferences save button can be hidden by language menu
Owen Leonard [Mon, 12 Nov 2018 19:07:12 +0000 (19:07 +0000)]
Bug 21814: System preferences save button can be hidden by language menu

This patch modifies the staff client CSS to give pages enough of a
bottom margin that the language footer will not obscure controls
appearing at the bottom of the page.

To test, apply the patch and regenerate the staff client CSS. You must
have one or more translations installed and enabled.
StaffLangSelectorMode should be set to display the language menu in the
footer.

Go to Administration and search for 'opac.' Scroll to the bottom of the
page and confirm that the last submit button is not hidden by the
language menu.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20244: DBRev 18.06.00.061
Nick Clemens [Fri, 16 Nov 2018 12:31:51 +0000 (12:31 +0000)]
Bug 20244: DBRev 18.06.00.061

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20244: Pod fixes
Nick Clemens [Fri, 16 Nov 2018 12:06:31 +0000 (12:06 +0000)]
Bug 20244: Pod fixes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20244: Add alt script indexing and fix sort field indexing
Ere Maijala [Mon, 2 Jul 2018 13:04:05 +0000 (16:04 +0300)]
Bug 20244: Add alt script indexing and fix sort field indexing

https://bugs.koha-community.org/show_bug.cgi?id=20244

Test plan:

1. Add a record with alternate script fields in 880 (sample attached in the bug).
2. Make sure the the record can be found e.g. with the alternate script title.
3. Add a record with multiple authors.
4. Check that in the index there is only a single author__sort field.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20244: Improve Elasticsearch ISBN indexing
Ere Maijala [Mon, 2 Jul 2018 12:55:10 +0000 (15:55 +0300)]
Bug 20244: Improve Elasticsearch ISBN indexing

https://bugs.koha-community.org/show_bug.cgi?id=20244

Test plan:

1. Add a record with an ISBN-10 or ISBN-13 that can be converted to ISBN-10 (e.g. 1-56619-909-3).
2. Verify that the record can be found by searching for "1-56619-909-3", "1566199093", "978-1-56619-909-4" and "9781566199094".

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: (QA follow-up) Convert atomicupdate to .perl
Martin Renvoize [Tue, 13 Nov 2018 11:23:11 +0000 (11:23 +0000)]
Bug 19893: (QA follow-up) Convert atomicupdate to .perl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: (QA follow-up) Spelling correction in POD
Martin Renvoize [Tue, 13 Nov 2018 11:11:04 +0000 (11:11 +0000)]
Bug 19893: (QA follow-up) Spelling correction in POD

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Increase test coverage
David Gustafsson [Mon, 5 Nov 2018 14:00:21 +0000 (15:00 +0100)]
Bug 19893: Increase test coverage

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Add code review fixes
David Gustafsson [Thu, 1 Nov 2018 14:47:12 +0000 (15:47 +0100)]
Bug 19893: Add code review fixes

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Add pods, remove syspref, add tests for serialization format
David Gustafsson [Mon, 22 Oct 2018 09:30:17 +0000 (11:30 +0200)]
Bug 19893: Add pods, remove syspref, add tests for serialization format

Add missing pods, remove obsolete syspref and add test for serialization format for records exceeding max record size

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Fix tests and add tests for joined subfields
David Gustafsson [Wed, 12 Sep 2018 14:50:01 +0000 (16:50 +0200)]
Bug 19893: Fix tests and add tests for joined subfields

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Support for joined subfields in mappings
David Gustafsson [Tue, 11 Sep 2018 15:56:44 +0000 (17:56 +0200)]
Bug 19893: Support for joined subfields in mappings

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Restore and fix removed tests
David Gustafsson [Fri, 7 Sep 2018 13:18:00 +0000 (15:18 +0200)]
Bug 19893: Restore and fix removed tests

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Fix Elasticsearch tests.
Ere Maijala [Mon, 2 Jul 2018 12:23:51 +0000 (15:23 +0300)]
Bug 19893: Fix Elasticsearch tests.

https://bugs.koha-community.org/show_bug.cgi?id=19893

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Add index status
David Gustafsson [Tue, 29 May 2018 15:57:31 +0000 (17:57 +0200)]
Bug 19893: Add index status

Add persistent per index "index status" state to provide useful
user feedback when update of Elasticsearch server mappings fails

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Remove serialization format setting
David Gustafsson [Mon, 28 May 2018 14:03:32 +0000 (16:03 +0200)]
Bug 19893: Remove serialization format setting

Default to base64 encoded binary MARC with MARCXML
fallback if record exceeds maximum size

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19893: Alternative optimized indexing for Elasticsearch
David Gustafsson [Tue, 12 Dec 2017 17:26:13 +0000 (18:26 +0100)]
Bug 19893: Alternative optimized indexing for Elasticsearch

Implement optimized indexing for Elasticsearch

How to test:
1) Time a full elasticsearch re-index without this patch by running the
   rebuild_elastic_search.pl with the -d flag:
   `koha-shell <instance_name> -c "time rebuild_elastic_search.pl -d"`.
2) Apply this patch.
3) Time a full re-index again, it should be about twice at fast (for a
   couple of thousand biblios, with fewer biblios results may be more
   unpredictable).

Sponsored-by: Gothenburg University Library
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7143: Update about page for new dev Thatcher Leoonard
Nick Clemens [Thu, 15 Nov 2018 12:37:22 +0000 (12:37 +0000)]
Bug 7143: Update about page for new dev Thatcher Leoonard

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21749: (QA follow-up) Add more tests for ImportFramework
Tomas Cohen Arazi [Mon, 12 Nov 2018 18:03:34 +0000 (15:03 -0300)]
Bug 21749: (QA follow-up) Add more tests for ImportFramework

This patch adds tests for:
- Output of ImportFramework on fields removal and error conditions (file
  not found)
- Different file format behaviour (csv, xml and ods are tested).

To test:
- Run
  $ kshell
 k$ prove t/db_dependent/ImportExportFramework.t
=> SUCCESS: All green :-D
- Sign off :-D

Note: the biblio_framework* files are based on the original one on the
patchset, and exported in 17.11 with different formats.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21749: Fix import of CSV biblio framework
Jonathan Druart [Mon, 12 Nov 2018 16:14:19 +0000 (13:14 -0300)]
Bug 21749: Fix import of CSV biblio framework

Bug 9701 added 2 new columns to the table marc_tag_structure which broke
the import of biblio frameworks if the CSV file was generated with a
previous version.

Test plan:
- Export a biblio framework from 17.11
- Import it into 18.05+

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=21740

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21749: Add tests for ImportFramework
Jonathan Druart [Mon, 12 Nov 2018 16:11:42 +0000 (13:11 -0300)]
Bug 21749: Add tests for ImportFramework

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21805: Duplicate include file in search results template causes JS error
Owen Leonard [Fri, 9 Nov 2018 19:02:25 +0000 (19:02 +0000)]
Bug 21805: Duplicate include file in search results template causes JS error

This patch removes a redundant include file, browser-strings.inc, from
the top of the staff client search results template. The
correctly-placed include is in the JavaScript block at the bottom of the
template. The duplication causes a JavaScript error which can be seen in
the browser console.

To test, apply the patch and peform a catalog search in the staff
client. Open the browser console and confirm that there are no errors.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18584: Our legacy code contains trailing-spaces
Thatcher Leonard [Tue, 6 Nov 2018 14:39:28 +0000 (14:39 +0000)]
Bug 18584: Our legacy code contains trailing-spaces

This patch removes trailing spaces from acquisitions-search.inc

Mentored-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17084: Automatic debian/control updates (unstable/master)
Nightly Build Bot [Wed, 14 Nov 2018 23:25:09 +0000 (00:25 +0100)]
Bug 17084: Automatic debian/control updates (unstable/master)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>