]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 23018: Refunding a lost item fee may trigger error if any fee has been written...
Kyle M Hall [Thu, 30 May 2019 18:15:52 +0000 (14:15 -0400)]
Bug 23018: Refunding a lost item fee may trigger error if any fee has been written off related to that item

If a lost item fee is written off, it creates a writeoff with the same itemnumber but the amount column is a negative number.

Now, when the lost item is returned, it calls _FixAccountForLostAndReturned which searchs for all accountlines with an account type of 'L' or 'W'.

Then, if the *first* of those lines has an outstanding balance, a credit is created and *all* the lines found are passed to $credit->apply. The apply method then calls is_debit on each line and when it hits the writeoff, it throws an exception ( Koha::Exceptions::Account::IsNotDebit ).

When this happens, the credit is creating but not applied the the outstanding lost item fee, and the librarian is presented with an error page.

It seems like the solution is to only fetch the first result since it seems like that is the only one we should be operating on.

Test Plan:
1) Create a lost item with a fee
2) Create a manual debit using the barcode of the item
3) Write off that manual debit
4) Check in the item, note the error
5) Apply this patch
6) Repeat steps 1-3
7) Check in the item, no error!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d4f41cc8aafbb9854b20d1de7115a81e1eb73b9c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 19012: Note additional columns that are required during patron import
Nick Clemens [Mon, 31 Jul 2017 16:13:20 +0000 (16:13 +0000)]
Bug 19012: Note additional columns that are required during patron import

This adds surname and cardnumber to the list of required columns on the
import tool screen and help page

To test:
Read the updated notes, verify it is true and understandable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 67f86868155725b3fec29d38a54e8c161dd72c78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23280: Silence warning
Martin Renvoize [Mon, 8 Jul 2019 16:41:16 +0000 (17:41 +0100)]
Bug 23280: Silence warning

Corrects a typo in t/db_dependent/selenium/patrons_search.t introduced
by bug 22781.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 481d34613183300bff31f7f6a66abe8aa893e07a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23199: (follow-up) Fix tab/space issues
Mark Tompsett [Tue, 2 Jul 2019 05:05:20 +0000 (05:05 +0000)]
Bug 23199: (follow-up) Fix tab/space issues

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 611b60ea9657efbe5f6c1da53d4b6a6d2d5f6a01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23199: Added tests for Koha::Patron
Mark Tompsett [Tue, 2 Jul 2019 05:01:55 +0000 (05:01 +0000)]
Bug 23199: Added tests for Koha::Patron

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e53bed5375638c8d7baaefb04cd77843dbe8e8a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23199: Koha::Patron->store must check 'uppercasesurname' syspref
Arthur Suzuki [Tue, 25 Jun 2019 09:17:24 +0000 (11:17 +0200)]
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref

Test plan:
1/ set uppercasesurname to 'Do'
2/ register a new patron using the REST API with lowercase surname
3/ verify the surname is not saved in uppercase
4/ apply patch
5/ repeat 2
6/ verify the surname now is saved to uppercase

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fa390ca232a0979c6786a0e00eca8d458f644f3e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23077: Fix import of cardnumber 0
Nick Clemens [Tue, 2 Jul 2019 10:58:53 +0000 (10:58 +0000)]
Bug 23077: Fix import of cardnumber 0

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9796f5adb39b3cb56bf82837cd57d14e513e8cae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23077: Don't fill cardnumber with empty string
Nick Clemens [Fri, 7 Jun 2019 12:19:28 +0000 (12:19 +0000)]
Bug 23077: Don't fill cardnumber with empty string

To test:
1 - Apply unit test patch only
2 - prove the tests, they fail
3 - Attempt to import the attached sample file
4 - First patron may be imported, second will give error (or both will error)
5 - If only one error, import agian, now both have error
6 - Apply this patch
7 - Prove tests, they pass!
8 - Import the sample file
9 - It succeeds!

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cc60770c4eed3ab8144acd2382e2894f7b63fb37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23077: Unit tests
Nick Clemens [Fri, 7 Jun 2019 12:18:55 +0000 (12:18 +0000)]
Bug 23077: Unit tests

prove -v t/db_dependent/Koha/Patrons/Import.t

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 51bfa2ce28fc2eed7b5d0361fe4585afd96e3e20)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23248: (QA follow-up) Consolidate 404s
Marcel de Rooy [Fri, 5 Jul 2019 06:07:25 +0000 (06:07 +0000)]
Bug 23248: (QA follow-up) Consolidate 404s

Merging two conditions: biblionumber is empty or biblionumber cannot be
found. This make the strange int($biblionumber) unneeded.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e559e59635e387ce53a894a67e4323e4984a15f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23248: Avoid opac-ISBDdetail.pl breaking on invalid biblionumber
Tomas Cohen Arazi [Mon, 1 Jul 2019 18:52:02 +0000 (15:52 -0300)]
Bug 23248: Avoid opac-ISBDdetail.pl breaking on invalid biblionumber

This patch makes opac-ISBDdetail.pl redirect to a 404 page (as it
should) in the event of a bad biblionumber passed.

To test:
- Open your browser on a known record detail page (OPAC)
- Switch to the ISBD view
=> SUCCESS: It shows
- Alter the biblionumber on the URL into an obviously non-existent
biblionumber (e.g. very high value)
=> FAIL: Internal errors are shown
- Apply this patch
- Reload the bad biblionumber ISBD view
=> SUCCESS: Browser is redirected to the 404 page as it should
- Sign off :-=> FAIL: Internal errors are shown
- Apply this patch
- Reload the bad biblionumber ISBD view
=> SUCCESS: Browser is redirected to the 404 page as it should
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c3f0732eb72dfb3c4c6000a8602424772bd46b61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED
Jonathan Druart [Thu, 20 Jun 2019 01:08:04 +0000 (20:08 -0500)]
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED

Test plan:
0: Do not apply the patches
1: Create an item with itype, ccode, location, and holding branch set
2: Create a course
3: Add item to course, changing the values for itype, ccode, and location
4: Click Edit for that item on course-details.pl
5: Assign new values for itype, ccode, and location but leave the holding library dropdown set to LEAVE UNCHANGED
6: Hit Save
7: Back on course-details.pl, observe that the item is still showing the values set in step 3
8: Apply this patch
9: Repeat 4 to 6
10: Back on course-details.pl, observe that the item is now showing the correct values
11: Edit the course reserve again, setting new values for itype, ccode, and location and setting the holding library dropdown to whatever the holding library for the item is currently
12: hit save
13: On course-details.pl, see that the change actually happened, the item is now showing the values set in step 9

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e4ee3636304d06a0492fee6a1fcd9e4c65a17be6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23083: Add tests
Jonathan Druart [Thu, 20 Jun 2019 01:12:14 +0000 (20:12 -0500)]
Bug 23083: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 44469cf4c3e9fa690b2247324b1922fdde207f9f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23255: Correct HomeOrHoldingBranch descriptions
Nick Clemens [Tue, 2 Jul 2019 16:10:10 +0000 (16:10 +0000)]
Bug 23255: Correct HomeOrHoldingBranch descriptions

To test:
1 - Apply patch
2 - View 'HomeOrHoldingBranch' system preference
3 - Confirm the options make sense

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cbf605539ad90e18a0325b1d06e43b8b71b655e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23230: (follow-up) Fix broken tests
Mark Tompsett [Wed, 3 Jul 2019 02:35:16 +0000 (02:35 +0000)]
Bug 23230: (follow-up) Fix broken tests

Before patch, the new tests don't run.
After patch, they do.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 288cc505557fdcb167737f1894cee581526b4741)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23230: Make _version_compare OO context aware
Tomas Cohen Arazi [Mon, 1 Jul 2019 14:42:51 +0000 (11:42 -0300)]
Bug 23230: Make _version_compare OO context aware

On using _version_compare in plugins development, it would be nice if it
was able to be called as an object method. This way we don't need to
fully qualify it like this:

    Koha::Plugins::Base::_version_compare

and we can do

    $self->_version_compare

instead.

This patch implements this behavior change. It is backwards compatible
so plugins using the 'old way' don't break.

To test:
- Apply the unit tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Plugins.t
=> FAIL: Tests fail
- Apply this patch
- Run:
 k$ prove t/db_dependent/Plugins.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 90acef7a9b860e70631ff243c21b435a7d081a16)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23230: Unit tests
Tomas Cohen Arazi [Mon, 1 Jul 2019 14:33:41 +0000 (11:33 -0300)]
Bug 23230: Unit tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ff5f9fb633e6f3786b093d2a2f202a66db7b3d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17003: (QA follow-up) Fix the number of tests
Kyle M Hall [Fri, 28 Jun 2019 15:27:27 +0000 (15:27 +0000)]
Bug 17003: (QA follow-up) Fix the number of tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 162ea12db99e3ad2face427548a1f4e6f469ef77)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17003: (follow-up) Update definitions according to voted RFC
Josef Moravec [Fri, 29 Mar 2019 07:53:27 +0000 (07:53 +0000)]
Bug 17003: (follow-up) Update definitions according to voted RFC

Test plan:
1) Have some patrons with checkouts, some renewable and some not
renewable
2) Use your favorite API tester and access GET
http://koha.url/api/v1/checkouts/{checkout_id}/allows_renewal
3) Check the response is OK according to voted RFC:
https://wiki.koha-community.org/wiki/Checkouts_endpoint_RFC#Checkout_renewability_2
4) prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0619aab9971c7f4d4859620abbac7ad2bfe93364)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17003: Adapt to OpenAPI
Josef Moravec [Thu, 21 Feb 2019 02:30:00 +0000 (02:30 +0000)]
Bug 17003: Adapt to OpenAPI

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0404ecec4b619ebe14ac262332870004bb88878c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17003: Add API route to get checkout's renewability
Lari Taskula [Mon, 22 Aug 2016 14:35:44 +0000 (17:35 +0300)]
Bug 17003: Add API route to get checkout's renewability

Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 563458f20e413388d11cf92ea36d2867f488416f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23045: Return record along with errors
Nick Clemens [Fri, 7 Jun 2019 10:14:36 +0000 (10:14 +0000)]
Bug 23045: Return record along with errors

We don't seem to directly handle the errors in most cases, let's always return the record

To test:
1 - Add some blank lines to editor, previous patch is okay with this
2 - Add a line with just 'e' or some other incomplete field
3 - Try to save
4 - Note JS leader error
5 - Apply this patch
6 - No errors

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f927d801121f9d7b291516649cf3b55be49b8e3d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23045: TextMarc errors on blank lines
Nick Clemens [Tue, 4 Jun 2019 14:25:53 +0000 (14:25 +0000)]
Bug 23045: TextMarc errors on blank lines

Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when
processing blank lines.

We should just pass on these rather then erroring

To test:
1 - Define a new macro that delete more fields than it adds
  delete 245
2 - Run it
3 - Note an error in JS console, and helpers will not load
4 - Apply patch
5 - Reload, try again
6 - No error

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 545f38d13c210e4cb173e67d2578d825a9ffeb47)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23225: Do not hide a biblio if there is no item
Jonathan Druart [Fri, 28 Jun 2019 19:01:04 +0000 (14:01 -0500)]
Bug 23225: Do not hide a biblio if there is no item

This patch fixes a 404 redirect from the OPAC ISBD view if the
bibliographic record does not have item attached.

Signed-off-by: Luis F. Lopez <lflfalagan@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f317d384f657bb8341a1a641343e18ed9598240d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23225: Add a test
Jonathan Druart [Fri, 28 Jun 2019 19:00:53 +0000 (14:00 -0500)]
Bug 23225: Add a test

Signed-off-by: Luis F. Lopez <lflfalagan@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f5d3dec2e4ddfa20006cd9f81e28616b36230685)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23196: (follow-up) Add comments to highlight structure
Owen Leonard [Mon, 24 Jun 2019 17:16:07 +0000 (17:16 +0000)]
Bug 23196: (follow-up) Add comments to highlight structure

This follow-up adds a few comments to the markup in order to highlight
and clarify the the HTML structure.

To test, apply the patch and perform a diff against master using the
'-w' flag:

git diff -w origin/master

You should only see the addition of HTML comments.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fc39e24eb502c1f724e8c5aa8b7264db901be278)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23196: Reindent tools/batch_record_modification.tt
Owen Leonard [Mon, 24 Jun 2019 17:09:36 +0000 (17:09 +0000)]
Bug 23196: Reindent tools/batch_record_modification.tt

This patch re-indents the template for batch record modifications. It
makes only whitespace changes. It should have no effect on the behavior
of the page.

To test, apply the patch and perform a diff against master using the
'-w' flag:

git diff -w origin/master

There should be no changes reported.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1693c2e01d6eb001a35caf3bb31b9d057c2136fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23183: Reindent cataloging.js
Owen Leonard [Fri, 21 Jun 2019 14:07:49 +0000 (14:07 +0000)]
Bug 23183: Reindent cataloging.js

This patch makes some very minor corrections to indentation in
cataloging.js, a JavaScript file used by the bibliographic and item
records editors.

To test, apply the patch and perform a diff against master using the
'-w' flag:

git diff -w origin/master

There should be no changes reported.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f50afc1fc0b9044c21564b45f44687993ebc07e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23193: Make set_password.pl use Koha::Script
Tomas Cohen Arazi [Mon, 24 Jun 2019 13:28:00 +0000 (10:28 -0300)]
Bug 23193: Make set_password.pl use Koha::Script

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5fd85da18e7e3c548cc9d56689b09fd34615aed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22128: Add Rudolf Byker to contributors
Martin Renvoize [Fri, 28 Jun 2019 13:31:03 +0000 (14:31 +0100)]
Bug 22128: Add Rudolf Byker to contributors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18767d62a873570637d199586bbeca4200e67d1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22128: Removed outdated comment
Mark Tompsett [Tue, 11 Jun 2019 13:39:48 +0000 (13:39 +0000)]
Bug 22128: Removed outdated comment

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 787b86f9d4d3aa83502f9b2afdc98d9ff6761b8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE
Rudolf Byker [Fri, 24 May 2019 18:25:45 +0000 (13:25 -0500)]
Bug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE

MySQL 5.7 is old, and the latest versions fail on "GRANT USAGE" if the
user does not exist. "DROP USER IF EXISTS" has been with us since 5.7,
so all users should have it by now. This patch fixes the issue.

To test:

Try to koha_remove a site, and if it works with no errors, all good!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e9bb407f62a208d42aefb03d16decd87bae228e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23220: Prevent form submission before redirect
Nick Clemens [Wed, 26 Jun 2019 12:49:14 +0000 (12:49 +0000)]
Bug 23220: Prevent form submission before redirect

To test:
 1 - Check in an item to generate a transfer (form another library, no floating)
 2 - Check it in again, click 'Cancel transfer'
 3 - It may or may not work
 4 - To highlight the issue edit return.tt to add the delay line as below:
$('.cancel-transfer').on("click",function(e){
delay(5000);
window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber | html %]&amp;canceltransfer=1'
});
 5 - Check in the item repeatedly, click 'Cancel transfer'
 6 - View the item in the staff or opac and verify it remains in transit
 7 - Undo changes above, apply patch
 8 - Test 'Cancel transfer', note it works
 9 - Add the delay back in, confirm it still works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dcf416dc9547fd28e6ed846d08d6bbecb144552)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23211: Prevent SIP/Transaction.t to fail randomly
Jonathan Druart [Tue, 25 Jun 2019 22:43:41 +0000 (17:43 -0500)]
Bug 23211: Prevent SIP/Transaction.t to fail randomly

The checkout failed because patron's category is the one used for statistics (category_type=X).

