]> git.koha-community.org Git - koha.git/log
koha.git
12 months agoBug 34825: Merge Letters.t into t/db/Letters.t
Marcel de Rooy [Tue, 19 Sep 2023 07:09:54 +0000 (07:09 +0000)]
Bug 34825: Merge Letters.t into t/db/Letters.t

Test plan:
Run t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5fd831755205fc3b3b7481103fbe2145b421a5ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f938f90795d5c57e59d4fc38de5b8fd0991f354f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34825: Remove Test::DBIx::Class from Letters.t
Marcel de Rooy [Tue, 19 Sep 2023 06:50:52 +0000 (06:50 +0000)]
Bug 34825: Remove Test::DBIx::Class from Letters.t

Includes a tidy.

Test plan:
Run t/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 22aee4db67280da3a92713dae93e57737a94b303)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 071c8ca79e34b16d12901f225c1fcfe6d8c5545d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34968: Remove unneeded module from Search.t
Marcel de Rooy [Sat, 30 Sep 2023 06:40:50 +0000 (06:40 +0000)]
Bug 34968: Remove unneeded module from Search.t

Test::DBIx::Class is not even used here.
Just like C4::Biblio.
We should remove TestBuilder too (this is t not t/db)!

Test plan:
Run t/Search.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 23a8497123e9898f48f7e23f1fe8c09158e19d88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6c4eeb1c4af29094b64816dd7e10eb1d78b52c84)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34969: Remove unneeded module from buildQuery.t
Marcel de Rooy [Sat, 30 Sep 2023 06:52:08 +0000 (06:52 +0000)]
Bug 34969: Remove unneeded module from buildQuery.t

Test plan:
Run t/Search/buildQuery.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 af093305b8c936f20c49fa707d5bc58fc9059ba8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2007b17a8407f1a24c7d38e5669ac6a00f124388)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34970: Remove most modules from SuggestionEngine_AuthorityFile.t
Marcel de Rooy [Sat, 30 Sep 2023 06:58:23 +0000 (06:58 +0000)]
Bug 34970: Remove most modules from SuggestionEngine_AuthorityFile.t

There is really no need for all those modules here.
What remains, is just a trivial test.

Test plan:
Run t/SuggestionEngine_AuthorityFile.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 80db256a4700c6a7eec78fe85dade334d8b05bec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5fd2fe48b9e838bbfd6bb35c39033610e5362872)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34944: Remove the use of event attributes from OPAC full serial issue page
Owen Leonard [Thu, 28 Sep 2023 11:25:02 +0000 (11:25 +0000)]
Bug 34944: Remove the use of event attributes from OPAC full serial issue page

This patch removes the use of event attributes (onclick) from the OPAC's
full serial issues template. These events are defined now along with the
other in-page JS.

To test you must have a serial record with issues from multiple years.

- Locate the serial record and view the detail page.
- Click "More details" at the bottom of the "Subscriptions" tab.
- Click the "Full history" tab.
- Test the "Show year" controls to confirm that clicking each year
  correctly filters the table of issues to show only issues from that
  year.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10ef1fe67226a09b15a563b04cde6cca266b87ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fc8972d45b0010761d800ce16d711dc1c1162bfe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34912: Add 14 hours to 1970 date in Account(s).t
Marcel de Rooy [Tue, 26 Sep 2023 11:45:58 +0000 (01:45 +1400)]
Bug 34912: Add 14 hours to 1970 date in Account(s).t

This makes those tests pass in whatever timezone.

Test plan:
Do not yet apply patch.
Change timezone on commandline with: export TZ='Etc/GMT-14'
NOTE: GMT-14 is what we also call UTC+14 (sign reversed).
Run prove t/db_dependent/Accounts.t t/db_dependent/Koha/Account.t
This fails now.
Apply patch.
Rerun tests and verify that they pass now.
Bonus: Try some other time zone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8d4b10fc846eb74aa381c809923d13bf258a9752)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c1078784db2a57d339b214d09d85662a85f2b338)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34916: Fix wrong borrowernumber in ArticleRequests.t
Marcel de Rooy [Tue, 26 Sep 2023 13:45:35 +0000 (13:45 +0000)]
Bug 34916: Fix wrong borrowernumber in ArticleRequests.t

Simple fix: Send patron to userenv instead of library only.

Test plan:
Do not apply patch.
Remove borrowernumber 51.
Run t/db_dependent/Koha/ArticleRequests.t. (FAIL)
Apply patch, rerun test (PASS)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d93d18548d02b1b634db09356caf18795a6ddbf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 47d9e00a7081415be7471e22b925b5c3189dde39)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34939: Set hour:minute to 23:59 when inputing dates unless explicitly set
Lucas Gass [Wed, 27 Sep 2023 21:22:43 +0000 (21:22 +0000)]
Bug 34939: Set hour:minute to 23:59 when inputing dates unless explicitly set

1. Find some places in the staff interface where data-flatpickr-enable-time is set to true. Examples: renew.tt or circulation.tt
2. Directly input a date in whatever date format you have specified in DateFormat but omit the hour/minute. Example: 12/12/2023
3. See that the hour/minute default to 00:00 if your TimeFormat is 24hr and 12:00 AM if your time format is 12hr
4. Apply patch, clear browser cache.
5. Try step again, setting a date like '12/12/2023'. The hour:minute should be added as 23:59.
6. With TimeFormat set to 24hr try entering a date with the hour:minute like '12/12/2023 11:22'. The hour:minute should be set to 11:22.
7. With TimeFormat set to 12hr try entering a date with the hour:minute like '12/12/2023 11:22 AM'. The hour:minute should be set to 11:22 AM.
8. Play with this in as many TimeFormat and DateFormat combonatinons as you can.

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ff00e77f466bb217ed6235cec16047da5a620c75)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b6cc786dfd5f11bbf896117660c5a82f1994c215)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34822: Process real time holds along with indexing
Nick Clemens [Mon, 18 Sep 2023 17:25:15 +0000 (17:25 +0000)]
Bug 34822: Process real time holds along with indexing

Current code already skips indexing when adding record to instead index in a single call. This patch pdates the code to do the same thing for real time holds queue updates.

Note: Newly added records do not need to be updated as they won't have holds yet.

To test:
1 - Have a marc file with several records that match records in your catalog
    You can export part of your catalog to generate one
2 - Set system preference:  RealTimeHoldsQueue to 'enable'
3 - Stage and import file, make sure you are matching and overlaying
4 - Go to Administration->Manage jobs
5 - Note a batch update for each updated record
6 - Apply patch
7 - Repeat
8 - Note a single job added for the entire batch containing only updated records

Signed-off-by: Sam Lau <samalau@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 b50d43c14ee19b32c312a2955c888f48235fddc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 56b15b0e2d5ac3e68734e81a660cda019ea55b6d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34689: Ignore itemnumber when creating item hash
Matt Blenkinsop [Fri, 29 Sep 2023 12:44:11 +0000 (12:44 +0000)]
Bug 34689: Ignore itemnumber when creating item hash

A primary key error can be thrown when an item number is included in a new title hash. We need the item creation to ignore an itemnumber even if it is included in a MARC Framework

Test plan:
1) Edit the MARC framework relating to books (BKS in KTD)
2) In the 952$9 field (Koha itemnumber (autogenerated)), change the value of "Managed in tab" to "items (10)"
3) In the catalog, find a record that uses that MARC framework
4) Click "New" and choose to add a new item
5) Enter a barcode and click the "Add & duplicate" button
6) The page will refresh and an item will have been added
7) Enter a new barcode and click the same button again
8) An error will be thrown
9) Click the back button in the browser
10) Apply patch and restart_all
11) Click the add and duplicate button again
12) This time no error will be thrown and the page will refresh with another new item added
13) Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5b9dbe558f6b9c548786691f29b940e4f2f66b86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 71dda507622e35d5ab083a8a45cab50a29211596)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34645: (follow-up) save sort1 and sort2 in order
Nick Clemens [Mon, 25 Sep 2023 13:12:40 +0000 (13:12 +0000)]
Bug 34645: (follow-up) save sort1 and sort2 in order

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 9f41a0fb979fabd70c1b1dc8ff6c54454969f818)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9ee8fdaf7d98a75595601928f7acf132ca2d3431)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder
Nick Clemens [Mon, 18 Sep 2023 16:32:10 +0000 (16:32 +0000)]
Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder

