]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 4078: Add the ability to display and configure the symbol for prices
Jonathan Druart [Thu, 1 Feb 2018 17:32:39 +0000 (14:32 -0300)]
Bug 4078: Add the ability to display and configure the symbol for prices

The symbol of currencies are not displayed (or not correctly) so far.
This patch set adds the ability to configure the display of the symbol
(with or without a whitespace between the symbol and the price).

Test plan:
1. Execute the update DB entry, go to the currency admin page and tick the
new "Space separation between symbol and value" checkbox
2. Add a fine to a patron and use their credentials to login at the OPAC
3. You should see the "$ 42 due fines and charges" info in the
dashboard
4. Untick the new checkbox to remove the space and reload the OPAC main
page.
=> The space should not be longer displayed ($42)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Pass with_symbol to module
Jonathan Druart [Thu, 1 Feb 2018 17:31:48 +0000 (14:31 -0300)]
Bug 4078: Pass with_symbol to module

The template plugin did not pass the with_symbol flag to the module and
so was not taken into account

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Add the checkbox to the UI
Jonathan Druart [Thu, 1 Feb 2018 17:31:25 +0000 (14:31 -0300)]
Bug 4078: Add the checkbox to the UI

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Update DB entry - add new column currency.p_sep_by_space
Jonathan Druart [Thu, 1 Feb 2018 17:30:53 +0000 (14:30 -0300)]
Bug 4078: Update DB entry - add new column currency.p_sep_by_space

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: DBIC Schema changes
Jonathan Druart [Thu, 1 Feb 2018 17:30:39 +0000 (14:30 -0300)]
Bug 4078: DBIC Schema changes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17457: Add tests for each marc flavour
David Bourgault [Wed, 24 Jan 2018 20:52:50 +0000 (15:52 -0500)]
Bug 17457: Add tests for each marc flavour

+ Added a `run_flavoured_tests` sub that runs for each MARC flavour
* Moved SearchWithISBNVariation tests to the new sub

I copied a lot of the necessary utility functions over Biblio.t (as of Jonathan's suggestion). I also tried to name and organize the code in such a way that it can be reused if anyone else needs to run "flavoured" tests in the future.

prove t/db_dependant/Acquisition.t  OK
QA tool green

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17457: Adv. Acquisition search with ISBN variations
David Bourgault [Mon, 25 Sep 2017 20:22:51 +0000 (16:22 -0400)]
Bug 17457: Adv. Acquisition search with ISBN variations

Advanced acquisition search will now follow the "SearchWithISBNVariations" system preference.

Test plan :
0) Make sure you have orders pending or completed
1) Enable SearchWithISBNVariations if it is not enabled
2) Search for one of your orders by its ISBN, it should appear
3) Search for the same order by a variation of its ISBN, I used this website to find it : http://www.hahnlibrary.net/libraries/isbncalc.html
You should not get a result.
4) Apply patch
5) Repeat step 2-3. You should get a hit both times.
6) prove t/db_dependent/Acquisition.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Add POD
Kyle M Hall [Fri, 2 Mar 2018 12:36:20 +0000 (12:36 +0000)]
Bug 19160: Add POD

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Remove tab characters causing qa script to fail
Kyle M Hall [Fri, 2 Mar 2018 12:32:09 +0000 (12:32 +0000)]
Bug 19160: Remove tab characters causing qa script to fail

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: (follow-up) Fix problems introduced by renaming logout_required to logout_...
Ulrich Kleiber [Wed, 7 Feb 2018 09:06:20 +0000 (10:06 +0100)]
Bug 19160: (follow-up) Fix problems introduced by renaming logout_required to logout_if_required

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Isolate CAS code into its own module
Jonathan Druart [Thu, 11 Jan 2018 18:43:42 +0000 (15:43 -0300)]
Bug 19160: Isolate CAS code into its own module

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Move the code from controller to C4::Auth_with_cas
Jonathan Druart [Thu, 11 Jan 2018 18:37:18 +0000 (15:37 -0300)]
Bug 19160: Move the code from controller to C4::Auth_with_cas

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Move duplicated code to its own private subroutine
Jonathan Druart [Thu, 11 Jan 2018 18:29:22 +0000 (15:29 -0300)]
Bug 19160: Move duplicated code to its own private subroutine

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: CAS Single logout
Chris Cormack [Wed, 7 Jun 2017 21:38:30 +0000 (09:38 +1200)]
Bug 19160: CAS Single logout

CAS supports single logout, where if you logout of one application it
logs you out of all of them.

This bug implements this

You will need a CAS server (with single logout configure),
and at least 2 applications (one being Koha)

1/ In Koha login via CAS
2/ Login to the other application via CAS
3/ Logout of the other application
4/ Notice you are still logged into Koha
5/ Log out of Koha
6/ Apply patch
7/ Login to Koha via CAS, login to other app via CAS
8/ Log out of other app
9/ Notice you are logged out of Koha

If you dont have CAS, this patch should be a no op, you could test that
1/ Login and logout normally
2/ Apply patch
3/ Login and logout still work fine

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Patch works as described, local login still works correctly.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20268: (follow-up) Correct template error
Owen Leonard [Fri, 23 Mar 2018 13:39:45 +0000 (13:39 +0000)]
Bug 20268: (follow-up) Correct template error

The login template must have a class attribute on the body tag in order
for the template to pass tests.

To test, apply the patch and confirm that the staff client login form
still looks the same. For further confirmation you could update the
IntranetUserCSS system preference with something like this:

.main_main-auth {
    background-color: #CCF;
}

The login form should now have a different background color.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoRevert "Bug 20341: Use AuthorisedValues plugin on the staff side"
Jonathan Druart [Mon, 19 Mar 2018 18:40:09 +0000 (15:40 -0300)]
Revert "Bug 20341: Use AuthorisedValues plugin on the staff side"

This reverts commit a67fdf3bd498bf1c5a90c2847570ea8eff9c52da.

I am not sure we already agreed on that: the UI let the ability to
choose different AV category for each frameworks. I think it should be
discussed widely before removing this possibility.
Even if I am pretty sure it is not handle correctly everywhere.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Maksim Sen
Jonathan Druart [Mon, 19 Mar 2018 18:38:03 +0000 (15:38 -0300)]
Bug 7143: Update about page for new dev - Maksim Sen

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Jose Martin
Jonathan Druart [Mon, 19 Mar 2018 18:36:52 +0000 (15:36 -0300)]
Bug 7143: Update about page for new dev - Jose Martin

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20347: Add missing classes to search results elements
Pasi Kallinen [Wed, 7 Mar 2018 07:35:19 +0000 (09:35 +0200)]
Bug 20347: Add missing classes to search results elements