To recreate the failure:
modified: t/db_dependent/SIP/Transaction.t
@ Transaction.t:37 @ subtest fill_holds_at_checkout => sub {
     plan tests => 6;

-    my $category = $builder->build({ source => 'Category' });
+    my $category = $builder->build({ source => 'Category', value => { category_type => 'X' }});
     my $branch   = $builder->build({ source => 'Branch' });
     my $borrower = $builder->build({ source => 'Borrower', value =>{
         branchcode => $branch->{branchcode},

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 466f99e44230968aeb51598e50f65d212941c5b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23126: Add tests
Jonathan Druart [Mon, 24 Jun 2019 17:39:15 +0000 (12:39 -0500)]
Bug 23126: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e639400225e2d04823eee7a00e490d87f8d60401)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23126: Remove more unnecessary linebreak processing from serial collection
Katrin Fischer [Fri, 21 Jun 2019 01:25:02 +0000 (01:25 +0000)]
Bug 23126: Remove more unnecessary linebreak processing from serial collection

This should have no visible effect on the templates as the
information the grep changes is not used in the template.

It's also strange, that these lines existed, as
GetSubscriptionsFromBiblionumber contained the same changes.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2455286da42b73fa3efc29ac1a51ca81a0017a8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23126: Display multi-line entries in subscrpitions correctly
Katrin Fischer [Tue, 18 Jun 2019 06:06:10 +0000 (08:06 +0200)]
Bug 23126: Display multi-line entries in subscrpitions correctly

There are several notes and other fields in a subscription that
can be entered as multi-line input with breaks. We should display
them as they were entered with keeping the line breaks intact.

To test:
- Add a subscription
  - Add comments including line breaks in internal and OPAC note
  - Check the manual history checkbox
- Go to the subscription detail page, tab 'Planning'
- Use the 'Edit history' link to edit the history
- Enter content with line breaks in all the input fields where
  it's possible
- Go to the OPAC detail page for your subscription record
- Go to tab 'Subscriptions' > More details > Brief history
- Verify the line breaks show there as <br>
- Apply patch
- Relaod page, verify all information displays correctly now
- Go back to the detail page, subscription tab - verify same there
- Go back to the subscription detail page in staff
  - Check editing the history works as expected
  - Verify information on all tabs displays correctly
  - Receive a serial issue - verify note on top displays right
  - Go to the serial collection page of the subscription - same there

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 316eda1036fd08f9c78578b27e85fd79c6895237)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23156: Add pagination to checkouts in ILS-DI GetPatronInfo service
Julian Maurice [Wed, 19 Jun 2019 10:07:58 +0000 (12:07 +0200)]
Bug 23156: Add pagination to checkouts in ILS-DI GetPatronInfo service

When patrons have a lot of checkouts, GetPatronInfo can take a lot of
time. This patch introduces two new parameters to allow pagination of
this list of checkouts

Also, fix a warning in C4::ILSDI::Services::GetPatronInfo

Test plan:
1. Go to /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X&show_loans=1
   where X is a borrowernumber of a patron who has several checkouts
   Verify that all checkouts are listed
2. Add '&loans_per_page=1&loans_page=1' to the URL. Verify that you have
   now only one checkout listed, and that there is a new element
   <total_loans> which contain the total number of checkouts
3. Increase the page number in the URL until you have seen all checkouts
4. prove t/db_dependent/ILSDI_Services.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2351693b61db83e0405157fd75951abee8df0116)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22566: (QA follow-up) Fix pod complaint
Nick Clemens [Tue, 25 Jun 2019 12:40:57 +0000 (12:40 +0000)]
Bug 22566: (QA follow-up) Fix pod complaint

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35093039df3b42ae33c746385669ba13deb38c7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22566: Add 'branch' key to GetPreparedLetter
Martin Renvoize [Tue, 18 Jun 2019 13:29:02 +0000 (14:29 +0100)]
Bug 22566: Add 'branch' key to GetPreparedLetter

The branch key was missing from the subsitution call to
GetPreparedLetter.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b3795df8012545af4134d7402e9609e2d89f7be9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22566: Clarify intent of reports and add warnings
Martin Renvoize [Tue, 18 Jun 2019 13:24:27 +0000 (14:24 +0100)]
Bug 22566: Clarify intent of reports and add warnings

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4e4f0b637c66ca04a07473c347cc741d456c20c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22566: Rename 'report_email' to 'report_by_branch'
Martin Renvoize [Tue, 18 Jun 2019 12:38:43 +0000 (13:38 +0100)]
Bug 22566: Rename 'report_email' to 'report_by_branch'

To clarify the intention of this routine, lets rename it

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e226ba3c018a890c823f10365dbe2b3d1d22d23)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22566: Accept 'all' in the branch params
Martin Renvoize [Tue, 18 Jun 2019 11:57:07 +0000 (12:57 +0100)]
Bug 22566: Accept 'all' in the branch params

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2b392a6db231c8069d57be88ebf4f2960af199fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22566: Fix some more issues
Martin Renvoize [Fri, 7 Jun 2019 11:50:32 +0000 (12:50 +0100)]
Bug 22566: Fix some more issues

1) Fix warning for undefined value in sprintf when no items have the
indemand flag set.
2) Corrections to report_full for bad ternary in string construction
3) Perldoc corrections

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4f3413f0d2688017f6a35b43d0d1d4a9d7295c5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22566: Fix some problems
Nick Clemens [Fri, 22 Mar 2019 17:23:35 +0000 (13:23 -0400)]
Bug 22566: Fix some problems

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b62473d192abaf9371bffb0ec4d73267a0070447)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22949: Markup error in OPAC course reserves template
Owen Leonard [Tue, 21 May 2019 14:45:06 +0000 (14:45 +0000)]
Bug 22949: Markup error in OPAC course reserves template

This patch adds a missing "=" in opac-course-reserves.tt in order to
quiet errors returned by the HTML validator.

To reproduce the problem you should have one or more course reserves
available in the OPAC. Go to the course reserves page. Run the page
through the W3C validation service: https://validator.w3.org. Either by
pasting in the URL for the search results (if web accessible) or by
viewing source, copying, and pasting into "Validate by Direct Input."

This patch addresses these errors:

 - 'Quote " in attribute name. Probable cause: Matching quote missing
    somewhere earlier.'
 - 'Attribute class"inst_surname" not allowed on element span at this
    point.'

To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the page.

Signed-off-by: Frederik Chenier <frederik@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35fe9cf40bb1472799db0f7596d33f1bd184fb9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23158: Make the assignment statement more readable
Jonathan Druart [Mon, 24 Jun 2019 15:37:54 +0000 (10:37 -0500)]
Bug 23158: Make the assignment statement more readable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9f4c2306ebc42e107603f6f8bf393a20d1013458)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23158: keep on-site checkout info when using itemBarcodeFallbackSearch
Fridolin Somers [Wed, 19 Jun 2019 11:42:16 +0000 (13:42 +0200)]
Bug 23158: keep on-site checkout info when using itemBarcodeFallbackSearch

When using preference itemBarcodeFallbackSearch one can enter a search term instead of a barcode in checkout form.
If on-site is selected this should be transmitted to itemBarcodeFallbackSearch form.

Test plan :
1) Enable system preferences "itemBarcodeFallbackSearch" and "OnSiteCheckouts"
2) Disable system preference "ConsiderOnSiteCheckoutsAsNormalCheckouts"
3) Go to a patron circulation page
4) Check "On-site checkout" in "Checkout settings"
5) Enter a barcode in checkout form and click on "Check out"
6) You see the checkout in table with red "(On-site checkout)"
7) Check "On-site checkout" in "Checkout settings"
8) Enter the title of a record in in checkout form and click on "Check out"
9) Click on "Checkout" on a line
10) You see the checkout in table with red "(On-site checkout)"

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 12ef157d757431520d63ab154b9572a855acf317)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23154: Add pagination to /api/v1/checkouts
Julian Maurice [Wed, 19 Jun 2019 09:10:14 +0000 (11:10 +0200)]
Bug 23154: Add pagination to /api/v1/checkouts

Allow to use _page and _per_page query parameters for
/api/v1/checkouts
Also fix a timezone problem in t/db_dependent/api/v1/checkouts.t

Test plan:
1. With your favorite REST tester tool, or directly in the browser,
   fetch http://koha/api/v1/checkouts and check that you have results
2. Fetch /api/v1/checkouts?_per_page=1&_page=1 and check that only the
   first result is returned. Check that response contains headers
   X-Total-Count and Link
