koha.git
3 months agoUpdate release notes for the 23.05.08 release v23.05.08
Lucas Gass [Wed, 24 Jan 2024 18:05:57 +0000 (18:05 +0000)]
Update release notes for the 23.05.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoIncrement version for 23.05.08 release
Lucas Gass [Wed, 24 Jan 2024 17:41:28 +0000 (17:41 +0000)]
Increment version for 23.05.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34893: Unit tests for C4::Auth::checkpw
Tomas Cohen Arazi [Fri, 15 Dec 2023 13:54:11 +0000 (10:54 -0300)]
Bug 34893: Unit tests for C4::Auth::checkpw

This patch introduces some tests on the current (and new) behavior for
the `checkpw` function.

I needed it to better understand if an edge case was actually possible
(it wasn't).

Found a really minor annoyance for the internal check with expired
password not returning the $patron object for consistency with the other
use cases.

I think this method deserves (at least) changing the return value to a
sane data structure. But that's not target for backporting to stable
releases. So a separate bug.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34893: (QA follow-up) Tidy code for qa script
Kyle M Hall [Fri, 1 Dec 2023 11:29:19 +0000 (06:29 -0500)]
Bug 34893: (QA follow-up) Tidy code for qa script

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34893: Add checkpw change to REST API
David Cook [Tue, 28 Nov 2023 22:57:39 +0000 (22:57 +0000)]
Bug 34893: Add checkpw change to REST API

This patch adds the checkpw return value change to the REST API
route for validating user identifiers and password.

Test plan:
0. Apply patch
1. prove t/db_dependent/api/v1/password_validation.t

Bonus points:
1. koha-plack --reload kohadev
2. Enable syspref RESTBasicAuth
3. curl -XPOST -H "Content-Type: application/json" \
-u <staff_userid>:<staff_password> \
-d '{"identifier":"<cardnumber>","password":"<password>"}' \
http://localhost:8081/api/v1/auth/password/validation
4. Validation doesn't fail. It gives you cardnumber, patron_id, userid

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34893: ILS-DI can return the wrong patron for AuthenticatePatron
Kyle M Hall [Fri, 22 Sep 2023 18:20:59 +0000 (14:20 -0400)]
Bug 34893: ILS-DI can return the wrong patron for AuthenticatePatron

Imagine we have a set of users. Some of those users have a NULL userid. We then call AuthenticatePatron from ILS-DI for a patron with a NULL userid, but a valid cardnumber. We call checkpw, which returns the cardnumber and userid. We then call Koha::Patrons->find on the userid *which is null*, meaning the borrowernumber returned is not the correct one, but instead the earliest patron inserted into the database that has a NULL userid.

Test Plan:
1) Give three patrons a userid and a password
2) From the database cli, set all patrons's userid to null
   Run this query: update borrowers set userid = null;
3) Call AuthenticatePatron with username being the 1st patron cardnumber,
   and password being the password you set for that patron
   http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=kohacard&password=koha
4) Note you get back a borrowernumber for a different patron. Refresh the page and the number is correct.
5) Do the same with the 2nd patron. Same issue at 1st and correct number after.
6) Apply this patch
7) Restart all the things!
8) Do the same with the 3rd patron.
9) Note you get the correct borrowernumber! :D
10) prove t/Auth.t t/db_dependent/Auth_with_ldap.t t/Auth_with_shibboleth.t t/db_dependent/Auth_with_cas.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34893: Add unit tests
Kyle M Hall [Wed, 29 Nov 2023 17:18:32 +0000 (17:18 +0000)]
Bug 34893: Add unit tests

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 25835: Include overdues with fines in overdues_report permission
Andrew Fuerste Henry [Wed, 29 Nov 2023 18:02:52 +0000 (18:02 +0000)]
Bug 25835: Include overdues with fines in overdues_report permission

To test:
1 - have a user with circulate_remaining_permissions but not
    overdues_report
2 - confirm user can see and run Overdues with Fines
3 - apply patch
4 - confirm user can no longer see links to Overdues with Fines or load
    the page directly by entering the url
5 - confirm a user with overdues_report or greate permission can see and
    use the tool

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 23de67a7e4d3701f9a665ec0fee38e22128c5fa3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9825c7ea36ef823034b82acc168b6e38730cd9b0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 32551: HTTP_ACCEPT_LANGUAGE legacy CGI variable not set in Mojolicious
Tomas Cohen Arazi [Thu, 28 Dec 2023 14:41:39 +0000 (14:41 +0000)]
Bug 32551: HTTP_ACCEPT_LANGUAGE legacy CGI variable not set in Mojolicious

This patch addresses the fact some of our code still relies on those CGI-era ENV variables.
In particular, C4::Laguages::getlanguage expects it to calculate the most suitable language.

As this is reported as required, I provide a fix.

I did a `git grep HTTP_` on the codebase, and the only other occurences are:

* C4::Output (HTTP_X_REQUESTED_WITH)
* C4::Context (HTTP_USER_AGENT, HTTP_X_FORWARDED_FOR)
* C4::Auth_with_shibboleth (using HTTP_ variables for matchpoints)
* Some handling on the 'Koha as a Mojo app' code
* Some .pl script not relevant to this report

I decided to limit this patch to the requested header which seems harmless. I leave the
other cases.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ qa -c 1
=> FAIL: Tests fail!
3. Apply this patch
4. Run:
  k$ qa -c 2
=> SUCCESS: Tests pass! All green!
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d6e072fb5f2a0cd47661e759142e59e887724cc6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c1ba60ce4dc5be6b2f808cd4b8ce57e8e583cc71)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 32551: Regression tests
Tomas Cohen Arazi [Thu, 28 Dec 2023 14:40:11 +0000 (14:40 +0000)]
Bug 32551: Regression tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5292903dc19191b265e5b2c6a1cdce99ed9e447c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0df6ad0aa9f3667a8ad6f0cc893a34dd34e62e0b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 35567: Prevent translation of Host-item in "Show analytics" link
Kevin Carnes [Thu, 14 Dec 2023 09:47:40 +0000 (10:47 +0100)]
Bug 35567: Prevent translation of Host-item in "Show analytics" link

The "Show analytics" link is built using text which can be translated.

The following languages have already translated Host-item:
fa-Arab, fi-FI, nl-NL, pt-BR, ru-RU, sv-SE

To test:
 1. Install one of the affected languages:
    koha-translate --install sv-SE --dev kohadev
 2. Modify and save the following system preferences:
    language: enable the language
    OPACLanguages: enable the language
    opaclanguagesdisplay: Allow
    EasyAnalyticalRecords: Show
 3. View a record with holdings and copy the barcode of one the items
 4. Select the Edit dropdown menu above the record details and click
    "Link to host record"
 5. Paste the barcode, click Select, and click OK
 6. Return to Normal view of the record and reload the page
 7. There should now be a "Show analytics" link
 8. Hover over the link and note that the link contains "Host-item"
 9. Switch to one of the affected languages and note that "Host-item" is
    translated
10. View the record in the OPAC and confirm that the link is also translated
11. Apply the patch
12. Update the affected language:
    koha-translate --update sv-SE --dev kohadev
13. Restart Koha (restart_all)
14. Notice that the links are no longer translated
15. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0f2c17e71dcf128a28a9533c2a3040db2535fd1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3ce12b7dca39b14039842401f085c4115d656e04)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 35713: Remove outdated debian/docs/LEEME.Debian file
Katrin Fischer [Sat, 6 Jan 2024 18:21:43 +0000 (18:21 +0000)]
Bug 35713: Remove outdated debian/docs/LEEME.Debian file

This removes the LEEME.Debian README file from the docs
directory. We don't even have an English README here as
we usually refer to the wiki for installation instructions.
It makes sense to remove it from the codebase.

To test:
* Verify that the file is removed
* Verify that all references to the file have been removed as well
  Example: git grep LEEME

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a18e4d0e6241d4a18ceb62b7543c89cddd74bb1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a3606493ad3572fd80acec8025996975d812d46e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 35598: Fix selenium/authentication_2fa.t random failure
Jonathan Druart [Tue, 19 Dec 2023 09:28:30 +0000 (10:28 +0100)]
Bug 35598: Fix selenium/authentication_2fa.t random failure

