koha.git
5 years agoBug 21312: Show lockout on Patrons form
Marcel de Rooy [Wed, 10 Oct 2018 14:53:30 +0000]
Bug 21312: Show lockout on Patrons form

Just what the title says :)
Specifically: moremember.pl

Test plan:
Check if you see the locked message on the patron form for an account
that has been locked. (Either login_attempts<0 or >FailedLoginAttempts)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22433: Use Data::Dumper instead of Data::Printer
Jonathan Druart [Fri, 10 May 2019 17:32:23 +0000]
Bug 22433: Use Data::Dumper instead of Data::Printer

Data::Printer is not in our deps

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22433: Add debug statement to Transaction.t
Jonathan Druart [Thu, 9 May 2019 18:04:38 +0000]
Bug 22433: Add debug statement to Transaction.t

Hard to know what's going on here without more info. Adding this output
may help to investigate more.

Test plan:
Make sure the tests still pass

If it fails, please paste the output!!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: DBRev 18.12.00.073
Nick Clemens [Fri, 10 May 2019 17:41:41 +0000]
Bug 5770: DBRev 18.12.00.073

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: (QA follow-up) Adapt for replyto handling
Martin Renvoize [Wed, 1 May 2019 17:58:23 +0000]
Bug 5770: (QA follow-up) Adapt for replyto handling

The ReplyTo preferences allwo for libraries to setup various
combinations of addresses for email headers to ensure correct mail
delivery. This patch accounts for their configuration and use in the
suggestions notifications

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: (QA follow-up) Move system preference to appropriate section
Martin Renvoize [Wed, 1 May 2019 13:29:16 +0000]
Bug 5770: (QA follow-up) Move system preference to appropriate section

The new sysprefs wher in the general admin section. I believe they are
better placed within the acquisitions area.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: (QA follow-up) Revert change to GetQueuedMessages
Martin Renvoize [Wed, 1 May 2019 11:56:05 +0000]
Bug 5770: (QA follow-up) Revert change to GetQueuedMessages

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: (QA follow-up) Allow feature to be disable
Martin Renvoize [Wed, 1 May 2019 13:14:38 +0000]
Bug 5770: (QA follow-up) Allow feature to be disable

This patch adds 'None' to the available options for the feature so it
may be disabled entirely (and sets that as default)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: Notify for new suggestion - sample notices
Nazlı Çetin [Tue, 30 Apr 2019 16:17:54 +0000]
Bug 5770: Notify for new suggestion - sample notices

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: Unit test
Nazlı Çetin [Tue, 30 Apr 2019 15:56:26 +0000]
Bug 5770: Unit test

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: New system pref for new suggestion email
Nazlı Çetin [Tue, 30 Apr 2019 15:53:20 +0000]
Bug 5770: New system pref for new suggestion email

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 5770: Email librarian when purchase suggestion made
Nazlı Çetin [Tue, 30 Apr 2019 15:50:43 +0000]
Bug 5770: Email librarian when purchase suggestion made

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 20485: Don't account for items timestamps when items not included
David Gustafsson [Fri, 23 Mar 2018 16:32:30 +0000]
Bug 20485: Don't account for items timestamps when items not included

If combining "--dont_export_items" and "--date" options
in export_records.pl, don't include items modification/deletion
timestamp in biblio query conditions.

How to test:
1) Delete or modify a biblio item.
2) Run export_records.pl with "--dont_export_items" and "--date"
   options with a date value before item was deleted or modified,
   but after the biblio was modified.
3) The biblio for which an item was changed should not be included in
   the export.

Sponsored-by: Gothenburg University Library
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21662: (QA follow-up) Be consistent between history and contributors
Martin Renvoize [Fri, 3 May 2019 09:51:02 +0000]
Bug 21662: (QA follow-up) Be consistent between history and contributors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21662: (QA follow-up) Minor corrections
Marcel de Rooy [Fri, 3 May 2019 08:27:53 +0000]
Bug 21662: (QA follow-up) Minor corrections

[1] Move doXulting and Universidad ORT Uruguay to Institutions.
    We do not mention the institution for each developer.
[2] Removing Anonymous.
[3] Adding the Bugzilla alias shantanoo as additional transliterated text.
[4] Resolve typo Continious.
[5] Removing three plural unused roles in about.tt.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21662: (follow-up) Corrections to YAMP for incompatible format
Martin Renvoize [Thu, 2 May 2019 09:42:57 +0000]
Bug 21662: (follow-up) Corrections to YAMP for incompatible format

YAML::XS and YAML output incompatible (but both valid) YAML files
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>

5 years agoBug 21662: (follow-up) Embelish contributor details
Martin Renvoize [Thu, 2 May 2019 07:44:09 +0000]
Bug 21662: (follow-up) Embelish contributor details

Add details to the 'non-commiters' in the contributors list. Information
gratefully recieved from Chris Cormack

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>

5 years agoBug 21662: (follow-up) Drop YAML::XS, use YAML
Martin Renvoize [Thu, 2 May 2019 07:03:23 +0000]
Bug 21662: (follow-up) Drop YAML::XS, use YAML

I mistakenly left us using YAML::XS when we don't already depend upon
it. YAML is a sufficent alternative that we do already require.

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>

