koha.git
5 years agoUpdate release notes for 18.05.08 release v18.05.08
Lucas Gass [Tue, 22 Jan 2019 17:08:26 +0000]
Update release notes for 18.05.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoIncrement version for 18.05.08 release
Lucas Gass [Tue, 22 Jan 2019 17:02:06 +0000]
Increment version for 18.05.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoTranslation updates for Koha 18.05.08
Koha translators [Tue, 22 Jan 2019 14:41:55 +0000]
Translation updates for Koha 18.05.08

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 22071: (follow-up) Add POD for validate_query_parameters
Tomas Cohen Arazi [Mon, 7 Jan 2019 10:38:29 +0000]
Bug 22071: (follow-up) Add POD for validate_query_parameters

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>
(cherry picked from commit 551626ce1e82286414c4a77c83febdcfbc99741a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f8bd298a0817bf6811c88fe7b441626c059b4f6f)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22071: (follow-up) Simplify code
Tomas Cohen Arazi [Mon, 7 Jan 2019 10:31:43 +0000]
Bug 22071: (follow-up) Simplify code

In order to add features to this method, the current code would force us
to do it for each authentication method.

There's duplicated code that could be simplified. This patch makes the
authentication code just set $user on each block (oauth and cookie
authentication) and moves the final permissions check to the end of the
authenticate_api_request method.

Overall, the behaviour remains unchanged.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t \
          t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass! Nothing changed!
- Sign off :-D

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0d5058b7b29d90cc7c8e533ee56388fbb5a96d52)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a6dc145ce966338ec0ae96f7e32968149647c02f)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22071: Make authenticate_api_request stash koha.user in OAuth use case
Tomas Cohen Arazi [Fri, 4 Jan 2019 15:46:37 +0000]
Bug 22071: Make authenticate_api_request stash koha.user in OAuth use case

This patch makes the OAuth code stash the requestion Koha::Patron.

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

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 613a0034e08af84af1e2198156bbfc6900ba6551)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 84ddb45e884394d08ba4dc836d3209e11e351048)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22071: Regression tests
Tomas Cohen Arazi [Fri, 4 Jan 2019 15:37:27 +0000]
Bug 22071: Regression tests

The authenticate_api_request() behaviour needs more tests. This patch
adds tests for the stashed Koha::Patron object. It highlights the bug in
the OAuth authentication case.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail in the OAuth case, pass in the cookie-based auth
case.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2067b8e3f8cb363370897ff179bcdbf5c97cbbbb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d830a2f0973fa6ffd634a9665f93a53c325c2d7a)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22073: Add to diacritics mappings for Ž and ž
Nick Clemens [Wed, 31 Oct 2018 12:50:27 +0000]
Bug 22073: Add to diacritics mappings for Ž and ž

To test:
1 - Find or add a record by author Slavoj Žižek
2 - Search for 'Zizek'
3 - No results
4 - Apply patch
5 - Reindex
6 - Search again
7 - Success!

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

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5c313bc554a857da29f124957d58459c0ed4c03b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aee127e6397db9594c97d06b684cdeabf6f50e0d)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22020: (bug 21777 follow-up) Fix columns visibility for circulation.pl
Jonathan Druart [Wed, 19 Dec 2018 19:00:52 +0000]
Bug 22020: (bug 21777 follow-up) Fix columns visibility for circulation.pl

The table is used by circulation.pl and moremember.pl
When it is modified we need to take care of the two view.

Test plan:
Use the columns settings to hide/show the "check in" and other columns
Confirm the this patch fixes the display for moremember.pl

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 17a8eb187959625ef67eea9999588fe502443691)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a02a19ffea86e64b65164e7578b5d9b8f611a064)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22052: Refactor DeleteExpiredOpacReigstrations
Nick Clemens [Fri, 28 Dec 2018 18:48:25 +0000]
Bug 22052: Refactor DeleteExpiredOpacReigstrations

This patch changes the sub to use Koha::Objects and updates the tests.
Previously the sub would die on borrowers with checkouts and would
delete borrowers if they had fines

To test:
 1 - prove -v t/db_dependent/
 2 - Set your selfreg preferences:
    PatronSelfRegistration: Allow
    PatronSelfRegistrationDefaultCategory: SELFREG (or of your choice)
    PatronSelfRegistrationExpireTemporaryAccountsDelay: 30
 3 - Register a patron into SELFREG or how you set above
 4 - Set their date enrolled to two months ago
 5 - Checkout an item to the patron
 6 - Issue a fine to that patron
 7 - perl misc/cronjobs/cleanup_database.pl --del-exp-selfreg -v
 8 - The job should die with an error
 9 - Check in the item