Jenkins is failing with
koha_1       | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...}
koha_1       |  /usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try
koha_1       |  (eval 582):1 in Selenium::Remote::Driver::__ANON__
koha_1       |  (eval 584):2 in Selenium::Remote::Driver::__ANON__
koha_1       |  (eval 556):17 in Selenium::Remote::Driver::_execute_command
koha_1       |  /usr/share/perl5/Selenium/Remote/WebElement.pm:125 in Selenium::Remote::WebElement::_execute_command
koha_1       |  t/db_dependent/selenium/authentication_2fa.t:276 in Selenium::Remote::WebElement::send_keys
koha_1       |  /usr/share/perl/5.32/Test/Builder.pm:334 in main::__ANON__
koha_1       |  /usr/share/perl/5.32/Test/Builder.pm:334 in (eval)
koha_1       |  /usr/share/perl/5.32/Test/More.pm:809 in Test::Builder::subtest
koha_1       |  t/db_dependent/selenium/authentication_2fa.t:294 in Test::More::subtest
koha_1       |
selenium_1   | 1702911648831 Marionette INFO Stopped listening on port 41385
selenium_1   | JavaScript error: resource:///modules/Interactions.jsm, line 230: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver]
selenium_1   | 15:00:49.452 INFO [ActiveSessions$1.onStop] - Removing session c3461b22-7a80-4b56-b177-653a53cc2651 (org.openqa.selenium.firefox.GeckoDriverService)
koha_1       |     # Looks like you planned 7 tests but ran 3.
koha_1       |
koha_1       | #   Failed test 'Enforce 2FA setup on first login'
koha_1       | #   at t/db_dependent/selenium/authentication_2fa.t line 294.
koha_1       | Error while executing command: element not interactable: Element <input id="pin_code" name="pin_code" type="text"> is not reachable by keyboard at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.

The error is: "Element <input id="pin_code" name="pin_code" type="text"> is not reachable by keyboard"

A guess is that the input is either 1. outside of the viewport, or 2. not
displayed yet.

1. We are hidding #registration-form then show it when we retrieved the
   info (after POST /api/v1/auth/two-factor/registration)
2. Couldn't there be a race condition?
In auth.tt
284                     success: function (data) {
292                         $("#registration-form").show();
And in the selenium test:
$s->wait_for_ajax; # There is an ajax request to populate the qr_code and the secret
Not sure this wait_for_ajax is waiting for the end of success, I don't
think so.

This patch is supposed to fix both theories.

Test plan:
0. Do not apply the patch
1. Edit auth.tt and sleep 1 second before showing the form:
290                         const sleep = ms => new Promise(r => setTimeout(r, ms));
291                         await sleep(1000);
292                         $("#registration-form").show();

You will also need to replace the following line (284):
  success: function (data) {
with
  success: async function (data) {

2. prove t/db_dependent/selenium/authentication_2fa.t
=> "is not reachable by keyboard" error!

3. Apply the patch, keep the sleep

4. prove t/db_dependent/selenium/authentication_2fa.t
=> Tests are passing

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Tidied a bit to clear complaints
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3270d321912823a5621ccff73eb1609a1c852145)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5aa213e210846320bb407984d486a5be79fe1369)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35587: (QA follow-up): QA script tidy
Pedro Amorim [Tue, 2 Jan 2024 11:15:39 +0000 (11:15 +0000)]
Bug 35587: (QA follow-up): QA script tidy

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 520c84756a2097927ef868630d40035198fbc5f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 95884923f7c5b85284a4ecf9bbcaa46451a0f3b4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems...
Aleisha Amohia [Wed, 20 Dec 2023 02:37:48 +0000 (02:37 +0000)]
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled

This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained.

To test:

1. Go to Koha Administration -> Global system preferences
2. Set the BlockReturnOfLostItems system preference to Block
3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster)
4. Take note of your logged in library
5. Search for an item where the home library is NOT the same as your logged in library
6. Edit this item and give it a lost status
7. Check in the item
8. Notice the item is returned and a transfer is automatically triggered
9. If you go to the item record page, the lost status has been remove

10. Apply the patch and restart services

11. Edit the item again and give it a lost status. This will also cancel the transfer
12. Check in the item
13. Confirm the transfer is NOT triggered and the lost status is retained as expected.
14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block")
15. Check in the item
16. Confirm the transfer is triggered and lost status is removed

17. Confirm tests pass

prove t/db_dependent/Circulation/Returns.t
prove t/db_dependent/Circulation/Branch.t

Sponsored-by: Pymble Ladies' College
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 930ad0178d41483672ec52fc8bedc94fe0dacc5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fc777d84a4b3e5064a41f48b19b6057906d0f4c5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35696: Fix regression caused by bug 33167
Martin Renvoize [Thu, 4 Jan 2024 16:25:35 +0000 (16:25 +0000)]
Bug 35696: Fix regression caused by bug 33167

A case was missed when switching from item.transfer.field to just
transfer.field.

This meant that the daterequested date wasn't getting filled properly in
the UI.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1f16ac11e228770872b0d2f40538e7816c03940c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a3ac46b388a8015fecaac074f7a3856e6d677784)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35629: Remove redundant code
Pedro Amorim [Thu, 21 Dec 2023 16:12:22 +0000 (16:12 +0000)]
Bug 35629: Remove redundant code

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9149dc4d06286779670013a34e005a7c3f90f0b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8810cffc0f775264381538db61d38368a0763c6a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 34900: (follow-up) Add version information to more entries
Owen Leonard [Tue, 19 Dec 2023 19:07:41 +0000 (19:07 +0000)]
Bug 34900: (follow-up) Add version information to more entries

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit dbc206082204ca99a8285479e6fe2aec94eb4dcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a2dc5d7bf182925323b8c6b469f406cb71046dd0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 34900: (follow-up) List alphabetically and tidy ups
David Nind [Sun, 3 Dec 2023 19:18:42 +0000 (19:18 +0000)]
Bug 34900: (follow-up) List alphabetically and tidy ups

Listed in alphabetical order (except for Koha, which is listed
at the start).

Tidy ups and consistency changes:
- end of each entry: remove full stops
- separator between software and license: use a colon
- headings for software/library name: use sentence case
  unless a noun, abbreviation, or the actual software name
- http and https: use https where site uses it
- URLs: update where required
- license names: use consistent full names with title case

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4cb2f7f2dbec601ea9e899bc85853c0c29ed2a67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3c24c5afb2d1a0f88a5345ab0a23d2b0e8ee05da)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 34900: (follow-up) Correct last entry
Owen Leonard [Fri, 1 Dec 2023 13:05:58 +0000 (13:05 +0000)]
Bug 34900: (follow-up) Correct last entry

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 99e57919946a0693f5ddeb5fd2e40a6044c8835f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a670c4cd3c5e8bf6620197c8cf369e2b28659764)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 34900: Simplify text of about page license information
Owen Leonard [Thu, 26 Oct 2023 10:35:12 +0000 (10:35 +0000)]
Bug 34900: Simplify text of about page license information

This patch simplifies the language describing third-party libraries and
their licenses so that translation are not so complicated.

The patch also removes information about some assets which are no longer
part of Koha.

The license information now lists only the library name, version (if
possible) and license.

To test, apply the patch and go to the about page in the staff
interface. Open the "Licenses" tab and check the content.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 84f18c3cc2815c7fb80a0e1e8f2b39adbdd7f17d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8f4c60372b66fa88e728e4b9207102a489f37e3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35070: Fix get_enabled_plugins when database is not created yet
Julian Maurice [Fri, 5 Jan 2024 08:04:33 +0000 (09:04 +0100)]
Bug 35070: Fix get_enabled_plugins when database is not created yet

