]> git.koha-community.org Git - koha.git/log
koha.git
20 months agoRevert "Bug 31587: Regression tests"
Wainui Witika-Park [Wed, 15 Mar 2023 00:22:00 +0000 (13:22 +1300)]
Revert "Bug 31587: Regression tests"

This reverts commit 32b44d9c9b9d9ae339647c32181e61d30d884291.

20 months agoRevert "Bug 31587: Basket not accessible from ACQORDER notice"
Wainui Witika-Park [Wed, 15 Mar 2023 00:21:50 +0000 (13:21 +1300)]
Revert "Bug 31587: Basket not accessible from ACQORDER notice"

This reverts commit d45ea439bc4b250164c9b58fa16c358158ba5ff8.

21 months agoMerge branch '21.05.x' of git.koha-community.org:Koha-community/Koha into 21.05.x...
Wainui Witika-Park [Thu, 26 Jan 2023 23:37:18 +0000 (12:37 +1300)]
Merge branch '21.05.x' of git.koha-community.org:Koha-community/Koha into 21.05.x-rmaint

21 months agoRevert "Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314" v21.05.22-1
Wainui Witika-Park [Fri, 20 Jan 2023 02:44:32 +0000 (15:44 +1300)]
Revert "Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314"

This reverts commit b160979234babc22bf6670149a09a10015a2419e.

21 months agoRevert "Bug 31908: Add a test to show issue"
Wainui Witika-Park [Fri, 20 Jan 2023 02:44:04 +0000 (15:44 +1300)]
Revert "Bug 31908: Add a test to show issue"

This reverts commit 2427d773a901926727888a43c471f90f1beb4bf8.

21 months agoRevert "Bug 31908: Resolve second login with another userid"
Wainui Witika-Park [Fri, 20 Jan 2023 02:43:45 +0000 (15:43 +1300)]
Revert "Bug 31908: Resolve second login with another userid"

This reverts commit 68cde441b325a8ceabe44355d616507e84d03783.

21 months agoRevert "Bug 31908: Add selenium tests"
Wainui Witika-Park [Fri, 20 Jan 2023 02:43:14 +0000 (15:43 +1300)]
Revert "Bug 31908: Add selenium tests"

This reverts commit 611780ed09c660b84357b73bdf5b4b5529b20125.

21 months agoRevert "Bug 32208: Extend Auth.t"
Wainui Witika-Park [Fri, 20 Jan 2023 02:42:59 +0000 (15:42 +1300)]
Revert "Bug 32208: Extend Auth.t"

This reverts commit adc9fd4fd8fe2e2009a40e4b85af0febbc5fdedc.

21 months agoRevert "Bug 32208: Adjust Auth.pm for relogin without perms"
Wainui Witika-Park [Fri, 20 Jan 2023 02:42:45 +0000 (15:42 +1300)]
Revert "Bug 32208: Adjust Auth.pm for relogin without perms"

This reverts commit 7db145f153024c40b076d0117bce49b82f3c6632.

21 months agoUpdate release notes for 21.05.22 release
Wainui Witika-Park [Fri, 23 Dec 2022 02:47:40 +0000 (15:47 +1300)]
Update release notes for 21.05.22 release

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoIncrement version for 21.05.22 release
Wainui Witika-Park [Fri, 23 Dec 2022 01:43:09 +0000 (14:43 +1300)]
Increment version for 21.05.22 release

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoFix translations for Koha 21.05.22
Wainui Witika-Park [Fri, 23 Dec 2022 01:40:01 +0000 (14:40 +1300)]
Fix translations for Koha 21.05.22

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoTranslation updates for Koha 21.05.22
Koha translators [Fri, 23 Dec 2022 00:29:43 +0000 (21:29 -0300)]
Translation updates for Koha 21.05.22

21 months agoBug 32208: Adjust Auth.pm for relogin without perms
Marcel de Rooy [Tue, 15 Nov 2022 13:55:18 +0000 (13:55 +0000)]
Bug 32208: Adjust Auth.pm for relogin without perms

If a second login on top of a current session fails on
permissions, we should not grant access without context.

Test plan:
[1] Run t/db../Auth.t, it should pass now.
[2] Test interface with/without this patch:
    Pick two users: A has perms, B has not.
    Put two staff login forms in two tabs.
    Login as A in tab1. Login as B in tab2.
    Without this patch, B gets in and crashes.
    With this patch, B does not get in ('no perms').
    Bonus: Go to opac if on same domain. You are still
    logged in as B.

NOTE: I added a FIXME here, since you could argue about filling
the session info or otoh deleting the session. We present an
authorization failure; people may not realize that they are
still logged in (see test plan - bonus).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoBug 32208: Extend Auth.t
Marcel de Rooy [Tue, 15 Nov 2022 13:53:17 +0000 (13:53 +0000)]
Bug 32208: Extend Auth.t

Test plan:
Without follow-up patch, Auth.t should fail:
    not ok 5 - No permission response
    not ok 6 - checkauth returned failure

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoBug 31908: Add selenium tests
Jonathan Druart [Fri, 11 Nov 2022 12:08:53 +0000 (13:08 +0100)]
Bug 31908: Add selenium tests

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoBug 31908: Resolve second login with another userid
Marcel de Rooy [Tue, 8 Nov 2022 13:40:17 +0000 (13:40 +0000)]
Bug 31908: Resolve second login with another userid

Somewhere the line undef $userid got removed.
We need it to resolve the second login situation.

Test plan:
Login in staff with user missing privileges.
On the login form login again with another staff user.
Note that you do no longer crash.

Run t/db../Auth.t
Run t/db../Koha/Auth/TwoFactorAuth.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoBug 31908: Add a test to show issue
Marcel de Rooy [Mon, 14 Nov 2022 11:07:09 +0000 (11:07 +0000)]
Bug 31908: Add a test to show issue

Test plan:
Without next patch, run Auth.t.
Should fail now before next patch resolves problem:
    not ok 2 - Login of patron2 approved
    ok 3 - Did not return previous session ID
    not ok 4 - New session ID not empty

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoBug 31908: Replace an exit by a safe_exit in Auth.pm L1314
Marcel de Rooy [Mon, 14 Nov 2022 11:09:43 +0000 (11:09 +0000)]
Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314

No change in user experience. But since we can mock safe_exit,
we can enhance test results.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
21 months agoRevert "Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314"
Wainui Witika-Park [Fri, 20 Jan 2023 02:44:32 +0000 (15:44 +1300)]
Revert "Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314"