10 - run the corn again - patron is deleted, oops
11 - Apply patch
12 - Create another patron in the same way
13 - Checkout and fine the patron
14 - run the cron
15 - they are not deleted, and no error
16 - checkin the item
17 - run the cron
18 - they are not deleted and no error
19 - clear the fine
20 - run the cron
21 - patron is deleted, huzzah

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b32756a5d7819e13290c2a145f3f0009280785c4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8102f6dc70623786c3247e008a0601cfd234d1e6)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22052: Unit tests
Nick Clemens [Fri, 28 Dec 2018 18:48:15 +0000]
Bug 22052: Unit tests

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f44e37b201d0a8b95b1eee0ac0766bed9c386fc2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2bc4f25855819990f5d5fbcd244a0ef6dd3d89e6)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22030: DBRev 18.05.07.002
Jesse Maseto [Fri, 11 Jan 2019 19:07:16 +0000]
Bug 22030: DBRev 18.05.07.002

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22030: Use preference to determine username sent to overdrive
Nick Clemens [Wed, 19 Dec 2018 17:53:08 +0000]
Bug 22030: Use preference to determine username sent to overdrive

Overdrive configuration generally defaults to cardnumber, however, they
have confirmed that some libraries use usernames. We need to allow for
both scenarios.

To test:
1 - Have an OverDrive account setup with SIP authentication
    Note: You can apply for a testing account at developer.overdrive.com
    and setup an environment
2 - Fill in all your OverDrive system preferences
3 - Test with a patron whose username is their cardnumber
4 - Confirm their overdrive account tab on opac loads
5 - Change the username to be another value like "borked_wont_work"
6 - Note the overdrive account tab won't load
7 - Apply patch, update database, not new system preference
OverDriveUsername (default to 'cardnumber)
8 - Note the OD account loads successfully
9 - Change the system preference to 'user name' - the account load fails

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 96adab7af8999da7f351169e1265d4be5e59742f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 274271b59d5491dc44ebe7bbfb12da13e96d2ceb)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 21605: (follow-up) Simple ternary boolean to number conversion
Marcel de Rooy [Thu, 13 Dec 2018 13:59:38 +0000]
Bug 21605: (follow-up) Simple ternary boolean to number conversion

Imo it is much easier to do just "$a ? 1 : 0" than testing defined($a) etc.
in the additional loop.
Less code, more readable?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 482b323da1e18324941963359b9a1bd96f297c44)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fee85191b0be2690cbfada45f4eba54ef0e75c35)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21605: Ensure EDI acct fields set to boolean val
Colin Campbell [Fri, 26 Oct 2018 09:42:13 +0000]
Bug 21605: Ensure EDI acct fields set to boolean val

Validate the input to the fields indicating account
functionality. The only valid values are 1 and 0
non-integer (or integers other than 0/1) are invalid

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c9c3fc4368ee9d37a45c48167d25d5cee511898b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ae409c2fb347f7605e20afb34c6e7fe6a04092bb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21990: Replace dialog .error with .alert
Jonathan Druart [Wed, 12 Dec 2018 15:22:47 +0000]
Bug 21990: Replace dialog .error with .alert

<div class="dialog error"> will display a div without background color, the correct class is "dialog alert".

https://wiki.koha-community.org/wiki/Interface_patterns#Error_messages

Test plan:
Hit /cgi-bin/koha/acqui/parcel.pl
Notice the background color change with and without this patch

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d44a42e417b563f501f038cc5226eda0f5fb3ca5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1f5aa58a2ce0b6f1bf076a50cbbd2f728b47d0e1)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 22034: Handle default framework for MARC view with framework
Jonathan Druart [Thu, 20 Dec 2018 22:55:46 +0000]
Bug 22034: Handle default framework for MARC view with framework

To test:

- Create a record in any framework that is not default
- Search for the record in your catalog
- Switch to the MARC tab
- Change framework pull down to default on top
- Note the page reloads and the framework stay default
- Verify it works for other frameworks

Also test the "labeled MARC" view (you will need the pref viewLabeledMARC turned on)

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 54e295e4c14e3d2b3959e3185a54447a9b90d945)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 270138aa678e858b835f65f5533e6b182e07ac76)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 21928: (bug 18789 follow-up) Fix CircAutoPrintQuickSlip=clear
Jonathan Druart [Wed, 5 Dec 2018 21:17:14 +0000]
Bug 21928: (bug 18789 follow-up) Fix CircAutoPrintQuickSlip=clear

caused by commit 105b3e10e8b31b7de6d733e676c3e661a39b1280

bug 18789

To recreate:
1 - Set CircAutoPrintQuickSlip to 'clear'
2 - Bring up a patron in circulation
3 - Click in checkout box and hit enter to submit empty
4 - Patron is partially loaded
5 - Apply patch
6 - Restart all the things
7 - Test again
8 - Patron is cleared correctly

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a440f6a4102f73073c76a31ad2d015be2af8ef48)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 25a22f2e639d368cff4813043130e29e53ab6940)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21929: Typo in orderreceive.tt
Andrew Isherwood [Sat, 1 Dec 2018 10:05:38 +0000]
Bug 21929: Typo in orderreceive.tt

lass -> class

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c14a0d3526351fde4d785b5f60117f62edea5a9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 66502804d2571c473a647cac2ab3e63fa62e1aa8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21571: Make ACCTDETAILS translatable
Jonathan Druart [Tue, 16 Oct 2018 14:51:40 +0000]
Bug 21571: Make ACCTDETAILS translatable

This patch makes the notice "ACCTDETAILS" translatable.