Koha::Plugins::get_enabled_plugins is called by Koha::Plugins::call
which is called by C4::Templates->new, which is used in the web
installer when the database is not created yet

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3df1cb33c277925b689b1e45c736ea8532bffdff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fec97b4ae8de760cb62b9d9c79c91823b97da6f2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35070: (QA follow-up) Fix missing TT filter
Katrin Fischer [Thu, 4 Jan 2024 15:35:46 +0000 (15:35 +0000)]
Bug 35070: (QA follow-up) Fix missing TT filter

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c3d78bc35aa6e46ff27a6c622deb497c134e913f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8df06a8cd5e658f9a8e04e82ec5122228896cf8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35070: Add test verifying plugins cannot override core templates
Julian Maurice [Mon, 18 Dec 2023 07:36:12 +0000 (08:36 +0100)]
Bug 35070: Add test verifying plugins cannot override core templates

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2233c230b2dc01dfd4e3624ba846cad252988d0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 829ef649c0932f21360a7540cc667a674e6b4d8c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35070: Tidy
Tomas Cohen Arazi [Fri, 15 Dec 2023 19:58:00 +0000 (16:58 -0300)]
Bug 35070: Tidy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 21fd8644163a171374f6f1a361b452c72eb69b26)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cd2e54f6e198ec72292fb7a67b1b1c38650e5513)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35070: Add plugin hook template_include_paths
Julian Maurice [Wed, 18 Oct 2023 14:24:52 +0000 (16:24 +0200)]
Bug 35070: Add plugin hook template_include_paths

It allows to add paths to Template::Toolkit's INCLUDE_PATH option

http://template-toolkit.org/docs/manual/Config.html#section_INCLUDE_PATH

Test plan:
1. Install the modified kitchen sink plugin:

    git clone --branch template-include-paths \
    https://github.com/jajm/dev-koha-plugin-kitchen-sink.git

2. Run misc/devel/install_plugins.pl
3. Restart memcached and koha
4. Go to Administration -> Manage Plugins
5. Run the KitchenSink plugin's tool
6. Click on "Schedule greeting"
7. Go to Administration -> Manage jobs
8. If you don't see any jobs, uncheck "Current jobs only"
9. You should see a job of type "Unknown job type
   'plugin_kitchensink_greeter". Click on the "View" button
10. Under the Report section you should see "This is the report block"
11. Under the Detailed messages section you should see "This is the
    detail block"
12. Open the browser console, you should see a message "This is the js
    block"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5047e0761cbb975c262c96cf395e6d6285fdb3c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fe5b461cbf127916ae9b2c1c0577541ff4d7e29f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35698: (bug 32162 follow-up) fix bug number in db rev
Jonathan Druart [Thu, 4 Jan 2024 08:54:00 +0000 (09:54 +0100)]
Bug 35698: (bug 32162 follow-up) fix bug number in db rev

Should be 32162, not 31162.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bc8a9b36ab7d6e796685b9fd89807252a3a603fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6694512cf0a9de5ee8b12b0341a8affcd2d212d5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35658: Fix misaligned collectionFormat in patron_holds.yaml
Tomas Cohen Arazi [Thu, 28 Dec 2023 13:16:33 +0000 (10:16 -0300)]
Bug 35658: Fix misaligned collectionFormat in patron_holds.yaml

This patch fixes a silly typo.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 54b07ffc1808082aee868a01ce4d670438309996)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 104c6bf1ccd6ac7ce96ca8d1fb2f913ecbcffed4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 28012: (QA follow-up) Use form validation for numbering patterns
Katrin Fischer [Wed, 27 Dec 2023 17:52:55 +0000 (17:52 +0000)]
Bug 28012: (QA follow-up) Use form validation for numbering patterns

Activates standard validation and error messages. Converts from
pattern check to digits class for "display order" field.

To test:
* Compare error message when leaving required fields empty
* Compare error message when entering wrong/false data in display order

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f816027ea15278c7ed4b738915e963e22ee5c2e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 452ab27397cf3023aab53b12904182871fa1f490)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 28012: (QA follow-up) Add numeric imput mode to display order field
Nick Clemens [Fri, 22 Dec 2023 15:24:04 +0000 (15:24 +0000)]
Bug 28012: (QA follow-up) Add numeric imput mode to display order field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49138a6df7ee69eb4e7dd35858eb7f1dc8625bae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9be82743f1b4e05072e03eaf037f2decbed9bddb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 28012: Creating numbering pattern: mark mandatory fields required
Joonas Kylmälä [Sat, 3 Sep 2022 11:08:50 +0000 (14:08 +0300)]
Bug 28012: Creating numbering pattern: mark mandatory fields required

If any of these fields were missing, notably the Numbering formula
then saving the new numbering pattern silently failed, it didn't give
any error but it didn't save any new pattern either.

Note that there is a plan to make description field optional, so even
if it currently is mandatory on the DB level we leave it optional
here (and due to people using production DB's in non-strict mode which
allows this to be optional).

To test:
  1) After applying this patch make sure all the 3 fields must be
  filled in
  /cgi-bin/koha/serials/subscription-numberpatterns.pl?op=new
  page and it cannot be saved without those.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a69b5e6ee99478e730be574178c30f950a09532e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 77e7e11c3a0963bef8d0295eca92f49759f1f3ec)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 28012: Use definedness test instead of bool when checking whether to null fields
Joonas Kylmälä [Sat, 3 Sep 2022 10:37:31 +0000 (13:37 +0300)]
Bug 28012: Use definedness test instead of bool when checking whether to null fields

Saving a new numbering pattern didn't work without having to fill all
the fields, even those that are not mandatory.

To test:
 1) Go to /cgi-bin/koha/serials/subscription-numberpatterns.pl
    and try creating a new pattern, notice that only Name and
    Description are mandatory after applying this patch
 2) Make sure editing existing numbering patterns still works

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 97aab6a98e05ed989e7cc719450d274c80e34bb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d4a81e4c2a40ed91513eb2877c79645e9192d32e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35588: Tidy up t/db_dependent/AuthorisedValues.t
Julian Maurice [Fri, 22 Dec 2023 13:18:12 +0000 (14:18 +0100)]
Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 002e02710b4ea0655ca445acda5c89e3ccd66151)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d95aa5163943e7e7e57215f65ab1cdfcc8f843e2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35588: Scope authorised value desc lookup according to field/subfield
David Cook [Mon, 18 Dec 2023 00:35:53 +0000 (00:35 +0000)]
Bug 35588: Scope authorised value desc lookup according to field/subfield

This patch ensures that the authorised value descriptions looked up
are for the correct field/subfield designated in the CSV profile.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following
for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|
111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|
505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995

3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;

5. Go to that list in the staff interface
6. Download that list using your CSV profile

7. Apply the patch
8. koha-plack --reload kohadev

9. Download that list using your CSV profile
10. Note that the output is a little slower, but still quick enough.
11. Note that the output is a bit different. For records like "Gairm",
the output will end in "1" instead of "Yes". This is correct, because
this subfield isn't an authorised value!!!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f53ebe874e74258e1465bc4ead3fdcd95008ca98)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6688687d93d6e382e14c65c7c80951b3fa74565d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35579: Add unit test
David Cook [Mon, 18 Dec 2023 00:11:32 +0000 (00:11 +0000)]
Bug 35579: Add unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ca754a2c5e8508ee8a3399fcbc8954aa23eda19b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 548c9ce885071bdc9398d10d64c71ecca3bab0c2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35579: Cache authorised value lookup by MARC field
David Cook [Fri, 15 Dec 2023 06:02:17 +0000 (06:02 +0000)]
Bug 35579: Cache authorised value lookup by MARC field