The MARC21 XSLT doesn't add html classes to distinguish between
certain elements, and there's no way to rely on the element
positioning, making it impossible to style the elements with CSS.

Add the missing classes to distinguish the elements.

Test plan:
1) Apply patch
2) Search for any biblios
3) Check the search result page table HTML to see that the
   "Publisher", "Edition", "Source", "Other title", and "Online access"
   are wrapped in a span with class of results_summary and one
   of "publisher", "edition", "source", "other_title", and
   "online_access"
4) Check that the search results of the elements above looks correct
   when compared to the other elements

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Sebastian Hierl <s.hierl@aarome.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 11936: (QA follow-up) Consistent log message for item insert
Julian Maurice [Mon, 12 Mar 2018 10:51:59 +0000 (11:51 +0100)]
Bug 11936: (QA follow-up) Consistent log message for item insert

Fix the same error in another place

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 11936: Consistent log message for item insert
Magnus Enger [Thu, 22 Feb 2018 09:37:08 +0000 (10:37 +0100)]
Bug 11936: Consistent log message for item insert

If you use bulkmarcimport.pl to import records with items it looks
like the successfull insert of the record is reported multiple time,
but the second and subsequent "ok" is really related to importing
the item(s).

This patch changes the log message on successfully inserting an item
to match the log message given when inserting an item fails.

To test, the easy way:
- Look at lines 530 and 536 of bulkmarcimport.pl, and note that the
  "op" in those two lines are different
- Apply the patch
- Look at lines 530 and 536 again, and note that the "op" is now
  identical, and that this makes sense, since they are both related
  to the same operation, specifically inserting an item

To test, the hard way
- Have some records with items
- Import the records with bulkmarcimport.pl, and make sure to specify
  the -l option, to create a log of the actions taken
- Look at the log and verify it looks something like this:
  id;operation;status
  1;insert;ok
  1;insert;ok
  2;insert;ok
  2;insert;ok
- Apply this patch and import some more records with items. The log
  should now be similar to this:
  id;operation;status
  1;insert;ok
  1;insertitem;ok
  2;insert;ok
  2;insertitem;ok

Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20382: Missing space between patron and cardnumber on check out screen
Claire Gravely [Tue, 13 Mar 2018 08:53:29 +0000 (08:53 +0000)]
Bug 20382: Missing space between patron and cardnumber on check out screen

There should be a space between patron name and cardnumber on the check
out screen.

This patch adds a space between patron and cardnumber.

To test:
 1 type a patron name into the check out search or go to the check out
 tab from a patron record
 2 Confirm there is no space between patron name and cardnumber on the
 check out page
 3 apply patch
 4 confirm there is now a space
 5 sign off :)

Signed-off-by: Sebastian Hierl <s.hierl@aarome.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20195: Untranslatable Show/Hide title attr replacement in opac detail
Pasi Kallinen [Wed, 14 Feb 2018 10:12:52 +0000 (12:12 +0200)]
Bug 20195: Untranslatable Show/Hide title attr replacement in opac detail

There's javascript code in opac detail view that tries to replace
the word "Show" with "Hide" (and vice versa) in a title attribute.
In addition to those words being untranslatable, a word replacement
like that would not work properly when using other languages.

Replace the single title attribute with two translatable strings,
one for the "Show" case and one "Hide", and use the whole
string instead of trying to replace a single word.

Test plan:

1) Make sure OpacBrowseResults is on
2) in OPAC, search the catalog and go to the detail view
3) Hover the mouse over the "Browse results" text in the grey box on the
   right side. The popup text should show something like
   "Show pagination list (1-5 / 5)"
4) Click on the "Browse results"
5) Hover the mouse again over the text. The popup should show
   "Hide pagination list (1-5 / 5)"
6) Update a language xx-YY, translate the new msgids
   "Show pagination list (%s-%s / %s)" and
   "Hide pagination list (%s-%s / %s)", and install the language
7) Repeat 2-5 with that language, making sure the popup
   texts show up correctly in that language

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20383: Hide link to plugin management if plugins are not enabled
Owen Leonard [Tue, 13 Mar 2018 10:15:31 +0000 (10:15 +0000)]
Bug 20383: Hide link to plugin management if plugins are not enabled

This patch adds a check in admin-home.pl to see whether plugins are
enabled. If plugins are disabled, the link to plugins management is
hidden even if the user has plugin management permission.

To test, view the administration home page with plugins enabled and
disabled via the enable_plugins flag in the Koha configuration file.
Also test using users with different plugins permissions:

- Plugins enabled
  - CAN_user_plugins = 1
    -> Plugins link appears
  - CAN_user_plugins = 0
    -> Plugins link hidden

- Plugins disabled
  - CAN_user_plugins = 1,
  - CAN_user_plugins = 0
    -> Plugins link hidden

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20372: Correct toolbar markup on some pages
Owen Leonard [Mon, 12 Mar 2018 12:56:08 +0000 (12:56 +0000)]
Bug 20372: Correct toolbar markup on some pages

Differences in markup around some toolbars has the potential to create
CSS styling problems. This patch changes the markup to be consistent
with other instances of <div id="toolbar"></div>

To test, apply the patch and view these pages:

- Course reserves (main page)
- Course reserves -> Course detail page
- Reports -> Dictionary

On each of these pages the toolbar should look correct.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20321: Remove get_biblionumber_from_isbn
Nick Clemens [Thu, 1 Mar 2018 16:30:35 +0000 (16:30 +0000)]
Bug 20321: Remove get_biblionumber_from_isbn

To test:
1 - grep get_biblionumber_from_isbn
2 - verify all occurences are not actual calls (except for test)
3 - Apply patch
4 - grep get_biblionumber_from_isbn
5 - Verify it is removed

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18908: Warning "Compatibility levels before 9 are deprecated"
Mark Tompsett [Thu, 6 Jul 2017 18:51:56 +0000 (18:51 +0000)]
Bug 18908: Warning "Compatibility levels before 9 are deprecated"

The following output:

dh: Compatibility levels before 9 are deprecated (level 7 in use)
   dh_testdir -O--fail-missing
   dh_auto_clean -O--fail-missing
dh_auto_clean: Compatibility levels before 9 are deprecated (level 7 in use)
   dh_clean -O--fail-missing

is given when trying to following these instructions:
https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way

This merely tweaks the debian/compat file from 7 to 9.
The message goes away.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
From https://www.debian.org/doc/manuals/maint-guide/dother.en.html:
You may use compat level v9 in certain circumstances for compatibility with older systems. However, using any level below v9 is not recommended and should be avoided for new packages.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20376: Make select/unselect all ignore disabled checkboxes on batch record deletion
Maksim Sen [Mon, 12 Mar 2018 20:15:30 +0000 (16:15 -0400)]
Bug 20376: Make select/unselect all ignore disabled checkboxes on batch record deletion