Test plan:
1. Switch on TranslateNotices and AutoEmailOpacUser
2. Define templates for different languages for ACCTDETAILS
3. Create a new patron, define an email address, userid and password.
Also pick a different "preferred language" then the default value
4. You should receive the email with the correct, translated, email.

Signed-off-by: Hugo Agud <hagud@orex.es>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a200aafd3b181b736dc288e208730a50372fbfd8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ddfa48bf7029216051da386d211bbd4327a7453b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21848: Remove Text::Unaccent from C4::Members
Marcel de Rooy [Fri, 16 Nov 2018 08:41:04 +0000]
Bug 21848: Remove Text::Unaccent from C4::Members

At refactoring time the unac_string call was moved to Koha::Patron.

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e17032700790032088fe3f2209c3d173e77d540)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7f4a7c42ad23e84e3dab1cffaaa81f7897171758)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21848: Resolve unac_string warning from Circulation.t
Marcel de Rooy [Thu, 13 Dec 2018 12:07:48 +0000]
Bug 21848: Resolve unac_string warning from Circulation.t

Just add "use utf8".

Test plan:
Run Circulation.t; verify there are no warnings.

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e731ce09433cf2121332f5356b27f90ccb34654)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dbb5e636093c9145dc3f3d02de4b119d93b13fb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 22022: Correct ordering for authorised values
Nick Clemens [Tue, 18 Dec 2018 18:30:28 +0000]
Bug 22022: Correct ordering for authorised values

To test:
1 - Add a shelving location with code "ZZZZ" and lib "Awake"
2 - Load some items in batch modification
3 - Note shelving location dropdown is wrong
4 - Apply patch
5 - Reload page
6 - Note order is correct

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e6cec898e078fc04d87e2faf26badba10fa6f348)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4aaaf2eecd8cb3e269c4543385ecebb5531eef17)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21984: Pass param_name in pagination URL
Nick Clemens [Tue, 11 Dec 2018 15:15:57 +0000]
Bug 21984: Pass param_name in pagination URL

To test:
 1 - Create a report like:
    SELECT <<cat>>,<<dog>>,<<cat>> FROM items
 2 - Run the report, enter 'CATS' and 'DOGS'
 3 - Get results LIKE "CAT | DOG | CAT"
 4 - Try to go to page 2
 5 - FAIL! (last column is blank)
 6 - Apply patch
 7 - Run the repot, enter 'CATS' and 'DOGS'
 8 - Verify first page looks right
 9 - Go to page 2
10 - Results are correct!

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

Signed-off-by: “Lucas Gass” <lucas@bywatersolutions.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f28a97034dd06b0f2b0e2e5fc56bea3878ffc717)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f7f5d6f2e2a6331ba2ae0671e10ce883f550dbb3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21065: DBRev 18.05.07.001
Lucas Gass [Thu, 27 Dec 2018 16:47:37 +0000]
Bug 21065: DBRev 18.05.07.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21065: (QA follow-up) Make the update idempotent
Martin Renvoize [Tue, 18 Dec 2018 13:52:15 +0000]
Bug 21065: (QA follow-up) Make the update idempotent

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6d44f9dac8235dfe0259ea5b935c5a8908d2e441)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b4f55f8019fa89ce80509d7b05bec3082102a80e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21065: Set ON DELETE SET NULL on accountlines.borrowernumber
Jonathan Druart [Fri, 14 Dec 2018 15:49:44 +0000]
Bug 21065: Set ON DELETE SET NULL on accountlines.borrowernumber

Note: Why do we have ON UPDATE SET NULL on accountlines.itemnumber?
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7f322d7ff87285cd0bc1370a0438f2bc8bb7c084)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit af9910f87283a29ab1f3d9e68589b524c30cfd33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21065: Add koha_object(s)_class methods to accountline
Jonathan Druart [Fri, 14 Dec 2018 15:48:09 +0000]
Bug 21065: Add koha_object(s)_class methods to accountline

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 457e560a06e00d861ec88bc7354969aac7ab9099)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f899e440146baadc6e268d00ef9188de8963af19)

Conflicts:
Koha/Schema/Result/Accountline.pm

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21065: Add tests
Jonathan Druart [Fri, 14 Dec 2018 15:47:11 +0000]
Bug 21065: Add tests

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 09ef91653bc8e0349d4e8613482251d7e3c165b5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 554cee5b3cc8c5f10ab0e252bedeb351e2b2799d)

Conflicts:
t/db_dependent/Koha/Account/Lines.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 14334: Remove AutoCommit from tests
Jonathan Druart [Fri, 7 Dec 2018 17:14:06 +0000]
Bug 14334: Remove AutoCommit from tests

And use a DBIx transaction instead.

Test plan:
prove that the test files modified by this patch are passing

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 64242cabea21e9ee7673666cad88eb403d1053d6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 10148dc26ba801d3f86401dc24a3fb5b6618a02b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21986: Do not escape quotation marks when cataloguing
Jonathan Druart [Wed, 12 Dec 2018 14:05:19 +0000]
Bug 21986: Do not escape quotation marks when cataloguing

In several places we escape quotation marks using
  $value =~ s/"/&quot;/g;
All the occurrences are wrong and must be removed.
Most of them are leftover of bug 11638 (Remove HTML from
addbiblio.pl), which removes the construction of html from pl scripts.