This patch adds a "get_descriptions_by_marc_field" method
which caches AuthorisedValue descriptions when searched by
MARC field, which is used when exporting MARC to CSV.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995|952|952$c
3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;
5. Go to that list in the staff interface
6. Download that list using your CSV profile
7. Apply the patch
8. koha-plack --reload kohadev
9. Download that list using your CSV profile
10. Note that the output is the same, but that the output completes much more quickly after applying the patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 78c0e8df8da008c87f28d9432e16790ce07eabc1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 423c24033999d2d098ae7c68956d3b583523500f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 31694: Add missing TT filters
Julian Maurice [Thu, 21 Dec 2023 14:22:42 +0000 (15:22 +0100)]
Bug 31694: Add missing TT filters

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47ffdaf6f4bf14faec49f64f9ee7d937584b2b20)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a3e35b0548d79033e3766b86f62152c790b69fe7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 31694: (follow-up) Use values for operations to avoid translation issues
Kevin Carnes [Thu, 13 Apr 2023 13:20:02 +0000 (15:20 +0200)]
Bug 31694: (follow-up) Use values for operations to avoid translation issues

    To test:
    * Try adding a preset rule that has an operation with different translations
      for the column and the pull down (e.g. Outrepasser for fr-CA)
    * Without the patch it appears as Custom (e.g. Personnalisé)
    * With the patch it appears correctly (e.g. Outrepasser)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e9c7f84896fe158894c86a682ef110723e5a4a44)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a0db31d75f873f849898a15359af534fceb31a2c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 31694: (follow-up) Fix preset display issue
Shi Yao Wang [Fri, 2 Dec 2022 21:06:35 +0000 (16:06 -0500)]
Bug 31694: (follow-up) Fix preset display issue

Preset column should now display the right preset.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 35ddacf397c6d2b7bd58b7adf9606fdeb24ef681)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d6511233b89ff267ab06606decf010fa9fdd1244)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 31694: (follow-up) Further improve translatability
Katrin Fischer [Mon, 24 Oct 2022 22:40:28 +0000 (22:40 +0000)]
Bug 31694: (follow-up) Further improve translatability

To test:
* Add rules fo different modules and with different settings
* Verify the saved module description for a saved rule matches the pull down
* Verify the saved filter matches the pull downs (especially for source and patron category)

Also:
* Renames 'User category' to 'Patron category'
* Remove some values from translations, that shouldn't be translated, like value attributs for options.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b1cd199aaa37e5c055f772b10b6015c6c3374fed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4595fdf0defb4ceacb9339573d4cc15b25c131c3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 31694: MARC overlay rules presets don't change anything if presets are translated
Caroline Cyr La Rose [Wed, 5 Oct 2022 19:48:46 +0000 (15:48 -0400)]
Bug 31694: MARC overlay rules presets don't change anything if presets are translated

This patch corrects option value names in MARC overlay rules to prevent
them from being translated.

To test:
1. Install a new language
1.1. In a terminal, run the following commands
gulp po:update
cd misc/translator
./translate install xx-XX
1.2. Go to Administration > Global system preferences
1.3. Search for language
1.4. In the language syspref check the box for the language you just installed
1.5. Save
2. In the staff interface in English, go to Administration > Record
overlay rules
3. In the column 'Preset' try the various options, note that the
'Added', 'Appended', 'Removed', and 'Deleted' settings change depending
on the chosen preset
4. Change the interface language
5. Redo step 3, notice that if the preset name is translated, the other
settings don't change
6. Apply patch
7. Redo step 3, the presets should now change the settings

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c5a98fe574d3b50382d5e0abaf1313b9317ad88f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1da66ccc1429d815c341faa7e789e9e7649fd24a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 31297: DBIC
Lucas Gass [Fri, 12 Jan 2024 20:38:37 +0000 (20:38 +0000)]
Bug 31297: DBIC

4 months agoBug 31297: DBRev 23.05.07.001
Lucas Gass [Fri, 12 Jan 2024 20:35:34 +0000 (20:35 +0000)]
Bug 31297: DBRev 23.05.07.001

4 months agoBug 31297: Allow null value for description in subscription_numberpatterns
Nick Clemens [Fri, 22 Dec 2023 14:52:04 +0000 (14:52 +0000)]
Bug 31297: Allow null value for description in subscription_numberpatterns

To test:
1 - Go to Serials
2 - Add a enw subscription
3 - Select Vendor and record, click next
4 - Select Numbring pattern: Number, or any to populate forms
4 - Click 'show advanced pattern'
5 - 'Modify pattern'
6 - Add a new name
7 - 'Save as new pattern'
8 - Nothin happens
9 - Check logs:
    C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Field 'description' doesn't have a default value at /kohadevbox/koha/serials/create-numberpattern.pl line 58
10 - Apply patch
11 - Update database
12 - Restart all
13 - Click save again
14 - Success!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Removed wrong 'out' from atomic update file.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f9b57c5342641e1b8efa68aa202857edadb8f605)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 17322360279a1a20e0e1f007847d1cb422df685a)

4 months agoBug 35489: [23.05.x] Add a hidden input for itemnumber even if item has no barcode
Nick Clemens [Tue, 5 Dec 2023 15:47:23 +0000 (15:47 +0000)]
Bug 35489: [23.05.x] Add a hidden input for itemnumber even if item has no barcode

This page is a single form, all fields must have inputs to avoid data loss/mismatch

To test:
1 - Find a record in the catalog and add or edit items to have one item with a barcode and one without
2 - Place an item level hold on the item with no barcode
3 - Place another hold for a different patron on the item with a barcode
4 - From the holds table add an expiration date to the hold with a barcode and save
5 - Note the hold on the item with no barcode is now on the item with a barcode and the other hold is now a next available hold
6 - Delete the holds
7 - Apply patch
8 - Repeat 2-4
9 - Confirm the itemnumbers for the holds have not changed

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35557: Remove references to unused PREF_LocalCoverImages
Julian Maurice [Fri, 22 Dec 2023 09:29:59 +0000 (10:29 +0100)]
Bug 35557: Remove references to unused PREF_LocalCoverImages

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f7ea515bcc37fc7c2b93683d6cf15c2fa6018722)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 31a356afd35a8c8e48947faab7599089ab0500ed)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35557: Remove LoadResultsCovers
Jonathan Druart [Wed, 13 Dec 2023 09:32:12 +0000 (10:32 +0100)]
Bug 35557: Remove LoadResultsCovers

The JS function LoadResultsCovers is not used from the Staff interface.

It is supposed to load the local cover images in JS but actually we are embedding the thumbnail in the img tag.

Test plan:
Confirm that LoadResultsCovers was called but had no effect.
Note that the selector ^local-thumbnail only exists in shelfbrowser.inc

but results.js is only used from results.tt (not shelfbrowser.inc)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4e66aa8065803fb2829db988ca1f4c71cc641137)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43fb9f9c7ab850db8277e60f436514746187f2d6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35547: Show public "staff only" lists in addbybiblionumber.pl
Kyle M Hall [Tue, 12 Dec 2023 15:27:07 +0000 (10:27 -0500)]
Bug 35547: Show public "staff only" lists in addbybiblionumber.pl

When adding an item to a list from catalogue/detail.pl, we can see the
latest 10  public lists. If all those lists are set as "staff only" for
"Allow changes to contents from" they will not show up in the
addbybiblionumber.pl popup. This is because the query in the popup does
not look for "staff only" lists while the "Add to list" button does.

Test plan:
1) Create 11 "staff only" lists as staff member A
2) Log in as staff member B
3) Find a record, click the "Add to list" button, note you can see lists
   2 through 11 here
4) In the pulldown, choose the "More lists" option
5) Note those lists are not visible in the "Choose list" pulldown under
   "Select an existing list"
6) Apply this patch
7) Restart all the things!
8) Click the "More lists" option again
9) Those lists should now be in the pulldown!

Signed-off-by: sabrina <kiehl@mpis.mpg.de>
Signed-off-by: Mikko Liimatainen <mikko.liimatainen@turku.fi>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5961e5c2a3c9c46461fe563b85b0d94bd0df195c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 39b75d3da03ceae6bd11d2e0f09c1fcff015eef6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35619: Fix validation error alignment in change password form
Owen Leonard [Wed, 20 Dec 2023 16:50:40 +0000 (16:50 +0000)]
Bug 35619: Fix validation error alignment in change password form

Bug 31829 made a change to the change password form in the staff
interface to accommodate a gap in the CSS following the staff interface
redesign. This gap has been fixed, so we don't need a double class on
the fieldset.