5 years agoBug 21662: Other history correction
Martin Renvoize [Fri, 26 Apr 2019 08:24:58 +0000]
Bug 21662: Other history correction

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21662: Use contributors.yaml for contributors list
Martin Renvoize [Thu, 11 Apr 2019 12:35:22 +0000]
Bug 21662: Use contributors.yaml for contributors list

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21662: Add Contributors.yaml file
Martin Renvoize [Fri, 26 Oct 2018 10:27:23 +0000]
Bug 21662: Add Contributors.yaml file

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21662: Update history.txt
Martin Renvoize [Fri, 26 Oct 2018 09:13:39 +0000]
Bug 21662: Update history.txt

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21662: Make history.txt whitespace consistent
Martin Renvoize [Fri, 26 Oct 2018 07:20:49 +0000]
Bug 21662: Make history.txt whitespace consistent

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22053: (QA follow-up) Fix tests
Tomas Cohen Arazi [Fri, 10 May 2019 14:52:34 +0000]
Bug 22053: (QA follow-up) Fix tests

This patch makes the tests enable the plugins that are required for
them. Otherwise unexpected failures can happen

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22053: Compiled CSS
Nick Clemens [Fri, 10 May 2019 16:56:50 +0000]
Bug 22053: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22803: (alternate) Set dataTable width issue
Owen Leonard [Mon, 29 Apr 2019 15:48:14 +0000]
Bug 22803: (alternate) Set dataTable width issue

This patch sets the "autowidth" option to "false" for the OPAC
subscriptions DataTable on opac-detail.pl. This gives the table a fluid
width rather than having the width be "hard-coded" by DataTables upon
first page render.

To test, apply the patch and view the detail page for a bibliographic
record with a subscription. Under the "Subscriptions" tab, the table of
latest issues should fill the width of the tab container.

Resize the browser window and confirm that the table width adjusts
accordingly.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21709: Replace 'no popup' plugin links with a span
Jonathan Druart [Thu, 1 Nov 2018 16:31:31 +0000]
Bug 21709: Replace 'no popup' plugin links with a span

Test plan:
Edit a bibliographic record
Notice that the icons next to fields linked with a plugin can be a link
or not. The browser displays a pointer or not.

It will remove the ambiguity to display an icon that is clickable but
does nothing when clicked.
We could also have another icon to disociate both behaviors.

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 22809: DBRev 18.12.00.072
Nick Clemens [Fri, 10 May 2019 14:44:47 +0000]
Bug 22809: DBRev 18.12.00.072

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22809: (RM follow-up) fix missing filter and update description
Nick Clemens [Fri, 10 May 2019 14:43:11 +0000]
Bug 22809: (RM follow-up) fix missing filter and update description

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22809: (QA follow-up) Add notice translations
Martin Renvoize [Thu, 2 May 2019 11:44:05 +0000]
Bug 22809: (QA follow-up) Add notice translations

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22809: (QA follow-up) add bug description to atomicupdate
Liz Rea [Tue, 30 Apr 2019 19:41:06 +0000]
Bug 22809: (QA follow-up) add bug description to atomicupdate

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22809: Move "INVOICE" from template to a slip
Kyle M Hall [Tue, 30 Apr 2019 11:53:50 +0000]
Bug 22809: Move "INVOICE" from template to a slip

Just as bug 22761 moves the "Fee receipt" to the ACCOUNT_CREDIT slip, we need to move the "INVOICE" to an ACCOUNT_DEBIT slip.

Test Plan:
1) Apply this patch set
2) Restart all the things
3) Use the "print" button beside a *fee*
4) You should not see any difference from before the patches were applied

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22761: DBRev 18.12.00.071
Nick Clemens [Fri, 10 May 2019 14:31:21 +0000]
Bug 22761: DBRev 18.12.00.071

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22716: (RM follow-up) missing filter and update description
Nick Clemens [Fri, 10 May 2019 14:21:45 +0000]
Bug 22716: (RM follow-up) missing filter and update description

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22761: (QA follow-up) Add description to DB update
Martin Renvoize [Thu, 2 May 2019 11:33:15 +0000]
Bug 22761: (QA follow-up) Add description to DB update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22761: (QA follow-up) Add notice translations
Martin Renvoize [Thu, 2 May 2019 11:27:44 +0000]
Bug 22761: (QA follow-up) Add notice translations

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22761: Remove hard coded version from template
Kyle M Hall [Tue, 23 Apr 2019 18:40:08 +0000]
Bug 22761: Remove hard coded version from template

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22761: Add notice based on existing template
Kyle M Hall [Tue, 23 Apr 2019 18:39:44 +0000]
Bug 22761: Add notice based on existing template

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22761: Add ability to use print version of ACCOUNT_CREDIT slip
Kyle M Hall [Tue, 23 Apr 2019 18:12:55 +0000]
Bug 22761: Add ability to use print version of ACCOUNT_CREDIT slip

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21872: Fix name of rebuild_elasticsearch.pl
Ere Maijala [Mon, 4 Mar 2019 12:30:13 +0000]
Bug 21872: Fix name of rebuild_elasticsearch.pl

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21872: Add support for -p parameter to koha-elasticsearch
Ere Maijala [Mon, 4 Mar 2019 12:18:00 +0000]
Bug 21872: Add support for -p parameter to koha-elasticsearch

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21872: Remove duplicate modulo condition in authorities iterator
David Gustafsson [Thu, 14 Feb 2019 14:59:27 +0000]
Bug 21872: Remove duplicate modulo condition in authorities iterator

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21872: Simplify conditions and exit on invalid combination of arguments
David Gustafsson [Thu, 14 Feb 2019 14:06:35 +0000]
Bug 21872: Simplify conditions and exit on invalid combination of arguments