The problem has been highlighted by bug 13618, I did not track down why
the issue did not exist before (?)

Test plan:
0/ Use strings with quotation marks, like:
'Fiddle tune history : "bad" tunes'
You can also use other html characters to make the tests more complete,
like 'Fiddle tune history : <"bad" tunes>'
1/ authorities/authorities.pl
a. Edit an authority filling different fields with quotation marks
b. Edit it again
=> The display (inputs' values) is wrong, if you save the escaped quotes
will be inserted
2/ cataloguing/addbiblio.pl
Same editing a bibliographic record
3/ cataloguing/additem.pl
Same editing items
4/ members/memberentry.pl
Edit a patron's record and fill some fields with quotation marks
+ fields borrowernotes and opacnotes
=> The quotes are inserted directly in DB (escape is done before the
insert!)
5/ opac/opac-review.pl
For QA only: $js_ok_review is never used
6/ tools/batchMod.pl
For QA only: $value is always undefined at that point

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d561273ef84f4bc2534ac63d0f8793c9eb2a7fb9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 305729fdc04c723b2eb372441500d3151e1a62d3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21931: Do not reset the ES mapping on 3.23.00.050
Jonathan Druart [Fri, 7 Dec 2018 19:49:00 +0000]
Bug 21931: Do not reset the ES mapping on 3.23.00.050

This update DB entry uses DBIx schema which does not make it crashes if
the table structure is changed.
Which happens on 18.06.00.054, that added search_field.weight

The entry 3.23.00.050 fails with
  Unknown column 'me.weight' in 'field list'

This patch removes the reset of the mapping and display a warning to
tell the administrator the mapping must be reset/inserted

Test plan:
Use a 3.22 dump and upgrade it

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>
(cherry picked from commit e29f0bce403d5d7c1f292d57b105e0a2ab31e01d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1fdc679955feb2357c8e897040f9d29cc3df930d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21991: Pass param names to report limit tool
Nick Clemens [Wed, 12 Dec 2018 16:16:50 +0000]
Bug 21991: Pass param names to report limit tool

To test:
1 - Define a report like:
SELECT barcode, itemnumber
FROM items
WHERE (homebranch = <<Branch|branches>> AND 0 ) OR
<<Branch|branches>>=<<Branch|branches>>
2 - Run it, you get results
3 - Select 'Rows to display' 50
4 - No results
5 - Apply patch
6 - Run report
7 - Change display rows
8 - Results remain!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 702c727470d332615fb1428c55f503183935f29d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4de2ad9839319778333c1a3163f318e437ff01fb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21465: Don't throw duplicate userid error if userid belongs to the matched patron
Nick Clemens [Tue, 2 Oct 2018 19:48:02 +0000]
Bug 21465: Don't throw duplicate userid error if userid belongs to the matched patron

To test:
 1 - Export your patrons
    a - Create a report 'SELECT * FROM borrowers'
    b - Run and save the report as csv (check your delimiter)
    c - Delete the borrowernumebr column
 2 - Use the Patron Import tool to import the csv from above
 3 - Set matching to 'cardnumber'
 4 - Set 'If matching record is already in the borrowers table:' to
Overwrite
 5 - Import
 6 - None are import because of matchign userid (their own)
 7 - Apply patch
 8 - Repeat
 9 - Patrons are successfully overwritten
10 - prove -v t/db_dependent/Koha/Patrons/Import.t
11 - prove -v t/db_dependent/Koha/Patrons.t

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a2bd027e5d2380b39776059066d8f06b42d68dd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e3da710f4cbf85e5a13f3723047202517afb99d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21908: (QA follow-up) Remove useless parentheses in query
Julian Maurice [Fri, 7 Dec 2018 09:19:44 +0000]
Bug 21908: (QA follow-up) Remove useless parentheses in query

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 875f3162c8008ef288adfcd18ada490cf06ecc15)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0c99c3a30a4ebe2ef18db1a6d1e48a99ef7ea0b6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl
Fridolin Somers [Thu, 29 Nov 2018 09:50:06 +0000]
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl

Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
When using table=items we should use DISTINCT(biblionumber) to avoid indexing several times the same biblio record when it has several items.
This patch adds DISTINCT(biblionumber) in all cases it does not harm if its already unique.

Test plan :
1) Be sur you have a biblio record with biblionumber 1 with 3 items
2) Run misc/migration_tools/rebuild_zebra.pl -v -b --table items --where="biblionumber=1"
3) Without patch you see "Records exported: 3", with patch only one
4) Check indexing works well

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a1b08269a7031417312e6265ace9ef5b995933fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 397f2e850ced3acaeb8d0f103694262ba339d63f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21908: Add biblio_metadata to rebuild_zebra.pl tables
Fridolin Somers [Thu, 29 Nov 2018 09:15:00 +0000]
Bug 21908: Add biblio_metadata to rebuild_zebra.pl tables

Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
It is missing biblio_metadata to allow filtering on MARCXML with ExtractValue.