Test Plan:

0.1 - find at least one biblionumber that has at least one item checked out
0.2 - find at least one biblionumber that has zero items checked out.
1 - Go into the module "Tools > Batch record deletion"
2 - in "List of biblionumbers or authority ids (one per line)" put the values you found in step 0.1 and 0.2
3 - click continue
4 - biblionumbers with at least one item checked out should not be clickable.
5 - biblionumbers with zero items checked out should be clickable.
6 - click "Select all" and "Clear all", both buttons should change the "checked" status of the enabled AND disabled biblionumber checkboxes.
7 - apply patch
8 - click "Select all" and "Clear all", both buttons should change the "checked" status of ONLY the enabled biblionumber checkboxes.

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20219: Remove t/smolder_smoke_signal
Jonathan Druart [Thu, 15 Feb 2018 19:00:20 +0000 (16:00 -0300)]
Bug 20219: Remove t/smolder_smoke_signal

The file is no longer used (is it?) and the project looks dead. Let
remove that file.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20173: Fix favicon.ico path in installer
David Cook [Sun, 18 Feb 2018 23:11:29 +0000 (10:11 +1100)]
Bug 20173: Fix favicon.ico path in installer

This patch corrects the favicon.ico path for the installer.

On git installs, it used to point to ./koha-tmpl/favicon.ico,
and on regular installs, it probably just didn't work.

https://bugs.koha-community.org/show_bug.cgi?id=20173
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20173: Clean up koha-tmpl directory
David Cook [Mon, 12 Feb 2018 02:44:50 +0000 (13:44 +1100)]
Bug 20173: Clean up koha-tmpl directory

This patch removes some HTML and ico files that are no longer
used in Koha.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20268: CSS regression: white gap on the top of the staff pages
Owen Leonard [Thu, 1 Mar 2018 15:00:18 +0000 (15:00 +0000)]
Bug 20268: CSS regression: white gap on the top of the staff pages

This patch makes template and CSS changes so that the staff client main
page doesn't get an unwanted top margin from the Bootstrap-grid
conversion.

- The unused "main" class is removed from the login page
- The "main" class on the staff client home page is changed to
  "intranet-main."
- The CSS for the staff client home page has been modified accordingly.

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

- Open the staff client login page. It should look as it always does.
- Log in and check the style of the main page. There should be no white
  margin at the top of the page.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19547: Deal with --create-db missing debian.cnf issue
Mark Tompsett [Tue, 31 Oct 2017 02:28:58 +0000 (02:28 +0000)]
Bug 19547: Deal with --create-db missing debian.cnf issue

Followed test plan. Patch functions as described and both commands execute.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19547: MariaDB install has no debian.cnf
Mark Tompsett [Mon, 30 Oct 2017 21:59:43 +0000 (17:59 -0400)]
Bug 19547: MariaDB install has no debian.cnf

This attempts to handle issues arising when running
koha-create on a system that never had MySQL installed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18570: (QA follow-up) Improved POD
Mark Tompsett [Fri, 9 Mar 2018 11:54:16 +0000 (11:54 +0000)]
Bug 18570: (QA follow-up) Improved POD

This tweaks the perldoc for SendQueuedMessages and adds
some for _get_unsent_messages.

TEST PLAN
---------

perldoc C4::Letters
-- look at _add_attachments (ugly), _get_unsent_messages (non-existent),
   SendQueuedMessages (no reference to borrowernumber or letter_code).
apply patch
perldoc C4::Letters
-- confirm that SendQueuedMessages and _get_unsent_messages
   have reasonable POD information.
-- notice how _add_attachments' POD is now readable

run koha qa test tools

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18570: Send Password Reset Emails immediately
Mark Tompsett [Thu, 8 Mar 2018 00:15:33 +0000 (00:15 +0000)]
Bug 18570: Send Password Reset Emails immediately

Run through the password reset process, and your server
should send the message immediate, not waiting for the
cronjob.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18570: Prove that the letter code parameter tweaks work
Mark Tompsett [Thu, 8 Mar 2018 00:13:09 +0000 (00:13 +0000)]
Bug 18570: Prove that the letter code parameter tweaks work

Run the following commands:
kshell
prove -v t/db_dependent/Letters.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18570: Tests to prove if email send was attempted
Mark Tompsett [Wed, 7 Mar 2018 23:59:54 +0000 (23:59 +0000)]
Bug 18570: Tests to prove if email send was attempted

kshell
prove -v t/db_dependent/Passwordrecovery.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20430: (See also bug 19436) Button display depends on wrong server count
Marcel de Rooy [Fri, 16 Mar 2018 08:02:36 +0000 (09:02 +0100)]
Bug 20430: (See also bug 19436) Button display depends on wrong server count

This is a QA follow-up of bug 19436, submitted separately for ease of
backporting it. (The bug was not raised by 19436.)

Obviously, the number of authority servers not biblio servers should
be the key factor for showing or hiding the button for new authority
records via Z39.50/SRU.

Trivial fix.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20097: (follow-up) Add a unit test
Mark Tompsett [Thu, 8 Mar 2018 03:03:46 +0000 (03:03 +0000)]
Bug 20097: (follow-up) Add a unit test

kshell
prove -v t/db_dependent/Record.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20097: Use same regex in marc2dcxml and opac-export
Marcel de Rooy [Mon, 29 Jan 2018 09:32:28 +0000 (10:32 +0100)]
Bug 20097: Use same regex in marc2dcxml and opac-export

This regex allows: dc, oaidc, srwdc, and rdfdc.

Test plan:
[1] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=dc
[2] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=oaidc
[3] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=nodc. This one should trigger a not-supported message.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid
Lari Taskula [Fri, 9 Mar 2018 13:49:27 +0000 (15:49 +0200)]
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid

To test:
1. In staff client, set your username to firstname
2. Add userid to BorrowerUnwantedField system preference
3. Go to your patron modification screen (memberentry.pl) and click Save
4. Observe you get kicked out into login screen, saying:
Error: You do not have permission to access this page.
Log in as a different user

5. Apply patch and restart plack

6. Set your username back to firstname
7. Repeat step 3
8. Observe you were not kicked out and your userid stays the same

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20348: SIP2 patron identification fails to use userid
Jose Martin [Wed, 7 Mar 2018 12:21:39 +0000 (15:21 +0300)]
Bug 20348: SIP2 patron identification fails to use userid