With this change, the "hint" div can also be put back into place.

To test, apply the patch and locate a patron record in the staff
interface.

 - Click the "Change password" button on the patron detail page.
 - Confirm that the form layout looks correct.
 - Enter mismatched passwords in the "New password" and "Confirm new
   password" fields and click "Save"
   - The validation error message should be aligned to the right of the
     input field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 46b0b41e09a6ad29b5fce8b56e08dd3922cf394b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7378b18f78a671bfb1cc1a4cc00775e8fe0501e9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35455: Remove = in ICU for indexing/searching
David Cook [Fri, 1 Dec 2023 02:36:56 +0000 (02:36 +0000)]
Bug 35455: Remove = in ICU for indexing/searching

This change more closely aligns ICU and CHR so that ICU also
removes the = character. This fixes issues in ICU when searching
with a : which gets transformed into a =. Without this change,
the Analytics features won't work for titles with a colon in them.

Test plan:
0. Apply the patch and import bibs from Bugzilla (using Staged MARC tools)
1. cp ./etc/zebradb/etc/phrases-icu.xml /etc/koha/zebradb/etc/phrases-icu.xml
2. cp ./etc/zebradb/etc/words-icu.xml /etc/koha/zebradb/etc/words-icu.xml
3. vi /etc/koha/zebradb/etc/default.idx
Change "charmap word-phrase-utf.chr" to "icuchain words-icu.xml" for "index w"
and "icuchain phrases-icu.xml" for "index p"
4. koha-zebra --stop kohadev
5. pkill zebrasrv
6. koha-zebra --start kohadev
7. koha-rebuild-zebra -a -b -f -v kohadev

8. Search for "Awesome title" and open the detail page
9. Note that the "Analytics: Show analytics" line shows up
10. Click that link
11. Note that it opens the "Cool article" record and it displays
"In: Awesome title: awesome subtitle"
12. Click that link
13. Note that it opens the "Awesome title" record

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7375d82c408ad6963cf3f3cae060b9376ffca91a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5035e12440ba7ae576de0eec10d17e20d300eb42)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35493: Do not show housebound roles as collapsible unless the housebound module...
Lucas Gass [Tue, 5 Dec 2023 17:09:26 +0000 (17:09 +0000)]
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on

To test:
1. HouseboundModule - disabled
2. CollapseFieldsPatronAddForm, add 'Housebound roles'
3. Edit/create a patron.
4. Notice the useless Housebound roles link at the top of the page
5. APPLY PATCH
6. Try 1 - 3 again, this time no Housebound roles at the top ( Show collapsed fields )
7. Turn on HouseboundModule and make sure it now shows

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49f30ad6ed5f36a6c2e570ab52b8ea2ae7ca8f19)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 83c18ad1c6a3079cae8eff34f1f4712fca8c4f04)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 34644: (follow-up) Additional edits to description
David Nind [Wed, 30 Aug 2023 00:15:26 +0000 (00:15 +0000)]
Bug 34644: (follow-up) Additional edits to description

Linked system preference in description to cross reference, and
and removed the spaces in the bracketed text.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5cd21f1139269f5e045d759c31ee98a1ad0915cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8d724b82c156538c5d30006e97fb00344e7710f0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 34644: replacementprice is support by MarcFieldsToOrder but is not listed
Kyle M Hall [Tue, 29 Aug 2023 18:20:19 +0000 (14:20 -0400)]
Bug 34644: replacementprice is support by MarcFieldsToOrder but is not listed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 341b90b2eefb62a8f2d776f204221083292c2b86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 26fb50672fd3789bb97ff2dd749dd91f65d704f8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 34644: Improve readability of sysprefs
Kyle M Hall [Tue, 29 Aug 2023 17:53:16 +0000 (13:53 -0400)]
Bug 34644: Improve readability of sysprefs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 61e8073b020746d797a14466cd78b963500bfeb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b5b2d1b678a56d868cf3bd9e0d10b23c5bea39c8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 34644: Add clarifying text to sysprefs to indicate that MarcFieldsToOrder is...
Kyle M Hall [Tue, 29 Aug 2023 17:48:30 +0000 (17:48 +0000)]
Bug 34644: Add clarifying text to sysprefs to indicate that MarcFieldsToOrder is a fallback to MarcItemFieldsToOrder

Clarify that fields will fall back to MarcFieldsToOrder from MarcItemFieldsToOrder.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 884039bd5af43ffc83aaf1ef93500c6ab56efc2a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5b54a01fa86a52b354fabfc23ae187502933b347)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35600: Prevent checkouts table to flicker
Jonathan Druart [Tue, 19 Dec 2023 10:45:59 +0000 (11:45 +0100)]
Bug 35600: Prevent checkouts table to flicker

The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

This patch makes the table hidden by default, and show it if/when needed

Test plan:
Check an item out, see the checkouts list view
Play with "Always show checkouts automatically", refresh the page
=> UI should behave better than before this patch

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6c8beb2f2ed566dc2e6645d99f2ef0e80eaf726b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 703ee190d94326538d8121563e5dee76aa5b2950)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35491: Add logging to RevertWaitingStatus
Nick Clemens [Tue, 5 Dec 2023 16:27:44 +0000 (16:27 +0000)]
Bug 35491: Add logging to RevertWaitingStatus

This patch simply adds a logaction line to RevertWaitingStatus

To test:
1 - Enable HoldsLog
2 - Place a hold
3 - Fill the hold
4 - Revert the waiting status
5 - Note there is no action log added
6 - Apply patch
7 - Repeat 2-4
8 - Confirm you now have a MODIFY action logged for the reversion

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4e42f1182d14dd0658c984930c11ea3c952b8051)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5ca5900f911ab483cb7bd6bda352399977148481)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 33847: Database update replaces undefined rules with defaults rather than the...
Kyle M Hall [Fri, 26 May 2023 15:42:08 +0000 (15:42 +0000)]
Bug 33847: Database update replaces undefined rules with defaults rather than the value that would be used

Bug 29012 introduces a database update that sets the default values for rules that are required but undefined. This functionally changes the results of the circulation rules.

Instead, this update should find value that is being used for that rule combo and use that as the rule value, only using the default in the case that the derived rule doesn't exist or has a null value.

Test Plan:
1) Check out Koha 22.05.05
2) Create a default all/all/all rule, 3 other rules. Ensure they all have Loan period set to 7, with one of the non-default rules having a Loan period of 14.
3) Delete all but one of the non-default rules with the following query:
   Delete from circulation_rules where rule_name  = 'issuelength' and ( rule_value != 14 and not ( branchcode is null and categorycode is null and itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the all/all/all rule!

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Bug 33847: Rewrite to use SQL

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed, and added reference to new bug too
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f6f2d1ae41ef83629cb25c684d261f98238fe051)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8b04a3f642576a5ad3a06c8ef22b42cada75726e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 30287: (follow-up) Make unit test more reliable in ktd
Martin Renvoize [Sat, 11 Nov 2023 11:06:32 +0000 (11:06 +0000)]
Bug 30287: (follow-up) Make unit test more reliable in ktd

This patch mocks NoticeCSS earlier to ensure we're not inadvertantly
failing due to a local setup in ktd having added to the preference.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 12e90c8b7d08a927c5fbc2c07792f78d6880cde2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 52772da921c9ad71abcbaab7223b60f5a9ac48de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 30287: (follow-up) Unit test for html_content
Martin Renvoize [Wed, 8 Nov 2023 09:38:18 +0000 (09:38 +0000)]
Bug 30287: (follow-up) Unit test for html_content

This patch adds a unit test for the new `html_content` method introduced
to Koha::Notice::Template in the previous patch.

Test
1) Run the new unit test ;P

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c260f4a374c3e3fcb335e997842ffb2fa1bd444a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f89d178b063698b643c62b38b93924039b722d94)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 30287: (follow-up) Add content wrap matching send time
Martin Renvoize [Mon, 6 Nov 2023 14:00:21 +0000 (14:00 +0000)]
Bug 30287: (follow-up) Add content wrap matching send time