Change to zero based indexing for slice index to simplify some
conditions. Exit with error message if trying to combine processes
and biblio numbers arguments.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21872: Add multiprocess support to Elasticsearch indexing utility
Ere Maijala [Fri, 23 Nov 2018 08:43:34 +0000]
Bug 21872: Add multiprocess support to Elasticsearch indexing utility

Test plan:
1. Time execution without -p parameter
2. Time execution with -p 2 or -p3 or -p 4 depending on CPU core count

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21533: Do not allow password recovery for administrative locked patrons
Marcel de Rooy [Wed, 10 Oct 2018 12:49:02 +0000]
Bug 21533: Do not allow password recovery for administrative locked patrons

Depends on bug 21336 for the ADMINISTRATIVE_LOCKOUT constant.

This is a bit lazy solution (but good enough): The account will not be found
when recovering the password. The user should contact the library. Since
the library chose to lock the account, that seems appropriate.

Test plan:
Select a borrower and set login_attempts to -1. Via mysql command line or
with Koha::Patrons->find(borrowernumber)->lock.
Enable password recovery.
Try to recover password from OPAC. You should fail with 'Not found, contact
the library'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22782: DBIC update for SocialData
Nick Clemens [Fri, 10 May 2019 12:10:42 +0000]
Bug 22782: DBIC update for SocialData

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 14407: DBRev 18.12.00.070
Nick Clemens [Fri, 10 May 2019 12:09:59 +0000]
Bug 14407: DBRev 18.12.00.070

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 14407: (RM follow-up) bump version number
Nick Clemens [Fri, 10 May 2019 11:44:45 +0000]
Bug 14407: (RM follow-up) bump version number

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 14407: Follow up to add test case and clean noise
Mark Tompsett [Tue, 27 Mar 2018 14:28:06 +0000]
Bug 14407: Follow up to add test case and clean noise

Comment #28 has a /36 which is invalid CIDR.
This triggers a crash and noise.
This cleans up the crash and noise, and adds
test cases to check for them.

prove t/Auth.t
-- before missing null case, and /36 case.
-- after null case, and /36 with/without warnings.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 14407: Follow up add missing atomic update
Mark Tompsett [Tue, 27 Mar 2018 14:43:46 +0000]
Bug 14407: Follow up add missing atomic update

The patch only added the system preference for fresh installs.

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 14407: Unit tests for in_ipset
Nicholas can Oudtshoorn [Fri, 12 Jan 2018 18:14:59 +0000]
Bug 14407: Unit tests for in_ipset

TEST PLAN
---------
1) apply all pathches
2) sudo koha-shell -c bash kohadev
   prove t/Auth.t
   -- should run.
3) run koha qa test tools

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 14407: Allow restricting SCO to IP or IP range
Nicholas can Oudtshoorn [Fri, 12 Jan 2018 17:28:41 +0000]
Bug 14407: Allow restricting SCO to IP or IP range

Converted this to actual applicable patches.
I think the test plan is comment #28. -- Mark Tompsett

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 21535: Anonymize function in Patron should not scramble email addresses
Marcel de Rooy [Wed, 10 Oct 2018 13:34:22 +0000]
Bug 21535: Anonymize function in Patron should not scramble email addresses

Scrambled email addresses will only generate warnings etc.
Clear them although they might be in BorrowerMandatoryField.

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

t/db_depepended/Koha/Patrons.t runs with no warnings.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22811: Add button to clear DataTables filtering
Owen Leonard [Tue, 30 Apr 2019 14:57:59 +0000]
Bug 22811: Add button to clear DataTables filtering

This patch adds a "clear filter" button to the global
DataTables configuration. The button will appear if:

 - There is no custom DOM configuration applied to the DataTable
   instance.
 - The DataTable has the search form enabled.

The new button should be disabled by default. Entering a search term in
the form should enable it.

To test, apply the patch and clear your browser cache if necessary. View
various pages with various DataTables configurations and confirm that
everything looks correct and the new "Clear filter" button doesn't
appear when there is no DataTable search field. For example:

 - Administration -> Libraries
 - Administration -> Currencies
 - Reports -> Saved reports
 - Circulation -> Check out
 - Tools -> News

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22053: DBRev 18.12.00.069
Nick Clemens [Thu, 9 May 2019 19:29:44 +0000]
Bug 22053: DBRev 18.12.00.069

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22053: (QA follow-up) Override enable_plugins configuration
Tomas Cohen Arazi [Tue, 30 Apr 2019 13:54:01 +0000]
Bug 22053: (QA follow-up) Override enable_plugins configuration