Replaces "or" with "||" in variable assignment

second attempt to retrieve borrower was not being executed due
to changed precedence

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20341: Use AuthorisedValues plugin on the staff side
Kyle M Hall [Fri, 9 Mar 2018 11:43:18 +0000 (06:43 -0500)]
Bug 20341: Use AuthorisedValues plugin on the staff side

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20341: Show authorized value description for withdrawn like damaged and lost
Fridolin Somers [Tue, 6 Mar 2018 11:26:19 +0000 (12:26 +0100)]
Bug 20341: Show authorized value description for withdrawn like damaged and lost

Actually catalog detail page shows for damaged and lost items the authorized value description if exists.
We must do the same for withdrawn information.

Test plan :
1) Set for items a subfield linked to items.withdrawn and using the authorized value category 'WITHDRAWN'
2) Edit the authorized value category to add value '2' and description 'Eaten by dog'
3) Edit an item to set this withdrawn value
4) Go to staff interface and look at items in record detail page /cgi-bin/koh/catalogue/detail.pl :
=> Without patch you see 'Withdrawn' and with patch you see 'Eaten by dog'
5) Go to OPAc and look at items in record detail page /cgi-bin/koha/opac-detail.pl :
=> Without patch you see 'Withdrawn' and with patch you see 'Eaten by dog'

Signed-off-by: delaye <stephane.delaye@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19908: Do not use .optional in password match validation function
Josef Moravec [Mon, 5 Feb 2018 08:25:03 +0000 (08:25 +0000)]
Bug 19908: Do not use .optional in password match validation function

Test plan:
0) Aplly only first patch
1) You will be able to submit a from on member-password.pl even if the
passwords don't match
2) Apply this patch -> you can't be able to submit the form if the
paswords don't match, but you'll be able to submit the form when
password fields are blank

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19908: Password fields in edit/add patron form should respect BorrowerMandatoryFi...
Josef Moravec [Wed, 3 Jan 2018 10:56:37 +0000 (10:56 +0000)]
Bug 19908: Password fields in edit/add patron form should respect BorrowerMandatoryField preference

Test plan:
0) Do not apply the patch, note the password field is always required
1) Apply the patch
2) Try to add and edit patron with and without "password" in BorrowerMandatoryField, it should always respect this setting
3) Use "Change password" button in patron toolbar, the password field
should be never required here - when leaved blank, the password is
unchanged
4) Play with  minPasswordLength and  RequireStrongPassword preferences,
    to ensure they work as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12812: (Follow-up) Fix use of C4::Circulation
Josef Moravec [Fri, 9 Mar 2018 06:58:34 +0000 (06:58 +0000)]
Bug 12812: (Follow-up) Fix use of C4::Circulation

Fixes this error:
Undefined subroutine &main::MarkIssueReturned called at
misc/cronjobs/longoverdue.pl line 316.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12812: Longoverdue.pl --mark-returned doesn't return items
Kyle M Hall [Thu, 8 Feb 2018 11:39:39 +0000 (06:39 -0500)]
Bug 12812: Longoverdue.pl --mark-returned doesn't return items

The longoverdue.pl option --mark-returned doesn't work unless the
--charge option is used as well.

Test Plan:
1) Run long overdue with --mark-returned and not --charge,
   note your items are marked lost but not returned
2) Apply this patch
3) Repeat step 1, the items should now get returned!

Tested with (for example):
misc/cronjobs/longoverdue.pl --lost 10=1 --mark-returned --verbose
--confirm

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20303: Do not explode when receiving an order if authorisedby not set
Jonathan Druart [Tue, 27 Feb 2018 18:54:38 +0000 (15:54 -0300)]
Bug 20303: Do not explode when receiving an order if authorisedby not set

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19546: (QA follow-up) Make the returning cd more fool proof
Marcel de Rooy [Mon, 5 Mar 2018 09:27:33 +0000 (10:27 +0100)]
Bug 19546: (QA follow-up) Make the returning cd more fool proof

Trivial and hypothetical fix.
If you create /root/AA B (space in dirname), the quotes added here will
help you to get back where you came from.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19546: Run starman from the instance's home dir
Tomas Cohen Arazi [Fri, 2 Mar 2018 13:36:34 +0000 (10:36 -0300)]
Bug 19546: Run starman from the instance's home dir

This patch makes koha-plack jump into the instance's home directory to
run.

It is required because Perl 5.18 introduced a breaking change that
makes perl die if @INC includes directories for which the user doesn't
have read permission, and need to be traversed when querying for a lib.
This is the case of '.', which is introduced automatically into @INC
until Perl 5.26 (which removes the 'feature').

The Mojolicious::Plugins lib prefixes the plugin names with
'Mojolicious::Plugin' so it first looks (for example) for
Mojolicious::Plugin::Koha::REST::Plugin::Pagination (Pagination is just
the first one on the list). When it looks for it at '.' it dies (because
of Perl's behaviour) so it doesn't query for the right namespace (the
following to try).

I only reproduced it in koha-testing-docker. To test, you just need to
try this patched koha-plack and make sure it doesn't break due to this
permissions issue.

To test:
- In your koha-testing-docker clone, run:
  $ docker-compose up -p test
- Open a shell inside the container (on a separate terminal):
  $ docker exec -it test_koha_1 bash
- From within the /root directory, restart plack:
  $ cd /root
  $ koha-plack --restart kohadev
=> FAIL: Logs show plack is broken due to permissions problems trying to
    find Mojolicious::Plugin::Koha::REST::Plugin::Pagination
- Use the patched script from this patch:
  $ /kohadevbox/koha/debian/scripts/koha-plack --restart kohadev
=> SUCCESS: Plack runs fine, no error in the logs
- Sign off :-D

Note: people who has environments in which the problems is reproducible,
    please test this version of koha-plack and stamp your sign-off,
    PLEASE.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20323: Fix batch patron modification tool
Josef Moravec [Fri, 2 Mar 2018 10:13:00 +0000 (10:13 +0000)]
Bug 20323: Fix batch patron modification tool

Test plan:
1) Go to Tools -> Batch patrons modification
2) Select some patrons and try to change any field
--> without patch - it exploads with log:
Can't call method "category" on unblessed reference at /home/vagrant/kohaclone/tools/modborrowers.pl
--> with patch - the modification is properly made

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20167: Make changing a hold pass the itemnumber to ModReserve
Tomas Cohen Arazi [Mon, 5 Mar 2018 16:36:50 +0000 (13:36 -0300)]
Bug 20167: Make changing a hold pass the itemnumber to ModReserve

If you have an item-level hold, changing an attribute (like priority,
pickup location or suspended until date) makes the hold a biblio-level
hold, because ModReserve is not passed the current itemnumber.