These values are stored at the order level, not per item. This patch simply sets the order values from the values retrieved from MarcFieldsToOrder even inf MarcItemFields to order is being used for other fields

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Note that discount and sort1 and sort2 are not populated per the Marc
Apply patch, restart all
Stage and add to basket again
Confirm discount and sort1 and sort2 are populated correctly

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 f3bf1f3da5f82e9479ac1c39f0a5ab869e7a748c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6270d813ef95ccf3d2b2cae54d2cec8a05a3bc3a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34911: Test files from HEAD instead of 'master'
Jonathan Druart [Tue, 26 Sep 2023 08:27:57 +0000 (10:27 +0200)]
Bug 34911: Test files from HEAD instead of 'master'

Since bug 34303 the test suite (when ran on jenkins) is no longer testing Perl::Critic

koha_1       | fatal: Not a valid object name master
koha_1       | [14:58:14] t/00-testcritic.t

We are not cloning the whole repo and "master" is not available. Additionally we do not want to test master's files on stable branches anyway...

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7dd57db42932a45e1af9a5bc3f827e1178bec469)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5c73ac5c23ee5d7e828f8cd2b02769fad1367589)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34932: Patron.t - Pass borrowernumber of manager to userenv
Marcel de Rooy [Wed, 27 Sep 2023 12:48:27 +0000 (14:48 +0200)]
Bug 34932: Patron.t - Pass borrowernumber of manager to userenv

Test plan:
Make sure that you do not have borrowr 51.
Run t/db_dependent/Koha/Patron.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca4da5e17ea7a65a473778f590c2703e8eecf7ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f5f0bc40106a06dcfeff5b36eb6527cc9350ff81)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34967: Move to db_dependent
Marcel de Rooy [Fri, 29 Sep 2023 16:02:46 +0000 (16:02 +0000)]
Bug 34967: Move to db_dependent

No further changes.

Test plan:
Run t/db_dependent/Prices.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 1628a576c4984c7b18990315d8e7084c4e3fb30d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 38a3001aed1818da511f6e6b3635d19da13a6ebc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34967: Add sample biblios and tidy some lines
Marcel de Rooy [Fri, 29 Sep 2023 16:01:13 +0000 (16:01 +0000)]
Bug 34967: Add sample biblios and tidy some lines

Test plan:
Run t/Prices.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 e36b873a47dce9f21f19b25e4c617e330f31e1ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 162c81b7be4d717d475871fb449eed716b2919c3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34967: Remove Test::DBIx::Class
Marcel de Rooy [Fri, 29 Sep 2023 15:52:35 +0000 (15:52 +0000)]
Bug 34967: Remove Test::DBIx::Class

Move everything in one subtest

Test plan:
Run t/Prices.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 7378865f4e5a8430f54169825e20e4d6c71fb2cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b38b279e1c888d899680f540ae2e2e4a6f42392c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 30843: Add unit test for Koha::Auth::TwoFactorAuth::verify
David Cook [Fri, 8 Sep 2023 01:53:38 +0000 (01:53 +0000)]
Bug 30843: Add unit test for Koha::Auth::TwoFactorAuth::verify

This change adds a unit test to test Koha::Auth::TwoFactorAuth::verify

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ac91b24cfb49e094a1d13008bd0efda0b63e288)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b89e31393ef050673611747cc26dd6b90ef74d0d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 30843: Add mfa_range configuration option for TOTP
David Cook [Wed, 6 Sep 2023 05:12:50 +0000 (05:12 +0000)]
Bug 30843: Add mfa_range configuration option for TOTP

This change adds a mfa_range configuration option for TOTP
to koha-conf.xml, and overrides the "verify" method from
Auth::GoogleAuth in order to provide a new default for "range"

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=TwoFactorAuthentication
3. Change the syspref to "Enable"
4. Go to
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
5. Click "More" and "Manage two-factor authentication"
6. Register using an app
7. In an Incognito window, go to
http://localhost:8081/cgi-bin/koha/mainpage.pl
8. Sign in with the "koha" user
9. Note down a code from your Authenticator app
10. Wait until after 60 seconds and try it
11. Note it says "Invalid two-factor code"
12. Try a new code from the app
13. Note that it works

14. Add <mfa_range>10</mfa_range> to /etc/koha/sites/kohadev/koha-conf.xml
15. Clear memcached and koha-plack --restart kohadev
16. Sign in with the "koha" user
17. Note down a code from your Authenticator app
18. Wait 4 minutes and then try it
19. Note that it works

20. Disable your two-factor authentication and click to re-enable it
21. Use a code older than 60 seconds when registering for the two
factor authentication
22. Note that the code works

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a0955946e06354ecd05f714057a878794314155)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5cef65a87f516ba3e04137f2f114a6a191d0f034)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34804: Fix translations
Matt Blenkinsop [Fri, 15 Sep 2023 15:51:34 +0000 (15:51 +0000)]
Bug 34804: Fix translations

This patch fixes some translations in the ERM module

Translations should be wrapped in this.$__()

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c736793cba2e763cca2dca1528e57a835bda817)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bd0a79a5eb293c4ff290c90a76331a3e4220f656)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34917: Fix default sort column of table in suggestion.tt
Jacob O'Mara [Tue, 26 Sep 2023 14:19:45 +0000 (15:19 +0100)]
Bug 34917: Fix default sort column of table in suggestion.tt

Test plan:
1. Navigate to Acquisitions and load the suggestions management page
2. Ensure that there are some suggestions in the table
3. Observe that the default sort is on the "Suggester Category" column
4. Apply Patch
5. Observe that the default sort is now on the "Suggested on" column
   instead

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 20524530c8308ea44e27c44d7e75861b0b923cae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit efd2fcc842692f6f7a269238f78daa493f4342e6)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34942: Fix typo - 'brower' to 'browser'
David Nind [Sat, 30 Sep 2023 09:03:06 +0000 (09:03 +0000)]
Bug 34942: Fix typo - 'brower' to 'browser'

This fixes a typo in a message used in the advanced cataloguing
editor when macros are converted from being stored in the browser to
being stored in the database (bug 17268 - Advanced cataloging editor
- rancor - macros are lost when browser storage cleared).

Test plan:
1. Search for 'brower' in the codebase - there should be one occurance:
   grep -rn --exclude=*.po brower *
2. Apply the patch.
3. Run the search in step 1 again, there should now be no occurances.
4. Review the diff for the patch a nd make sure that the change makes
   sense.
5. Sign off! 8-)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ec0a8ae60190c1d2baf716bb4c922ded0ef24b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 20a99ed86c7ec023db39de9a1fb3cfaad75b762b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34918: Fix userenv for safe_to_delete tests
Marcel de Rooy [Wed, 27 Sep 2023 10:43:04 +0000 (10:43 +0000)]
Bug 34918: Fix userenv for safe_to_delete tests

Instead of the fallback to 51, we pass a borrower that has
permission for editing items.