Test plan :
1) Be sur you have a biblio record with biblionumber 1
2) Run misc/migration_tools/rebuild_zebra.pl -h
3) You see : --table specify a table (can be items, biblioitems, biblio, biblio_metadata) to retrieve biblionumber to index.
4) Run misc/migration_tools/rebuild_zebra.pl -v -b --table biblio_metadata --where="biblio_metadata.biblionumber=1"
5) Check you dont have SQL errors

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c36597bc0c72cc31249c02af5aaaf1c1f977ee50)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 33b8f3ff1df670d4512695213d004b1a189f9c25)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 17111: Automatic debian/control updates (oldstable/18.05.x)
Nightly Build Bot [Wed, 19 Dec 2018 01:24:47 +0000]
Bug 17111: Automatic debian/control updates (oldstable/18.05.x)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoRevert "Bug 17108: Automatic debian/control updates (stable/18.11.x)"
Jesse Maseto [Fri, 21 Dec 2018 13:01:50 +0000]
Revert "Bug 17108: Automatic debian/control updates (stable/18.11.x)"

This reverts commit 46d725c128ad238794974dfd2bf35e99e3a5b6bc.

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 17108: Automatic debian/control updates (stable/18.11.x)
Nightly Build Bot [Thu, 13 Dec 2018 00:24:37 +0000]
Bug 17108: Automatic debian/control updates (stable/18.11.x)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 46d725c128ad238794974dfd2bf35e99e3a5b6bc)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoUpdate release notes for 18.05.07 release v18.05.07
Jesse Maseto [Thu, 20 Dec 2018 14:51:35 +0000]
Update release notes for 18.05.07 release

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoIncrement version for 18.05.07 release
Jesse Maseto [Thu, 20 Dec 2018 14:39:21 +0000]
Increment version for 18.05.07 release

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoTranslation updates for Koha 18.05.07
Koha translators [Thu, 20 Dec 2018 14:13:22 +0000]
Translation updates for Koha 18.05.07

5 years agoBug 21962: (RMaint follow-up) Fixed bad rebase.
Jesse Maseto [Wed, 19 Dec 2018 17:46:58 +0000]
Bug 21962: (RMaint follow-up) Fixed bad rebase.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

5 years agoBug 21849: Add unit tests
Kyle M Hall [Fri, 16 Nov 2018 14:54:39 +0000]
Bug 21849: Add unit tests

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2dbaaa300877ff6d96ae84b5a703753d97b6c340)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aa565b8e9919ee414d0693f391b141985ebacb93)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21849: Two useless Koha::Account::Offset->new calls need attention
Kyle M Hall [Fri, 16 Nov 2018 12:01:39 +0000]
Bug 21849: Two useless Koha::Account::Offset->new calls need attention

Came across those calls in bug 20598 in _FixOverduesOnReturn

        Koha::Account::Offset->new(
            {
                debit_id => $accountline->id,
                type => 'Forgiven',
                amount => $amountoutstanding * -1,
            }
        );

This does nothing if you don't store data.

Test Plan:
1) Apply this patch
2) Set up 2 items with overdue fines
3) Return one with dropbox mode
4) Note the dropbox account offset is created
5) Return one with full fine forgiveness
6) Note the forgiven account offset is created

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a2b5407ba5c74f826c1665c1a2ef1ff6d52689fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ff3d3776a4d9b52da49b6ad4b2a1dde1da9425ee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoRevert "Bug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button...
Jesse Maseto [Wed, 19 Dec 2018 12:20:14 +0000]
Revert "Bug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectly filtered"

This reverts commit a1d3c8d83b64d870dcf1a8f4ef418765c3effa7e.

5 years agoBug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectl...
Kyle M Hall [Wed, 28 Nov 2018 18:41:53 +0000]
Bug 21905: Plugin hook intranet_catalog_biblio_enhancements_toolbar_button incorrectly filtered

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ed22c5fc0f65cc3736a8dbabb159b6b4b9b2f7c4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 55e807c287f2da9f5c031847ccecc7a9554f60d7)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21778: Sort user list by surname,firstname unless user cannot manage patron lists...
Nick Clemens [Wed, 7 Nov 2018 01:32:26 +0000]
Bug 21778: Sort user list by surname,firstname unless user cannot manage patron lists OR edit patrons

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

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 96b3889390f8efe9851aaa9c2cafa9e20bda3f43)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f228847155bc46433cbad4f834c2df89734b9c5c)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21962: Fix authority search using 'all'
Nick Clemens [Thu, 6 Dec 2018 12:42:45 +0000]
Bug 21962: Fix authority search using 'all'

To test:
1 - Set search engine to Zebra
2 - Have some authorities and indexes up to date
3 - Search authorities with option 'search entire record'
4 - No results
5 - Apply patch
6 - Run unit tests, they pass!
7 - Repeat search
8 - Results!

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3adf7708d544338250703165fe7e87f2690d8639)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a110125338202f30cec0bc061141d82c80652f30)

5 years agoBug 21962: Unit tests
Nick Clemens [Thu, 6 Dec 2018 12:41:41 +0000]
Bug 21962: Unit tests

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 39c93e87f648978ec7907220710efaf64e556ea0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d6b7e00b9cd04e15c472b2f7b075d85886ffa3e5)