This patch uses the hold's itemnumber and passes it to the ModReserve
call.

To test:
- Run the regression tests from the previous patch:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail
- Apply this patch
- Run the tests:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20167: Regression test
Tomas Cohen Arazi [Mon, 5 Mar 2018 16:35:33 +0000 (13:35 -0300)]
Bug 20167: Regression test

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17717: (QA follow-up) Fix typo chdir
Marcel de Rooy [Mon, 5 Mar 2018 10:30:15 +0000 (11:30 +0100)]
Bug 17717: (QA follow-up) Fix typo chdir

This test does obviously not achieve the desired result:
    [ "chdir" != "no" ]
Trivial fix.
Adding the same quotes around starting_dir (just as for Bug 19546).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17717: Make cronjobs using koha-foreach use --chdir
Tomas Cohen Arazi [Fri, 2 Mar 2018 14:51:20 +0000 (11:51 -0300)]
Bug 17717: Make cronjobs using koha-foreach use --chdir

In order to patch production sites we need to adjust the shipped
cronjobs so they are called with the --chdir option switch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17717: Add a --chdir option switch for koha-foreach
Tomas Cohen Arazi [Fri, 2 Mar 2018 14:17:40 +0000 (11:17 -0300)]
Bug 17717: Add a --chdir option switch for koha-foreach

Until Perl 5.26, the current directory is added to @INC when running a
Perl script [1]. Having the current directory in @INC means it can be
tried to be traversed when performing a lib lookup. Since version 5.18,
Perl dies when it finds an unreadable directory (permissions) in @INC
that needs to be traversed. This behaviour won't change because Perl
devs consider it an enhancement to security. [2]

Because of this, we need to make sure our scripts are ran **from** a
directory in which they have read permissions.

Ths patch adds a --chdir option switch to the **koha-foreach** wrapper
script, that makes the inner shells/scripts to be ran within the Koha
instance's user home directory.

The change is trivial and should be QAed easily. I tested this on a prod
server:

- Create a /tmp/test.pl file containing:

use Modern::Perl;

use Cwd;
my $dir = getcwd;

warn $dir;

1;