This reverts commit b160979234babc22bf6670149a09a10015a2419e.

21 months agoRevert "Bug 31908: Add a test to show issue"
Wainui Witika-Park [Fri, 20 Jan 2023 02:44:04 +0000 (15:44 +1300)]
Revert "Bug 31908: Add a test to show issue"

This reverts commit 2427d773a901926727888a43c471f90f1beb4bf8.

21 months agoRevert "Bug 31908: Resolve second login with another userid"
Wainui Witika-Park [Fri, 20 Jan 2023 02:43:45 +0000 (15:43 +1300)]
Revert "Bug 31908: Resolve second login with another userid"

This reverts commit 68cde441b325a8ceabe44355d616507e84d03783.

21 months agoRevert "Bug 31908: Add selenium tests"
Wainui Witika-Park [Fri, 20 Jan 2023 02:43:14 +0000 (15:43 +1300)]
Revert "Bug 31908: Add selenium tests"

This reverts commit 611780ed09c660b84357b73bdf5b4b5529b20125.

21 months agoRevert "Bug 32208: Extend Auth.t"
Wainui Witika-Park [Fri, 20 Jan 2023 02:42:59 +0000 (15:42 +1300)]
Revert "Bug 32208: Extend Auth.t"

This reverts commit adc9fd4fd8fe2e2009a40e4b85af0febbc5fdedc.

21 months agoRevert "Bug 32208: Adjust Auth.pm for relogin without perms"
Wainui Witika-Park [Fri, 20 Jan 2023 02:42:45 +0000 (15:42 +1300)]
Revert "Bug 32208: Adjust Auth.pm for relogin without perms"

This reverts commit 7db145f153024c40b076d0117bce49b82f3c6632.

22 months agoUpdate release notes for 21.05.22 release v21.05.22
Wainui Witika-Park [Fri, 23 Dec 2022 02:47:40 +0000 (15:47 +1300)]
Update release notes for 21.05.22 release

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoIncrement version for 21.05.22 release
Wainui Witika-Park [Fri, 23 Dec 2022 01:43:09 +0000 (14:43 +1300)]
Increment version for 21.05.22 release

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoFix translations for Koha 21.05.22
Wainui Witika-Park [Fri, 23 Dec 2022 01:40:01 +0000 (14:40 +1300)]
Fix translations for Koha 21.05.22

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoMerge remote-tracking branch 'translate/21.05.22-translate-20221222' into 21.05.x...
Wainui Witika-Park [Fri, 23 Dec 2022 00:53:09 +0000 (13:53 +1300)]
Merge remote-tracking branch 'translate/21.05.22-translate-20221222' into 21.05.x-security

22 months agoTranslation updates for Koha 21.05.22
Koha translators [Fri, 23 Dec 2022 00:29:43 +0000 (21:29 -0300)]
Translation updates for Koha 21.05.22

22 months agoBug 32208: Adjust Auth.pm for relogin without perms
Marcel de Rooy [Tue, 15 Nov 2022 13:55:18 +0000 (13:55 +0000)]
Bug 32208: Adjust Auth.pm for relogin without perms

If a second login on top of a current session fails on
permissions, we should not grant access without context.

Test plan:
[1] Run t/db../Auth.t, it should pass now.
[2] Test interface with/without this patch:
    Pick two users: A has perms, B has not.
    Put two staff login forms in two tabs.
    Login as A in tab1. Login as B in tab2.
    Without this patch, B gets in and crashes.
    With this patch, B does not get in ('no perms').
    Bonus: Go to opac if on same domain. You are still
    logged in as B.

NOTE: I added a FIXME here, since you could argue about filling
the session info or otoh deleting the session. We present an
authorization failure; people may not realize that they are
still logged in (see test plan - bonus).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoBug 32208: Extend Auth.t
Marcel de Rooy [Tue, 15 Nov 2022 13:53:17 +0000 (13:53 +0000)]
Bug 32208: Extend Auth.t

Test plan:
Without follow-up patch, Auth.t should fail:
    not ok 5 - No permission response
    not ok 6 - checkauth returned failure

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoBug 31908: Add selenium tests
Jonathan Druart [Fri, 11 Nov 2022 12:08:53 +0000 (13:08 +0100)]
Bug 31908: Add selenium tests

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoBug 31908: Resolve second login with another userid
Marcel de Rooy [Tue, 8 Nov 2022 13:40:17 +0000 (13:40 +0000)]
Bug 31908: Resolve second login with another userid

Somewhere the line undef $userid got removed.
We need it to resolve the second login situation.

Test plan:
Login in staff with user missing privileges.
On the login form login again with another staff user.
Note that you do no longer crash.

Run t/db../Auth.t
Run t/db../Koha/Auth/TwoFactorAuth.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoBug 31908: Add a test to show issue
Marcel de Rooy [Mon, 14 Nov 2022 11:07:09 +0000 (11:07 +0000)]
Bug 31908: Add a test to show issue

Test plan:
Without next patch, run Auth.t.
Should fail now before next patch resolves problem:
    not ok 2 - Login of patron2 approved
    ok 3 - Did not return previous session ID
    not ok 4 - New session ID not empty

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoBug 31908: Replace an exit by a safe_exit in Auth.pm L1314
Marcel de Rooy [Mon, 14 Nov 2022 11:09:43 +0000 (11:09 +0000)]
Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314

No change in user experience. But since we can mock safe_exit,
we can enhance test results.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoBug 31587: Basket not accessible from ACQORDER notice
Kyle Hall [Tue, 20 Sep 2022 14:21:19 +0000 (10:21 -0400)]
Bug 31587: Basket not accessible from ACQORDER notice

The parameter "aqbasket" is passed to GetPreparedLetter, but is always undefined for the notice ACQORDER.

Test Plan:
1) Set your ACQORDER notice content to:
   ***[% basket %]***
2) Set up a vendor with an email, set contact for email so the "E-mail
   order" button shows on a basket for that vendor
3) E-mail the basket
4) Note the email contents are "******"
5) Apply this patch
6) Restart all the things!
7) Email the basket again
8) Note the content looks something like:
   ***Koha::Acquisition::Basket=HASH(0x55870acd96e0)***

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c89e886b6d99d92347b0da36d190429771a5ab97)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aceaca5d29b1a43d7f03178efbb934ba11671f6f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
22 months agoBug 31587: Regression tests
Tomas Cohen Arazi [Tue, 20 Sep 2022 14:46:23 +0000 (11:46 -0300)]
Bug 31587: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc7cc1467d5115de07e0c3f8a8229f3bdaf81739)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a09d2258156632b04ba13bdf53a34c7ef37bf073)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
23 months agoBug 31685: Replace current_article_requests_count in opac-user
Marcel de Rooy [Wed, 5 Oct 2022 13:45:09 +0000 (13:45 +0000)]
Bug 31685: Replace current_article_requests_count in opac-user