Test plan:
Do not apply patch.
Run test without a borrower 51 in db. (FAIL)
Apply patch.
Run test again. (PASS)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f8233f44a5e4871be38d9b850d97166dcf99c981)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e369d47eb738cd4b4ff2c2e2e21173dbd580aceb)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34918: Fix hardcoded borrowernumber 42
Marcel de Rooy [Tue, 26 Sep 2023 14:42:08 +0000 (14:42 +0000)]
Bug 34918: Fix hardcoded borrowernumber 42

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3298b2798520b9e9d7d37848739dc0b24b5f2e0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3dc01292aa869d1ad896e908bdd161fb19682b41)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34930: Change timezone in Koha/Object.t where tests assume it
Marcel de Rooy [Wed, 27 Sep 2023 11:57:49 +0000 (13:57 +0200)]
Bug 34930: Change timezone in Koha/Object.t where tests assume it

This is the case for subtest: attributes_from_api() tests.

Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Object.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fb84e424e005179480faddb5d7d646bb594ea7b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 69ce926ff223b8f207c04962cedfebbde41fedd5)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34489: Fix timezone problem in Patrons.t
Marcel de Rooy [Wed, 27 Sep 2023 12:13:45 +0000 (14:13 +0200)]
Bug 34489: Fix timezone problem in Patrons.t

See also bug 34930. Using same approach.

Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6109a41ca607f826bb7bce5083009c74139d898a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f2228f40ab201ed6762c900b157235e221c534ed)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34934: Remove the use of event attributes from OPAC lists page
Owen Leonard [Wed, 27 Sep 2023 15:42:26 +0000 (15:42 +0000)]
Bug 34934: Remove the use of event attributes from OPAC lists page

This patch removes the use of event attributes (onclick, onchange) from
the OPAC lists template. These events are defined now along with the
other in-page JS.

The patch also removes a "delete list" button which was only shown
when viewing an empty list and which was redundant.

To test, apply the patch and log into the OPAC.

- Go to Lists -> New list.
- Change the category to "Private" and the "Allow changes" dropdown to
  "Staff only."
  - You should see a message, 'The "Staff only" permission has no actual
    effect while this list is strictly private'
- Change the category to "Public." The message should disappear.

- View the contents of a list.
  - Click the "Send list" button at the top of the table of titles.
  - It should trigger the "Sending your list" popup window.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 56348379ec35bbccbb54e205cc180cc0bd4f9297)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ea411a563a3bd57a1fa8fbb8a75ddf0a5a5a44fc)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34936: Remove the use of event attributes from OPAC detail page
Owen Leonard [Wed, 27 Sep 2023 16:26:03 +0000 (16:26 +0000)]
Bug 34936: Remove the use of event attributes from OPAC detail page

This patch removes the use of event attributes (onclick) from the OPAC's
bibliographic detail page template. These events are defined now along
with the other in-page JS.

The patch also adjusts the global "Dopop" function so that the popup
window is a litte bigger. The comments form did not fit well.

In checking for use of the "Dopop" function I found that it was being
redefined in opac-topissues.tt for no reason so I removed it.

To test you must have the OPACComments system preference enabled.

- Log in to the OPAC, locate a bibliographic record, and view the detail
  page.
- Under the "Comments" tab, click the "Post your comments on this title"
  link. It should trigger a popup window.
  - Submit your comment. When the detail page reloads, return to the
    "Comments" tab and click the "Edit" link on your comment. The same
    popup window should be triggered.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f03cf6cc108022a05d036d4c197760203d31468b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75f595ee523c78f8c0acf15484da6529596558fe)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34836: Add patron check to isbd and marc detail pages
Pedro Amorim [Mon, 25 Sep 2023 10:21:36 +0000 (10:21 +0000)]
Bug 34836: Add patron check to isbd and marc detail pages

Test plan:
- Go to circulation rules and set On shelf holds allowed to If all unavailable
- Log out
- Visit a MARC detail or ISBD detail bib record on OPAC:
http://localhost:8080/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=76
http://localhost:8080/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=76
- Notice it blows up with error 500, on both occasions
- Apply patch. Repeat.

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 4fadf73a95f82ca7abd3d27f490a51825949f7b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0c8dda1dcc8cb1d074cde223ccd43b0b0933332d)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34446: (QA follow-up) Add colons on delete confirm page
Katrin Fischer [Thu, 21 Sep 2023 21:37:08 +0000 (21:37 +0000)]
Bug 34446: (QA follow-up) Add colons on delete confirm page

This adds the missing colon on the 'confirm deletion' page.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f4ee7f2bb9bedfbe24073d0385cfcc67726b8054)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 70df53df4b099da662f3546fd9f3afc25b7ef59e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34446: Added missing colon to Can be guarantee
Laura Escamilla [Thu, 21 Sep 2023 20:59:13 +0000 (20:59 +0000)]
Bug 34446: Added missing colon to Can be guarantee

To test:

1. Go to Administration > patron categories and edit or create a new category. Notice that “Can be guarantee” does not have a colon.
2. Apply patch and refresh the page.
3. Can be guarantee now has a colon — yay!
4. Sign off and have a great day. :)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f9a4097200fdc9762593b674b4bf70bb76d33d53)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c5da14058bd466f4d0e59dc2d59f6f679e4fedd)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34885: Improve confusing pref description for OPACHoldsIfAvailableAtPickup
Marcel de Rooy [Fri, 22 Sep 2023 13:07:51 +0000 (13:07 +0000)]
Bug 34885: Improve confusing pref description for OPACHoldsIfAvailableAtPickup

Changes pref description and sysprefs.sql.
The change is not important enough for a dbrev.

Test plan:
Look at the changed text in Systempreferences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a398c5e9dab3a31d827ab7980899e0366353a37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit abb035ac3206b6065f7691852137de87437bb01d)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34781: Add a span tag in opac-memberentry
Marcel de Rooy [Wed, 13 Sep 2023 11:29:17 +0000 (11:29 +0000)]
Bug 34781: Add a span tag in opac-memberentry

Test plan:
Enable self registration and GDPR consent (privacy policy).
Look at selfreg page on OPAC. Scroll to bottom.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3db74c80866cb9252d13885d2cc09566e9c5a22c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7c1054f26fe6083937dde71684e1176b890f8f2e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34443: Spelling: Patron search pop-up Sort1: should be Sort 1
Owen Leonard [Fri, 8 Sep 2023 15:44:33 +0000 (15:44 +0000)]
Bug 34443: Spelling: Patron search pop-up Sort1: should be Sort 1

This patch instances of "Sort1" and "Sort2" being used
as labels in the interface, replacing the strings with "Sort 1" and
"Sort 2"

To test, apply the patch and test this page:

With the borrowerRelationship system preference populated, edit a
child record and click the "Add guarantor" button. There are two
fields in the form with the updated labels.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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 93d4defeda79349d57be209bfb8fa4132cae3b77)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b548d4ec6edc84cc3448ac2fa7f6c80981a2e8f4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoRMaint fix: Add execute perms to 22.11.10.000 dbrev
Jacob O'Mara [Tue, 17 Oct 2023 13:07:30 +0000 (14:07 +0100)]
RMaint fix: Add execute perms to 22.11.10.000 dbrev

The 22.11.10 release db_revs file was missing execute permissions, this
adds them and should fix any related build errors

12 months agoBug 34513: (QA follow-up) Tidy
Nick Clemens [Thu, 24 Aug 2023 18:19:37 +0000 (18:19 +0000)]
Bug 34513: (QA follow-up) Tidy

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 332b95b2507184e20cd70ddfb16c6f5a260d6dc0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e193989419bf3bff551bf61b9cf46a366fd7b854)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34513: Add checkauth unit test for resetting auth state when changing users
David Cook [Wed, 16 Aug 2023 02:51:43 +0000 (02:51 +0000)]
Bug 34513: Add checkauth unit test for resetting auth state when changing users

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 abbbc5924de287a73c7d91c0f8ab70f8d7461508)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6c1b969a1f5014c3ae4ea6405a91ff54f7c8afbe)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34513: Add end-to-end test for authorization check after first failed authorization
David Cook [Wed, 16 Aug 2023 02:21:40 +0000 (02:21 +0000)]
Bug 34513: Add end-to-end test for authorization check after first failed authorization

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 bb581fe78be9dacb9215366f3a54ab9b640f783f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 644416222e1e43fb2a4b106735233f73ebb2ea85)