3. Fetch /api/v1/checkouts?_per_page=1&_page=2 and check that only the
   second result is returned. Check that response contains headers
   X-Total-Count and Link
4. prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 088522032f33b6a5931cbea1b928537e7fe33fd0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22935: Compiled CSS
Fridolin Somers [Wed, 24 Jul 2019 07:25:37 +0000 (09:25 +0200)]
Bug 22935: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22935: Improve style of Bootstrap pagination
Owen Leonard [Fri, 17 May 2019 15:03:24 +0000 (15:03 +0000)]
Bug 22935: Improve style of Bootstrap pagination

This patch makes some updates to the staff client CSS and adds Font
Awesome icons to the Bootstrap pagination include.

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

Perform a search in the staff client which will return multiple pages of
results. Check that the pagination links look good.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 33b70b798d4cc2bc6d6db43a40d006dd8c1109b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22862: (QA follow-up) Make regexes match
Kyle M Hall [Thu, 9 May 2019 18:14:25 +0000 (14:14 -0400)]
Bug 22862: (QA follow-up) Make regexes match

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 982fd9fecbe6777805d2d0d3f977f10c522b86c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22862: Normalize SMS messaging numbers before validating them
Kyle M Hall [Tue, 7 May 2019 18:53:29 +0000 (14:53 -0400)]
Bug 22862: Normalize SMS messaging numbers before validating them

Librarians often copy and paste patron data, including phone numbers. SMS phone numbers are now being validated to conform to the E.164 specification. It would be nice to try to normalize that data by stripping non-numeric data from the paste (i.e. dashes, parens, etc ).

Test Plan:
1) Apply this patch
2) On the staff side, Attempt to enter invalid characters the SMS number field
3) Note you cannot enter invalid characters
4) Attempt to paste a phone number with invalid characters
5) Note those characters are removed on paste
6) Repeat these steps on the OPAC

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 115f4f2045a6c695d1eed47cd401b7759630ac4d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 15704: Split up Zebra indexing of RDA 264 information
Nick Clemens [Mon, 18 Dec 2017 15:41:33 +0000 (15:41 +0000)]
Bug 15704: Split up Zebra indexing of RDA 264 information

To test:
1 - Add a record with a unique publisher "Supercalifragilistic" in the
264 b field
2 - Search for the value
3 - Record not found
4 - Apply patch (may need ot copy the .xml file into koha install)
5 - Reindex all the things
6 - Search for the value
7 - Success!

Signed-off-by: Felicia Martin <felicia.martin@dncr.nh.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3599e57bf67a1357c13903fbf07f07cb2c94e756)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23115: Compiled CSS
Fridolin Somers [Wed, 24 Jul 2019 07:00:58 +0000 (09:00 +0200)]
Bug 23115: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23115: (QA follow-up) Address QA tools complaints
Nick Clemens [Fri, 21 Jun 2019 16:20:28 +0000 (16:20 +0000)]
Bug 23115: (QA follow-up) Address QA tools complaints

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c3ced5d89320f85774d945957b2b4e68d0336016)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23115: (follow-up) Move switches to a TT block
Nick Clemens [Fri, 21 Jun 2019 16:18:15 +0000 (16:18 +0000)]
Bug 23115: (follow-up) Move switches to a TT block

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit efc21e6f47801503e55e3ba709a48c3f426f90ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23115: Tweak display of totals on 'Fines and charges' page
Martin Renvoize [Thu, 13 Jun 2019 10:42:02 +0000 (11:42 +0100)]
Bug 23115: Tweak display of totals on 'Fines and charges' page

This patch tweaks the display of totals on the OPAC 'Fines and charges'
page to clarify between the totals before and after applying credits.

Test Plan:
1) Add some debts and credits to a patrons account
2) Look at the 'Fines and charges' page before applying the patch
3) Look at the 'Fines and charges' page after applying the patch
4) Varify the new layout is an improvment or not

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49275f27d43990746b4af5c6335d4fe7f38de7b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23106: Tweak display of totals on payment page
Martin Renvoize [Thu, 13 Jun 2019 09:02:35 +0000 (10:02 +0100)]
Bug 23106: Tweak display of totals on payment page

This patch tweaks the display of totals on the fines payments page to
clarify between the totals before and after applying credits.

Test Plan:
1) Add some debts and credits to a patrons account
2) Look at the pay page before applying the patch
3) Look at the pay page after applying the patch
4) Verify the new layout is an improvment or not

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7c5e7ca9c47ac6c8a8b7d89da46e7354d8fea69d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23098: Reword success message of KOC upload process
Katrin Fischer [Mon, 17 Jun 2019 21:20:41 +0000 (23:20 +0200)]
Bug 23098: Reword success message of KOC upload process

When uploading KOC files the processing of transactions needs
to happen in a separate second step. This is why the success
message "Your file was processed" was found to be misleading.

This patch changes it to the wording suggested by Benjamin
Daeuber in the original bug report. Thx!

To test:
- Create a KOC file either manually or by downloading it
  from the plugin
- Upload the KOC file into Koha using Circulation >
  Upload offline circulation file (.koc)
- Verify the new message is clear and has no typos :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 286f151009f778d6d4d0890b1a8bead1a6e62bde)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoUpdate release notes for 19.05.02 release v19.05.02
Fridolin Somers [Tue, 23 Jul 2019 13:09:08 +0000 (15:09 +0200)]
Update release notes for 19.05.02 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoMerge remote-tracking branch 'translate/19.05.02-translate-20190723' into 19.05.x
Fridolin Somers [Tue, 23 Jul 2019 13:02:52 +0000 (15:02 +0200)]
Merge remote-tracking branch 'translate/19.05.02-translate-20190723' into 19.05.x

5 years agoIncrement version for 19.05.02 release
Fridolin Somers [Tue, 23 Jul 2019 13:00:47 +0000 (15:00 +0200)]
Increment version for 19.05.02 release

5 years agoTranslation updates for Koha 19.05.02
Koha translators [Tue, 23 Jul 2019 12:59:40 +0000 (09:59 -0300)]
Translation updates for Koha 19.05.02