5 years agoBug 21405: Fix authorities pagination for Zebra and ES
Nick Clemens [Mon, 3 Dec 2018 13:05:49 +0000]
Bug 21405: Fix authorities pagination for Zebra and ES

Bug 20261 introduced an error because search_auth_compat responded
differently for ES and Zebra, now bug 19365 fixed the underlying
difference. This patch restores previous code to fix pagination.

Additionally we add a fix for 10000+ results in ES and remove a double
import of C4::Auth

To test:
 1 - Perform an authorities search with 1+ pages using Zebra
 2 - Page through results, note you are only offseeting by 1 each time
 3 - Perform an authorities search with 10,000+ results in ES
 4 - Click on the last page and get an error
 5 - Apply patch
 6 - Retry Zebra search
 7 - Results should paginate correctly
 8 - Clicking on last page should return last results
 9 - Retry ES results
10 - Results should paginate correct
11 - Clicking on last page should return last results

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 06e6378899631da162d57d477381782f3764ec89)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb5dd96552e84380fd30575880effd0d116309b3)

5 years agoBug 21911: Regression test
Josef Moravec [Fri, 30 Nov 2018 07:09:23 +0000]
Bug 21911: Regression test

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e5585a10d5f2ee24cad94b2cf17df1ce13e8a01a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e6c3b19899c51b801cc5647259793206e2de622)

5 years agoBug 21911: Fix OPAC scoping to work with new group system
Nick Clemens [Thu, 29 Nov 2018 14:17:37 +0000]
Bug 21911: Fix OPAC scoping to work with new group system

To test:

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4c0682f5598d53992b6966a217b10f71a9cdaebb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 647b853073bde006c0477c886a5cce727c3035a1)

5 years agoBug 21910: Does not deal with call context, ->search does already
Jonathan Druart [Thu, 6 Dec 2018 15:53:24 +0000]
Bug 21910: Does not deal with call context, ->search does already

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 21372f78f825c0ec439ea4a7cfe7dff6656467b9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7b849d70e7acf818d33d0602401dd613b8787535)

5 years agoBug 21910: Remove duplicated lines in tests
Jonathan Druart [Thu, 6 Dec 2018 15:52:54 +0000]
Bug 21910: Remove duplicated lines in tests

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ee96d18b2cee07aa64d5e68078bc898d36e22146)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5ab531818003874635d842a59ec3234370b200c3)

5 years agoBug 21910: Koha::Library::Groups->get_search_groups should return the groups
Nick Clemens [Thu, 29 Nov 2018 14:11:36 +0000]
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups

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

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f3b8c66392098d69bca48bbf04b7e93fa2100280)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e9ab97390b8cad111bbe9853dc0e27172719c27)

5 years agoBug 21955: Remove Cache::Memory as fallback for L2 cache
Jonathan Druart [Wed, 5 Dec 2018 19:39:02 +0000]
Bug 21955: Remove Cache::Memory as fallback for L2 cache

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

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

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

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4bf033c6d6b2a8bf4d5597b3fdf6355fb7060b60)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6039f64e53172a046c5b579271df7cf434b20e81)

5 years agoMerge branch '18.05.x' of git://git.koha-community.org/koha into rmain1805
Jesse Maseto [Tue, 18 Dec 2018 13:48:19 +0000]
Merge branch '18.05.x' of git://git.koha-community.org/koha into rmain1805

5 years agoBug 21869: Fix incorrect value setting in DB update
Nick Clemens [Mon, 26 Nov 2018 13:08:05 +0000]
Bug 21869: Fix incorrect value setting in DB update

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

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

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

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21730: DBRev 18.05.06.001
Jesse Maseto [Thu, 13 Dec 2018 20:13:13 +0000]
Bug 21730: DBRev 18.05.06.001

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21730: Add missing PA_CLASS authorized values categories
Jonathan Druart [Wed, 31 Oct 2018 20:42:43 +0000]
Bug 21730: Add missing PA_CLASS authorized values categories

PA_CLASS is missing from the list of AV category

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

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

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

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

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21644: better UNIMARC XSLT display of 210 in intranet
Fridolin Somers [Wed, 24 Oct 2018 12:23:02 +0000]
Bug 21644: better UNIMARC XSLT display of 210 in intranet

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

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

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

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7b16603b310212cc42d2e06e4b9bcaefa4b066ea)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21874: (QA follow-up) Fix intranet sendshelf
Marcel de Rooy [Fri, 23 Nov 2018 11:02:51 +0000]
Bug 21874: (QA follow-up) Fix intranet sendshelf

Move encode line below regex line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1ec452e5ce454b99433972a34ec1154e81a19a3)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21874: Fix encoding of cart and list email subjects
Katrin Fischer [Fri, 23 Nov 2018 10:30:49 +0000]
Bug 21874: Fix encoding of cart and list email subjects

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

To test:

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

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

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

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e40bb00ab8da87c8c5d6e660de928d24b887df17)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoMerge branch '18.05.x' of git://git.koha-community.org/koha into rmain1805
Lucas Gass [Fri, 14 Dec 2018 17:51:41 +0000]
Merge branch '18.05.x' of git://git.koha-community.org/koha into rmain1805