A) then create a cronjob entry to run it using koha-foreach:
(in /etc/cron.d/test):
1/* * * * * root koha-foreach perl /tmp/test.pl
- Once I noticed the cronjob ran, I used mutt to read the emails in the
root user.
=> FAIL:
...
Subject: Cron <root@koha> koha-foreach --enabled perl /tmp/test.pl

"/root"
"/root"
"/root"
"/root"
"/root"
...

B) I then used the patched koha-foreach with different results:
=> SUCCESS:
...
Subject: Cron <root@koha> /root/koha-foreach --chdir --enabled perl /tmp/test.pl

"/var/lib/koha/acaderc"
"/var/lib/koha/agro"
"/var/lib/koha/anc"
"/var/lib/koha/arico"
"/var/lib/koha/artes"
...

So this patch's approach works. But...

C) master's koha-foreach seems to work just the same... I think it is
because of my previous attempt to fix this by using sudo in koha-shell.
So I think environmental conditions affect the behaviour (which shell is
configured for cron, sudo configuration, etc).

====

In conclusion, I think we should go ahead with this patch as it will solve
peoples issues, and it is a right solution (option #5 on the list) to
this Perl behaviour change. It doesn't cover other commands, but
followup patches could do.

I avoided /tmp as it is writable by any user... so it is an easy path
for both exploiting by replacing some lib, and also because the
existence of an unreadable dir that the interpreter could try to
traverse (unreadable /tmp/Authen or /tmp/Koha will trigger the same
error, and I assume people know what they are putting on the instance's
dir, at least it will be easier to track).

A followup patch takes care of making the cronjobs use --chdir when
calling koha-foreach

[1] https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
[2] https://rt.perl.org/Public/Bug/Display.html?id=123795

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20251: (bug 19280 follow-up) FIX SIP checkout
Jonathan Druart [Wed, 28 Feb 2018 15:57:25 +0000 (12:57 -0300)]
Bug 20251: (bug 19280 follow-up) FIX SIP checkout

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20286: Fix filter for BakerTaylor* prefs
Jonathan Druart [Tue, 27 Feb 2018 18:30:18 +0000 (15:30 -0300)]
Bug 20286: Fix filter for BakerTaylor* prefs

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20286: Correctly escape URI characters in OPAC RSS template
Jonathan Druart [Mon, 26 Feb 2018 13:48:18 +0000 (10:48 -0300)]
Bug 20286: Correctly escape URI characters in OPAC RSS template

Bug 19568 use the TT filter url whereas it must have escaped the URI
characters with the uri filter.

Test plan:
Subscribe to an OPAC search
=> Without this patch you will get an empty page
=> With this patch applied you will see result list.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20311: Prevent get_age tests to fail on Feb 28th
Jonathan Druart [Wed, 28 Feb 2018 16:54:32 +0000 (13:54 -0300)]
Bug 20311: Prevent get_age tests to fail on Feb 28th

Today Feb 28th 2018:
If we subtract 18y to this DateTime object 29/02/2000 and so the patron is not major yet

use Koha::DateUtils qw( dt_from_string );
say dt_from_string('28/02/2018')->add(years => -18);
say dt_from_string('28/02/2018')->add(years => -18, end_of_month => 'limit');

will display:
2000-02-29T00:00:00
2000-02-28T00:00:00

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19610: Make koha-common.logrotate use copytruncate
Tomas Cohen Arazi [Sat, 17 Feb 2018 14:57:43 +0000 (11:57 -0300)]
Bug 19610: Make koha-common.logrotate use copytruncate

This patch makes logrotate use the **copytruncate** directive, removing
the need to stop the Zebra and Plack servers on log rotation.

To test:
- Run:
  $ misc4dev/cp_debian_files.pl
- Edit the new /etc/logrotate.d/koha-common file changing 'weekly' for
'hourly'. This is to ease testing.
- Run:
  $ sudo ls -l /var/log/koha/kohadev
- Open a second terminal on your kohadevbox. On it...
- Run:
  $ sudo logrotate /etc/logrotate.d/koha-common
- Run:
  $ sudo ls -l /var/log/koha/kohadev
=> SUCCESS: Files got rotated! (i.e. files ending in .1 are created, the
        sizes make sense (.1 have contents, the ones without numbering
            probably zeroed <- it will depend on what's happening with
            your devbox in between).
- Play with your Koha, do some searches too:
=> SUCCESS: You have access to your Koha, searches work. i.e.:
     - Apache handled the log rotation operation
     - Plack handled the log rotation operation
     - Zebra handled the log rotation operation
- Sign off :-D!

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud hagud@orex.es
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20234: Update service description in koha-common.init
Tomas Cohen Arazi [Sat, 17 Feb 2018 14:50:16 +0000 (11:50 -0300)]
Bug 20234: Update service description in koha-common.init

The service description is very old and outdated. This patch fixes this.

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud hagud@orex.es
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20234: Make maintenance scripts use koha-zebra instead of koha-*-zebra
Tomas Cohen Arazi [Sat, 17 Feb 2018 14:34:58 +0000 (11:34 -0300)]
Bug 20234: Make maintenance scripts use koha-zebra instead of koha-*-zebra

This patch makes all maintenance scripts use **koha-zebra** instead of
the old **koha-*-zebra** scripts.

To test:
- Run:
  $ perl misc4dev/cp_debian_files.pl
  $ sudo service koha-common stop
=> SUCCESS: No errors and the Zebra-related sevices are stopped
  $ sudo service koha-common start
=> SUCCESS: No errors and the Zebra-related services are started
  $ sudo service koha-common restart
=> SUCCESS: No erros and Zebra-related services are running
  $ sudo koha-create --create-db test
=> SUCCESS: Instance created and zebra running for it
  $ sudo koha-disable test
=> SUCCESS: No errors and Zebra is stopped for instance test
  $ sudo koha-zebra --start test
  $ sudo koha-remove test
=> SUCCESS: No errors, instance removed, no Zebra running for test
- Sign off :-D

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud hagud@orex.es
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20218: Fix matching of uri in tracklinks
Nick Clemens [Fri, 16 Feb 2018 12:31:39 +0000 (12:31 +0000)]
Bug 20218: Fix matching of uri in tracklinks

The current code matches using a regex, this breaks when the url
contains special characters. We swtich it to equality check

To test:
1 - Enable TrackClicks (either track or anonymous)
2 - Find the URL of a biblio in the OPAC
3 - Paste this into the 856$u of another record
    (or use any url containing a '?' or other characters)
4 - View the record in the opac
5 - Click the URL
6 - 404 Error!
7 - Apply patch
8 - Try again
9 - Success!

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20302: Allow translating Delete button in Patron batch mod tool
Pasi Kallinen [Tue, 27 Feb 2018 10:59:56 +0000 (12:59 +0200)]
Bug 20302: Allow translating Delete button in Patron batch mod tool

There is an untranslatable Delete-button in the patron batch modification
tool. Allow translating it.

Test plan:

1) Go to Home -> Tools -> Batch patron modification, put a patron's
   card number in the box, and click on Continue
2) At the bottom of the screen there is an drop-down entry for
   Attribute, click on the "New" at the nd of that line
3) There should now be another Attribute -line, with "Delete" -link
   at the end of that line
4) Apply patch, install a language
5) Repeat 1-3 in that language, the Delete-link should be shown in
   the correct language, if the msgid "Delete" was translated
   in xx-YY-staff-prog.po

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20301: Allow translating "View" in manage MARC import
Pasi Kallinen [Tue, 27 Feb 2018 07:10:17 +0000 (09:10 +0200)]
Bug 20301: Allow translating "View" in manage MARC import

When looking at the table showing the staged MARC records, the "View"
text in the Diff-column is not translatable. Make it so.

Test plan:

1) Go to Home -> Tools -> Stage MARC records for import
2) Select eg. t/db_dependent/www/data/marc21record.mrc and upload the file
3) Click on Stage for import
   -> Manage staged records
   -> Import this batch into the catalog
4) Wait for zebra to reindex, or trigger it yourself by
   running rebuild_zebra.pl -a -b -r
5) Go to Home -> Tools -> Stage MARC records for import
6) Select the same file as in part 2 and upload the file
7) Change the Record matching rule to ISBN (020$a)
8) Click on Stage for import
   -> Manage staged records
9) In the table below, there should now be a line showing
   the staged MARC record matches biblio
10) Note the "View"-text in the "Diff"-column
11) Apply patch
12) Install a language, view the same batch in the
    Manage staged MARC records -page in that language
13) The "View" should show up correctly, and if the
    msgid "View" was translated in the xx-YY-staff-prog.po,
    should show up in the correct language

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20141: Untranslatable string in transport cost matrix
Pasi Kallinen [Tue, 6 Feb 2018 10:19:17 +0000 (12:19 +0200)]
Bug 20141: Untranslatable string in transport cost matrix

Make the "Disable" checkboxes in transport cost matrix translatable

Test plan:

1) Go to Home -> Administration -> Transport cost matrix
2) Click on any cell
3) Note the "Disable" checkbox text
4) Install patch, add a language, translate the text, etc
5) Repeat 1-3, the "Disable" text should now be translated

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20139: Improve MARC mapping translatable strings
Pasi Kallinen [Mon, 5 Feb 2018 12:45:25 +0000 (14:45 +0200)]
Bug 20139: Improve MARC mapping translatable strings

- Allow translating one error message
- Use string formatting with placeholders instead of concatenation

Test plan:

1) Go to Home -> Administration -> Koha to MARC Mapping
2) Click on the "Add" button to add a new mapping
3) Note the popup text looks correct
4) Enter something invalid
5) Note the error message
6) Click on any of the "Remove" buttons to remove a mapping
7) Note the popup text looks correct
8) Update, translate the new msgid's, and install a language
9) Repeat 1-7, note how the message are in the correct
   language

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20296: Untranslatable "All" in patrons table filter
Pasi Kallinen [Mon, 26 Feb 2018 10:08:27 +0000 (12:08 +0200)]
Bug 20296: Untranslatable "All" in patrons table filter

There's an untranslatable "All" in the "Show X entries" filter
when browsing the patrons.

Test plan:

1) Home --> Patrons --> Browse by last name.
2) In the table filtering toolbar, there's a dropdown with
   "Show [20] entries" and the last in the dropdown is "All".
3) Update and install a language, check that msgid "All" is
   translated and isn't fuzzy.
4) Check the "All" in the dropdown, it is not translated.
5) Install patch, repeat 1-3, and check the "All" in the dropdown,
   it should now be translated.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20295: Allow translating link title in ILL module
Pasi Kallinen [Mon, 26 Feb 2018 09:10:10 +0000 (11:10 +0200)]
Bug 20295: Allow translating link title in ILL module

Allow translating "View borrower details" link title in the ILL module.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20201: Silence warnings triggered by admin/aqplan.pl
Mark Tompsett [Wed, 14 Feb 2018 20:19:01 +0000 (20:19 +0000)]
Bug 20201: Silence warnings triggered by admin/aqplan.pl

TEST PLAN
---------
0) back up DB
1) Run the following commands on a kohadevbox:
    reset_all
    git bz apply 20185
    echo | sudo tee /var/log/koha/kohadev/plack-error.log
    restart_all
2) Navigate in a staff client:
    Home -> Administration -> Budgets -> Edit -> Planning by libraries
   -- could be any of the planning, but by libraries is nicely visible
   on screen.
3) Run the following commands:
    cat /var/log/koha/kohadev/plack-error.log
   -- several warnings.
4) Run the following commands:
    git bz apply 20201
    echo | sudo tee /var/log/koha/kohadev/plack-error.log
    restart_all
5) repeat step 2 and refresh the staff client page.
   -- this time warnings related to aqplan.pl are not there.
6) run koha qa test tools

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20290: Fix capitalization of "Routling List"
Katrin Fischer [Tue, 20 Feb 2018 21:42:13 +0000 (21:42 +0000)]
Bug 20290: Fix capitalization of "Routling List"

This fixes some strings to be properly capitalized.

To test:
- Create a new routing list, check title and breadcrumbs
- View the routing list tab in the patron account in staff,
  check title and breadcrumbs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19979: ->count and be called directly on Koha::Objects
Jonathan Druart [Tue, 27 Feb 2018 14:40:13 +0000 (11:40 -0300)]
Bug 19979: ->count and be called directly on Koha::Objects

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19979: Fix get_facets_info test in Search.t
Marcel de Rooy [Tue, 16 Jan 2018 13:28:36 +0000 (14:28 +0100)]
Bug 19979: Fix get_facets_info test in Search.t

The test should remove the holdingbranch key in the expected results when
there is only one branch.
See the logic in C4::Koha.

Test plan:
[1] Run Search.t on a database with multiple branches.
[2] Run Search.t on a database with one branch. Without this patch the test
    would fail: Failed test '_get_facets_info returns the correct data'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20142: Allow translating offline circ message
Pasi Kallinen [Tue, 6 Feb 2018 11:01:36 +0000 (13:01 +0200)]
Bug 20142: Allow translating offline circ message

Allow translating the notification saying you cannot change branch or
logout while offline.

Test plan:

1) Enable AllowOfflineCirculation
2) Go to Home -> Circulation -> Built-in offline circulation interface
3) Try to change your branch. Note the notification message
4) Apply patch, install language, translate the notification
5) Repeat 2 and 3 in that language. The message should be translated

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20147: Allow translating prompt in label edit batch
Pasi Kallinen [Tue, 6 Feb 2018 12:17:45 +0000 (14:17 +0200)]
Bug 20147: Allow translating prompt in label edit batch

Fix one untranslatable prompt in the label batch edit.

Test plan:

1) Go to Home -> Tools -> Label creator
2) Click on New -> Label batch
3) Add items to the batch
4) Select any of the items
5) Click on "Remove selected items"
6) Note the popup text
7) Apply patch, update a language, translate the msgid
   "Are you sure you want to remove label number(s): %s from this batch?"
8) Repeat 1-6. The popup text should now be translated.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13287: Fix DBRev message
Jonathan Druart [Tue, 27 Feb 2018 14:25:03 +0000 (11:25 -0300)]
Bug 13287: Fix DBRev message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13287: DBRev 17.12.00.021
Jonathan Druart [Mon, 26 Feb 2018 16:23:38 +0000 (13:23 -0300)]
Bug 13287: DBRev 17.12.00.021

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13287: Remove warning if --days is not passed and pref empty
Jonathan Druart [Mon, 26 Feb 2018 16:01:05 +0000 (13:01 -0300)]
Bug 13287: Remove warning if --days is not passed and pref empty

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13287: (QA follow-up) Final polishing
Marcel de Rooy [Fri, 23 Feb 2018 09:33:49 +0000 (10:33 +0100)]
Bug 13287: (QA follow-up) Final polishing

Cosmetic changes.
And: adding a confirm flag (see earlier comment too). Without this flag but
with having a filled pref, the script would purge when you do not pass any
parameter. This might not be appreciated.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13287: (QA follow-up) Extend Suggestions.t for DelSuggestionsOlderThan
Marcel de Rooy [Fri, 23 Feb 2018 09:00:13 +0000 (10:00 +0100)]
Bug 13287: (QA follow-up) Extend Suggestions.t for DelSuggestionsOlderThan

Adding a days>0 test in the sub with a POD line.
Specific subtest for this sub added in Suggestions.t.

Test plan:
Run t/db_dependent/Suggestions.t again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13287: (QA follow-up) Prepare Suggestions.t for changes
Marcel de Rooy [Fri, 23 Feb 2018 08:15:55 +0000 (09:15 +0100)]
Bug 13287: (QA follow-up) Prepare Suggestions.t for changes

Just rearranging some modules here.
Adding Koha::Database and schema calls.

Test plan:
Run t/db_dependent/Suggestions.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13287: (QA follow-up) Add db revision
Mark Tompsett [Wed, 24 Feb 2016 00:29:36 +0000 (19:29 -0500)]
Bug 13287: (QA follow-up) Add db revision

Added missing upgrade SQL system preference.
Corrected system preference screen message
Fixes on purge_suggestions.pl
- perlcritic friendlier
- address $PERL5LIB comment by using $PROGRAM_NAME (comment #10)
- used STDERR (comment #10)
- perltidy

TEST PLAN
---------
$ ./installer/data/mysql/updatedatabase.pl
-- should run upgrade and generate new systempreference in table
$ ./misc/cronjobs/purge_suggestions.pl --help
-- should give help with a real path used instead of $PERL5LIB.
$ ./misc/cronjobs/purge_suggestions.pl -days -1
-- should give error message as expected
$ ./misc/cronjobs/purge_suggestions.pl -days 0
-- should give error message as expected

Go to OPAC system preferences tab and check the
PurgeSuggestionsOlderThan system preference
-- message should be as expected (see comment #9)

run koha qa test tools
-- all should pass

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Moved new pref from OPAC to Acquisitions preferences.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13287: Add a system preference to define the number of days used in purge_suggest...
remi [Tue, 28 Jul 2015 16:10:59 +0000 (12:10 -0400)]
Bug 13287: Add a system preference to define the number of days used in purge_suggestions.pl

    The system preferences value is used whenever purge_suggestions.pl is called without the 'days' parameter.
    This patch uses the preference description suggested by comment #9.
    This version should now be cleanly applicable.

    I Apply the patch
    II Run updatedatabase.pl

    a) Run purge_suggestions.pl without the days parameter
       - validate that there is an error message
    b) Run purge_suggestions.pl with the days parameter
       - validate that there is no error message
    c) Insert a number of days in the system variable PurgeSuggestionsOlderThan
    d) Run purge_suggestions.pl without the days parameter
       - validate that there is no error message

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tested per plan, all tests pass.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20140: Allow translating more of OAI sets
Pasi Kallinen [Tue, 6 Feb 2018 08:11:27 +0000 (10:11 +0200)]
Bug 20140: Allow translating more of OAI sets

Allow translating two strings in the OAI set config:
"setDescription" and "Remove"

Test plan:

1) Go to Home -> Administrator -> OAI sets config -> Add a new OAI set
2) Click on "New set"
3) Click on "Add description"
4) Note the "setDescription:" and "Remove" -texts
5) Install patch, update language, translate the new strings
6) Redo 1-4, note how the strings in part 4 are now translated

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20225: Remove unused script reports/stats.print.pl
Julian Maurice [Fri, 16 Feb 2018 10:21:09 +0000 (11:21 +0100)]
Bug 20225: Remove unused script reports/stats.print.pl

Test plan:
1. Verify that there is no remaining references to this script

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Maksim Sen <maksim@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=20255

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20082: DBRev 17.12.00.020
Jonathan Druart [Mon, 26 Feb 2018 16:09:18 +0000 (13:09 -0300)]
Bug 20082: DBRev 17.12.00.020

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20082: Correct description of Vietnamese language and add German translation
Katrin Fischer [Thu, 1 Feb 2018 06:42:13 +0000 (07:42 +0100)]
Bug 20082: Correct description of Vietnamese language and add German translation

Fixes the language description of Vietnamese according to the
bug report and adds the German translation for the language
name.

To test:
- Run the database update
- Verify that the new descriptions Tiếng Việt shows
  in advanced search language pull down
- Install German translations
- Verify that the German translation 'Vietnamesisch'
  shows in the pull down when German is selected.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20199: Send a DateTime to DBIC instead of an iso formatted date
Jonathan Druart [Wed, 14 Feb 2018 17:17:58 +0000 (14:17 -0300)]
Bug 20199: Send a DateTime to DBIC instead of an iso formatted date

We do not need to format the date, DBIC handles DateTime correctly.

It fixes t/db_dependent/Letters.t with new SQL modes

Test plan:
  prove t/db_dependent/Letters.t
  prove t/db_dependent/Koha/Acquisition/Order.t
Must return green

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20199: Add tests for Koha::Acq::Order->store
Jonathan Druart [Wed, 14 Feb 2018 17:13:15 +0000 (14:13 -0300)]
Bug 20199: Add tests for Koha::Acq::Order->store

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20075: Update installer files for uk-UA
Marcel de Rooy [Mon, 26 Feb 2018 09:59:13 +0000 (10:59 +0100)]
Bug 20075: Update installer files for uk-UA

Instead of the very laborious task of going thru all these files line by
line, I am adding a statement at the very end to correct hidden values.

Test plan:
Run a new Ukrainian install or run a few files on an empty database.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20075: Update installer files for ru-RU
Marcel de Rooy [Mon, 26 Feb 2018 09:48:50 +0000 (10:48 +0100)]
Bug 20075: Update installer files for ru-RU

Instead of the very laborious task of going thru all these files line by
line, I am adding a statement at the very end to correct hidden values.

Test plan:
Run a new Russian install or run a few files on an empty database.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20075: Adjust installer files for de-DE up to pl-PL
Marcel de Rooy [Mon, 26 Feb 2018 08:59:03 +0000 (09:59 +0100)]
Bug 20075: Adjust installer files for de-DE up to pl-PL

We are replacing the values -5 or 8 here by 1 for the hidden field in
auth_subfield_structure.
Note that 1 is mainly used in MARC21 and -5 in UNIMARC.
Since it is a boolean, I choose here for keeping 0 and 1.

The value 8 was only used for field 942 in MARC21 files.
The value -5 was replaced in
en/marcflavour/unimarc/mandatory/authorities_normal_unimarc.sql
it-IT/marcflavour/unimarc/necessari/authority_framework.sql
pl-PL/marcflavour/unimarc/mandatory/authorities_normal_unimarc.sql

NOTE: The french unimarc files
fr-FR/marcflavour/unimarc_complet/Obligatoire/autorite_default.sql
fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql
fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/autorites_norme_unimarc.sql
seem to display all fields, since hidden is 0 everywhere.

Test plan:
Test a new install in one of the languages.
Or run the sql script on an empty database.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20074: DBRev 17.12.00.019
Jonathan Druart [Mon, 26 Feb 2018 16:06:15 +0000 (13:06 -0300)]
Bug 20074: DBRev 17.12.00.019

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20074: (follow-up) Replace hidden value -5 by 1 in data and interface
Marcel de Rooy [Mon, 26 Feb 2018 10:43:43 +0000 (11:43 +0100)]
Bug 20074: (follow-up) Replace hidden value -5 by 1 in data and interface

[ Moved from 20075 to 20074 ]

Since hidden is used as a boolean, it makes more sense to save the values
0 and 1 instead of 0 and -5.

Test plan:
Test toggling between Show all and Hide all in the auth frameworks.
Run the db rev.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20074: (follow-up) Remove another remainder of biblio hidden logic
Marcel de Rooy [Tue, 23 Jan 2018 14:59:06 +0000 (15:59 +0100)]
Bug 20074: (follow-up) Remove another remainder of biblio hidden logic

Script authorities.pl still contains a module 2 calculation on the hidden
attribute, although it is used as a boolean.
Since -5 mod 2 == 1, it does no harm, but we better remove it.

Test plan:
Edit and save an authority. Verify that everything still works as expected.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20074: Database revision to convert hidden to -5
Marcel de Rooy [Tue, 23 Jan 2018 14:21:27 +0000 (15:21 +0100)]
Bug 20074: Database revision to convert hidden to -5

The hidden value is used as a boolean in authority frameworks (in contrast
with biblio framework).
It is consistent to apply the same value (-5) to all non-zero values.

Test plan:
Check if you a have 0, 1 and 8 value in hidden somewhere.
Run the dbrev.
Verify that 1 and 8 are converted to -5.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20074: Fix hidden value in auth_subfields_structure
Marcel de Rooy [Tue, 23 Jan 2018 14:16:35 +0000 (15:16 +0100)]
Bug 20074: Fix hidden value in auth_subfields_structure

The template included an else branch where a value not equal to 0 or -5
was interpreted as 0 (Show all).
This effectively converted hidden values 1 and 8 to 0.
This patch removes that else branch.

Test plan:
Toggle a authority field between Hide all and Show all. Check what happens.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>