Fixing the "( total)" in the caption of the table.

The tt var should be replaced now by current_article_requests.size.
Note that current_article_requests is an array now (from as_list).
We cannot use .count since it is no Koha object.

Test plan:
Submit a few article requests.
Check OPAC account page, and verify that both totals are fine now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5db216385708d9420a8f8d32bfc35c81cf194d75)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9b7b41be1f18ee931370dc1e41da9d268fa1d4b9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
23 months agoBug 20457: Overdue and pre-overdue cronjobs not skipping phone notices
Kyle M Hall [Mon, 25 Mar 2019 18:03:16 +0000 (14:03 -0400)]
Bug 20457: Overdue and pre-overdue cronjobs not skipping phone notices

The overdue and pre-overdue cron scripts are not skipping the generation of phone notices. This causes many phone notices to be created that will always be left at 'pending' as the Talking Tech outbound script creates its own phone notices and puts them in the message queue.

Test Plan:
1) Enable Talking Tech
2) Enable predue and overdue notice phone transports for a patron
3) Generate overdues and predues, notice phone notices are generated
4) Apply the patch
5) Repeat steps 2-3
6) Note phone notices are not generated

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bf6bbc29a0c84581a59624b070cb5747f195ea43)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2a14f470f7af0b5b2a3acea2a52cf744e3f0df5d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
23 months agoBug 29671: Dropbox mode is unchecked after check in confirm on item with Materials...
Christophe Torin [Fri, 23 Sep 2022 19:55:37 +0000 (15:55 -0400)]
Bug 29671: Dropbox mode is unchecked after check in confirm on item with Materials specified

Suggested patch

steps to reproduce :

1) Enable System preference CirConfirmItemParts
2) Go to Circulation > Check in
3) Enable Dropbox mode (Book drop mode) in the Checkin settings
4) Enter a barcode of an item having the 'Materials specified' field
   not empty
5) A Popup is shown, click the confirm button
6) The Dropbox mode (Book drop mode) is now unchecked, but should stay
   checked.

In the template, the modal window lacks the dropboxmode input, so that
it stays on the next page. I attached a patch with my suggested correction.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Géraud <geraud.frappier@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e024b6fb5282f057aca3e901162fced3715e7724)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4c0025a81c9e88f227bf89bb3c5c3d92d4a6801c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
23 months agoBug 31643: Require only edit_catalogue, not full cataloging
Nick Clemens [Wed, 28 Sep 2022 18:59:41 +0000 (18:59 +0000)]
Bug 31643: Require only edit_catalogue, not full cataloging

To test:
1 - Grant a patron: catalogue, edit_catalogue, and editauthorities permissions
2 - Log in to staff client
3 - Browse to: http://localhost:8081/cgi-bin/koha/svc/cataloguing/automatic_linker.pl
4 - UNAUTHORIZED
5 - Apply patch, restart all
6 - Log in and go to link again
7 - status "OK"

Signed-off-by: Catrina <catrina@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fb1ca3311001b0a7c5b93a54330a9206ff5b41d9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e3db0a35c38359a0a92f9eb81a29b2371aebb6e6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 7197149f6e42d88b67cc85c63d70f5f268f4d9a2)

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
23 months agoBug 31559: Staff results page doesn't always use up full available screen width
Owen Leonard [Mon, 26 Sep 2022 14:07:06 +0000 (14:07 +0000)]
Bug 31559: Staff results page doesn't always use up full available screen width

This patch adds an explicit "width: 100%" to tables which are contained
within a #searchresults <div>. The change affects staff interface
catalog search results and these other pages with the same markup:

- Advanced MARC editor search results
- Holds to pull
- Patron search results

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

- Test the catalog search results and other affected pages to confirm
  that the tables affected take up the full width of the page.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cfb6ea48b8240ca3e526fba840c1b40701911329)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fec7b1efa46cd7ec0df260326a664ea3b6f57957)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
23 months agoBug 30517: Translation breaks editing parent type circulation rule fix
Shi Yao Wang [Tue, 19 Apr 2022 15:52:42 +0000 (11:52 -0400)]
Bug 30517: Translation breaks editing parent type circulation rule fix

Test plan:
1. Install another language in the staff interface
   1. in commandline: `cd misc/translator/; ./translate install xx-XX`
   2. Check the box of the language in the 'language' system preference
and save
   3. Refresh and you should be able to choose languages
2. Create an item type with a parent
   1. Go to Administration > Item types
   2. Create a new item type or modify an existing one, assigning a parent type (I created a 'Children's books' type and assigned 'Books' as its parent)
3. Create a circulation rule for the parent type (I created All/Books, with 10 checkouts allowed)
4. Create a circulation rule for All/All (I created All/All with 30 checkouts allowed)
5. In English, click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)'
6. Modify the number of checkouts allowed (e.g. 99)
--> The All/Books rule is modified
7. Switch the interface to the other language
8. Click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row stays on 'All'
9. Modify the number of checkouts allowed (e.g. 88)
--> The All/All rule is modified
10. Apply the patch, translate again and refresh the page
11. Do step 8-9 again and notice it now behaves as it should

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eccae54eee0316e6eb6f2edc54edce2cd269ebe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 080d763c488d2d534a8784973313e9b1a972639c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
23 months agoBug 31593: Remove Test::DBIx::Class from Context.t
Marcel de Rooy [Wed, 21 Sep 2022 13:54:54 +0000 (13:54 +0000)]
Bug 31593: Remove Test::DBIx::Class from Context.t

No need to keep it.
Fixing a test description too.

Test plan:
Run t/db_dependent/Context.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 499562f0b80ca705e94581ccef0eebadce1ed6f9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3088c2f56a8f21a696cab4d80dde20db8fa164b7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit fd0f1adceb)

23 months agoBug 31540: Exclude expired holds from the reminder job
Nick Clemens [Mon, 12 Sep 2022 14:35:24 +0000 (14:35 +0000)]
Bug 31540: Exclude expired holds from the reminder job

Some libraries don't want to auto-cancel holds, but we should not remind
a patron about a hold which has expired.