12 months agoBug 34513: Set auth state correctly when changing auth sessions
David Cook [Fri, 11 Aug 2023 03:03:01 +0000 (03:03 +0000)]
Bug 34513: Set auth state correctly when changing auth sessions

This patch sets the $auth_state to failed when changing auth sessions,
so that the new login attempt gets processed correctly (instead
of skipping the authorization step).

Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=baseurl
3. Log in as an OPAC user with 0 permissions
4. Note the auth screen "Error: You do not have permission to access this page"
5. Click "Log in"
6. Note that you're still shown a login screen (and that you've been logged out of
your previous authenticated session)

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 16da12cbbc200d9ef07a87ee7f9bdf8e61ae06f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6fc8ea422a2cb6a1f2a8c3b7a54112037fe863bf)

12 months agoBug 34653: Make koha-foreach return the correct status code
Evan Giles [Fri, 1 Sep 2023 06:42:45 +0000 (18:42 +1200)]
Bug 34653: Make koha-foreach return the correct status code

I think the correct behavior for this script should be that koha-foreach
will return 0 (success) if all the commands it tried to run succeeded, but
1 (failure) if any of the commands failed.

To test:
1. $ koha-create --create-db test
2. $ vi test.sh
if [ $USER = 'kohadev-koha' ]; then
    echo "FAILED";
    exit 1;
else
    echo "SUCCESS";
    exit 0;
fi

3. $ debian/scripts/koha-foreach sh test.sh
FAILED
kohadev: 1 status returned by "sh test.sh"
SUCCESS
4. $ echo $?
5. Note that the exit status is 0 (success)

6. Apply patch

7. $ debian/scripts/koha-foreach sh test.sh
FAILED
kohadev: 1 status returned by "sh test.sh"
SUCCESS
8. $ echo $?
9. Note that the exit status is 1 (failure)

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 d9849aaa3aa777072c846526c772a896b5424cfb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 392edc1a2fe1f84f94b03bd569a10adb60dbc6fe)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34748: DBRev 22.11.10.004
Tomas Cohen Arazi [Mon, 25 Sep 2023 13:14:08 +0000 (10:14 -0300)]
Bug 34748: DBRev 22.11.10.004

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a06396c2826c604fc9dfe79c22256b6d69edc415)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6dbd5e5fdbe333b0f0e7197e729ffe659ff98cf1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34748: Fix column name in columns configuration for basket table
Katrin Fischer [Tue, 19 Sep 2023 21:33:00 +0000 (21:33 +0000)]
Bug 34748: Fix column name in columns configuration for basket table

The first column was named basket_number, but it's actually the
order_line.

To test:
* Edit column configuration for acquisition > basket
* Make sure to set at least one checkbox for 'basket_number'
* Apply patch, run database update
* Verify that the first column is now 'order_line', but your
  settings have been preserved

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 f9f9c3a7faeba4a36e233d867019dad495a09c25)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit afcbbb3469cff8f81171e3983a5b37da7a21bbd9)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34302: (bug 28653 follow-up) Do not refresh the table if an error happened
Jonathan Druart [Thu, 27 Jul 2023 13:01:24 +0000 (15:01 +0200)]
Bug 34302: (bug 28653 follow-up) Do not refresh the table if an error happened

If checkin or renew failed, we should not refresh the table or it will
hide the error message.

Test plan:
Apply the DO NOT PUSH patch
Do a renew
=> No error in the table
Apply this patch
Do a renew
=> You see the error
Revert the DO NOT PUSH patch
Do a renew
=> The table is refreshed

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d80a1df25a1c4e726bcf148e1c2432ea8c9a007)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e27ae1d138e3cfa268feb5fc4be05059181f47e4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34835: Highlight logged-in library in patron searches fix for new staff interface
Fridolin Somers [Tue, 19 Sep 2023 22:20:43 +0000 (12:20 -1000)]
Bug 34835: Highlight logged-in library in patron searches fix for new staff interface

Since Bug 30952 the feature from Bug 10902 does not work anymore.
The class "currentlibrary" is there but no background color in CSS.
Bug 30952 removed it :
-    background-color: #E6FCB7;

This patch restores this rule plus '!important' that is used by
class 'ac-currentlibrary'

Test plan:
1) Perform a patrons search
2) Check you see green background color for patrons with same branch as
   currently logged in.

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 9f59ea2f61a4660a9e1f5c27a2ecca33bea89b0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3b8187d620862741fdeb892d6e5f29873e49392b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34848: (QA follow-up) Resolve warn on useless constant
Marcel de Rooy [Fri, 22 Sep 2023 08:51:59 +0000 (08:51 +0000)]
Bug 34848: (QA follow-up) Resolve warn on useless constant

Useless use of a constant ("Dies if sip user cannot be found") in void context at t/db_dependent/SIP/Message.t line 582.

We should remove the comma..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b07842d243bd45b0c11fa7b4d0b02c0589ee44fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa117f566bd04f02cd1775c04cdc8000bb7db0e3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34848: Fix SIP/Message.t if DB has been upgraded
Jonathan Druart [Wed, 20 Sep 2023 14:00:08 +0000 (16:00 +0200)]
Bug 34848: Fix SIP/Message.t if DB has been upgraded

There were a lot of failures (in the context of bug 34841)

t/db_dependent/SIP/Message.t .. 2/16
    #   Failed test 'Found AH field as timestamp in response'
    #   at t/db_dependent/SIP/Message.t line 820.

    #   Failed test 'Found AH field as SQL date in response'
    #   at t/db_dependent/SIP/Message.t line 825.
    # Looks like you failed 2 tests of 8.
t/db_dependent/SIP/Message.t .. 3/16

    #   Failed test 'Desensitize flag was set for patron category not in inhouse_patron_categories'
    #   at t/db_dependent/SIP/Message.t line 1133.
    #          got: 'N'
    #     expected: 'Y'

    #   Failed test 'Desensitize flag was set for empty inhouse_patron_categories'
    #   at t/db_dependent/SIP/Message.t line 1139.
    #          got: 'N'
    #     expected: 'Y'

Because renewalsallowed is 0 for upgraded DB, when it's 5 for new
install.

We need to set the value.

This patch also adds some missing transaction

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 4fd7857e3fcc0314aba2fe851082e6e125a16650)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3041af984ab54ce3e70e13814d0f8fb56f3ee908)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34843: DBRev 22.11.10.003
Tomas Cohen Arazi [Fri, 22 Sep 2023 14:12:00 +0000 (11:12 -0300)]
Bug 34843: DBRev 22.11.10.003

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aea9fce4b0320fa57bc729042286c655580735e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9452ff0095fcfbdc48de4de52dd8524f99c92afd)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34843: Fix database comment inconsistency on toc_request
Marcel de Rooy [Fri, 22 Sep 2023 07:33:57 +0000 (07:33 +0000)]
Bug 34843: Fix database comment inconsistency on toc_request

Bug 29093 had a dbrev without comment, but added comment to
kohastructure.

Test plan:
Check (or remove) comment on article_requests.toc_request.
Run dbrev.
Check if comment was added (if you removed).
Run t/db/Koha/Database/Commenter.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f809c272af42864b48d2d650ba5ddd0cf03d6b06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f5b5b1d90d18fe4c6fce91a04cd8cdba752cd30c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34054: Allow to embed biblio on GET /items
Jonathan Druart [Tue, 25 Apr 2023 10:06:07 +0000 (12:06 +0200)]
Bug 34054: Allow to embed biblio on GET /items