5 years agoBug 23151: DBRev 19.05.01.001
Martin Renvoize [Fri, 19 Jul 2019 09:07:17 +0000 (10:07 +0100)]
Bug 23151: DBRev 19.05.01.001

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cca82cc6d04a7070688fe7a3d7d55cf385ae2502)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: (QA follow-up) Remove debug leftover
Marcel de Rooy [Fri, 19 Jul 2019 08:04:45 +0000 (08:04 +0000)]
Bug 23151: (QA follow-up) Remove debug leftover

Removes: Running... Running... Ran

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f9d39508d67818c62797ab4f0d8d656272510085)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: (QA follow-up) Fix atomic update
Kyle M Hall [Fri, 28 Jun 2019 14:15:40 +0000 (10:15 -0400)]
Bug 23151: (QA follow-up) Fix atomic update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4f90d7ecc7d07551c2115ed0c564dc918735d428)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: (follow-up) tweaked tests
Mark Tompsett [Wed, 19 Jun 2019 16:31:17 +0000 (16:31 +0000)]
Bug 23151: (follow-up) tweaked tests

This forces the tests to use the new changed_fields
field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c5a261e4ed9880723ce782a2c85677d2e1d0e05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: Add tests
Jonathan Druart [Wed, 19 Jun 2019 03:54:27 +0000 (22:54 -0500)]
Bug 23151: Add tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 286ffd5f2f255e77aac1099f31b9c418827d842e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: Tweak to use the new database structure
Mark Tompsett [Wed, 19 Jun 2019 16:29:59 +0000 (16:29 +0000)]
Bug 23151: Tweak to use the new database structure

This will use changed_fields to know whether a
borrower field is actually modified.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 30fd4eb1a59fd480406261f30daa40692f16bc10)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: Schema changes
Mark Tompsett [Wed, 19 Jun 2019 16:32:10 +0000 (16:32 +0000)]
Bug 23151: Schema changes

It is best to regenerate these from scratch.
On a kohadevbox:
$ misc/devel/update_dbix_class_files.pl --db_name=koha_kohadev --db_user=koha_kohadev --db_passwd=password

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1af2698b84e21c11f80ed5c080430596ee712709)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: Modifiy database structure
Mark Tompsett [Wed, 19 Jun 2019 16:28:44 +0000 (16:28 +0000)]
Bug 23151: Modifiy database structure

This modifies a fresh install structure, and provides
an atomic update.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d102165f8de3b808e2f555df2c97e8864b5445aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23250: Just use an @ in the password
Mark Tompsett [Thu, 4 Jul 2019 00:29:01 +0000 (00:29 +0000)]
Bug 23250: Just use an @ in the password

Rather than try to use -y and symbols, since
older versions of pwgen don't have the -y,
Purposefully just shorten the generated
password to 15 characters and put @ on the end.
This avoids nasty shell globbing, fixes the
MySQL requiring a symbol by default in the
newer versions.

While @ at the end is less secure, the
password portion providing security is
still 15 characters long.

Before patch, password should have potentially
multiple ugly symbols in it.
After patch, when creating an instance, the
password will have an @ at the end of it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a6866afa343e3b53ad77a36552e19404ac7afab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23116: AllowHoldPolicyOverride allows a librarian to almost place a hold on an...
Kyle M Hall [Thu, 13 Jun 2019 10:34:38 +0000 (06:34 -0400)]
Bug 23116: AllowHoldPolicyOverride allows a librarian to almost place a hold on an item already on hold

A library appears to be able to place a second item level hold on an item a patron already has on hold if
A) AllowHoldPolicyOverride is enabled
and
B) the circ rule allow for multple item level holds.

Once the patron submits the hold requests though, the hold does not get stored in the database.

Because allowing two item level holds for the same item makes no sense, we should not allow
this attempt to take place, even if AllowHoldPolicyOverride is enabled.

Test Plan:
 1) Enable AllowHoldPolicyOverride
 2) Set up circ rules to allow for multiple item level holds on one record
 3) Place an item level hold on a record
 4) Note you can force placing a second item hold on that reocrd
 5) Attempt to do so, it will not actually work
 6) Apply this patch
 7) Note you can no longer place another item level hold for the same item
   you just placed an item-level hold on
 8) Note you can still force holds that contravene the circ rules for
   any and all other reasons
 9) Test with record level holds
10) Test by placing multiple holds from search results

Signed-off-by: Martha Fuerst <mfurest@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Simple fix for a regression. Works as expected.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c5e9bed7de83d01be755475b96a3cf439e0126c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23057: (QA follow-up) Remove new AddReturn message ReturnOfLostItemBlocked, use...
Kyle M Hall [Tue, 11 Jun 2019 11:46:57 +0000 (07:46 -0400)]
Bug 23057: (QA follow-up) Remove new AddReturn message ReturnOfLostItemBlocked, use existing pattern from returns.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 80cbb81224e78c535daa14cf67fec2e945385e9f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23057: Update do_checkin
Kyle M Hall [Thu, 6 Jun 2019 16:42:46 +0000 (12:42 -0400)]
Bug 23057: Update do_checkin

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17f5547b3492bbf31a5e63ce0568c4bc31100421)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23057: Unit tests
Kyle M Hall [Thu, 6 Jun 2019 14:37:11 +0000 (10:37 -0400)]
Bug 23057: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 77116bbed68332d46f96663ad47512ae98342d89)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23057: If checked_in_ok is set and item is not checked out, alert flag is supress...
David Cook [Thu, 6 Jun 2019 00:31:13 +0000 (10:31 +1000)]
Bug 23057: If checked_in_ok is set and item is not checked out, alert flag is supressed for *any* reason

This patch fixes a bug from Bug 15221 and hopefully also makes it so that the alert flag
is suppressed when checked_in_ok is set and an item is not checked out.

To test:

0) Create patron in web interface with a cardnumber and userid of "staff" with a password
that matches the account in SIPconfig.xml. Also set their branch to CPL
(also matching SIPconfig.xml).
1) Create an item with a barcode of 'test'
2) Choose a patron to check out to and record their borrowernumber

In one terminal:
3) cd to your git directory (e.g. /home/koha/koha)
4) perl ./C4/SIP/SIPServer.pm ~/koha-dev/etc/SIPconfig.xml