This patch makes the update script override the configured
enable_plugins setting in koha-conf.xml.

on testing the failure I wrote trivial tests on how
Koha::Plugins->new({ enable_plugins => 1 }) should work. Adding them to
this patch as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22053: (QA follow-up) More tests
Tomas Cohen Arazi [Mon, 29 Apr 2019 18:21:32 +0000]
Bug 22053: (QA follow-up) More tests

This patch adds tests for:
- $plugin->enable and $plugin->disable are chainable (i.e. return $self)
- Disabled plugins don't inject routes

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t \
          t/db_dependent/Plugins.t
=> SUCCESS: Tests pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22053: update database
Alex Arnaud [Fri, 28 Dec 2018 16:52:18 +0000]
Bug 22053: update database

Rebased-on: 2019-03-25 Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22053: ability to enable/disable some plugins
Alex Arnaud [Fri, 28 Dec 2018 16:50:14 +0000]
Bug 22053: ability to enable/disable some plugins

Test plan:

  - apply this patch(es),
  - launch an updatedabase,
  - go to plugins/plugins-home.pl
    and deal with enable/disable method
  - install a plugin like KitchenSink
    https://github.com/bywatersolutions/koha-plugin-kitchen-sink
  - once installed, the plugin change the background color
    of the staff client to orange.
  - disable the plugin,
  - background color should be set back to the original one

Rebased-on: 2019-03-25 Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22053: create unit tests
Alex Arnaud [Fri, 28 Dec 2018 16:48:43 +0000]
Bug 22053: create unit tests

Rebased-on: 2019-03-25 Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: DBRev 18.12.00.068
Nick Clemens [Thu, 9 May 2019 18:20:34 +0000]
Bug 7088: DBRev 18.12.00.068

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: Compiled CSS
Nick Clemens [Thu, 9 May 2019 17:22:25 +0000]
Bug 7088: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: (follow-up) Modify checkbox enabling
Andrew Isherwood [Fri, 26 Apr 2019 09:58:31 +0000]
Bug 7088: (follow-up) Modify checkbox enabling

As described in comment #50, we need to only enable renewal on items
that are disabled in line with which sysprefs are enabled. So we now
only enable renewal of on hold items if the AllowRenewalOnHoldOverride
syspref is on and we only enable renewal of all other limited items
when the AllowRenewalLimitOverride syspref is on.

NOTE: The test plan below has changed substantially from previous
iterations

Test plan (you might want to make a coffee first...):

- Apply patch
- Rebuild CSS

- Go to the Patron Details page for a patron who has an item on loan that would fulfil an outstanding loan request.
- The patron also needs to have an item on loan that cannot be renewed for some other reason, say renewal limit has been reached
=> TEST: Observe that it is NOT possible to select either item for renewal

- Enable the "AllowRenewalLimitOverride" syspref
- Return to the Patron Details page
- Check the "Override renewal restrictions" checkbox
=> TEST: Observe that it IS possible to select the the item that has reached the renewal limit, but not the item that is on hold

- Disable the "AllowRenewalLimitOverride" syspref
- Enable the "AllowRenewalOnHoldOverride" syspref
- Return to the Patron Details page
- Check the "Override renewal restrictions" checkbox
=> TEST: Observe that it is NOT possible to select the the item that has reached the renewal limit, but it IS possible to select the item on hold

- Enable the "AllowRenewalLimitOverride" syspref
- Enable the "AllowRenewalOnHoldOverride" syspref
- Return to the Patron Details page
- Check the "Override renewal restrictions" checkbox
=> TEST: Observe that it IS possible to select the the item that has reached the renewal limit, AND it IS possible to select the item on hold

- Select the item that is on hold
=> TEST: Observe that an additional "On hold due date" input box is displayed
- De-select the item
=> TEST: Observe that an additional "On hold due date" input box is hidden
- Select the item
- In the "On hold due date" input box, select a due date for the item
- Click "Renew or check in selected items"
=> TEST: Observe that the item is renewed as usual
- In the "Renewal due date" input box, select a due date
- Remove the contents of the "On hold due date" input box
- Click "Renew or check in selected items"
=> TEST: Observe that the item is renewed by falling back to the "Renewal due date" value if a value is not specified in the "On hold due date" input box
- Remove the contents of the "Renewal due date" input box
- Click "Renew or check in selected items"
=> TEST: Observe that the standard loan period is used for the renewal period if no due date is specified in either box
- In the "On hold due date" input box, select a due date for the item
- In the "Renewal due date" input box, select a different due date
- Click "Renew all"
=> TEST: Observe that all non on hold items are renewed using the value in "Renewal due date" and on hold items are renewed using the value in "On hold due date"
- From the main staff client from page, choose "Circulation", then choose "Renew"
- Enter the barcode of an item that you know to be on hold and submit
=> TEST: In the alert box that appears, observe that a date picker is
displayed
- Choose a due date for this item, then click "Override and renew"
=> TEST: In the "Item renewed" box, observe that the item has been
renewed to the date specified

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: (follow-up) AllowRenewalLimitOverride fix
Andrew Isherwood [Tue, 23 Apr 2019 09:44:08 +0000]
Bug 7088: (follow-up) AllowRenewalLimitOverride fix