To test:
1 - Place a hold for a patron
2 - Set it waiting
3 - Run the holds reminder script in the future
    perl misc/cronjobs/holds/holds_reminder.pl -day 1 --date '2023-09-12' -v
4 - Note the holds would be reminded
5 - Set expirationdate for the hold less than today
    UPDATE reserves SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY);
6 - Run the remidner cron again
7 - No holds trigger!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4c3d18091d821af2d9ac7a6178547cc9c478f9de)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6e3ff69730ec269973cc5225a99e5ce7123f05f7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit fce44867acdcfe34bea0cf165601d51081c85c5c)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit fce44867acdcfe34bea0cf165601d51081c85c5c)

23 months agoBug 31412: Add focus to 'name' on SMTP Servers
Isobel Graham [Mon, 12 Sep 2022 16:33:57 +0000 (17:33 +0100)]
Bug 31412: Add focus to 'name' on SMTP Servers

This patch adds the focus class to ensure focus is given to the first form element on the SMTP server entry page.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44537c58d1ea689c974bdba216b2ae69eac79e5c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7a8a5177da3be90f7779cfe7c68b6a5823a9ee18)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 38b608eadbdde8eed5a223d228fc14e14376627f)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 38b608eadbdde8eed5a223d228fc14e14376627f)

23 months agoUpdate release notes for 21.05.21 release v21.05.21
Victor Grousset/tuxayo [Thu, 1 Dec 2022 00:03:35 +0000 (01:03 +0100)]
Update release notes for 21.05.21 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
23 months agoIncrement version for 21.05.21 release
Victor Grousset/tuxayo [Wed, 30 Nov 2022 23:48:45 +0000 (00:48 +0100)]
Increment version for 21.05.21 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
23 months agoFix translations for Koha 21.05.21
Victor Grousset/tuxayo [Wed, 30 Nov 2022 23:44:54 +0000 (00:44 +0100)]
Fix translations for Koha 21.05.21

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
23 months agoTranslation updates for Koha 21.05.21
Koha translators [Wed, 30 Nov 2022 19:10:09 +0000 (16:10 -0300)]
Translation updates for Koha 21.05.21

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
23 months agoBug 28553: (QA follow-up) default to auto renew email when cron switched used
David Cook [Tue, 13 Sep 2022 06:46:46 +0000 (06:46 +0000)]
Bug 28553: (QA follow-up) default to auto renew email when cron switched used

This patch defaults to using "email" rather than "sms" notices
when AutoRenewalNotices is set to use the --send-notices cron switch

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88f63e01d29917e9323c57be97aaa91b9e00fd92)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 681730ee1af9ad167f9526903eee6b6681d7d9ff)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit dc92b692e2704c64d1700e7c4fcbf667f6b1402e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
23 months agoBug 28553: Patrons can be set to receive auto_renew notices as SMS, but Koha does...
Kyle M Hall [Mon, 18 Jul 2022 16:37:48 +0000 (12:37 -0400)]
Bug 28553: Patrons can be set to receive auto_renew notices as SMS, but Koha does not generate them

Following bug 18532, one can set a patron's messaging prefs to deliver an auto-renew notice via SMS.
However, the auto_renewals cron only knows how to generate email notices. We should not allow the selection of non-functional transport types.

Test Plan:
 1 - Set pref AutoRenewalNotices - 'according to patron messaging preferences'
 2 - Set circ rule with:
    Loan period: 5 days
    No renewal before: 5
    AutoRenewal: Yes
    Renewals allowed: 5
 3 - Set SMS Send driver to Email
 4 - Find a patron and set them to receive auto renewal notices via SMS and no other transport
 5 - Provide a proivder and sms number for the patron
 6 - Checkout an item to the patron, set due date to yesterday
 7 - Run auto renewals:
    perl misc/cronjobs/automatic_renewals.pl -v --send-notices -c
 8 - Item renewed, no message sent
 9 - Check in item, checkout again due yesterday
10 - Apply patch
11 - Browse to Tools->notices and slips
12 - Edit AUTO_RENEWALS and AUTO_RENEWALS_DIGEST to copy email template to sms and add a title
13 - perl misc/cronjobs/automatic_renewals.pl -v --send-notices -c
14 - Item renewed, confirm patron has a notice in their account
15 - Check the digest option, check in item, checkout again as due, repeat cronjob and note digest notic
16 - sign off

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fef29151e0dd6287f8e4e49effc9d9666bf87582)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e672ea689221f8c6dd7e139acd3ffbd92c7c569f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit ff27eecd567e0a2e2f7cc2062c811b6b864cceea)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
23 months agoBug 29603: Compiled SCSS
Victor Grousset/tuxayo [Thu, 17 Nov 2022 23:46:26 +0000 (00:46 +0100)]
Bug 29603: Compiled SCSS

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
23 months agoBug 29603: Fix responsive behavior of facets menu in OPAC search results
Owen Leonard [Thu, 27 Jan 2022 15:29:32 +0000 (15:29 +0000)]
Bug 29603: Fix responsive behavior of facets menu in OPAC search results

The OPAC was originally featured a search results facets box that would
collapse at narrower browser widths and show a "Refine your search" link
under the breadcrumbs menu. At some point this broke, with the "Refine
your search" link appearing at the bottom instead.

This patch revises the page to restore the previous behavior.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Perform catalog search in the OPAC which will return multiple results.
- View the page at various browser widths. At narrower widths the facets
  menu should appear as a "collapsed" box with a "Refine your search"
  link.
- Clicking the link should toggle the facets menu visibility.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 915815ddae7a69e549e0114eddd2be6a44f1486b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 2e72aae7e40baddc8927d6c2a0e7fdafaa17c981)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
23 months agoBug ?????: Compiled SCSS due to compiler change or previous oversight
Victor Grousset/tuxayo [Thu, 17 Nov 2022 23:34:19 +0000 (00:34 +0100)]
Bug ?????: Compiled SCSS due to compiler change or previous oversight