Test plan:
Request the /items REST API endpoint and ask for the biblio's info to be
embeded into the response passing x-koha-embed

curl -u koha:koha --request GET 'http://localhost:8081/api/v1/items' --header "x-koha-embed: biblio" --header "Content-Type: application/json"

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9afc411a150ab5bdf9337d73e82b2ac39e851e91)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cf017af80c4ddfb7fbf7a31a3b6275a8b004fabd)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34054: Add tests
Jonathan Druart [Mon, 19 Jun 2023 07:49:08 +0000 (09:49 +0200)]
Bug 34054: Add tests

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd0380c272e83f7da60f24ab7205a65a693cab7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 66a790e6cd886dde094c21da1e00859e70c058a5)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
12 months agoBug 34846: Fix SIP/ILS.t if DB has been upgraded
Jonathan Druart [Wed, 20 Sep 2023 14:13:40 +0000 (16:13 +0200)]
Bug 34846: Fix SIP/ILS.t if DB has been upgraded

t/db_dependent/SIP/ILS.t .. 12/15
    #   Failed test 'Renewal succeeded'
    #   at t/db_dependent/SIP/ILS.t line 346.
    #          got: '0'
    #     expected: '1'
    # Looks like you failed 1 test of 2.
t/db_dependent/SIP/ILS.t .. 15/15
 #   Failed test 'renew'
 #   at t/db_dependent/SIP/ILS.t line 348.
 # Looks like you failed 1 test of 15.

Because renewalsallowed is 0 for upgraded DB, when it's 5 for new
install.

We need to set the value.

Test plan:
perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only

prove t/db_dependent/SIP/ILS.t

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 5f55775f402d4f4b56ab82426588b202d6f327ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bb19ca161832d3c630523f03730eb2439063399f)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
12 months agoBug 34844: DBRev 22.11.10.002
Tomas Cohen Arazi [Fri, 22 Sep 2023 13:43:50 +0000 (10:43 -0300)]
Bug 34844: DBRev 22.11.10.002

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aacbadb22f21dbb427e62ee2a2b6bb2da54012a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bf1eb476514b00334e3619702fa988abb2db98ff)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
12 months agoBug 34844: Add db update file
Kyle M Hall [Thu, 21 Sep 2023 12:55:50 +0000 (08:55 -0400)]
Bug 34844: Add db update file

JD amended patch: tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b46b319980cd236e85e75c88e8a1428e1bb8bbb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f4e867fe32c725e208567e346118419f3f1f9541)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
12 months agoBug 34844: Add manage_item_editor_templates to userpermissions.sql
Kyle M Hall [Wed, 20 Sep 2023 13:31:47 +0000 (09:31 -0400)]
Bug 34844: Add manage_item_editor_templates to userpermissions.sql

Test Plan:
1) perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only; prove t/Koha/Auth/Permissions.t
2) Note failure
3) Apply this patch
4) perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only; prove t/Koha/Auth/Permissions.t
5) Tests pass!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d2f3ffe7d2dfb796a4ec7e0b4503a3266f3ee80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c580aa20379f0eb864233abed31f78f72c69dc8a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
12 months agoBug 34794: Fix typo in recalls_to_pull.tt
Matt Blenkinsop [Thu, 14 Sep 2023 15:17:54 +0000 (15:17 +0000)]
Bug 34794: Fix typo in recalls_to_pull.tt

Fixed typo - it's v its

Test plan:
Look at the bug patch and confirm the change is correct

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b385a2c36f433bc9fe1a2b5c6896eca28aae447)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 445ec77de363180fe15461035f78cdbe7c215d84)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34716: Fix typo
Matt Blenkinsop [Tue, 5 Sep 2023 13:40:07 +0000 (13:40 +0000)]
Bug 34716: Fix typo

Fixes a typo where "it's" should be "its"

Test plan:
1) Check the commit and observe that the change has been made correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5540d8c949a2ea3f7e95667821e2a1668a58e18)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 61b0558a3cd1e4780894e0f0c5a61b074c5bc6d7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34847: Fix t/db_dependent/Search.t
Jonathan Druart [Fri, 22 Sep 2023 12:33:31 +0000 (14:33 +0200)]
Bug 34847: Fix t/db_dependent/Search.t

If 01e still exists then the test will fail with
Truncated incorrect DECIMAL value: '01e' at t/db_dependent/Search.t line 945

Test plan:
% perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only
% prove t/db_dependent/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca3243d00ff094c86fcd02406543b6b3d06627ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fae321c6a7b41d1f0ba2e6949a049ab6a0443ea0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34730: Add responsive behavior to more tables in the OPAC
Owen Leonard [Tue, 12 Sep 2023 14:52:30 +0000 (14:52 +0000)]
Bug 34730: Add responsive behavior to more tables in the OPAC

This patch adds responsiveness to several DataTables which were not
updated in 32341. The patch removes the CSS-based responsive styling
which was previously used for these tables.

This patch also adds some additional configuration to the tables on the
user home page so that the title column is always prioritized when
DataTables collapses columns in narrow views.

To test, apply the patch and rebuild the OPAC CSS. Ideally this should
be tested with a user who has checkouts, overdues, holds, tags, and a
checkout history.

- Log in to the OPAC and test the user summary page. Check that each
  table adjusts well to narrow browser widths. In each case the column
  containing the title should never be hidden no matter how narrow the
  window:
  - Checkouts
  - Relatives' checkouts (requires that the user is a guarantor for a
    patron with checkouts and that the guarantee's account is set up to
    show checkouts to the guarantor).
  - Overdues
  - Holds
  - Article requests

The new places the responsive DataTables extension is being used:

- Checkout history
- Suggestions
- Tags (in the table of user-submitted tags)
- Most popular

Again, in each case the table should be responsive and the title column
should be prioritized so that it doesn't get hidden at narrow page
widths.

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 266194321453d096a1fd1a9f80195dfb77ad5258)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff1b7f74d666682fded9d6c923489ffc91201311)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34760: Confirm session ID is set to save OPAC search history to logged in user
Aleisha Amohia [Mon, 11 Sep 2023 20:47:34 +0000 (20:47 +0000)]
Bug 34760: Confirm session ID is set to save OPAC search history to logged in user

This patch confirms that a session ID has been set before trying to save search history to a logged in user on the OPAC.

This depends on EnableOpacSearchHistory system preference being enabled.

Apply the patch and test that you don't see an Error 500 page at any point through this plan:

1. Do an OPAC search, ensure you are not logged in
2. Confirm your search was saved to search history
3. Do another search, then log in
4. Confirm you are brought back to the search results after logging in
5. Confirm all search history from the session is visible

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7707b768ba50f2128e8efc50378ec3117962a60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f11452e2dc63955d08365e6fe59182fe129adcb3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 33734: Remove incorrect URL escaping on search filters
David Cook [Wed, 13 Sep 2023 02:25:13 +0000 (02:25 +0000)]
Bug 33734: Remove incorrect URL escaping on search filters

This patch removes an incorrect URL escaping on search filter
facet URLs.

Without this patch, search filters using non-ASCII characters won't
return results.

To test:
0. Apply patch
1. Enable SavedSearchFilters syspref
2. Search for "the"
3. Save as search filter (to show on both OPAC and staff interface)
4. Search for "ü" in staff interface
5. Apply the "the" filter
6. Note that search results appear
7. Search for "ü" in OPAC
8. Apply the "the" filter
9. Note that search results appear

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 51e602e61cc5dc46188aa298f276e6410678fdf7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4a3175b7cfd474a6ac02d5c19bc9cb4aefecdc31)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34732: (QA follow-up): tidy up code
Victor Grousset/tuxayo [Fri, 15 Sep 2023 18:36:38 +0000 (20:36 +0200)]
Bug 34732: (QA follow-up): tidy up code

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 703ecab2c6911175f673565249d7c0c6f13bbe56)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 84ce5d3e2c28060dbcfa37666284032da4835221)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34732: For Code39, append or prepend asterisk if missing from barcode
David Cook [Fri, 8 Sep 2023 02:19:20 +0000 (02:19 +0000)]
Bug 34732: For Code39, append or prepend asterisk if missing from barcode