This patch adds a new method to the Koha::Notice::Message class to wrap
content in the same way we currently do at email send time. We then
update the notice preview to use this method so we're embedding
NoticeCSS into that iframe. This means the generated preview should now
exactly match how your notice will display in email clients including
any CSS you may have placed within NoticeCSS.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fixed typo in POD of html_content

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a09986ea51eb0104b006fac40d1dc7e2f6cdeeab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1dc33325041b5c2f94bc0d7acdecb101de16b98c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 30287: Conditionally render notice preview
Martin Renvoize [Mon, 6 Nov 2023 12:50:05 +0000 (12:50 +0000)]
Bug 30287: Conditionally render notice preview

This patch adds conditional formatting based on whether the notice was
generated from an HTML template or a plaintext one. We simply drop the
'html_line_break' filter for the case where the notice should already be
html formatted.

I was tempted to replace the html_line_break for plaintext formatted
notices too as I believe this closer resembles how we actually output
such generated notices.. but I decided that should be for another bug.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f83b9ab1ffc7e703804bdc52f30e1994984180b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ebf8e267aca64be7ea8b0741f3d4b7d23a7a6dac)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35309: Remove DT's fnSetFilteringDelay
Jonathan Druart [Wed, 15 Nov 2023 10:44:37 +0000 (11:44 +0100)]
Bug 35309: Remove DT's fnSetFilteringDelay

On bug 35284 we added the delay on the column filters using dt's
throttle builtin function.