Likely compiler change.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoUpdate release notes for 21.05.20 release v21.05.20
Victor Grousset/tuxayo [Mon, 24 Oct 2022 16:24:06 +0000 (18:24 +0200)]
Update release notes for 21.05.20 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoIncrement version for 21.05.20 release
Victor Grousset/tuxayo [Mon, 24 Oct 2022 16:08:43 +0000 (18:08 +0200)]
Increment version for 21.05.20 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoFix translations for Koha 21.05.20
Victor Grousset/tuxayo [Mon, 24 Oct 2022 15:47:13 +0000 (17:47 +0200)]
Fix translations for Koha 21.05.20

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoTranslation updates for Koha 21.05.20
Koha translators [Mon, 24 Oct 2022 11:57:27 +0000 (08:57 -0300)]
Translation updates for Koha 21.05.20

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 31219: Prevent JS injection in patron extended attributes
Jonathan Druart [Mon, 25 Jul 2022 07:23:25 +0000 (09:23 +0200)]
Bug 31219: Prevent JS injection in patron extended attributes

We are sanitizing other attributes but "extended patron attributes".

Test plan:
Make a patron attribute editable at the OPAC
Edit an existing patron, or register a new one
Use a script tag in the new value ("<script>alert("booh!")</script>" for
instance)
With this patch the value is remove if containing an HTML tag that is
not br b i em big small strong (see C4::Scrubber)

Signed-off-by: Mark Hofstetter <koha@trust-box.at>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ddaa78bdab360f41b9e3672de7f50cd3053b9116)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30252: lower version of 'Locale::XGettext::TT2' to 0.6
Mason James [Wed, 9 Mar 2022 04:22:50 +0000 (17:22 +1300)]
Bug 30252: lower version of 'Locale::XGettext::TT2' to 0.6

this patch reduces the required version of 'Locale::XGettext::TT2' to 0.6

version 0.7 of of Locale::XGettext::TT2 is incompatible with the current version of libintl-perl (1.26), so we use 0.6 instead

 https://packages.debian.org/stretch/libintl-perl
 https://metacpan.org/release/GUIDO/Template-Plugin-Gettext-0.6/view/lib/Locale/XGettext/TT2.pm

we will move to 'Locale::XGettext::TT2' 0.7 when libintl-perl-1.32 arrives
 https://tracker.debian.org/pkg/libintl-perl

small change, no test plan

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6c49c489d6d8ad9dd8e3e02d9d623895f79d3607)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29325: Fix commit_file.pl
Tomas Cohen Arazi [Tue, 26 Oct 2021 16:54:15 +0000 (13:54 -0300)]
Bug 29325: Fix commit_file.pl

This patch fixes the broken commit_file.pl script.

It doesn't deal with commiting the import from the UI.

To test:
1. Pick a file for staging:
   $ kshell
  k$ misc/stage_file.pl --file TestDataImportKoha.mrc
=> SUCCESS: All good
2. Commit!
  k$ misc/commit_file.pl --batch-number 1
=> FAIL: You see
DBIx::Class::Storage::DBI::_exec_txn_begin(): DBI Exception: DBD::mysql::db begin_work failed: Already in a transaction at /kohadevbox/koha/C4/Biblio.pm line 303
3. Apply this patch
4. Repeat 2
=> SUCCESS: Commit succeeds
5. Sign off :-D

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>
Bug 29325: (QA follow-up) Remove unexisting parameters of BatchRevertRecords

There is no interval and callback as in BatchCommitRecords.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29325: Call progress callback one last time to confirm comppletion

Previously after finishing the loop we were still in a transaction that never completed - we should report progress when done
one final time to commit the last records

To test:
1 - Stage a file with > 100 records
2 - Commit file
3 - Confirm batch is imported and no records left as staged

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29325: Fix import from staff client

same test as before, but via the staff client

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29325: Handle the transaction in BatchCommitRecords

Requiring the callback to commit was breaking reversion, and likely elsewhere

Let's simplify and say that the routine iteself will handle the txn and commit

TO test:
1 - Stage a file
2 - Import a file
3 - Revert a file
4 - Test staff client and command line

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 29325: (QA follow-up) Tidy up

tools/manage-marc-import.pl: sub commit_batch does no longer need $schema
tools/manage-marc-import.pl: sub revert_batch: calling BatchRevertRecords which has no interval and callback
misc/commit_file.pl: sub print_progress_and_commit does no longer commit, renamed
misc/commit_file.pl: sub print_progress does no longer have a schema parameter
misc/commit_file.pl: sub revert_batch reported deleted items as added

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 514b6628613b27aed1138d16ab9f2393b79bb897)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoUpdate release notes for 21.05.19 release v21.05.19
Victor Grousset/tuxayo [Tue, 27 Sep 2022 13:42:51 +0000 (15:42 +0200)]
Update release notes for 21.05.19 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoIncrement version for 21.05.19 release
Victor Grousset/tuxayo [Tue, 27 Sep 2022 12:05:52 +0000 (14:05 +0200)]
Increment version for 21.05.19 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoFix translations for Koha 21.05.19
Victor Grousset/tuxayo [Tue, 27 Sep 2022 12:02:49 +0000 (14:02 +0200)]
Fix translations for Koha 21.05.19

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoTranslation updates for Koha 21.05.19
Koha translators [Tue, 27 Sep 2022 08:16:12 +0000 (05:16 -0300)]
Translation updates for Koha 21.05.19

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30308: Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData)
Frédéric Demians [Mon, 11 Jul 2022 10:05:54 +0000 (12:05 +0200)]
Bug 30308: Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData)

Test plan:

(A) Reproduce the bug:

A1 In Administration > System preferences > Web services:
   - Enable OAI-PMH
   - Enable OAI-PMH:AutoUpdateSets
   - Enable OAI-PMH:AutoUpdateSetsEmbedItemData

A2 In Tools > Export data > Export bibliographic records, export 1 (one)
   biblio record. Be sure that this biblio record has at least one item.
   Don't tick "Don't export items".

A3 Delete the exported biblio record, and its items.

A4 In command line, on the server load the exported file:
   ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc

A5 Retrieve the biblio record in Koha. Note the absence of the item(s). This is
   the bug.

(B) Apply the patch

B1 Delete the record (without item) loaded at A4.

B2 In command line, on the server load the exported file:
   ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc

B2 Retrieve the biblio record in Koha. Note the presence of the item(s).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d5e65dd4c0352c4fb2d96f4cabfc6e6311770cd0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 06b48f16e420ccac12cc0560d0091c404e647be6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 084c14787f751e8aabee7db6f701c5d4c71cf497)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 31138: Don't ignore DataTables errors and raise them to the end-user
Jonathan Druart [Tue, 12 Jul 2022 08:09:25 +0000 (10:09 +0200)]
Bug 31138: Don't ignore DataTables errors and raise them to the end-user