This patch appends or prepends an asterisk on Code39 barcodes if
they are missing from the input. This is so that they form correct
Code39 barcode images.

Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to http://localhost:8081/cgi-bin/koha/labels/barcode-print.pl
3. Type 39999000001310 into "Barcode" and click "Show barcode"
4. Note that the barcode text on the right includes asterisks around it
5. Type *39999000001310 into "Barcode" and click "Show barcode"
6. Note the same as above
7. Type 39999000001310* into "Barcode" and click "Show barcode"
8. Note the same as above
9. Type *39999000001310* into "Barcode" and click "Show barcode"
10. Note the same as above

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f888f48fa0f839aa62eda7a457ed5c6f50c5a8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 66e179f905f1b795dce812258c02b308f964764a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: (follow-up) Restore missing statuses
Martin Renvoize [Tue, 19 Sep 2023 15:37:08 +0000 (16:37 +0100)]
Bug 32942: (follow-up) Restore missing statuses

At some stage we lost some of the core statuses. This patch simply
adds them back into the list.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e33042105435078222aab1b72a1e7a1d0a8ff56)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 555575745b560261d0145480fcabdd81972af3f1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: (follow-up) Fix typo
Martin Renvoize [Tue, 19 Sep 2023 15:23:29 +0000 (16:23 +0100)]
Bug 32942: (follow-up) Fix typo

Spelling typo fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 07a602d995db1aec4067a47116cfa5d91800747f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6fb3ec5f7469954f964e01d59c5e1b909eb4f8a8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: (follow-up) Fix test
Martin Renvoize [Tue, 19 Sep 2023 15:19:53 +0000 (16:19 +0100)]
Bug 32942: (follow-up) Fix test

I missed a test case when doing follow-ups before.. this patch catches
that case and create the required authorized value to allow
ModSuggestion to succeed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 078e98a7a35d6e5f598c51cd7c94b917f68128d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8558dafce5b4f3aca82f96b431d187bab65ae326)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: (QA follow-up) Fix regression test
Martin Renvoize [Mon, 18 Sep 2023 11:59:50 +0000 (12:59 +0100)]
Bug 32942: (QA follow-up) Fix regression test

With the move to checking status during store, we broke the api
regression test introduced earlier in the patch set.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8eb27c40e6fd771e8d4c2bff28cc1a45838af712)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6444a30adcf42efb5e3cac55e5f0fee3d0c7dbc6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: (QA follow-up) Moving Suggestion->STATUS check to Suggestion::store
Arthur Suzuki [Fri, 18 Aug 2023 11:16:53 +0000 (13:16 +0200)]
Bug 32942: (QA follow-up) Moving Suggestion->STATUS check to Suggestion::store

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40ca7aa06c166b005fda5b6ff38f4cbf20b3d081)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8ea062497a04956811a7edf899b28019a89fd8c9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: (QA follow-up) Add tests for STATUS checking in Suggestion::store
Arthur Suzuki [Fri, 18 Aug 2023 11:11:45 +0000 (13:11 +0200)]
Bug 32942: (QA follow-up) Add tests for STATUS checking in Suggestion::store

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 672e8a9d715d144812329aeb07cea5c915c50377)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 84863736a414d63065fdb253f833e04be230bdb6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: (QA follow-up) Document possible values
Tomas Cohen Arazi [Mon, 13 Feb 2023 18:11:17 +0000 (15:11 -0300)]
Bug 32942: (QA follow-up) Document possible values

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 54c8aa9471e83b380e455dafe2e8cbf208cb6f36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 05b4ebf00dc9f15eda8eb92be6cf6b96c8d918e1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: Suggestion API route when non 'standard' status are present
Frédéric Demians [Fri, 10 Feb 2023 17:23:11 +0000 (18:23 +0100)]
Bug 32942: Suggestion API route when non 'standard' status are present

The API route for listing all suggestion:

/api/v1/suggestions

send back an error message when there is a suugestion with non standard
status (ASKED, CHECKED, ACCEPTED, REJECTED).

This patch fixes this too restrictive restriction.

TO TEST:

1. Add a status in SUGGEST_STATUS AV list.
2. Create a suggestion, and assign it to the previsous status.
3. Call /api/v1/suggestion
3. You get an error message:
   {
    "errors": [ {
      "message":"Not in enum list: ASKED, CHECKED, ACCEPTED, REJECTED.",
      "path":"\/1\/status"
    }],
    "status":200
   }
4. Apply the patch. Call /api/v1/suggestion

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3dc9bf900bd666eb17272060e071422a35267ada)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 745a6bde5e58bda0ba4eb619dcf2253ab63da5df)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32942: Regression tests
Tomas Cohen Arazi [Mon, 13 Feb 2023 14:54:07 +0000 (11:54 -0300)]
Bug 32942: Regression tests

Having a custom status shouldn't cause issues

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e13f68965efab9b5f25daf1ec9926386fd386800)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 585a816aff11fbfdcc9637bcc96f09c82d3a34a3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34789: (follow-up) Fix atomic update file
Matt Blenkinsop [Tue, 19 Sep 2023 09:24:04 +0000 (09:24 +0000)]
Bug 34789: (follow-up) Fix atomic update file

Atomic update file had a versioning issue - now changed to be compatible with older versions

Please backport

(cherry picked from commit b593f6b806c8f2ec000470b9221ffcdb22aa7ac6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 48ebd5a803867045231fefc0ffe38288a6528af4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34694: Only check for IsAvailableForItemLevelRequest if is authenticated
Pedro Amorim [Fri, 1 Sep 2023 16:12:56 +0000 (16:12 +0000)]
Bug 34694: Only check for IsAvailableForItemLevelRequest if is authenticated

- Go to circulation rules and set On shelf holds allowed to If all unavailable
- Log out
- Visit a bib record on OPAC:
http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=76
- Notice it blows up with error 500
- Apply patch. Repeat

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1742913a0522c589705c5e54ce13c6ef1c7463ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6054c26215e2733d95208b718da916d6962533e4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34740: Update sort options in ES config to by Yes/No
Nick Clemens [Thu, 7 Sep 2023 17:13:46 +0000 (17:13 +0000)]
Bug 34740: Update sort options in ES config to by Yes/No

At some point the option for 'undef' was removed from te sort options
and was collapsed to yes/no

The dropdowns when adding a new field were missed, this patch corrects that.

While undef in a mappings file wil stil load, when saving we should not privde undef any longer

To test:
1 - Browse to bottom to add a new field on the 'Bibliographic records' tab in
    Administration > Search engine configuration (Elasticsearch)
2 - Set sortable column to undef, set other columns and provide a valid field
3 - Click '+Add'
4 - Click 'Save'
5 - At top of page you receive an error:
 An error occurred when updating mappings: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'sort' cannot be null at /kohadevbox/koha/Koha/SearchField.pm line 37 .
6 - Apply patch, restart all
7 - Add a new mapping, your only choices are Yes/No
8 - Save mapping
9 - Confirm it saves correctly

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5f6e1a1cf77dfc893de08b66840f2ea16abf1998)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a9b76c2254d1f5a1823fdf9f444fc70052ff3e7a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 32048: Added clear cache routine to delete_holiday_range_repeatable
Laura Escamilla [Mon, 28 Aug 2023 14:20:17 +0000 (14:20 +0000)]
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable

When adding and deleting holidays, holidays might return
unexpectedly.