In another terminal:
5) cd to your git directory (e.g. /home/koha/koha)
6) perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber>
NOTE: You need to replace <borrowernumber> with the borrowernumber from Step 2, and <password> with the password from Step 0.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 97af85525f8a828551ff30d1522308f9efe2be54)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23034: (RM follow-up) Consistent coding style
Martin Renvoize [Mon, 24 Jun 2019 13:48:27 +0000 (14:48 +0100)]
Bug 23034: (RM follow-up) Consistent coding style

We had a mix of q||, q{} and '' in this one script. This followup just
makes them all conform to our standard style of q{}.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dc64b4b124abf4bd2437004879e083972e20492)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23034: Remove uninitialized value warning in Mana KB settings
Joonas Kylmälä [Mon, 3 Jun 2019 14:58:34 +0000 (14:58 +0000)]
Bug 23034: Remove uninitialized value warning in Mana KB settings

This gets rid of the warning "Use of uninitialized value $auto_share
in string ne at [...]" by initializing the variable with empty string.

Test plan:
1) Go to page cgi-bin/koha/admin/share_content.pl and unselect "Auto
   subscription sharing". Click "Save".
2) Check plack-error.log and notice the warning "Use of uninitialized
   value $auto_share [...]"
3) Apply the patch and repeat the previous steps but now this time the
   warning is gone in plack-error.log.
4) Make sure the AutoShareWithMana syspref with and without the patch
   is in unselected state after clicking "Save".

Sponsored-by: The National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0df3fc3dae575ceb16b85de6c201f5e82d01059c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22944: remove obsolete unit test
Fridolin Somers [Tue, 11 Jun 2019 13:31:45 +0000 (15:31 +0200)]
Bug 22944: remove obsolete unit test

Test 'AnonymiseIssueHistory should not return any error if success' is obsolete,
previous statement will explode if something went wrong.

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

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ed7b3760965ec5a52783efe64bcba13b45b3725a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22944: avoid AnonymousPatron in search_patrons_to_anonymise
Fridolin Somers [Tue, 21 May 2019 09:55:40 +0000 (11:55 +0200)]
Bug 22944: avoid AnonymousPatron in search_patrons_to_anonymise

In Koha::Patrons::search_patrons_to_anonymise() old issues already affected to the anonymous patron should be avoided. It is useless and can impact performance.

It is already working if AnymousPatron is not defined or 0 because of :
  'old_issues.borrowernumber' => { 'not' => undef }

In theory the anymous patron should have privacy=0 but in case its not it should be explicitly avoided.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 66975364b672ea5f362d49f6e5fca8c9a0e8326c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22944: change unit tests
Fridolin Somers [Tue, 21 May 2019 09:17:11 +0000 (11:17 +0200)]
Bug 22944: change unit tests

Add a dedicated UT and correct a test return value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 48e5713e6ff78d7aad7eff9e239ec8779d62655c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22571: (follow up) fix Donald cut-&-paste error
Mark Tompsett [Mon, 17 Jun 2019 17:57:46 +0000 (17:57 +0000)]
Bug 22571: (follow up) fix Donald cut-&-paste error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d08e776cf1e25ffa407bb3a5d668c1b140be6ec2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22571: Handle control fields in MMT for conditionals
Jonathan Druart [Sun, 5 May 2019 17:41:46 +0000 (12:41 -0500)]
Bug 22571: Handle control fields in MMT for conditionals

Control fields are not handled correctly by Koha::SimpleMARC when
comparaison (with or without regex) is done.

Which means we did not support something like:
Do something if control field 008 equals or matches "a string"

Test plan:
Create a new MARC modification template and a new action, like:
Add new field 100$a with value "foo bar" if 008 (or any other control
fields) matches (or equals) a regex
Then use the record mofication tool and confirm that the new field is
create if the regex matches 008 of the bib record

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c59586aebe1d8eab56d3cd32b5156fc1a61f11ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22571: Add tests
Jonathan Druart [Sun, 5 May 2019 17:41:43 +0000 (12:41 -0500)]
Bug 22571: Add tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f6009342a95575dc6b1157c953f5e6e8c249b6d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22617: Fix checkout notes typo in manage_checkout_notes permission usage
Fridolin Somers [Fri, 14 Jun 2019 08:43:15 +0000 (10:43 +0200)]
Bug 22617: Fix checkout notes typo in manage_checkout_notes permission usage

When logged into the staff client with an account with full circulate permissions (and therefore including the manage_checkout_notes permission) an error occurs when clicking on the Checkout notes pending link.  The account is logged out automatically with the message:  "Error: you do not have permission to view this page.  Log in as a different user".
The same error occurs for both the link on the home page dashboard and from the Circulation module button.  Works as expected if Superlibrarian permission is set.

This is just a typo in perl script : circulation instead of circulate

Test plan :
1) Set preference "AllowCheckoutNotes" to "Allow"
2) Create a user with only permissions "catalogue" and "circulate > manage_checkout_notes"
3) Loggin with this user
4) Go to "Circulation" home page
5) Click on "Checkout notes"
6) You should be allowed to access

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 206498dc5585fbd555181a1b241d5049632870df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23179: Add 'edit subfields' button to framework management
Nick Clemens [Fri, 21 Jun 2019 11:02:43 +0000 (11:02 +0000)]
Bug 23179: Add 'edit subfields' button to framework management

To test:
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) Note the dropdowns for each tag are: Edit, Subfields, Delete
4) Apply patch
5) Reload and note dropdowns are: Edit tag, View subfields, Edit subfields, Delete
6) Confirm options do what is selected

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b6dc7bc791853d4dafb7f9ab02d3767c926ff08)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23153: In framework management action subfields must not go directly to edition
Fridolin Somers [Wed, 19 Jun 2019 05:04:25 +0000 (07:04 +0200)]
Bug 23153: In framework management action subfields must not go directly to edition

Since 18.11, when viewing a framework field clicking on Actions >
Subfields goes to subfields edition instead of subfields table view.

This is because link contains op=add_form.
This is is also missing /cgi-bin/koha/admin.