5 years agoBug 21861: (follow-up) replace onchange() with jQuery equivalent
Andreas Roussos [Thu, 22 Nov 2018 13:55:25 +0000]
Bug 21861: (follow-up) replace onchange() with jQuery equivalent

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f44a4f1d2a13735c52948df29e773728d04ab991)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cc0833fec6ac0e4f5008c855d8c0034c56870fa4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21861: The MARC modification template actions editor does not always validate...
Andreas Roussos [Sat, 17 Nov 2018 18:03:36 +0000]
Bug 21861: The MARC modification template actions editor does not always validate user input

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

This patch fixes that.

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

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e1e1448e9132dce81571a4c3f31eb67816f14f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a616b9fc0266fdc9a5d299d5927f8b4a2236c559)

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

5 years agoBug 21869: Fix incorrect value setting in DB update
Nick Clemens [Mon, 26 Nov 2018 13:08:05 +0000]
Bug 21869: Fix incorrect value setting in DB update

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

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

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

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21730: DBRev 18.05.06.001
Jesse Maseto [Thu, 13 Dec 2018 20:13:13 +0000]
Bug 21730: DBRev 18.05.06.001

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21730: Add missing PA_CLASS authorized values categories
Jonathan Druart [Wed, 31 Oct 2018 20:42:43 +0000]
Bug 21730: Add missing PA_CLASS authorized values categories

PA_CLASS is missing from the list of AV category

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

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

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

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

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21644: better UNIMARC XSLT display of 210 in intranet
Fridolin Somers [Wed, 24 Oct 2018 12:23:02 +0000]
Bug 21644: better UNIMARC XSLT display of 210 in intranet

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

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

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

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7b16603b310212cc42d2e06e4b9bcaefa4b066ea)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21874: (QA follow-up) Fix intranet sendshelf
Marcel de Rooy [Fri, 23 Nov 2018 11:02:51 +0000]
Bug 21874: (QA follow-up) Fix intranet sendshelf

Move encode line below regex line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1ec452e5ce454b99433972a34ec1154e81a19a3)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21874: Fix encoding of cart and list email subjects
Katrin Fischer [Fri, 23 Nov 2018 10:30:49 +0000]
Bug 21874: Fix encoding of cart and list email subjects

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

To test:

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

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

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

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e40bb00ab8da87c8c5d6e660de928d24b887df17)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21774: Cloned item subfields disappear when editing an item
Marcel de Rooy [Thu, 8 Nov 2018 13:49:10 +0000]
Bug 21774: Cloned item subfields disappear when editing an item

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

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5f34dd06ec66b11a914e49eb611714ea4c72771d)

Conflicts:
t/db_dependent/Items.t

5 years agoRevert "Bug 21774: Cloned item subfields disappear when editing an item"
“Lucas Gass” [Wed, 12 Dec 2018 17:19:57 +0000]
Revert "Bug 21774: Cloned item subfields disappear when editing an item"

This reverts commit d6fe41657861666320383904b16165cc4820777a.

5 years agoRevert "Bug 21529: (follow-up) USE raw filter"
“Lucas Gass” [Wed, 12 Dec 2018 16:52:39 +0000]
Revert "Bug 21529: (follow-up) USE raw filter"

This reverts commit 7d7f110cefc3e1ee2260424bcd2a55f6fb9ce07d.

Signed-off-by: “Lucas Gass” <lucas@bywatersolutions.com>

5 years agoRevert "Bug 21529: (bug 13618 follow-up) Display print notices with HTML tags"
“Lucas Gass” [Wed, 12 Dec 2018 16:51:58 +0000]
Revert "Bug 21529: (bug 13618 follow-up) Display print notices with HTML tags"

This reverts commit dab7e22c68dd9328bf2768e7e20e444f1311c875.

Signed-off-by: “Lucas Gass” <lucas@bywatersolutions.com>

5 years agoBug 17111 - Automatic debian/control updates (oldstable/18.05.x)
Nightly Build Bot [Tue, 11 Dec 2018 14:25:52 +0000]
Bug 17111 - Automatic debian/control updates (oldstable/18.05.x)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

5 years agoBug 21649: [18.05.X] Pass guarantee info to template when adding child
Nick Clemens [Mon, 19 Nov 2018 14:47:04 +0000]
Bug 21649: [18.05.X] Pass guarantee info to template when adding child

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

Signed-off-by: “Lucas Gass” <lucas@bywatersolutions.com>

5 years agoBug 21774: Cloned item subfields disappear when editing an item
Marcel de Rooy [Thu, 8 Nov 2018 13:49:10 +0000]
Bug 21774: Cloned item subfields disappear when editing an item

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

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5f34dd06ec66b11a914e49eb611714ea4c72771d)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21867: Replace remaining document.element.onchange calls in marc_modification_tem...
Marcel de Rooy [Tue, 20 Nov 2018 15:45:17 +0000]
Bug 21867: Replace remaining document.element.onchange calls in marc_modification_templates.js