To test:
1 - Enter a holiday repeated yearly on a range from the 1st of the month to the 5th
2 - Delete it
3 - Add a new holiday from the 20th to the 25th
4 - When saved, the holiday from the 1st to the 5th is also added again.
5 - Apply patch and restart_all.
6 - Repeat steps 1-3. Notice that the holiday from the 1st to the 5th is no longer added and it has properly been cleared from the cache.
7 - Sign off! :D

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d4be7b10aca91a5af3e9614f465429c78a28fb13)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c8cec2c52f03a844b23ff7310bda5a6d11e987ca)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34728: (QA follow-up) Remove o modifier, bit more compact
Marcel de Rooy [Fri, 15 Sep 2023 07:01:24 +0000 (07:01 +0000)]
Bug 34728: (QA follow-up) Remove o modifier, bit more compact

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bda428399aa76057f0596883d5a619a27520a7c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b9ad842dee52633e5ae840c206a2c7588cf5b5dd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34728: Make pre tag conditional
Matt Blenkinsop [Wed, 6 Sep 2023 10:50:30 +0000 (10:50 +0000)]
Bug 34728: Make pre tag conditional

This patch makes the pre-formatting of notice templates conditional on the content type.

Test plan:
1) Navigate to tools > Notices and slips
2) Edit the notice with the code of HOLD
3) Under print, paste the following
<p>Please collect within 10 days from the date of this letter and don't forget to bring your library card with you.</p>
<p>Be aware that opening hours vary at different library branches so if in doubt double check the times before you visit.</p>
<p>Should you no longer require this item please contact us so we can make it available for another customer.</p>

<p>Thank you</p>
4) Check the box that says HTML message and save the notice
5) In Patrons, select a patron and in Patron messaging preferences, check the box in the Email column for Hold filled
6) Find a record in the catalogue
7) Copy the barcode for one of the items
8) Place a hold on the item for the patron you selected
9) Navigate to Circulation > Check-in
10) Paste the barcode in the Check-in box and click Check-in
11) In the pop-up box, click Confirm hold
12) In the command line, run perl misc/cronjobs/gather_print_notices.pl --letter_code=HOLD --html /tmp
13) cd /tmp
14) There should be a file in there called 'notices_HOLD-date.html
15) cat this file
16) The html you pasted in the template will be wrapped in a <pre> tag
17) Apply patch and restart_all
18) rm the notices file that was created
19) cd /kohadevbox/koha
20) Select a new record from the catalogue and repeat steps 7-15 for this record, using the same patron
21) This time, the html file should not contain the <pre> tag
22) Sign off!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 d947ae3c1a62a8abaabcba67d655084ecff8aa58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5cff31dd785efd997e76865b8e5e53cde97a21ab)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34333: Add embed option for `cancellation_requested` for holds
Tomas Cohen Arazi [Thu, 20 Jul 2023 23:18:27 +0000 (20:18 -0300)]
Bug 34333: Add embed option for `cancellation_requested` for holds