From doc:
https://datatables.net/plug-ins/api/fnSetFilteringDelay
"""
Please note that this plug-in has been deprecated and the dt-init searchDelay option in DataTables 1.10 should now be used. This plug-in will not operate with v1.10+.

Test plan:
Note that column filtering still work as before (test on different
tables, see bug 35284 for the list)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8bb8282d6868b458237fe2b0638dc810c116077b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 967ed52dd23bd8e4ba598ffe20a2fbdf2708aaf7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35405: Remove noise from MARC::Record in SearchAuthorities
Marcel de Rooy [Mon, 27 Nov 2023 15:12:41 +0000 (16:12 +0100)]
Bug 35405: Remove noise from MARC::Record in SearchAuthorities

We are calling ->field with an undef parameter.
MARC::Record does not like that and says:
  Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202.
For now, a fix at our side.

Test plan:
Run SearchAuthorities without passing an authtypecode.
Without this patch, it results in a warning per hit.
With this patch, the noise should be gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ac02c1d2adc883cc6ff6b749c271cb165d337436)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 30213b67aed36719c20ec28539d90e300601eee5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35204: Prevent an expired password from throwing a 500 error
Matt Blenkinsop [Wed, 6 Dec 2023 10:03:45 +0000 (10:03 +0000)]
Bug 35204: Prevent an expired password from throwing a 500 error

Currently when a patron with an expired password is authenticated via the API a 500 error is returned rather than a 400 "Validation failed" error. This patch catches the return value for an expired password and returns the validation failure before the patron search is attempted.

Test plan:
1) Choose a patron and set their password expiry date to a date in the past
2) Send a request to auth/password/validation as an authenticated user with that patron's details
3) The response should be a 500 error
4) Apply patch
5) Repeat steps 1-3 and this time the response should be a 400 code with an error message of  "Password expired"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f3bb88505245228d97a4e39612b17a688df64a79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit df9d4b0f55fa6b4c430a77686d8e00804eed88de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35204: Add unit tests
Matt Blenkinsop [Mon, 18 Dec 2023 11:00:06 +0000 (11:00 +0000)]
Bug 35204: Add unit tests

prove t/db_dependent/api/v1/password_validation.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 711f9a041a706ed3f025afd6da0259879396ea58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 86be92a6084d4475b004f6ffce2e14fb21917f50)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35496: (QA follow-up): tidy up code
Victor Grousset/tuxayo [Wed, 13 Dec 2023 15:38:09 +0000 (16:38 +0100)]
Bug 35496: (QA follow-up): tidy up code

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d0732252ab3e0ed854dce800018c01ccbad89c2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1c2269488c6e5982d2788fa558204a4befa8b13)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35496: Open article requests tab by default on opac-user.pl after placing an...
Lucas Gass [Tue, 5 Dec 2023 18:04:47 +0000 (18:04 +0000)]
Bug 35496: Open article requests tab by default on opac-user.pl after placing an article request

To test:
1 - Turn on ArticleRequests
2 - Place an  Article Requests on the opac
3 - Note after placing the request the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-article-requests
4 - Note the article request tab is not active
5 - APPLY PATCH and restart_all
6. Try steps 2 - 4 again, this time the article request tab should be open by default.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 33ba9c270173703181e4c7f6e03656eea29c0b27)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7ad7038936af4adf3cd57f1f2339f5a6adf850ce)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35495: Open holds tab by default on opac-user.pl after cancelling a hold
Lucas Gass [Tue, 5 Dec 2023 17:47:50 +0000 (17:47 +0000)]
Bug 35495: Open holds tab by default on opac-user.pl after cancelling a hold

To test:
1 - Go to the opac-user.pl page for a user with some holds and cancel a hold.
2 - Note after placing the hold the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3 - Note the holds tab is not active
4. APPLY PATCH and restart all
5. Now after cancelling a hold, the refreshed page should have an active hold tab.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cc9e40869af83f1eff4f54577a48050f628c9a5c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d4c0bd27f737885e1562e4ff07cc41ebbc378ffe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35492: Open holds tab by default on opac-user.pl after suspending a hold
Lucas Gass [Tue, 5 Dec 2023 16:50:37 +0000 (16:50 +0000)]
Bug 35492: Open holds tab by default on opac-user.pl after suspending a hold

To recreate:
1. Go to the opac-user.pl page for a user with some holds and suspend
   a hold.
2. Note after placing the hold the URL is:
   http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3  Note the holds tab is not active
4. APPLY PATCH and restart all
5. Now after suspending a hold, the refreshed page should have an active
   hold tab.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9076f0ba3d11875028e87fae314ae993c196cb2a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3259bcf9794762283e80a8bec28dc3594accba1b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35488: Open holds tab by default on opac-user.pl after placing a hold
Lucas Gass [Tue, 5 Dec 2023 16:40:15 +0000 (16:40 +0000)]
Bug 35488: Open holds tab by default on opac-user.pl after placing a hold

1 - Place a hold on the opac
2 - Note after placing the hold the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3 - Note the holds tab is not active
4 - APPLY PATCH and restart_all
5 - Try steps 1 - 3 again, this time the holds tab should be opened.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d8bd46d0d7dcc80ece69f3c8f869ec7113401d65)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ce728a04f9adb66c2ed9bc180e30196c4034b4a3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35428: Remove temporary files for gulp po tasks
Jonathan Druart [Wed, 29 Nov 2023 09:02:50 +0000 (10:02 +0100)]
Bug 35428: Remove temporary files for gulp po tasks

gulp po:update will generate 1 /tmp/koha-* directory per task.

We need to remove them when the script does not longer need them.

Test plan:
0. Do not apply this patch
1. ls -ltr /tmp
2. gulp po:update --lang es-ES
3. ls -ltr /tmp
=> Notice new koha-* directories
Repeat 2, 3
4. Apply this patch and try again
=> No new directories when the job is done

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ba7b62d1fc171f346176cd454f86747fea7928f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a4a2d02d3c2d6aa8dab3def86800a467a01fc66d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35498: Allow tab to indent lines and trigger autocomplete
Matt Blenkinsop [Wed, 6 Dec 2023 15:13:20 +0000 (15:13 +0000)]
Bug 35498: Allow tab to indent lines and trigger autocomplete

This patch allows the tab key to indent lines as well as trigger autocomplete.

Test plan:
1) Apply patch, navigate to reports and create a new SQL report
2) Click in the text editor and press tab, it should indent and then trigger the autocomplete options
3) Type something to select from the autocomplete box and press tab - it should autocomplete that option
4) Type any word and then press space. Now press tab and it should indent again

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f9b3866ebfa78b39dcf6aac6ef4c0e1a5679f7f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ef1255372d01302e5605c005dfb37749f714ed18)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35310: Show current renewal value of the currently active check out
Pedro Amorim [Fri, 10 Nov 2023 11:31:28 +0000 (11:31 +0000)]
Bug 35310: Show current renewal value of the currently active check out

Test plan, with the previous 2 patches applied:

1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on 'View' in front of 'Current renewals'
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice it shows the renewals as expected
5) Return the same item: 39999000003192
6) Repeat 1) to 3). Notice it shows 2 current renewals even tho only 1 corresponds to the currently active check out
7) Renew again. Notice it shows 3 current renewals even tho only 2 correspond to the currently active check out
7) Apply this patch. Notice it now only shows 2 current renewals

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e756faf860c7475e2761e45f3ebc152c34a2d036)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b242a03a30943eda94762374e3526b14c2f57ebd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35310: Only show 'Current renewals' link if item is currently checked out
Pedro Amorim [Fri, 10 Nov 2023 11:01:58 +0000 (11:01 +0000)]
Bug 35310: Only show 'Current renewals' link if item is currently checked out

1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on "View" in front of "Current renewals"
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice it shows the renewals as expected
5) Return the same item 39999000003192
6) Repeat 3). Notice it never loads renewals and network console shows HTTP error 400
7) Apply this patch. Repeat the test plan. Notice the 'Current renewals' no longer shows for the item because it is no longer checked out, so whatever past renewals are no longer 'current'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ebba646b46455d308cf9e8777bd9af92080156ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 467626119ad739330e2fec4c7b111ab3a4b520f9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoBug 35310: Only show 'Current renewals' <li> entry if there are current renewals
Pedro Amorim [Fri, 10 Nov 2023 11:00:55 +0000 (11:00 +0000)]
Bug 35310: Only show 'Current renewals' <li> entry if there are current renewals

'Current renewals' is always showing, even if empty.

Test plan:
1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on "View" in front of "Current renewals"
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice all items have the 'Current renewals' label entry, but only the checked out item in step 1) has the 'Current renewals' label entry
5) Apply patch. Notice only the item with current renewals is showing the 'Current renewals' label entry with the respective value.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 942c4a0535dbbf46746e849758d7dfc741187bec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9eacb4b40f1c35d2e713ef04ca376ace44408eef)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoUpdate release notes for 23.05.07 release v23.05.07
Lucas Gass [Wed, 3 Jan 2024 14:56:41 +0000 (14:56 +0000)]
Update release notes for 23.05.07 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 months agoIncrement version for 23.05.07 release
Lucas Gass [Wed, 3 Jan 2024 14:06:33 +0000 (14:06 +0000)]
Increment version for 23.05.07 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 34091: Fix typo log-modules in help for cleanupdatabase.pl
Fridolin Somers [Fri, 1 Dec 2023 17:55:57 +0000 (07:55 -1000)]
Bug 34091: Fix typo log-modules in help for cleanupdatabase.pl

This parameter is actually --log-module.

Test plan :
Run misc/cronjobs/cleanup_database.pl -h
Confirm you see --log-module

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 289e06edea3284ddc5b61c57a4a62a657328c3f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 22d44fd2f24ea71de31f76fc2ed4f78fe725845e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35436: Copy is not translatable in OPAC Search History
Adolfo Rodríguez [Thu, 30 Nov 2023 10:12:13 +0000 (11:12 +0100)]
Bug 35436: Copy is not translatable in OPAC Search History

Test plan
1 Enter in OPAC Search History in a language other than English and
  check that Copy is not translated
2 Apply patch, restart services
3 Regenerate the templates for that language
4 Repeat step 1 and check that Copy appears now translated

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e3f961777786b0ebae9fa76d50e8c40a4cb664e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 118da7f0b3a2fc7f2e00ceed5774a6a7e4ddc680)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35344: Warn on patron image upload if missing cardnumber
David Cook [Thu, 16 Nov 2023 05:08:30 +0000 (05:08 +0000)]
Bug 35344: Warn on patron image upload if missing cardnumber

This change displays a warning message instead of the patron image
upload feature in the patron record when the patron is missing the
cardnumber.

Without this change, the staff user can try to upload a patron image
but it will silently fail. This change warns the staff user of the
cardnumber requirement for patron image upload.

Test plan:
0. Apply the patch
1. Enable the "patronimages" system preference
2. Go to http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
3. Click "Add" over the patron image placeholder
4. Note the "Upload photo" button and the ability to take a patron photo if your
device has a camera
5. Remove "cardnumber" from BorrowerMandatoryField
6. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
7. Edit the patron to remove the cardnumber
8. Click "Add" over the patron image placeholder
9. Note that no patron image upload features appear. Instead, only
a warning appears stating that the patron needs a cardnumber before
the patron image upload can be performed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 855b8bc66e3bf1d012d0caeab938556eb520fd51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0a8908bddb1a75f539e596893a257de0aac24fa6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35414: Silence warn related to number_of_copies
Magnus Enger [Wed, 29 Nov 2023 13:58:08 +0000 (14:58 +0100)]
Bug 35414: Silence warn related to number_of_copies

To test in ktd:
- Tail the logs with "sudo tail -f /var/log/koha/kohadev/plack*.log"
- Find a record in the staff client
- Add an item to the record
- Observe "[WARN] Argument "" isn't numeric in subroutine entry ..."
  in /var/log/koha/kohadev/plack-intranet-error.log
- Apply this patch
- restart_all
- Tail the logs again
- Add another item
- Observe the absence of the earlier warning

Thanks to Jonathan Druart for suggesting this particular solution!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8ba9ea8a87e0d6653261d90d743cd75328ad0b99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aad41dd27a37ab42a6aa9606d56a031b6f67a180)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 34516: Upgrade database fails for 22.11.07.003, points to web installer
Kevin Carnes [Mon, 27 Nov 2023 08:40:55 +0000 (09:40 +0100)]
Bug 34516: Upgrade database fails for 22.11.07.003, points to web installer

MySQL requires key length for indexes of text columns, while MariaDB
sets it automatically for utf8mb4.

Test plan:
1. Setup Koha to use MySQL (e.g. ku-my8)
2. Downgrade database with the following commands (e.g. koha-mysql
   kohadev):
   ALTER TABLE `biblioitems` MODIFY COLUMN `publishercode` varchar(255);
   ALTER TABLE `biblioitems` DROP INDEX `publishercode`;
   ALTER TABLE `biblioitems` ADD INDEX `publishercode` (`publishercode`);
   ALTER TABLE `deletedbiblioitems` MODIFY COLUMN `publishercode` varchar(255);
   ALTER TABLE `deletedbiblioitems` DROP INDEX `publishercode`;
   ALTER TABLE `deletedbiblioitems` ADD INDEX `publishercode` (`publishercode`);
   UPDATE systempreferences SET value="23.0600006" WHERE variable = "Version";
3. Attempt to upgrade the database (e.g. koha-upgrade-schema kohadev)
4. Notice the error about "key specification without a key length"
5. Apply patch
6. Attempt to upgrade the database (e.g. koha-upgrade-schema kohadev)
7. Notice that the database is upgraded
8. Sign off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Perltidied the database update file.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4c6517767a86947361b81e0f718ec3833c5d5a33)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b07a87ae43f578c30e752933e9ad5a5a8871fd73)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35408: Fix import job link
Jonathan Druart [Tue, 28 Nov 2023 08:11:43 +0000 (09:11 +0100)]
Bug 35408: Fix import job link

After importing titles from a list there is a link to the background job
that is displayed.
This link points to /cgi-bin/koha/admin/background_jobs/:id
There is a route to this path in routes/erm.js, to redirect to the
correct URI /cgi-bin/koha/admin/background_jobs.pl?op=view&id=:id
However this link will not work if we are accessing it from outside the
ERM app/module, or if we are opening it in a new tab/window.

The idea was interesting, but does not work...

Test plan:
Create a new ERM local package, a new list (virtual shelf), add some
items to the list.
Go to E-resource management > eHoldings > Local > Titles > Import from a list
Click "import"
Notice the "see job" link and click it

=> Confirm that with this patch applied you can open it in a new tab
without getting a 404

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 09d5355ffb6381b531b5d42cc97b17c1e9790da4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 32eccd89749d6fa3f5d71cc01be79c00dda0dddf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35352: Allow SMSalertnumber to be hidden via BorrowerUnwantedField
Lucas Gass [Thu, 16 Nov 2023 14:58:56 +0000 (14:58 +0000)]
Bug 35352: Allow SMSalertnumber to be hidden via BorrowerUnwantedField

To test:
1. Add a value to SMSSendDriver like 'Emial'.
2. Go to BorrowerUnwantedField and attempt to hide "Mobile phone number (smsalertnumber)"
3. Go to members/memberentry.pl and see the field is not hidden.
4. APPLY PATCH
5. Try step 3 again and this time the field should be properly hidden.

Note: This patch also includes some indentation changes.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6aa971be01987e041dcb55a71ad2f36e3f2c40d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2aaadaad09e96d982bef65f66c553b8630fd73e3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35410: Use "Online resources" label in search results
David Nind [Mon, 4 Dec 2023 03:23:03 +0000 (03:23 +0000)]
Bug 35410: Use "Online resources" label in search results

Update the staff interface and OPAC XSLT files to use
"Online resources" as the label in search results, instead of
"Online access". This matches the label used in the detail page
for a record.

Test plan:
1. Search for perl in the staff interface and OPAC (or add to
   an existing record a URL to 856$u with 4 for the first
   indicator).
2. For any search result that displays the "Online access" label,
   view the detail page for the record.
3. Note that the detail page uses the label "Online resources".
4. Apply the patch and restart_all.
5. Repeat steps 1 and 2.
6. Note that the search result pages now show "Online resources" for
   the label, matching the detail page.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6c8ad081a610b6e6b9cdbd3fdd519a2ca4dce3a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c5f9158dca9804847ee7e74080e16e8d1ef41825)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35453: Fix wrong 'Laserdisc)' string on 007 builder (MARC21)
Tomas Cohen Arazi [Thu, 30 Nov 2023 12:46:48 +0000 (09:46 -0300)]
Bug 35453: Fix wrong 'Laserdisc)' string on 007 builder (MARC21)

Steps to reproduce:
1. On cataloguing, open the 007 builder.
2. Choose material type 'Video recording'
3. On 04 choose g - Laserdisc
4. Click save
=> SUCCESS: 'g' correctly shows on the 007
5. Edit the 007 again
=> FAIL: on 04, 'g - Laserdisc)' is displayed
6. Apply this patch
7. Repeat 4 and 5
=> SUCCESS: no trailing ')'
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f48ef52cfc786bd969ceb03a782b037a10d854d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0659f6afd28c1e6e2e9f79f12e711381f9931382)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35441: Fix typo 'UniqueItemsFields' system preference
Fridolin Somers [Wed, 29 Nov 2023 19:13:38 +0000 (09:13 -1000)]
Bug 35441: Fix typo 'UniqueItemsFields' system preference

Typo in message :
NOTE: Fields listed in the 'UniqueItemsFields' system preference will not be copied

The preference is Item without 's' : 'UniqueItemFields'

Test plan :
1) Check system preference 'UniqueItemFields' contains values
2) Go to acquisition to create a new order from new record
3) Check the note you see with the system preference

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 08cc74a9b60d85fcdf5b3febfa5653111a16d9ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0aea3a0f42f79768725933c2b552334a4dc8ef09)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35327: Fix capitalization of language name
Lari Taskula [Mon, 13 Nov 2023 23:21:17 +0000 (23:21 +0000)]
Bug 35327: Fix capitalization of language name

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Updated opac to OPAC.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8c309ea53d4422b53641a2b7fbd46310df7d9fb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fed4126e5ce6a7ee97324b3733ba06b647db814f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoUpdate release notes for 23.05.06 release v23.05.06
Fridolin Somers [Tue, 28 Nov 2023 19:02:20 +0000 (09:02 -1000)]
Update release notes for 23.05.06 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoIncrement version for 23.05.06 release
Fridolin Somers [Tue, 28 Nov 2023 18:24:44 +0000 (08:24 -1000)]
Increment version for 23.05.06 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35290: (follow-up) Perltidy formatting corrections
Owen Leonard [Thu, 9 Nov 2023 19:46:35 +0000 (19:46 +0000)]
Bug 35290: (follow-up) Perltidy formatting corrections

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 350aa94b5e4d5013429fa574ac1598ba4cab7c5c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35290: Sanitize field input on cataloguing/ysearch.pl
David Cook [Wed, 8 Nov 2023 23:39:45 +0000 (23:39 +0000)]
Bug 35290: Sanitize field input on cataloguing/ysearch.pl

This change sanitizies the field input on cataloguing/ysearch.pl

Test plan:
0. Apply the patch and restart/reload Koha
1a. "Add marc21_field_260b.pl plugin to 260$b in the Default framework"
1b. Go to http://localhost:8081/cgi-bin/koha/admin/marc_subfields_structure.pl?
op=add_form&tagfield=260&frameworkcode=#subbfield
1c. Choose "marc21_field_260b.pl" from the dropdown next to "Plugin"
1d. Click "Save changes"
2a. "Add new record"
2b. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=
3. Click on tab "2" and scroll down to 260 "b"
4. Type in "Ori" into 260 subfield b
5. Some autocomplete suggestions should appear

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4160afa3d74abb703ec1c461156f1b5a061480b3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35291: (QA follow-up) Tidying script for QA test tools
Aleisha Amohia [Thu, 23 Nov 2023 21:08:09 +0000 (21:08 +0000)]
Bug 35291: (QA follow-up) Tidying script for QA test tools

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b30898c8bf48b828080c557186dcb25b980ffb48)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35291: Validate filepaths in linking files
David Cook [Thu, 9 Nov 2023 00:49:54 +0000 (00:49 +0000)]
Bug 35291: Validate filepaths in linking files

Validate that the files in linking files are contained within the ZIP.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bae5256216f3ad911af3ef4dd944174448c85eaa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35291: Don't allow symlinks for link files in cover image ZIP
David Cook [Thu, 9 Nov 2023 00:23:45 +0000 (00:23 +0000)]
Bug 35291: Don't allow symlinks for link files in cover image ZIP

There's no reason to allow symlinks for link files in cover image
ZIP files. Preventing their use prevents someone from uploading
a symlink pointing to an existing file on the Koha server.

Test plan:
0. Apply patch and restart/reload Koha
1. Create a PNG cover image
2. Create a datalink.txt file that contains something like the
following:
29,Untitled.PNG
3. Turn on "LocalCoverImages" system preference
4. Upload via http://localhost:8081/cgi-bin/koha/tools/upload-cover-image.pl
5. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
6. Note the cover image has been uploaded

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4b019fcbb041649bf4e19e95d59117fb9b422c05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35291: Prevent leaks from FS
Jonathan Druart [Wed, 8 Nov 2023 16:14:55 +0000 (17:14 +0100)]
Bug 35291: Prevent leaks from FS

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6023acd648110297a87c65d1b6d024584ac1bc06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35174: update control files for koha-l10n dependency package
Mason James [Thu, 16 Nov 2023 10:06:27 +0000 (23:06 +1300)]
Bug 35174: update control files for koha-l10n dependency package

 to test...

 - apply patch
 - build koha-common package
 - install koha-common package, and confirm koha-l10n package is installed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
5 months agoBug 35174: Don't run gulp po commands if po dir is missing
Jonathan Druart [Thu, 16 Nov 2023 07:45:15 +0000 (08:45 +0100)]
Bug 35174: Don't run gulp po commands if po dir is missing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
5 months agoBug 35174: Add misc/translator/po to .gitignore
Jonathan Druart [Thu, 16 Nov 2023 07:44:56 +0000 (08:44 +0100)]
Bug 35174: Add misc/translator/po to .gitignore

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