This patch causes the click event listener on the #override_limit to be
created if EITHER the AllowRenewalOnHoldOverride OR
AllowRenewalLimitOverride sysprefs are enabled. Previously, it would
only be created if the AllowRenewalLimitOverride syspref was enabled,
which would cause the checkbox to be displayed but do nothing.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: (follow-up) Add pref to checkbox
Andrew Isherwood [Thu, 21 Feb 2019 12:21:23 +0000]
Bug 7088: (follow-up) Add pref to checkbox

As per commit #29 here:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7088#c29

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: (follow-up) Default hold checkbox display
Andrew Isherwood [Thu, 7 Feb 2019 14:43:55 +0000]
Bug 7088: (follow-up) Default hold checkbox display

As per item 4 here:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7088#c24

Now, the checkbox for renewing on hold items behaves the same way as the
checkbox for renewing items that have reached their renew limit. It is
necessary to check the re-labelled "Override renewal restrictions"
checkbox before it is possible to select on-hold items for renewal.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: (follow-up) Set syspref default to off
Andrew Isherwood [Wed, 30 Jan 2019 11:05:17 +0000]
Bug 7088: (follow-up) Set syspref default to off

As per item 2 here:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7088#c24

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: (follow-up) Remove script "type" attribute
Andrew Isherwood [Wed, 30 Jan 2019 11:03:10 +0000]
Bug 7088: (follow-up) Remove script "type" attribute

As per item 1 here:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7088#c24

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: (follow-up) Fix renewal limit bug
Andrew Isherwood [Tue, 13 Nov 2018 13:57:57 +0000]
Bug 7088: (follow-up) Fix renewal limit bug

There was a bug in that altering the state of the "Override renewal
limit" checkbox was altering the appearance of the per-item "On hold"
checkbox. This is incorrect, the "Override renewal limit" checkbox is
unconnected with this bug.

Sponsored-by: Cheshire Libraries Shared Services
Sponsored-by: Halton Borough Council
Sponsored-by: Sefton Council

Signed-off-by: Andrew Farthing <Andrew.Farthing@sefton.gov.uk>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: Allow renew on hold items with due date
Andrew Isherwood [Fri, 21 Sep 2018 10:09:13 +0000]
Bug 7088: Allow renew on hold items with due date

This patch adds the ability for items that are on hold to be renewed with a due date specfied by the user. It is enabled by the new "AllowRenewalOnHoldOverride" syspref. It is manifested in two locations:

1. In the "Checkouts" table on the Patron Details screen. It is now possible to select on loan items that would otherwise fulfil a hold request to be renewed. When such an item is selected, an additional date selection box is displayed to allow the user to specify the due date for all on hold items that are to be renewed.

2. In the Circulation > Renew alert screen. When a barcode of an on loan item that would ordinarily fulfil a hold request is entered, the usual alert is displayed indicating that the item is on hold, it is still possible to override this, and renew, however it is now also possible to specify a due date.

Test plan:

- Go to the Patron Details page for a patron who has an item on loan that would fulfil an outstanding loan request.
- TEST: Observe that it is NOT possible to select this item
- Enable the "AllowRenewalOnHoldOverride" syspref
- Return to the Patron Details page for a patron who has an item on loan that would fulfil an outstanding loan request.
- TEST: Observe that it IS possible to select this item
- Select the item
- TEST: Observe that an additional "On hold due date" input box is displayed
- De-select the item
- TEST: Observe that an additional "On hold due date" input box is hidden
- Select the item
- In the "On hold due date" input box, select a due date for the item
- Click "Renew or check in selected items"
- TEST: Observe that the item is renewed as usual
- In the "Renewal due date" input box, select a due date
- Remove the contents of the "On hold due date" input box
- Click "Renew or check in selected items"
- TEST: Observe that the item is renewed by falling back to the "Renewal due date" value if a value is not specified in the "On hold due date" input box
- Remove the contents of the "Renewal due date" input box
- Click "Renew or check in selected items"
- TEST: Observe that the standard loan period is used for the renewal period if no due date is specified in either box
- In the "On hold due date" input box, select a due date for the item
- In the "Renewal due date" input box, select a different due date
- Click "Renew all"
- TEST: Observe that all non on hold items are renewed using the value in "Renewal due date" and on hold items are renewed using the value in "On hold due date"
- From the main staff client from page, choose "Circulation", then choose "Renew"
- Enter the barcode of an item that you know to be on hold and submit
- TEST: In the alert box that appears, observe that a date picker is
displayed
- Choose a due date for this item, then click "Override and renew"
- TEST: In the "Item renewed" box, observe that the item has been
renewed to the date specified

Sponsored-by: Cheshire Libraries Shared Services
Sponsored-by: Halton Borough Council
Sponsored-by: Sefton Council

Signed-off-by: Andrew Farthing <Andrew.Farthing@sefton.gov.uk>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 7088: Add AllowRenewalOnHoldOverride syspref
Andrew Isherwood [Wed, 19 Sep 2018 15:29:19 +0000]
Bug 7088: Add AllowRenewalOnHoldOverride syspref

Enables the renewal of on hold items with specified due dates to be turned on/off