Test plan :
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) On a line click Actions > Subfields
4) You see subfields table
5) Click on Edit subfields
6) You see subfields edition tabs

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49e0384f10f659e337fac1b08e6bdd2c163151ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 15814: Add missing filters
Jonathan Druart [Tue, 18 Jun 2019 01:07:29 +0000 (20:07 -0500)]
Bug 15814: Add missing filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 12a9dfb6593c4d5ccc6936b85c82479c12337309)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 15814: Handle correctly MMTA edit button
Jonathan Druart [Thu, 30 May 2019 02:28:23 +0000 (21:28 -0500)]
Bug 15814: Handle correctly MMTA edit button

The MARC modification template action edit buton does not correctly
handle variable escaping.
Assigning a JS variable containing the JSON representation of the
hashref will make the processing much more easier.

Test plan:
Create a MARC Modification Template with several actions.
In the description you should use the following characters, to try to
break this patch: \ ' " \n \r
(not sure what we handled \n and \r)
Then edit the action, modify and save again.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7a80483a1358a7bc3e516a8fbc92d34b6559dcac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23150: (follow-up) Make gdpr_proc_consent mandatory for create
Marcel de Rooy [Thu, 20 Jun 2019 12:37:27 +0000 (12:37 +0000)]
Bug 23150: (follow-up) Make gdpr_proc_consent mandatory for create

When updating (patron modification), the field should not be required.

Test plan:
Check patron modification on opac.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6dc8306b58bc1207f396d2df919a3daf4712e8e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23150: Do not consider gdpr_proc_consent a mandatory field
Jonathan Druart [Wed, 19 Jun 2019 19:49:15 +0000 (14:49 -0500)]
Bug 23150: Do not consider gdpr_proc_consent a mandatory field

It introduced a regression in the patron's self modification feature.
Patron's details are no longer modificable, the screen displays
"You have not filled out all required fields. Please fill in all missing
fields and resubmit."

Test plan:
- Set GDPR_Policy to either Enforced or Permissive
- Set PatronSelfRegistrationBorrowerMandatoryField to empty
- Set OPACPatronDetails to Allow
- Log into the OPAC
- Accept the GDPR screen
- Go to opac-memberentry.pl, change something, submit modification
request

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3b14f7d636fea4425b2f6eab922be9aa2a9eed1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22946: Markup error in OPAC search results around selection links
Owen Leonard [Tue, 21 May 2019 12:39:09 +0000 (12:39 +0000)]
Bug 22946: Markup error in OPAC search results around selection links

This patch makes minor corrections to the template for OPAC search
results. These corrections fix errors returned by the HTML validator.

To reproduce the problem, make sure holds and/or tags are enabled in the
OPAC. Perform a search in the OPAC which will return multiple results.
Run the page through the W3C validation service:
https://validator.w3.org. Either by pasting in the URL for the search
results (if web accessible) or by viewing source, copying, and pasting
into "Validate by Direct Input."

This patch addresses one specific error:

 - "Element div not allowed as child of element span in this context."

To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the search results view.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 48259267f6830b2e388b2a91268117645bda80f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23097: Fix regression on overdues report and link patrons to moremember
Katrin Fischer [Mon, 17 Jun 2019 21:35:19 +0000 (21:35 +0000)]
Bug 23097: Fix regression on overdues report and link patrons to moremember

The link from the patron name in the circulation > overdues report
shouldn't point to the reserves tab, as this report is about checkouts.

The patch restores the behaviour as it was in 17.11.

To test:
- Make sure you have a patron account with overdue items
- If you don't have one, check out an item with specified due date in the
  past
- Go to Circulation > Overdues
- Veriy the overdue shows
- Click on the patron name that is linked
- Verify you go to the checkouts tab in patron account with holds tab selected
- Apply patch
- Reload Overdues report
- Verify the link now leads to the Details tab with the checkouts tab in front

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d018953ca1947649c35df8670a385a942c80c134)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23103: (QA follow-up) Return undef implicitly
Kyle M Hall [Wed, 19 Jun 2019 11:00:01 +0000 (07:00 -0400)]
Bug 23103: (QA follow-up) Return undef implicitly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3bf26cfb934cb699839aabb136df09ea97c030bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23103: Cannot checkin items lost by deleted patrons with fines attached
Kyle M Hall [Wed, 12 Jun 2019 19:08:08 +0000 (15:08 -0400)]
Bug 23103: Cannot checkin items lost by deleted patrons with fines attached

Test Plan:
1) Checkout an item to a patron
2) Ensure the item has a replacement cost (or itemtype has default)
3) Ensure patrons are charged when items lost
4) Mark the item lost
5) Confirm patron has a fine
6) Write off the fine
7) Delete the patron
8) Check in the item
9) Note the internal server error
10) Apply this patch
11) Repeat steps 1-8
12) Note there is no internal server error!
13) prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d2a2e4a8d52c2098dd183e6714b03aed5b6a84bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23177: (RM follow-up) Further test clarifications
Martin Renvoize [Fri, 21 Jun 2019 11:28:48 +0000 (12:28 +0100)]
Bug 23177: (RM follow-up) Further test clarifications

This patch makes a few minor improvements to Circulation.t
1) Adds a name to some of the scoped blocks by converting them to
   subtests.
2) Adds output messages to some tests where they were missing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 90d4e3a672e8778e30058fe691f83d94b6d379ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23177: (QA follow-up) Remove subtest txn_begin and rollback
Marcel de Rooy [Fri, 21 Jun 2019 09:15:18 +0000 (09:15 +0000)]
Bug 23177: (QA follow-up) Remove subtest txn_begin and rollback

This resolves:
DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1)
Removing unneeded subtest txn's. We should probably add them everywhere or
just at global level.

Test plan:
With all three patches applied, run Circulation.t a few times.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c7a707d60b187fa2c18c4bacd3a6b472de25da98)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23177: (QA follow-up) Move rollback to the end
Marcel de Rooy [Fri, 21 Jun 2019 09:03:27 +0000 (09:03 +0000)]
Bug 23177: (QA follow-up) Move rollback to the end

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 95a303c8f351bdd926136b5e9110ba9957df52f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>