DataTables is not raising error to the end user, it's only displaying a generic message in the console.
This leads to lot of questions on IRC or the mailing list ("the table is empty").
We can do better and display what went wrong.

We could also imagine add a link to the wiki for the more common problems (won't be implemented here however).

Test plan:
Revert "Bug 31104: Put each link on a separate header" and search for a
patron using a very long string
You should get an alert with the reponse of the server.
In my case:
"""
Something went wrong when loading the table.
414: Request-URI Too Long
"""

You can also make the REST API returns a 500 (bad specs or simply with a
die statement).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 76b984bb6ccee55ba1ddfdb5b08c6ee2e75eaa37)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7a5d048b51b60dcb7123e2fd0b73e5d95f9e554e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 6ac8f34e9906d840cb6b8e04427f064f2d9518b3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 27045: (follow-up) Fix delimiter in header rows
Katrin Fischer [Sat, 16 Jul 2022 11:23:54 +0000 (11:23 +0000)]
Bug 27045: (follow-up) Fix delimiter in header rows

The header rows still showed \t because the newly defined
variable wasn't used there.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eea061ca30e4810b07ca2920bfe1e55762fab02)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ed114537d3a965bc5f636e4f138cdf35c2515d3b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 6c47479066eae4d6c3c42aaeb6e2b7dc86d92ef4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 27045: Fix other exports using CSV profiles
Jonathan Druart [Fri, 20 Nov 2020 14:33:14 +0000 (15:33 +0100)]
Bug 27045: Fix other exports using CSV profiles

This patch corrects the export of the 2 other reports
using CSV profiles:

* Late issues (serials)
* Basket (acquisitions)

To test:
1) Late issues
* Update the late issues sample report to use tab as separator
* Create a subscription
* Go to serial collection and 'generate next' to get some late issues
* Go to Claims
* Export the late issues and verify format is correct
* Verify exported file has tabs

2) Basket summary
* Create an order with several order lines
* Create an SQL type CSV profile for basket export using tab as separator
  Example: aqorders.quantity|aqordres.listprice|Title=biblio.title
* Export the basket using your configured CSV profile
* Verify exported file has tabs

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7cd84171ab57a35138fa5c585d2ed6de442e453c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9af01ea2e3c6735420431cd41a97e29a28167165)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit cdfecb6fb771c872b6ebb528ef2e99b9c69283b7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 27045: Fix items lost report export if delimiter is tab
Jonathan Druart [Fri, 20 Nov 2020 14:33:02 +0000 (15:33 +0100)]
Bug 27045: Fix items lost report export if delimiter is tab

When choosing tabulation as the delimiter for a CSV profile
for the lost item report, the tabs appear in the file as \t
instead of as proper tabs.

title\tauthor\tstocknumber\tcallnumber
"E Street shuffle :"\"Heylin, Clinton."\\

To test:
* Upate the existing sample lost item CSV profile to use tabs as
  separator
* Make sure you have some lost items in your database or create some
* Go to Reports > Lost items
* Run the report
* Check all or some of the checkboxes in the result list
* Export using the link on top and the CSV profile
* Verify the tabs are not exported correctly
* Apply patch
* Verify tabs now are proper tabs instead of \t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 983965ee4790fd7841af87fcfdb8395ccea9e813)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4db8368fd558066ab321353e9eb346563f871f72)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit becbc5bec1bece7f5dbf9089c7e1bd593e9d850c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 14680: Always subtract discount from price to calculate estimated cost
Nick Clemens [Tue, 12 Jul 2022 18:10:54 +0000 (18:10 +0000)]
Bug 14680: Always subtract discount from price to calculate estimated cost

This patch simply removes a discrepancty where when a discount is provided on the order form
we add the discount to the price, and when it comes form the vendor we subtract the discount.

Discounts should always descrease the estimated cost

To test:
 0 - Have a vendor with a discount of 10% specified
 1 - Export a record from your Koha
 2 - Stage the record for import and match on biblionumber
 3 - Add to a basket in acq from the staged file
 4 - Select the title, and set order price to $10 and do not fill the discount field
 5 - Add the order - note $10 RRP and $9 actual/budgeted cost
 6 - Repeat 2&3
 7 - Select the tile, set price $10 and discount 50%
 8 - Add the order - note $20 RRP and $10 actual/budgeted cost! FAIL
 9 - Apply patch, restart all
10 - Repeat 2-7
11 - Add the order, note $10 RRP and $5 actual.budgeted cost

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c734c6903a823eeb58be9ab1c4af251def776b7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 96eed0f5e00657808e506ba6d5e0a98a3529bf95)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit da1633125fef9995bc9917693807ffb07054be15)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29051: Update svc api to allow seen renewals
Martin Renvoize [Wed, 11 May 2022 15:21:48 +0000 (16:21 +0100)]
Bug 29051: Update svc api to allow seen renewals

This patch updates the svc/renew api endpoint to allow seen renewals
when appropriate

Signed-off-by: Caroline <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3311ebffc2b2965239674501cf56818c9e90cec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e9153d7f1566981e14741a8ea50f9da4da483196)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit e20d79123b267599b1df4c0f1a5a82e0b3cf5a09)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29051: Enable seen renewal in the staff client
Martin Renvoize [Wed, 11 May 2022 15:13:23 +0000 (16:13 +0100)]
Bug 29051: Enable seen renewal in the staff client

This patch updates the javascript for the checkouts table to add the
checkbox back in for the case where too_unseen is the error returned by
CanBookBeRenewed, allowing such issues to be renewed.

Signed-off-by: Caroline <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 91a67e3c8acd4d0cad73e01b10569c712b6b4c01)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 36e39cab65fbb6fd36754dcd20839814e5386d9b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit b513d0b03800eb9ac70265d7ff61d2e23fb42d6b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 31473: Fix fragile test about bad OpacHiddenItems conf
Tomas Cohen Arazi [Fri, 26 Aug 2022 19:45:10 +0000 (16:45 -0300)]
Bug 31473: Fix fragile test about bad OpacHiddenItems conf

There's been a behavior change in recent MariaDB that made some cases
deal with truncated data in DOUBLE context instead of DECIMAL.

Probably this:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27380

This made the affected test fail consistently on those versions.

This trick for checking OpacHiddenItems is correct (as introduced on bug
28125 doesn't really make use of the warning, just prints it in
about.pl) so one option was to just check for a warning.