Sponsored-by: Cheshire Libraries Shared Services
Sponsored-by: Halton Borough Council
Sponsored-by: Sefton Council

Signed-off-by: Andrew Farthing <Andrew.Farthing@sefton.gov.uk>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22790: Add a test
Jonathan Druart [Wed, 8 May 2019 15:28:22 +0000]
Bug 22790: Add a test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes...
Andreas Jonsson [Fri, 26 Apr 2019 19:44:59 +0000]
Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22847: Correctly displayed circ rule values for max_holds and maxissue*
Jonathan Druart [Fri, 3 May 2019 21:34:22 +0000]
Bug 22847: Correctly displayed circ rule values for max_holds and maxissue*

There are several things going wrong on the circulation rules screen. The global rule is displayed for specific libraries (even if the rule does not exist for the library), and max_holds is always blank.

I have trouble finding the root of the issue, but I will propose a patch to fix both problem.

Certainly a mismatch between bug 18887 and bug 18925.

Test plan:
0. Do not apply the patch
1. Notice the issue on the circulation rules screen
2. Apply the patch
3. Confirm that the value you set are correctly displayed (and not the propagated ones!)

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22527: (RM follow-up) Add filter
Nick Clemens [Tue, 7 May 2019 15:57:35 +0000]
Bug 22527: (RM follow-up) Add filter

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22816: OPAC detail holdings table should now look a bit better
Liz Rea [Wed, 1 May 2019 00:31:15 +0000]
Bug 22816: OPAC detail holdings table should now look a bit better

This patch sets the "autowidth" option to "false" for the OPAC
holdings DataTable on opac-detail.pl. This gives the table a fluid
width rather than having the width be "hard-coded" by DataTables upon
first page render.

To test, apply the patch and view the detail page for a bibliographic
record with some items. Under the "Holdings" tab, the table of
holdings should fill the width of the tab container.

Resize the browser window and confirm that the table width adjusts
accordingly.

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: arthur <arthur.bousquet@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm
Marcel de Rooy [Thu, 5 Jul 2018 10:10:26 +0000]
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm

Like this one (16.11 line number):
Odd number of elements in anonymous hash at C4/AuthoritiesMarc.pm line 1070.

We need to add a scalar to some MARC::Field::subfield calls. In list context
an empty list returned affects the hash built around it.

Test plan:
Could reproduce this warning easily from OPAC authority search.
opac-authorities-home.pl calling BuildSummary.

Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21036: Fix warnings from C4/Biblio
Marcel de Rooy [Thu, 5 Jul 2018 07:53:57 +0000]
Bug 21036: Fix warnings from C4/Biblio

Use of uninitialized value $isbn in string ne at /usr/share/koha/prodclone/C4/Biblio.pm line 1794. (16.11 line number)
Trivial edit.

And these warnings from TransformHtmlToXml (with 16.11 line numbers):
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm line 2527.
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
substr outside of string at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
Indicator in 952 is empty at /usr/share/koha/prodclone/C4/Biblio.pm line 2534.

The last warning is not needed and can be removed.
Note that the code used the construct @$indicator[$j] for $$indicator[$j].
The first is an array slice. This worked in list context. But apparently
the second was meant to be used. And can be rewritten as $indicator->[$j]
which generally is considered more readable.
The code around indicator1/2 and ind1/2 is simplified. This change is applied
twice in the same sub.

Test plan:
Read the changes.
Run t/Biblio/TransformHtmlToXml.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21036: Fix uninitialized value within @itemnumber in string ne
Marcel de Rooy [Wed, 4 Jul 2018 14:49:38 +0000]
Bug 21036: Fix uninitialized value within @itemnumber in string ne

Line from 16.11 log:
Use of uninitialized value within @itemnumber in string ne at /usr/share/koha/prodclone/reserve/modrequest.pl line 70.

Test plan:
Read the change. Not 100% identical (numeric zero) but should be enough.
This line is probably not needed at all.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22800: (bug 22550 follow-up) Do not raw filter when not necessary (OPAC suggestions)
Jonathan Druart [Mon, 29 Apr 2019 02:09:39 +0000]
Bug 22800: (bug 22550 follow-up) Do not raw filter when not necessary (OPAC suggestions)

This is a follow-up for bug 22550, we do not need to use the $raw
filter.

Test plan:
Same as bug 22550:
Test plan:
Test plan:
1. OPAC->login->your purchase suggestions->New purchase suggestion
2. Click button "Submit your suggestion" directly without filling in any field.
   Empty suggestion record was added succeffully.
3. Apply the patch.
4. Click button "Submit your suggestion" directly without filling in any field.
   The required fields should be labeled in red.
   (you can change the mandatory fields by preference
   'OPACSuggestionMandatoryFields')

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22791: Unify calculation between aqui-home and ordered.pl
Nick Clemens [Fri, 26 Apr 2019 19:58:05 +0000]
Bug 22791: Unify calculation between aqui-home and ordered.pl

To test:
1 - Enable order price rounding
2 - Order an example with 8 * 16,99 and 42% discount, 19.45% tax.
3 - Check ordered page - 94.17 is total
4 - Check aqui-home - 94.16 is total
5 - Apply patch
6 - Verify numbers now match

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22527: web installer links to outdated DB manual
Liz Rea [Tue, 16 Apr 2019 06:55:36 +0000]
Bug 22527: web installer links to outdated DB manual