Replace onchange() by jQuery change().

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit be78d3177e8b9bbf90c7071dc6b6e3385674d106)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21819: (QA follow-up) Replace onchange() in touched code
Marcel de Rooy [Tue, 20 Nov 2018 15:32:46 +0000]
Bug 21819: (QA follow-up) Replace onchange() in touched code

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

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

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

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit aeaf74b7cc6608d7b81aaba10defdca6decdaa1d)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21819: Marc modification templates action always checks Regexp checkbox
Andreas Roussos [Sat, 17 Nov 2018 09:35:00 +0000]
Bug 21819: Marc modification templates action always checks Regexp checkbox

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

This patch fixes that.

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

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a9fc00db03a8210b3edb69a922209a4e8f6df9a1)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21854: Use template plugin to display category description
Nick Clemens [Fri, 16 Nov 2018 17:23:14 +0000]
Bug 21854: Use template plugin to display category description

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

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

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit df68391a5ec2eac05a88373dc10c136c8d057e98)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21837: Don't set holdingbranch filter using selected homebranch filter
Nick Clemens [Wed, 14 Nov 2018 19:08:09 +0000]
Bug 21837: Don't set holdingbranch filter using selected homebranch filter

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 81ac96abec1226b6635022c0a3f69697d13c7d62)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21529: (bug 13618 follow-up) Display print notices with HTML tags
Jonathan Druart [Mon, 22 Oct 2018 20:52:46 +0000]
Bug 21529: (bug 13618 follow-up) Display print notices with HTML tags

Replace a wrong html filter with raw.

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

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b704a1adfc3fcee739194d7d6cb79800ba991e51)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21529: (follow-up) USE raw filter
Andrew Isherwood [Mon, 29 Oct 2018 14:10:42 +0000]
Bug 21529: (follow-up) USE raw filter

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a1d24a2b61359552942fc2420fe18c093c169191)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21853: (follow-up) to solve printpdf error
Mark Tompsett [Sun, 18 Nov 2018 05:36:44 +0000]
Bug 21853: (follow-up) to solve printpdf error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b62714e47d5acd0a4c371024edacc02cfe6f5b5)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21853: Fix PDF export of basketgroups
Julian Maurice [Sat, 17 Nov 2018 10:58:02 +0000]
Bug 21853: Fix PDF export of basketgroups

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

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

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

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c18d4c18fad5a0d470c7bdf1ac746a640f25099)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21567: Move Koha_ExternalContent_OverDrive.t to db_dependent
Mirko Tietgen [Thu, 15 Nov 2018 23:07:14 +0000]
Bug 21567: Move Koha_ExternalContent_OverDrive.t to db_dependent

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e78070b80a24410de57e7b0c6da4db6bd2e3a7e)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 21815: Rephrase HidePersonalPatronDetailOnCirculation
Katrin Fischer [Sat, 3 Nov 2018 08:29:39 +0000]
Bug 21815: Rephrase HidePersonalPatronDetailOnCirculation

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

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 43d8946d5934151d38dc95b7162674dc7e95efb4)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 20598: Update number of tests
Nick Clemens [Fri, 16 Nov 2018 12:51:27 +0000]
Bug 20598: Update number of tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 119653a3a133d5bb138234d2e45a13f8a7e447fe)

Conflicts:
t/db_dependent/Circulation.t

5 years agoBug 20598: (QA follow-up) Tiny fixes
Marcel de Rooy [Fri, 16 Nov 2018 09:37:55 +0000]
Bug 20598: (QA follow-up) Tiny fixes

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 867f88076eb47c434c3edf6f7903238b5a465cdb)

5 years agoBug 20598: Unit test
Kyle M Hall [Mon, 5 Nov 2018 13:31:40 +0000]
Bug 20598: Unit test

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b9ed7699e3da4966681a21c85bc78d99123d1681)

5 years agoBug 20598: Accruing fines not closed out by longoverdue.pl if WhenLostForgiveFine...
Kyle M Hall [Tue, 17 Apr 2018 18:11:41 +0000]
Bug 20598: Accruing fines not closed out by longoverdue.pl if WhenLostForgiveFine is not enabled

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 461a6f53b85becbefb18c0cb9356384a479aa9f1)

5 years agoBug 18677: (QA follow-up) Trivial fixes to Chargelostitem.t
Marcel de Rooy [Fri, 16 Nov 2018 09:04:55 +0000]
Bug 18677: (QA follow-up) Trivial fixes to Chargelostitem.t

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fab9936ddb68e15cae356cb4c52a3be806948f83)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 18677: Remove new issue_id param from charlostitem
Jonathan Druart [Thu, 1 Nov 2018 14:47:47 +0000]
Bug 18677: Remove new issue_id param from charlostitem

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

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3475670881e75f47bc6b7e21f0563162e428b831)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 18677: Make the tests pass
Jonathan Druart [Thu, 1 Nov 2018 14:47:16 +0000]
Bug 18677: Make the tests pass

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cd250dae36b8dd03cbfa1b2ab691202a51daa58b)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>

5 years agoBug 18677: issue_id is not added to accountlines for lost item fees
Kyle M Hall [Wed, 11 Apr 2018 18:08:57 +0000]
Bug 18677: issue_id is not added to accountlines for lost item fees

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

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

[EDIT:]
Patch should have increased the number of tests obviously.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cde7a8e72c04ad31bdda66908e5e0482276bdcb8)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>