I decided to keep the test, but add the optional DECIMAL|DOUBLE check on
the qr. This way other eventual changes will make it fail and serve as a
warning in case something more relevant changes.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28610: Elasticsearch 7 - hits.total is now an object
Kevin Carnes [Tue, 8 Feb 2022 13:48:19 +0000 (14:48 +0100)]
Bug 28610: Elasticsearch 7 - hits.total is now an object

In Elasticsearch 7 hits.total is now an object which is not always an exact
value. You can always get an exact total by adding a track_total_hits
parameter set to true when using the Elasticsearch search method

To test:
1) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
2) If you observe an error about types, apply patch for bug 25669
3) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
4) Observe that tests with count fail
5) Apply patch
6) Observe that tests with count pass
7) Sign off

Sponsored-by: Lund University Library
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 301ed1567b78956b7d6ec9ef2378e37f87ca1371)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30209: Upgrade 'libdbd-sqlite2-perl' package to 'libdbd-sqlite3-perl'
Mason James [Wed, 2 Mar 2022 01:46:09 +0000 (14:46 +1300)]
Bug 30209: Upgrade 'libdbd-sqlite2-perl' package to 'libdbd-sqlite3-perl'

to test...

1/ apply patch, build and install new package

2/ check that libdbd-sqlite3-perl package is installed

     $ dpkg -l | grep libdbd-sqlite
     ii  libdbd-sqlite3-perl:amd64              1.62-3          amd64

    note: libdbd-sqlite3-perl package installs DBD::SQLite module, which uses sqlite3 :)

        https://packages.debian.org/stretch/libdbd-sqlite3-perl
        https://metacpan.org/pod/DBD::SQLite

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2c5f49550bffde753b33fe605878ab689bf86697)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoUpdate release notes for 21.05.18 release v21.05.18
Victor Grousset/tuxayo [Sat, 27 Aug 2022 23:17:35 +0000 (01:17 +0200)]
Update release notes for 21.05.18 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoIncrement version for 21.05.18 release
Victor Grousset/tuxayo [Sat, 27 Aug 2022 20:51:21 +0000 (22:51 +0200)]
Increment version for 21.05.18 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoFix translations for Koha 21.05.18
Victor Grousset/tuxayo [Fri, 26 Aug 2022 23:57:39 +0000 (01:57 +0200)]
Fix translations for Koha 21.05.18

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoTranslation updates for Koha 21.05.18
Koha translators [Fri, 26 Aug 2022 18:54:33 +0000 (15:54 -0300)]
Translation updates for Koha 21.05.18

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 25669: (follow-up) Minor fixes
Kevin Carnes [Wed, 25 May 2022 09:19:21 +0000 (09:19 +0000)]
Bug 25669: (follow-up) Minor fixes

Bulk doesn't support include_type_name, update requirement to
Search::Elasticseach@6.80, and remove data type name from tests.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e926de5e8f359acf6b8beff541fe13ce2a5ac49e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 22c9ea9737d614a26b06092cda9708e27013e494)
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 3a46ff9702146b8def00c1c4000a316dc0fa10ed)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 25669: Use include_type_name parameter in ES calls
Nick Clemens [Mon, 28 Mar 2022 12:00:25 +0000 (12:00 +0000)]
Bug 25669: Use include_type_name parameter in ES calls

This patch includes the parameter:
include_type_name
on our ES calls

It removes the deprecation warning we are seeing, and should allow using ES7 with no other chnages.

For ES8 we will need to remove the hardcoded type,

I would suggest a second patch, with a new syspref "ElasticsearchLegacyType" set to 'True' by default.
Description can explain that this must be set to false, and data reindexed after upgrading to ES7 and before
upgrading to ES8 - then we can drop this pref when we drop ES7 support

When we drop ES6 support the pref can be set default true for upgrades, default 'false' for new installs

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 150a4b03f337f6a58869c67d3681caa64441d53a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 99757c2d975d224ea191622116e6eb839fff70c1)
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit a1fdcc4f440601272c2e30e92843a60a3850bd6b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30567: Fix price formatting when adding a manual invoice with CurrencyFormat FR
Katrin Fischer [Mon, 6 Jun 2022 21:34:26 +0000 (21:34 +0000)]
Bug 30567: Fix price formatting when adding a manual invoice with CurrencyFormat FR

In input fields we always use the decimal . while the display format
uses the decimal separtor definded by CurrencyFormat. When adding a
manual invoice without this patch, the amount is shown with comma, but
it should be . in the input field.

To test:
1- Go in Administration->Debit types
2- Click on New debit type
3- Fill the form:
   Code: USEDBOOK
   Default amount: 0.50
   Description: Used book
   Can be manually invoiced: Yes
4- Save
5- Go to any patron account
6- Go to the "Accounting" tab
7- Click on "Create manual invoice"
8- Fill the form
9- Choose the created debit (Used book)
10- Verify that the format is incorrect (0,50 instead of 0.50)
11- Apply the patch
12- Verify the amount is now using the correct format

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c54e1de8b2beec131f51fdfe866fd27ee8bc0759)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 533a858684d8e5cf69caea560b64aefebc88b626)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 8a5ab91aed151fe2f0473fd5920e1297b3035ccb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves
Jonathan Druart [Tue, 7 Jun 2022 12:11:06 +0000 (14:11 +0200)]
Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves

Silly mistake, 'delete if verbose' must be 'delete if confirm'

Test plan:
Try the cleanup_database.pl script to delete transfers and old issues.
Using --transfers --old-reserves and the --confirm flag the entries must be
removed

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6166405c7d7886466a8d1264c98970b4973f77f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b503c186e4ca8012b24441e746045c7439c44b97)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 144372e72ed59f9ded5db00b9f4f9e38bfa0ada9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29958: Do not set dateaccessioned on updates
Martin Renvoize [Fri, 24 Jun 2022 14:39:07 +0000 (15:39 +0100)]
Bug 29958: Do not set dateaccessioned on updates