To reproduce:
1. Use MySQL or MariaDB for your Koha installation
2. Create an empty database and point $KOHA_CONF to this database name.
3. Grant SELECT privilege to your database user, e.g.
grant select on koha3.* to 'koha'@'%' identified by 'koha';
4. Go to step 2 of web installer where it checks database
connection
5. Observe the following message

     User koha doesn't have enough privilege on database koha.

     Ask for or make a change in the user's privileges. User koha must
     have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on
     database koha2.

     Need help? See manual for PostgreSQL

6. Note "See manual for PostgreSQL" is wrong. Should now read Need help?
For help with granting permissions, please search online for "[%
dbms %] manual grant permissions" of course the dbms should be the dbms
you are using.
7. Apply patch, restart all
8. Refresh page and observe it now displays correct link

Test plan and original patchset by Lari Taskula <lari.taskula@hypernova.fi>

Sponsored-by: Hypernova Oy

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Bug 22527: Remove extra space after '?'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22787: Add mapping of letters "ů" and "Ů" to zebra definitions
Josef Moravec [Mon, 29 Apr 2019 12:18:43 +0000]
Bug 22787: Add mapping of letters "ů" and "Ů" to zebra definitions

Test plan:
0) Do not apply the patch
1) Add some word with character "ů" into metadata, for example author "Martinů, Bohuslav"
2) Try to search it with "Martinu" and you'll see you can't find it
3) Apply the patch
4) Copy file etc/zebradb/etc/word-phrase-utf.chr to your /etc/koha directory
    sudo cp etc/zebradb/etc/word-phrase-utf.chr /etc/koha/zebradb/etc/
5) koha-zebra --restart kohadev
6) koha-rebuild-zebra -f kohadev
6) try to search "Martinu" again - you should be able to find your record

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 21671: Prevent Modifications.t to fail randomly
Jonathan Druart [Mon, 12 Nov 2018 18:20:33 +0000]
Bug 21671: Prevent Modifications.t to fail randomly

If repeatable is set to 0 by TestBuilder, the tests will fail with:
t/db_dependent/Koha/Patron/Modifications.t .. 1/6     # Looks like you planned 20 tests but ran 9.

 #   Failed test 'approve tests'
 #   at t/db_dependent/Koha/Patron/Modifications.t line 259.
[repeatable not set for attribute type and tried to add a new attribute for the same code]# Looks like your test exited with 255 just after 5.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22813: (follow-up) Add missing condition
Tomas Cohen Arazi [Tue, 30 Apr 2019 18:48:14 +0000]
Bug 22813: (follow-up) Add missing condition

This patch restores a missing condition. $patron gets renamed to make
it obvious that it related to the logged in user.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22813: remove repetitive queries inside two nested loops in searchResults
Tomas Cohen Arazi [Tue, 30 Apr 2019 15:30:25 +0000]
Bug 22813: remove repetitive queries inside two nested loops in searchResults

This patch moves a query on Koha::Patrons and then the related
Koha::Patron::Category that needlessly happens inside two nested loops
(all items of all MARC records in the resultset).

The Koha::Patron and Koha::Patron::Category are always the same as it is
fetched from C4::Context->userenv each time.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22453: Make TestBuilder generates dates taking into account the timezone
Jonathan Druart [Mon, 4 Mar 2019 21:12:56 +0000]
Bug 22453: Make TestBuilder generates dates taking into account the timezone

I have no idea why this only appears today but TestBuilder generates dates using DateTime->now,
which does not take into account the timezone.

It has been highlights by a failing test today on U18.
Why today whereas this patch was pushed few weeks ago?
Why U18 and not D9?

The output of the test is:
koha_1       |     #   Failed test 'With BorrowerLogs and TrackLastPatronActivity we should not spam the logs'
koha_1       |     #   at t/db_dependent/Koha/Patrons.t line 1421.
koha_1       |     #          got: '2'
koha_1       |     #     expected: '1'
koha_1       |     # Looks like you failed 1 test of 4.
koha_1       |
koha_1       | #   Failed test 'BorrowersLog tests'
koha_1       | #   at t/db_dependent/Koha/Patrons.t line 1422.
koha_1       | # Looks like you failed 1 test of 33.
koha_1       | [19:51:44] t/db_dependent/Koha/Patrons.t

Actually there are 2 logs, one for the cardnumber that is expected, and on for updated_on:
   "updated_on" : {
      "after" : "2019-03-04 21:10:00",
      "before" : "2019-03-04 18:10:00"
   }
Apart from the fact that we may want to remove this updated_on field from MODIFY,
the before/after dates differ from 3 hours.
Here it's currently 18:10 and in UTC-3

To prevent such behaviors in tests (create stuffs in the future...), we should
use our Koha::DateUtils::dt_from_string method that takes care of the timezone
used in other places of Koha.