This patch adds the `cancellation_requested` attribute to the hold
object definition, and allows embeding it as on the different holds
endpoints that migt be useful.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t \
           t/db_dependent/api/v1/*holds.t
=> SUCCESS: Tests pass!
3. Play with your REST tool (Postman?) on the following endpoints:
   GET http://localhost:8081/api/v1/holds
   GET http://localhost:8081/api/v1/patrons/:patron_id/holds
on both, pass and not pass the `x-koha-embed` header with
`cancellation_requested` on it.
=> SUCCESS: It is easy! You see the attribute and you don't, and the
content makes sense!
4. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4ce7ce2a158d9c61ac176660e341b4111e76a2ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e916ec22ddf50aa3007f68bfdb87b087070b2354)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34333: Add Koha::Hold->cancellation_requested
Tomas Cohen Arazi [Thu, 20 Jul 2023 23:16:39 +0000 (20:16 -0300)]
Bug 34333: Add Koha::Hold->cancellation_requested

This patch adds a helper method for telling if a hold has cancellation
requests. To be used for embedding such information.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: Tests pass, the new method is covered by tests.
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 23cfdf97e379255139a6a3a73d74ee60f36aa5a2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e932dc8372310eda321c4d473053c0c4d211cfd6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34786: after_biblio_action hooks - No find when action is delete
Marcel de Rooy [Thu, 14 Sep 2023 09:11:56 +0000 (09:11 +0000)]
Bug 34786: after_biblio_action hooks - No find when action is delete

Test plan:
Run t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ac7581e90a79961a4de915f0592834eb9f2611c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4aedaed0bc07160b2ca387c9bd08faa741746fa2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34613: Replace onclick attributes in midiplayer.js
David Cook [Fri, 25 Aug 2023 01:26:01 +0000 (01:26 +0000)]
Bug 34613: Replace onclick attributes in midiplayer.js

This patch replaces the onclick attributes in midiplayer.js
with Javascript click handlers.

To test:
0. Apply patch
1. Clear browser cache (it may be necessary to go into the
   Network tab and explicitly disable cache)
2. Add 031 subfields 2gopnu to Default framework
3. Create a catalogue record with a 031 like follows:
2: pe
g: G-2
o: 4/4
p: 4bB''C2bE/2F4GbB/'bB2''C4D/F2.bE/4GG2bB/4'''C2C4''bB/4bE2G4bB/4bE2.F/
n: xFCGD
4. Enable the following sysprefs:
   OPACShowMusicalInscripts
   OPACPlayMusicalInscripts
5. Go to OPAC record view and click "Play this sample"
6. Play with the "Pause/Start" and "Stop" buttons
7. If the buttons work, it means the patch worked

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 a4bdd27fd9d953a8ae086a6f3e8b7960f9b7160b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 87ec1caebc1d3ce5b525c9c8605541e7f24341e7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 33876: Add class for styling
Lucas Gass [Wed, 31 May 2023 22:38:50 +0000 (22:38 +0000)]
Bug 33876: Add class for styling

To test:
1. Checkout and item that has a public and nonpublic note.
2. In the checkout table ( Title column ) notice the notes display. If you use the browser dev tools to inspect you'll notice a "-" outside of any HTML element.
3. Apply patch.
4. See the '-' is now inside of a html element with class of seperator.

Signed-off-by: Sam Lau <samalau@gmail.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 6091a938c1c148cbeab6ff27f5261c6fe64d1463)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 71b92c80c89c05311db4a8e2452632f114ef75c0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34711: Remove use of onclick for opac-privacy.pl
David Cook [Tue, 5 Sep 2023 04:58:52 +0000 (04:58 +0000)]
Bug 34711: Remove use of onclick for opac-privacy.pl

This change removes the "onclick" attribute for the buttons
on opac-privacy.pl.

Note: The Javascript is placed in a separate file, which is
the preferred way for Javascript to be handled by
Content-Security-Policy

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACPrivacy
2. Set syspref to "Allow"
3. Go to http://localhost:8080/cgi-bin/koha/opac-privacy.pl
4. The confirmation modal appears and "OK" and "Cancel" buttons work as
   expected

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 c997fe863f70fa951c71dca73296ed1f497aeca7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cdb5734ade61abf0e62b5a3f79d8fdcb3fbe38f5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34724: (QA follow-up):
Pedro Amorim [Fri, 8 Sep 2023 16:01:03 +0000 (16:01 +0000)]
Bug 34724: (QA follow-up):

Replace href from thumbnail link with a # to keep pointer event. The href link gets reconstructed by showCover anyway
Remove return false from on click event, its not triggering a location change anymore because of the above
Remove check for imagenumber, its a non-null primary key, if the image exists, then the imagenumber must also exist

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bc8a0620012a79567c44d863c029a4b0025a2fbd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 167f5aa3bb833764ed8e0ecc29d09740533e508c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34724: Remove inline onclick handler for opac-imageviewer.pl
David Cook [Wed, 6 Sep 2023 06:40:21 +0000 (06:40 +0000)]
Bug 34724: Remove inline onclick handler for opac-imageviewer.pl

This patch moves the click handler for thumbnails for opac-imageviewer.pl
out of the inline HTML and out to an existing <script> element.

Test plan:
0. Apply the patch (including dependent patches)
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=localcover
2. Change both *LocalCoverImages sysprefs to "Show"
3. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=AllowMultipleCovers
4. Change "AllowMultipleCovers" to "Allow"
5. Go to
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
6. Click "Images (0)" tab
7. Download or make two JPEG images
8. Upload the images
9. Go to http://localhost:8080/cgi-bin/koha/opac-imageviewer.pl?biblionumber=29
10. See one large image in the centre and two smaller thumbnails on the right side
11. Click on the thumbnail of the image that isn't displayed in the centre
12. Note that the image changes
13. Click the other thumbnail and note that the image changes back

PA amended patch: Added missing test plan step

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 847b5f0777c51a56100108ac44351de8a81660e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bebd213c8787cc8f894f9b353b2a35deb9fcc830)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34725: Remove use of onclick for OPAC cart
David Cook [Wed, 6 Sep 2023 06:57:15 +0000 (06:57 +0000)]
Bug 34725: Remove use of onclick for OPAC cart

This patch moves the click handler in the OPAC cart from the inline HTML
and out to an existing <script> element.

Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
2. Add the results to the cart
3. Click on the "Cart"
4. One by one click on the title of each row
5. Notice how the parent window changes to the detail record for that title

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9e39d2d67135186b2202d42004b31f9fcfa9eb58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8af48bc9f727d5067d2108dd4565a79c7c72813e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34789: DBRev 22.11.10.001
Tomas Cohen Arazi [Mon, 18 Sep 2023 14:56:35 +0000 (11:56 -0300)]
Bug 34789: DBRev 22.11.10.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b952d2eb9922ed1afc5c52a2706290f94bb83e03)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bd47ab5bcbc21eb29b85373b142832a6e1b92ea4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34789: (QA follow-up) Improve output of database update
Katrin Fischer [Sun, 17 Sep 2023 13:18:49 +0000 (13:18 +0000)]
Bug 34789: (QA follow-up) Improve output of database update

* Adds description
* Adds column names to success messages

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c1b344b002b3ff2471c72f18a9746f71f7900978)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ab85941b5f8dc9dbd4084031c5388e58f78d7da0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34789: Update unit tests
Matt Blenkinsop [Thu, 14 Sep 2023 12:27:20 +0000 (12:27 +0000)]
Bug 34789: Update unit tests

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 4ec7c6a62ec12abe1ea092e0fbbdcc6e7ecee110)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bac14ffe0876f077e04ab825df56143db3af121d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34789: Update usage throughout Koha modules and Vue components
Matt Blenkinsop [Thu, 14 Sep 2023 12:26:53 +0000 (12:26 +0000)]
Bug 34789: Update usage throughout Koha modules and Vue components

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 7d2ce611f71958d31b6b3592e305bea415e50ef5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9ea9a7156b27e0235c4014a81bd289cd20f45745)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34789: DBIC file
Matt Blenkinsop [Thu, 14 Sep 2023 12:25:21 +0000 (12:25 +0000)]
Bug 34789: DBIC file

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 6989d25df7dcb1bc1f4a9b2897b107c38a583053)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a286990983bfc94fa8afb9e2776dec018a9bc9f5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34789: Database and API update
Matt Blenkinsop [Thu, 14 Sep 2023 12:23:49 +0000 (12:23 +0000)]
Bug 34789: Database and API update

Currently the erm_eholdings_titles table has a field called preceeding_publication_title_id. This should be preceding_publication_title_id

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 cf94eae1ff89d1c99604dd68429c77f7247aa9a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5a01b6dddcab0e86032a17e0ecb392ed25d6db2b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 33406: (follow-up) Mock SearchEngine to ensure using ES
Nick Clemens [Mon, 18 Sep 2023 13:24:53 +0000 (13:24 +0000)]
Bug 33406: (follow-up) Mock SearchEngine to ensure using ES

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 766bdd638acbf8870c3f6eb21d03d8195040e54f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff544893a1e07725b0f64071de43ab762bfaa15b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34719: Add middle_name to patron autocomplete
Lucas Gass [Thu, 7 Sep 2023 21:19:26 +0000 (21:19 +0000)]
Bug 34719: Add middle_name to patron autocomplete

To test:
1. Apply patch and clear browser cache.
2. Find some patrons with middle_name populated or add new patrons with a middle_name.
3. Make sure PatronAutoComplete is on
4. Try searching for a part of one of the patron's names who has a middle_name.
5. It should appear in the autocomplete dropdown

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6c77f664c6b21b3d7c9ee4590a8b8b21a18a9b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 92cb17716931ff68e963acf04361be29dff3b80e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 33406: (QA follow-up) Adjust tests and tidy
Nick Clemens [Thu, 14 Sep 2023 13:21:44 +0000 (13:21 +0000)]
Bug 33406: (QA follow-up) Adjust tests and tidy

Rather than test that nothing is returned, we want to test that the terms are filtered as expected. This also avoids the possibility of the tests failing in a db where there is a record for Donald Duck

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3d7b60dc90142b171b6aaa268bdf2abf917b3739)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4cc41203223e5e43b1289e819682f2b1b38efde6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 33406: Filter out some known isolated trouble makers
Janusz Kaczmarek [Tue, 8 Aug 2023 08:41:53 +0000 (08:41 +0000)]
Bug 33406: Filter out some known isolated trouble makers

Test plan:
1) Launch k-t-d with ES:
-- ktd --es7 pull
-- ktd --es7 up
2) Visit /cgi-bin/koha/authorities/authorities-home.pl and search for 'tim'
3) Edit that, add a dash '-' to 100$a, like 'Bunce, Tim - name'"
4) Do a authority search for 'tim - name', notice it errors out
5) Apply patch
6) Perform the same search, notice it doesn't error and returns the correct record

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 27c6171222bf3abb5ed91e399bb2663579e8e367)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 14487cd5e06cc8e5da133194f8d31e60b03fab9b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 33406: Handle ES search errors for authorities
Jonathan Druart [Thu, 11 May 2023 10:38:53 +0000 (12:38 +0200)]
Bug 33406: Handle ES search errors for authorities

We are dealing ok with ES exceptions for biblio records search,
catching them and raising them to the end user. But we don't for
authorities, where we explode with an ugly 500.

Test plan:
Search for "(term_1*) AND (-) AND (term_2*)" in the authority search and
notice that you don't get a 500 but an error instead saying that you
should try again

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09b29d06da5fac2bd1315d849f1b9bf924576700)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b4187cf2abb7007d528585f59b723c10dc3b4480)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 33406: Add tests
Pedro Amorim [Mon, 4 Sep 2023 12:28:29 +0000 (12:28 +0000)]
Bug 33406: Add tests

Test plan:
1) Apply this tests patch only
2) Run: prove t/Koha/SearchEngine/ElasticSearch/Search.t
3) Notice it fails with nasty ES "Failed to parse query" error
4) Apply the other patches
5) Repeat 2) - notice theres no nasty error

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fbd62562e0d67d22738435e44adf9f03900a147e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f36647c32a7224146ff2a8420b4c3243562f094c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
12 months agoBug 34787: Fix typo gorup
Marcel de Rooy [Thu, 14 Sep 2023 09:31:00 +0000 (09:31 +0000)]
Bug 34787: Fix typo gorup

No test plan (fixing comment).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5797079fc5e5b1e9a4d883f0ceb5a344b8cdbd36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b8b21c6d11cc2065a475b36bf1214fd03d7ebe05)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>