This patch reomves the second occurence of setting daeaccessioned today,
outside of the 'add/update' handling in Koha::Item->store.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f5fbcf73626139bcc01aca73b912fa29ff51f7d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e0fcd54a6edd728ab67924d5ab3ef3df8d4e52dd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 898adc6ff6ef8e6c16e279508a9d073d2547084b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29958: Regression tests
Tomas Cohen Arazi [Tue, 5 Jul 2022 12:14:16 +0000 (09:14 -0300)]
Bug 29958: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3684a53dc328047f5f608d4b3d6b37abcbf30400)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91c4d411157a22bbeb58b43b878705f44c71f1f3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 35643f28f91428ca0fa6c1c8c4f5d6b8ba40d13a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30848: [21.05.x] Export C4::Biblio::GetMarcSubfieldStructure()
Victor Grousset/tuxayo [Mon, 15 Aug 2022 20:46:57 +0000 (22:46 +0200)]
Bug 30848: [21.05.x] Export C4::Biblio::GetMarcSubfieldStructure()

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30848: Add exec flag to test
Nick Clemens [Fri, 17 Jun 2022 13:09:02 +0000 (13:09 +0000)]
Bug 30848: Add exec flag to test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c926c976a7a5057c578d8f5d41f4cdaa1d8ab5e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4edaa27fc2a7a487a9558dc66acce9b636fa06b3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit b10ac8189facd7b6e36f986dd392730a27b7ccbd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30848: Fix issue exposed by unit tests
Martin Renvoize [Mon, 13 Jun 2022 13:26:33 +0000 (14:26 +0100)]
Bug 30848: Fix issue exposed by unit tests

This patch changes the 'map' to a simple for loop so that we can easily
map multiple subfields to a field without overwriting the first previous
subfields in the structure.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c381c4b22d30388f8e24966a6c6e7c78201dba3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 965e9856196a30520ffaea7cc99f7724f7b123d3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 4541f43789495b0163fd5125620e0b25991ffede)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30848: Expand unit tests
Martin Renvoize [Mon, 13 Jun 2022 13:25:30 +0000 (14:25 +0100)]
Bug 30848: Expand unit tests

Add to the unit tests to test Library and Itemtype expansions as well as
linking multiple subfields of the same marc field to such expansions.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6b04e3e18f1c534e3d7d91dde458d30e02e13f33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 66999034d4ce274dec14340c1494dc280292984a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 8987b899709e5a8329f0f71b46aae476de83358b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30848: Add an ExpandCodedFields RecordProcessor filter
Martin Renvoize [Thu, 26 May 2022 09:24:50 +0000 (10:24 +0100)]
Bug 30848: Add an ExpandCodedFields RecordProcessor filter

This patch introduces a RecordProcessor filter for MARC::Record objects
that replaces Koha codes with descriptions in the MARC::Record passed to the processor.

Target usage:

  my $biblio = Koha::Biblios->find(
      $biblio_id,
      { prefetch => [ metadata ] }
  );

  my $record = $biblio->metadata->record;

  my $processor = Koha::RecordProcessor->new(
    {
        filters => ('ExpandCodedFields'),
        options => {
            interface     => 'opac',
            frameworkcode => $biblio->frameworkcode
        }
    }
  );

  $processor->process( $record );

Test plan
* Read the included unit test and confirm it makes sense and passes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 62bba6d9e12bdf9e3dbf231beae68afe43618f4b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a861042947adbc12b4d865c89c6a87effe965b9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 52dd29792ef8c746827e6071cd85e46a5dcbc8c1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t
Mason James [Wed, 6 Jul 2022 10:54:55 +0000 (22:54 +1200)]
Bug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t

to test...

1/ run prove, test is not run :(
 prove ./t | grep 00-check-atomic-updates.pl | wc -l
 0

2/ apply patch

3/ run prove, test is run :)
 prove ./t | grep 00-check-atomic-updates.t | wc -l
 2

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8884068904b77ecb8dff7875a056129443b08e6b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fea07bfab8d4a58bc07929585939a9472c384a59)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 1df5e78deb59d1ae87d315389c84a77ef9409194)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30958: OPAC overdrive search result page broken for translations
Alex Buckley [Mon, 13 Jun 2022 22:54:54 +0000 (22:54 +0000)]
Bug 30958: OPAC overdrive search result page broken for translations

Note: You will need a valid OverDrive subscription to test this.

This patch fixes a JavaScript error thrown on the OPAC overdrive search
results page for libraries using translation templates and who don't
have the OverDrivePasswordRequired system preference = 'Required'.

Test plan:
1. Install the en-NZ translation: https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client

2. Enable the en-NZ language:
   - In the OPACLanguages system preference -> tick 'English New Zealand
     (en-NZ)' checkbox and untick 'English (en)'

3. Fill in the OverDrive system preferences:
   - Make sure you set: OverDrivePasswordRequired = "Not required"

4. Perform an OPAC search

5. Click on the Overdrive results link

6. Open the browser console and notice there is a JS error, and the
   OverDrive results do not load

7. Apply patch

8. Update the en_NZ translation:

9. Repeat steps 4, 5 and 6 and notice there is no JavaScript error and
   the OverDrive results do display

Sponsored-by: Melbourne Athenaeum Library, Australia
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ade61b5e0c185fd7263ab6f101b1a4082d0ea0dd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f5c43cf2636e3e59d58b6ea739491dea192a51d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 6fb34f0d66d6b0882225c5edf099cdf79cdcc617)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoUpdate release notes for 21.05.17 release v21.05.17
Victor Grousset/tuxayo [Tue, 26 Jul 2022 01:46:14 +0000 (03:46 +0200)]
Update release notes for 21.05.17 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoIncrement version for 21.05.17 release
Victor Grousset/tuxayo [Tue, 26 Jul 2022 00:24:02 +0000 (02:24 +0200)]
Increment version for 21.05.17 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoFix translations for Koha 21.05.17
Victor Grousset/tuxayo [Mon, 25 Jul 2022 23:50:33 +0000 (01:50 +0200)]
Fix translations for Koha 21.05.17

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoTranslation updates for Koha 21.05.17
Koha translators [Mon, 25 Jul 2022 10:56:42 +0000 (07:56 -0300)]
Translation updates for Koha 21.05.17

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorit...
Kyle Hall [Wed, 15 Jun 2022 16:06:55 +0000 (12:06 -0400)]
Bug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorities-home.pl )

There appears to be a cross site scripting attack vulnerability in opac-authorities-home.pl, but may be accessible from any page using C4::Output::pagination_bar.

https://MYKOHA.LOCAL/cgi-bin/koha/opac-authorities-home.pl?and_or=and%27%22()%26%25%3Csad%3E%3CScRiPt%20%3Ealert(document.domain)%3C/ScRiPt%3E&authtypecode=CORPO_NAME&excluding=1&marclist=all&op=do_search&operator=contains&orderby=HeadingAsc&type=opac&value=1

Test Plan:
1) Use the URL above to show the XSS vulnerability exists
2) Apply this patch
3) Restart all the things!
4) Reload the page, no XSS vulnerability!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>