Test plan:
prove t/db_dependent/Koha/Patrons.t
May fail without this patch.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch is fine in itself, but there may still be an issue around
the failing test for TrackLastPatronActivity. Reopened bug 22741.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22808: Move Cache.t to db_dependent
Mirko Tietgen [Tue, 30 Apr 2019 08:56:20 +0000]
Bug 22808: Move Cache.t to db_dependent

Cache.t fails during package build. Moving it to db_dependent fixes
the problem.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22420: Remove wrong calculation on approved tags
Tomas Cohen Arazi [Wed, 27 Feb 2019 10:09:12 +0000]
Bug 22420: Remove wrong calculation on approved tags

Before the patch from bug 14385, the passed structure (that is returned
by get_approval_rows() looks like:

\ [
    [0] {
        approved           1,
        approved_by        51,
        approved_by_name   undef,
        date_approved      "2019-02-26 15:36:42",
        term               "another",
        weight_total       3
    },
    [1] {
    ...

After the introduced 'filtering', we loose the information about the
term weight!:

\ [
    [0] {
        approved               1,
        author                 "Heylin, Clinton.",
        biblionumber           1,
        borrowernumber         51,
        date_created           "2019-02-26 15:36:37",
        language               undef,
        subtitle               [],
        tag_id                 1,
        term                   "word",
        time_created_display   "15:36:37",
        title                  "E Street shuffle :",
        visible                1,
        XSLTBloc               "
            <<<BUNCH OF GENERATED HTML HERE>>>
    ...

The code even calls GetMarcBiblio. This needs to be reverted as it is
plain wrong. If it was worth removing *some* biblios from the
weight_total value, then this calculation should be done somewhere else,
without fetching the MARC data again.

Signed-off-by: Claudio <costalc@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22542: Force back button to display personal data
Jonathan Druart [Thu, 21 Mar 2019 17:45:37 +0000]
Bug 22542: Force back button to display personal data

This is a follow-up of bug 5371

The following command must not return anything:
grep ^output_html_with_http_headers `git grep -l -P "authnotrequired\s*=>\s*0" opac`|grep -v force_no_caching

This must be a test somehwere to prevent further regressions.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22478: (QA follow-up) Update tests to check for any script tags
Martin Renvoize [Mon, 29 Apr 2019 12:30:09 +0000]
Bug 22478: (QA follow-up) Update tests to check for any script tags

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22478: (QA follow-up) Make test consistent with variable name
Martin Renvoize [Fri, 26 Apr 2019 18:56:43 +0000]
Bug 22478: (QA follow-up) Make test consistent with variable name

We were adding data to category 1 (private lists) and testing against
that, but we named the variable 'publist_lists'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22478: (QA follow-up) Handle category in opac-shelves like a boolean
Marcel de Rooy [Fri, 12 Apr 2019 07:02:06 +0000]
Bug 22478: (QA follow-up) Handle category in opac-shelves like a boolean

The category parameter should be restricted to 1 or 2 (private/public). In
order to keep same behavior, no parameter means 1 (private).
Note: Adding the same line in intranet counterpart.

Test plan
[1] Check for category empty, '1a', '11' etc. And with script ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22478: Fix POD
Katrin Fischer [Wed, 10 Apr 2019 02:06:37 +0000]
Bug 22478: Fix POD

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 22478: Add tests
Jonathan Druart [Fri, 15 Mar 2019 16:41:27 +0000]
Bug 22478: Add tests

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 22478: Prevent XSS vulnerabilities when pagination appears
Jonathan Druart [Thu, 14 Mar 2019 22:42:50 +0000]
Bug 22478: Prevent XSS vulnerabilities when pagination appears

This is a bad one as we thought we were XSS safe since bug 13618.

The html code generated in C4::Output::pagination_bar must escape the
variables and values correctly.

This patch needs to be widely tested, everywhere the pagination appears,
to make sure we will not introduce regressions.

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 22478: (RMaint follow-up) source t::lib::Mocks
Martin Renvoize [Fri, 26 Apr 2019 16:24:06 +0000]
Bug 22478: (RMaint follow-up) source t::lib::Mocks

In 18.11.x the t::lib::Mocks module is not yet sourced for the relevant
test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22692: (RM follow-up) Adjust test count
Nick Clemens [Thu, 2 May 2019 13:40:07 +0000]
Bug 22692: (RM follow-up) Adjust test count

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22692: Check for patron using cardnumber and userid
Nick Clemens [Fri, 12 Apr 2019 01:23:34 +0000]
Bug 22692: Check for patron using cardnumber and userid

TO test:
1 - Set failed login attempts to 1
2 - Attempt a login with a userid and bad password, no success
3 - Attempt a login with userid and correct password, prevented because
locked
4 - Attempt a login with cardnumber and right password, you are logged
in
5 - Log out, try again with userid and correct password, prevented
because locked?
6 - Apply patch
7 - Repeat 1-3 to lock account
8 - Attempt logging in with cardnumber, you are prevented

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

5 years agoBug 22692: Unit tests
Nick Clemens [Fri, 12 Apr 2019 01:11:19 +0000]
Bug 22692: Unit tests

1 - Apply just this patch
2 - prove -v t/db_dependent/Auth.t
3 - Failure
4 - Apply second patch
5 - prove -v t/db_dependent/Auth.t
6 - Success

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>