Martin Renvoize [Wed, 5 Jun 2024 13:20:22 +0000 (14:20 +0100)]
Bug 37018: Use validation in search_rs helper
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
Martin Renvoize [Wed, 5 Jun 2024 13:19:54 +0000 (14:19 +0100)]
Bug 37018: Add validation method to Koha::REST::Plugin::Query.pm
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
Martin Renvoize [Wed, 5 Jun 2024 13:19:06 +0000 (14:19 +0100)]
Bug 37018: Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
This patch adds regression tests. With the current codebase, the
malicious query returns a 200. It should be caught and a 400 needs to be
returned.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/query.t
=> FAIL: It returns a 200
3. Once the rest of the patches are ready, repeat 2
=> SUCCESS: It returns a 400
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
David Cook [Fri, 21 Jun 2024 01:45:51 +0000 (01:45 +0000)]
Bug 37146: Prevent path traversal by validating input
This patch validates the plugin_name passed to plugin_launcher.pl
against the base path containing the "value_builder" directory.
Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29
3. Check that the tag editor for leader still works
4. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=29
5. Check that the pluginf or "Date acquired" still works
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
Chris Cormack [Mon, 13 May 2024 02:26:13 +0000 (02:26 +0000)]
Bug 36520: Sanitize input in opac-sendbasket.pl
To test
1/ Add some items to your cart in the opac
2/ Choose send cart
3/ Open firefox developer tools and switch to the network tab
4/ Send cart
5/ In the network tab, find the post request and choose copy as curl
6/ Edit the curl command to add )+AND+(SELECT+1+FROM+(SELECT(SLEEP(6)))x)--+- to the bib_list parameter
7/ Run the curl notice it takes a long time to respond, if you want to check run the curl without the above part added
8/ Apply the patch and restart plack
9/ Run the modified curl and notice no longer the slow down
10/ Test in browser and make sure the basket is still sent
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 13 May 2024 12:47:28 +0000 (14:47 +0200)]
Bug 36520: Prevent SQL injection in GetPreparedLetter
Actually in _get_tt_params
The following query will delay the response
SELECT `me`.`biblionumber`, `me`.`frameworkcode`, `me`.`author`, `me`.`title`, `me`.`medium`, `me`.`subtitle`, `me`.`part_number`, `me`.`part_name`, `me`.`unititle`, `me`.`notes`, `me`.`serial`, `me`.`seriestitle`
, `me`.`copyrightdate`, `me`.`timestamp`, `me`.`datecreated`, `me`.`abstract`
FROM `biblio` `me`
WHERE `biblionumber` = '1) AND (SELECT 1 FROM (SELECT(SLEEP(6)))x)-- -'
ORDER BY field( biblionumber, 1 ) AND (
SELECT 1
FROM
SELECT SLEEP( 6 ) x
) -- - )
To test
1/ Add some items to your cart in the opac
2/ Choose send cart
3/ Open firefox developer tools and switch to the network tab
4/ Send cart
5/ In the network tab, find the post request and choose copy as curl
6/ Edit the curl command to add )+AND+(SELECT+1+FROM+(SELECT(SLEEP(6)))x)--+- to the bib_list parameter
7/ Run the curl notice it takes a long time to respond, if you want to check run the curl without the above part added
8/ Apply the patch and restart plack
9/ Run the modified curl and notice no longer the slow down
10/ Test in browser and make sure the basket is still sent
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 15 May 2024 09:25:47 +0000 (11:25 +0200)]
Bug 36520: Add tests
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Chris Cormack [Wed, 8 May 2024 22:41:43 +0000 (22:41 +0000)]
Bug 36818: Escape characters in file names uploaded
To test:
1/ create a file named something like 'execute`curl blog.bigballofwax.co.nz`.zip'
Where the domain is one you can watch the logs from
2/ Upload this file as a cover image
3/ Check /var/lib/koha/sitename/tmp/koha_sitename/ and see unescaped filenames
4/ Choose process, check the logs of the webserver see the connection has been made
5/ Apply the patch
5/ Repeat 2 & 3 and see the filename is now escaped
6/ Choose process and check no errors but no no remote execution occurs
7/ Test uploading actual zip file and images still works
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 36575: (QA follow-up) Shibboleth POD and checkpw_internal call
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 24 Apr 2024 15:06:22 +0000 (15:06 +0000)]
Bug 36575: Adjust checkpw_internal to return patron
This patch refactors checkpw_internal to remove the SQL code, use patron ojbects, and return the
patron that correctly matches the userid/caerdnumber when auth is successful
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 24 Apr 2024 14:25:40 +0000 (14:25 +0000)]
Bug 36575: (bug 34893 follow-up) Return patron when autocreating in Shibboleth
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 24 Apr 2024 14:23:51 +0000 (14:23 +0000)]
Bug 36575: (bug 34893 follow-up) Return patron from LDAP
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Thu, 11 Apr 2024 10:18:30 +0000 (12:18 +0200)]
Bug 36575: (QA follow-up)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 11 Apr 2024 09:39:03 +0000 (09:39 +0000)]
Bug 36575: Return correct patron when there is a shared userid / cardnumber
This patch moves some patron fetching code in C4/Auth to use to patron returned from the validation
methods and only try to fetch the patron (to check if locked, update attempts, etc) if we didn't authenticate
To test:
1 - Set a user to have userid = BANANA password = Password1
2 - Set a user to have cardnumber = BANANA password = Password2
3 - Hit the patron authentication API:
http://localhost:8080/api/v1/auth/password/validation
with data:
{ "identifier": "BANANA", "password":"Password1" }
and:
{ "identifier": "BANANA", "password":"Password2" }
4 - Note you receive the same response for both
5 - Apply patch, restart all
6 - Repeat the API and confirm you get the correct patron for the password submitted
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
A Marcel's QA patch to Bug 36552 added use POSIX; in two spots.
In https://metacpan.org/pod/POSIX we read:
CAVEATS
Everything is exported by default (with a handful of exceptions). This is
an unfortunate backwards compatibility feature and its use is strongly
discouraged. You should either prevent the exporting (by saying use
POSIX ();, as usual) and then use fully qualified names (e.g.
POSIX::SEEK_END), or give an explicit import list. If you
do neither and opt for the default (as in use POSIX;), you will
import hundreds and hundreds of symbols into your namespace.
This patch fixes this.
No test plan.
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 8d9ccd6fc371877fbd4d016ee3bc1de54721787e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ca023b334cc9b79cfd85e6bb9a75c7037ae1fd95) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Pedro Amorim [Fri, 3 May 2024 14:22:13 +0000 (14:22 +0000)]
Bug 34263: (QA follow-up): Use flatpickr .clear instead
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1137793e44ce6b5d2a4e7759e46218f6ddeb9e8b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dcddcda37d1efb586cb75a89df4ad6af0bf438ee) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katariina Pohto [Thu, 2 May 2024 13:09:39 +0000 (16:09 +0300)]
Bug 34263: Suspending holds consecutively populates previously used date falsely
Suspending a hold doesn't clear the date from the date picker. When another hold is suspended
the previously used date will show on the date picker but the value is not set on the hold.
Suspending the hold will suspend it indefinitely. Also the link "Clear date to suspend indefinitely"
will not clear the date picker. This patch will make both the Suspend button and the Clear date link
clear the dates from both the date picker and the variable passed on, making the suspending consistent
with what is seen on the date picker.
Test plan:
1) Place 3 holds on a patron.
2) Suspend a hold and set a date for it.
3) Suspend a second hold and notice the previously used date is shown on the date picker.
Note that the hold will be suspended indefinitely.
4) Open the suspending window for the third hold and pick a date. Click "Clear date to suspend indefinitely"
and note the date picker doesn't get cleared. The hold will be suspended indefinitely.
5) Apply patch.
6) Suspend a hold and set a date for it.
7) Suspend a second hold and notice the date picker does not have a preset date.
8) Pick a date and clear it with the "Clear date to suspend indefinitely link".
See that the date picker also gets cleared.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0f0479e87aaa324b455fbbf40674f15e2fa862c0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 44a26cbec7d63d873c0b13cbd8097138431480d0) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 22 May 2024 12:01:28 +0000 (14:01 +0200)]
Bug 36923: Remove warnings from Holds/LocalHoldsPriority.t
t/db_dependent/Holds/LocalHoldsPriority.t .. 1/7 Use of uninitialized value in numeric gt (>) at /kohadevbox/koha/C4/Reserves.pm line 866.
t/db_dependent/Holds/LocalHoldsPriority.t .. 2/7 Use of uninitialized value in numeric gt (>) at /kohadevbox/koha/C4/Reserves.pm line 866.
Use of uninitialized value in numeric gt (>) at /kohadevbox/koha/C4/Reserves.pm line 866.
Use of uninitialized value in numeric gt (>) at /kohadevbox/koha/C4/Reserves.pm line 866.
t/db_dependent/Holds/LocalHoldsPriority.t .. 5/7 Use of uninitialized value in numeric gt (>) at /kohadevbox/koha/C4/Reserves.pm line 866.
t/db_dependent/Holds/LocalHoldsPriority.t .. ok
All tests successful.
We didn't have the default values generated by the DBMS
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 6827c9061ffc57c2e1f7087aced8ce2e65196558) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 233e92f8996958e66363557daec1859a4f76c93b) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Phil Ringnalda [Thu, 16 May 2024 20:54:41 +0000 (13:54 -0700)]
Bug 36589: Advanced cataloging - restore the correct height of the clipboard
A simple direct fix for the height of the advanced editor's clipboard,
which is a <select size="10"> that's currently cut down to the height of
one thick line by CSS intended for non-multiple, non-sized selects with
dropdown menus.
Test plan:
1. Set the pref EnableAdvancedCatalogingEditor to Enable
2. Cataloging -> Advanced editor
3. Note the Clipboard is a single line tall
4. Apply patch, shift+reload Advanced editor
5. Note the Clipboard is ten lines tall
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 10a8dc5108dc58d91786ead95f5130a7a147d5b1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0413d06b0e0f9e2bb8ec3bf26a55d445a7df7119) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Thu, 23 May 2024 09:36:55 +0000 (10:36 +0100)]
Bug 36908: (QA follow-up) Proposed improvement to prefernce description
I found the initial addition of 'or the branch chosen at login' to the
system preference description more misleading than the original. After
discussion on mattermost and with training staff here at PTFS the best
alternative we could come up with is proposed here.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 85735e86f4f927d8e455aec08ef90a1381694059) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b478d91b59a11574b0fd7689b5037c2c29ee8d42) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 21 May 2024 12:44:25 +0000 (12:44 +0000)]
Bug 36908: Sort branches based on branchcode
This adds a sort based on branchcode, it's a fallback for an edge case that should be rare
so I think is acceptable, as long as documented.
I added test coverage, but it may no longer be possible to encounter this scenario.
System preference descriptions are updated as well.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 46cecfdd72ee45bfad03c6875fdc078df48eabec) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7682763fca0e1d14c27a32e9987e8c66712229cb) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 21 May 2024 12:26:34 +0000 (12:26 +0000)]
Bug 36908: Additional unit tests to identify flaw when two branches have same IP
This could be considered a configuration flaw, but when:
StaffLoginBranchBasedOnIP enabled and not AutoLocation
or
AutoLocation enabledand no IP set in user's branch
AND
two branches have the same IP set
the user can be logged in randomly to one of the matching branches.
These test often pass, but will also randomly fail
Easier to verify with a one liner demonstrating current code:
perl -e 'use Koha::Libraries; use List::MoreUtils qw(uniq); my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search->as_list }; my $branchcode="CPL"; warn Data::Dumper::Dumper( uniq( $branchcode, keys %$branches ));'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7e8803537254ec950c64327bece8091e6cf49499) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aa1c4c0281039749fa024687049b32b375d78ec6) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 21 May 2024 12:14:50 +0000 (12:14 +0000)]
Bug 36908: Expand, clarify, and tidy tests for AutoLocation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6966fcc398d3a87edba95aa987d915a1b00eb08f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 15bf32a50a9c4cfff9e7b8b139f7fb639e90b331) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 23 May 2024 06:49:39 +0000 (08:49 +0200)]
Bug 36924: Remove warning "Value not allowed for auto_incr itemnumber in Item"
We are removing entirely the badly written test.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Note: We cannot test this properly when the search index refers to biblios
and items that do not exist in the database. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 12511385289b41c3c3d067f1b7c4397010e3d27c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 98fa5f6b25360e056dac72a776e880ec2c4d4970) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 17 May 2024 11:59:21 +0000 (11:59 +0000)]
Bug 36665: Add option to set the staff user's logged in branch based on their current ip
This patch adds a new system preference StaffLoginBranchBasedOnIP which restores the behaviour before bug 35918
of using the current IP to determine the user's logged in branchcode
To test:
1 - Get your current ip
2 - Set that IP for a library in the administration section
3 - Find a user account assigned to a different library that can login to staff side
4 - Login to staff as that user, select 'My library'
5 - You are logged in to the user's branch
6 - Apply patch, restart all
7 - Log out and back in, selecting 'My library'
8 - You are logged in to the user's branch
9 - Enable new system preference StaffLoginBranchBasedOnIP
9 - Log out and back in, selecting a different branch, noting the new warning below the library selection
10 - You are logged in to the branch with the matching IP
11 - Log out and back in, selecting 'My library'
10 - You are logged in to the branch with the matching IP
11 - Change your logged in branch
12 - Verify the selection sticks and you can perform staff actions in the chosen branch
13 - Change the IP of the library to one that doesn't match yours
14 - Verify you can log out and log back in and that selected branch is respected when your IP doesn't match library IP
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 3a0d6f5d07b914ab03f9ae3c56b033158bd91130) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f4632ef04365436079a78b3b0e23bd34536d972) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Tue, 21 May 2024 14:20:18 +0000 (14:20 +0000)]
Bug 36858: Check page parameter for virtual shelves
Test plan:
Try passing page=x now and verify different behavior (no 500).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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 90f011355735d16af8cdf6ef224ccf8074ad94e1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d903ffd4e61689ddcac0f4cd046d2b9f800859f3) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 1 May 2024 18:19:42 +0000 (18:19 +0000)]
Bug 35929: Don't record a change for empty fields submitted in patron form
This is reminiscent of bug 36159 - when a field is submitted as empty, and null in the DB
we need to reject this as a change. I tried to copy the logic from that bug, as well as
deleting submitted changes for hidden fields (from html manipulation)
This should be tested extensively. One note: If you submit a valid change request, then submit a second with no change the second will be ignored, but the first will remain. i.e. if you change your name from 'Nick' to 'Nack' - then realize your typo you cannot submit a new request to change it back untl the initial request is cleared
To test:
1 - Play with PatronSelfModificationBorrowerUnwantedField and PatronSelfModificationMandatory field to have some fields set
2 - Add a patron attribute, or several, that are editable in the OPAC
3 - Try submitting a form with no changes, note a modification requets is submitted
4 - Approve the request
5 - Apply patch, restart all
6 - Try submitted a blank request, you are notified there were no changes
7 - Try to force an unwanted field via html modification
8 - No changes reported
9 - Confirm attributes changes are successful
10 - After a successful request, try submitting a blank request
11 - Note no changes are recorded, but the initial request is still active
Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 cf4a3667cbeb4dbb6b7dd74fd30a3cacca540603) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1a898d94649f13e76e094c14ad41395f2bd19c9a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 14 May 2024 07:29:02 +0000 (09:29 +0200)]
Bug 36845: Exclude meta tag from the translations
This bug originaly wants to get rid of "noindex" coming from this meta
tag:
<meta name="robots" content="noindex">
But actually we have other strings from the meta tags that should not be
translated.
Test plan:
0. Do not apply this patch
1. cd misc/translator/po && gulp po:update --lang es-ES (or any other
lang)
2. git commit -a -m"wip"
3. Apply this patch
4. Repeat 1 and git diff to show the diff
Notice that strings that should not be translated are removed from the
po files (actually commented)
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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 fbb123b12eab123e62c508944fd2b6261fb24acf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b3dfb82bd030aefb2299fd6e00d31588dbdcffb4) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Thibaud Guillot [Fri, 17 May 2024 09:13:21 +0000 (11:13 +0200)]
Bug 36892: Fix label for 'is_standing' input
Test plan:
1) Go to acqui/histsearch.pl and look for "search_children_too" with
dev tools console.
2) On 'is_standing' input, the same label is used
3) Apply this patch and reload it
4) Now it's correct
Sponsored by: BibLibre
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 40900343673c280d092de9c57399a77c113b41ba) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dacd7fabbe318ad3c340dd5cc1d35b2e67c040d8) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Tue, 14 May 2024 09:41:57 +0000 (11:41 +0200)]
Bug 36856: Fix MARC subfield name in new order from existing bibliographic record
In form of the bibliographic details when adding an order 'From an existing record' in a basket, the marc subfield name is not shown.
The template calls [% field.lib | html %] but this comes from Koha::UI::Form::Builder::Biblio generate_subfield_form() which gives 'marc_lib'.
Test plan:
1) Be sure to have an ACQ biblio framework
2) Enable system preference UseACQFrameworkForBiblioRecords
3) Go to an acquisition basket
4) Add a term in 'From an existing record' and submit
5) On first result click on 'Add order'
6) Look at 'Catalog details'
=> Without patch you only see subfield tag and letter : (123a)
=> With patch you also see subfield name : Name (123a)
Signed-off-by: Lucas Gass <lucas@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 5080eecc2268c2b7b88856800e728041c2fc29ec) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 33370ea55b34b234d8d0f05e84dd03dc5d4313aa) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Janusz Kaczmarek [Sat, 11 May 2024 08:41:04 +0000 (08:41 +0000)]
Bug 36834: (Bug 29697 follow-up) Koha explodes when trying to open in Labeled MARC view a bibliographic record with an invalid biblionumber
After changes made in catalogue/labeledMARCdetail.pl with the bug 29697
when trying to open the Labeled MARC view with
biblionumber=<invalid_number> (e.g. a deleted biblionumber) Koha explodes
with a message << Can't call method "metadata" on an undefined value at
/kohadevbox/koha/catalogue/labeledMARCdetail.pl line 59 >>
Test plan:
==========
1. Activate the viewLabeledMARC syspref.
2. Try to open a biblio record in Labeled MARC view, giving as a biblionumber
(in URL) a non-existing biblionumber, e.g. in ktd, with standard ktd
test data:
http://your_ktd:8081/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=1234567
Koha should explode with the message:
Can't call method "metadata" on an undefined value at
/kohadevbox/koha/catalogue/labeledMARCdetail.pl line 59
3. Apply the patch; restart_all.
4. Repeat p. 2. You should get a regular page with the info "The record you
requested does not exist (1234567)".
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e4e54af0e77a01d8ad1ee6ac84f5b255951f1831) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 944f3ffc8f0f59b2080d0670f4691a2343413e50) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 16 May 2024 12:52:04 +0000 (12:52 +0000)]
Bug 36872: Untranslatable strings in request.tt
There are errors in the JavaScript in the holds template in the staff
client which results in strings not being translatable. This patch
corrects the errors.
To test, apply the patch and run through the process of placing a hold
on multiple items in the staff interface.
- At the hold confirmation step, try to submit the form without
selecting pickup locations for one or more titles.
- You should get an alert, "Please make sure all selected titles have a
pickup location set".
- Uncheck the checkboxes next to each title you're placing a hold on.
- Submit the form. You should get an error: "Please select at least one
title".
- Test the translation process with a language, e.g. fr-FR:
- In KTD, run: gulp po:update --lang fr-FR
- Check fr-FR-staff-prog.po for the line referring to
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:1499
- You should see the string "Please make sure all selected titles have a
pickup location set".
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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 537c960777f94cf964c757ed2773f330612ae3c7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4a51f8ca4ae772d5b3f9f06605aa72980ef49a19) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 36529: manage_additional_fields permission for more than acquisitions and serials
This patch renames the manage_additional_fields permission to remove
the specificity of acquisitions orders and serial subscriptions.
Since each additional field requires a corresponding permission, I
wrote each of them next to it. It makes it very long, but right now
there isn't really a way to link permissions other than the permission
description.
To test:
1. Apply patch
2. Go to a patron account
3. Click More > Set permissions
4. Go to the Administration panel permissions and open the
sub-permissions
5. Check that the manage_additional_fields permission description
makes sense, check grammar and spelling, try the various
combinations
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e251212ff5f783ff7d5d9de3821510ba7928d95f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fd982c027ddf247e441f2db278145b54f7dc537c) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Mon, 6 May 2024 12:28:45 +0000 (12:28 +0000)]
Bug 36793: Fix case of $var in Context->delete_preference
This only applies to 'local' preferences.
Test plan (first without this patch):
Add a local pref. Delete it. Ask value on commandline with:
* perl -MC4::Context -e"print C4::Context->preference('YOUR_PREF')"
* Did you replace YOUR_PREF :)
Now repeat with this patch. And verify fix (no value now).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8ea126b1f89e24a2baf8c43f7bf837bf74741088) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6122b60194af5b6939a6bbae6bc3c7973835b309) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 17 Apr 2024 10:18:11 +0000 (12:18 +0200)]
Bug 36619: Restore 'Columns' visibility on the patron search when placing a hold
Test plan:
Go to /cgi-bin/koha/reserve/request.pl?biblionumber=117
Search for "d"
Notice that with this patch applied the "Columns" button is back and
that the "Configure" is working correctly
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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 76ebbb4b9b3a39c6e7ffffe8ad1b9b2c603daf5c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b485b949f4207ffa7b8651858ba4850557734042) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Mon, 13 May 2024 22:15:02 +0000 (22:15 +0000)]
Bug 35961: (follow-up) Pass along the borrowernumber
To test:
1. APPLY PATCH
2. Turn on OpacCatalogConcerns
3. Find a record and go to the OPAC detail page.
4. Click "Report a concern" in the right navigation menu
5. Make sure it works
6. Repeat the proces from MARC view and ISBD view pages
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 e412a4387c888816cf478d811a559c5f57f7e9e2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dc8fb79cf4438f31cf72942caccf4a7d6c9bd665) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Mon, 13 May 2024 13:43:53 +0000 (14:43 +0100)]
Bug 35961: Add missing includes
This patch adds the missing includes for the 'Catalog concerns' modal on
opac-MARCdetail and opac-ISBDdetail views.
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 c2154173af06efaf007e0cdf444f885275d61f1b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e90c544841efed6cf31ec8433f2e79161a07095f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch makes the XSLT contain HTML tags instead of building them
from scratch with static attribute values. This made it awkward for
translators as CSS classes ended up being extracted for translation
purposes. Plus, there's no need to spend CPU cycles on static content
generation.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 48e39c1e5cea2db2c4e0951a6efcae7e611490fb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 22ff328708b377b4599bd072a9b444bae5953fa3)
Janusz Kaczmarek [Tue, 18 Apr 2023 19:42:24 +0000 (21:42 +0200)]
Bug 33099: Add missing MARC21 Match authority mappings so "Search all headings" search works
The main entry form of corporate names (110), uniform titles (130), topical
terms (150), geographical names (151), and genre/form (155) are not indexed
with 'Match' search field in Elasticsearch standard mapping. As a result,
the respective records are not present on the result list when performing
an 'All headings' search for the authority records with the main heading form
(MARC 21).
Test plan
=========
0. Have a test installation with Elasticsearch.
1. In Authorities, make an 'All headings' search for a main entry
form from the corporate names, uniform titles, topical terms,
geographical names, or genre/form
--> e.g., in ktd: UK Archiving. You will get no results.
2. Apply the patch, reindex with:
sudo koha-elasticsearch --rebuild -r -a kohadev
3. Repeat the test. You should see 'UK Archiving' on the result list.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d4c70f7d07dcc0fe1319b6e0380abcd1b7400b95) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5e405a29a8b5af3daf8c51f814844086d828e63a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Wed, 20 Mar 2024 19:32:50 +0000 (15:32 -0400)]
Bug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not set correctly
We can get into a scenario what a user cannot stay logged in for more than a single page load.
If AutoLocation is enabled with branch IP addresses being set to a space, you will be logged out with every page load.
Test Plan:
1) Set your branch ip to a space
2) Enable AutoLocation
3) Restart all the things!
4) Log out
5) Log in
6) Browse to another page
7) You are logged out
8) Apply patch
9) Repeat 1-6
10) You are not logged out!
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7291a312332e4fac7ac61288f33a001d4a7b306c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d3dd7d20f1eae2bed24bb6833d08b4c80b4a250f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
danyonsewell [Fri, 10 May 2024 02:40:45 +0000 (02:40 +0000)]
Bug 36723: Add musical presentation to Elasticsearch index mappings
Testing plan:
1. Start up KTD with Elasticsearch: ktd --es8 up
2. Apply the patch and restart everything (restart_all).
3. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)
4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev
5. Alternative to steps 3 and 4: reset_all
6. Update the visibility for 254$a in the default framework so that it is visible in the Editor (OPAC, Staff interface should already be selected).
7. Add a new record using the default framework and put a term in 254$a, such as 'Full score'.
Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fffb3665eadec04792b055e9ba04152b3b36d6dd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 58052b46f4365b0d5c6729b80a84b7f13ebe6b34) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Wed, 6 Mar 2024 18:41:04 +0000 (18:41 +0000)]
Bug 34823: Do not show Item group dropdown if there are no item groups
To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Go to the OPAC and log in as a patron
3. Go to any record that doesn't have grouped items and try to place a hold
4. Click on "Show more options"
5. See "Request specific item group:" and dropdown
6. APPLY PATCH
7. Try again, this time if the record has no item groups you should not see the dropdown at all.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit be98d633be1fb34f52ccc8b57b18280856cf1d1a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 58c25f1c78091c714e24710ca65b8989f02c80b4) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 36794: Illegitimate modification of biblionumber subfield content (999 $c)
It happens that librarians, by mistake, open a biblio editor putting in the
URL, by hand, the biblionumber prefixed with a blank (e.g.
.../addbiblio.pl?biblionumber= 123 -- mind the space before 123).
In such a case the editor opens with the right biblio record (i.e. 123)
but, after saving the record, the content of the biblionumber MARC
field (999 $c for a standard MARC 21 installation) results modified and
contains additional initial blanks.
Moreover, while using ES and making a search for the record (with title,
author etc.) we get two records on the result list (instead of one).
This is because in the addbiblio.pl script $biblionumber is taken (and
continuously used) directly from CGI parameter, without any
validation and/or correction.
Test plan:
==========
0. Have a test installation with ES.
1. Open a biblio record in the editor with an added space before
biblionumber value, e.g.:
http://ktd:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber= 123
Save the record.
2. From the Normal view choose Save -> MARCXML. Open the saved file in
your favourite editor. You should see, at the end, something like:
<datafield tag="999" ind1=" " ind2=" ">
<subfield code="c"> 123</subfield>
(mind the space before 123).
This is not right.
3. Make a search with the title or author's name from the record (e.g.
Henning Mankell for the record 123 from the default ktd data set).
You should get two records instead of one (while using ES).
4. Apply the patch, restart_all. Repeat p. 1 and 2 with a different
biblionumber. Notice the unchanged (i.e. without spaces) value
of 999 $c subfield in the exported record and only one record
as a result of a search.
WNC amended patch - rebased, added conditional in case no bib, moved comments to their own lines
Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c74169ba27c2e12473239b15358e428bc05da9f5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 076b82d52036a4779ff762319586dcba24e72cbf) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 36799: Illegitimate modification of MARC authid field content (001)
It happens that librarians to save time open an authority editor by putting
in the URL, by hand, the authid prefixed, by mistake, with a blank (e.g.
.../authorities.pl?authid= 100 -- mind the space before 100). In
such a case the editor opens with the right auth record (i.e. 100) but,
after saving the record, the content of the authid MARC field (001 for
a standard MARC 21 installation) results modified and contains
additional initial blanks.
Moreover, if the heading (1XX field) was modified in the authority record
during such an edit, the changes will not propagate to the linked
bibliographic records. And won't in the future.
This is because in the authorities.pl script $authid is taken (and
continuously used) directly from CGI parameter, without any
validation and/or correction (line 540 in the current main branch).
Test plan:
==========
1. Open an auth record in the editor with an added space before
authid value, e.g.:
http://ktd:8081/cgi-bin/koha/authorities/detail.pl?authid= 100
Modify the heading field -- in the ktd data set:
150 Computerized typesetting
Save the record.
2. a) Open the record for editing again--see the space added before
the authid in field 001. Close the editor (with Cancel).
b) Try to go to the linked biblio records with Used in X records.
Note no results, if using ES.
c) Remove the space before authid (after an:) in the URL.
Go to the linked biblio records. See that the content of
the field controlled by the modified auth record did not
update.
3. Apply the patch; restart_all.
4. Repeat p. 1 and 2 with a different authid. Everything should
be OK now.
Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b66fbc4ebc0fe706f9a9b9057a19ee0c1b13aa3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 65e1816bbaa83ff88800d9dd9a3eddb208eb31a7) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 33849: Do not reset new patrons home library when error occurs
While adding new patron, if patron is flagged as duplicate
or another error occurs and their home library differs from
library user is logged in, patrons home library resets as
logged in users library. This happens with all patrons
expect those with category type C. This patch removes checking
if patrons category type is C from code so that all category
types use previously chosen home library even if error occurs.
To test:
1. Add new patron and set their library to a different
library than the one you're logged in.
2. Cause an error (wrong age, duplicate etc) while saving.
3. Attempt to save.
=> Note that patrons home library is set as one you're
logged in.
4. Apply this patch.
5. Repeat steps 1 to 3.
=> Note that patrons home library hasn't changed.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Esther <esther@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d2f41df188c3d8e8d8705c6a5ceb583e3e29e629) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3c52b89167018f79456a3308cdd5f7266856ef5f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Mon, 29 Jan 2024 09:08:00 +0000 (10:08 +0100)]
Bug 35927: Selecting MARC framework again doesn't work when adding to basket from an external source
Like Bug 19372, selecting MARC framework currently doesn't work when adding to basket from an external source.
Strangly I can reproduce on koha-testing-docker, but we have this issue with a Ubuntu Focal install.
Looks like it comes from a bad syntaxe than needs to be replaced in any case.
Test plan:
1) Add an order to a basket from an external source
2) Select another framework than the default one on the search result
view. Before doing 'add order' on choosen search result line.
3) Chek the framework code you will pick will be used in the created biblio record
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b7a5cc5beeb4af7cd23a414519c038f007f5b959) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 71b9421451dce017c12b82f34240431d4069a288) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 34041: (follow-up) escape double dashes to prevent issues
Having double dashes inside a commmented block is not valid XML. This
patch restores it, with an added message explaining it
To test:
1. Run:
$ xmllint etc/z3950/config.xml
=> FAIL: You get:
etc/z3950/config.xml:5: parser error : Double hyphen within comment: <!--
<config>
<z3950_responder_options>
<z3950_responder_options>--add-item-status k -t 5</z3950_responder_options
2. Apply this patch
3. Repeat 1
=> SUCCESS: All good!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 11c69496bcd216ad264acd87409e5160c73995bf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit afb9cd8e1ccf941ae8cf6e1070dd41a285dcb86b) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Liz Rea [Fri, 16 Jun 2023 17:50:35 +0000 (12:50 -0500)]
Bug 34041: z3950 responder additional options not coming through properly
This patch adds the <config> node that the z3950 responder starter script is looking for in the z3950/config.xml to the example code.
To test:
- verify that the <config> </config> is around the commented z3950_additional_options suggestion in the etc/z3950/config.xml file
- copy the config stanza to the live file: /etc/koha/sites/kohadev/z3950/config.xml
- restart_all
- ps aux | grep z3950
- confirm the script has restarted
- confirm the options: --add-item-status k -t 5 have been passed through
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 3878dbe9994186d70b3eb94e5096d4d1c6cf5452) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7773b92a0c1cf86f1e17b2dc519db49abcf3b46f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jan Kissig [Tue, 23 Apr 2024 18:19:05 +0000 (20:19 +0200)]
Bug 36676: SIP2 drops connection on unknown patron id in fee paid message
When sending a fee paid message to SIP2 with an unknown patron id it will respond with an empty response followed by dropping the connection to a client.
Test plan:
a) perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL --patron 2352900100046 -m fee_paid --fee-type FT --fee-amount 0.01
Output:
Trying 'fee_paid'
SEND: 3720240423 124447FT00USDBV0.01|AO|AA2352900100046|ACterm1|
Use of uninitialized value $data in concatenation (.) or string at /usr/share/koha/bin/sip_cli_emulator.pl line 355, <GEN0> chunk 1.
READ:
b) apply patch
c) perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL --patron 2352900100046 -m fee_paid --fee-type FT --fee-amount 0.01
Output:
Trying 'fee_paid'
SEND: 3720240423 125602FT00USDBV0.01|AO|AA2352900100046|ACterm1|
READ: 38N20240423 125602AO|AA2352900100046|AFInvalid patron barcode.|
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 d59e148879c0495f5071998d4521875e9c9022ed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d2ee1abc2cc219551b54e494bbdf75c2c4e3849f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Phil Ringnalda [Thu, 2 May 2024 23:19:17 +0000 (16:19 -0700)]
Bug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches
The advanced editor currently saves which Z39.50 servers are selected
in local storage using the index in the sorted array of servers, and
then misreads them back as though they were server_ids. We want them to
be server_ids, since that's immutable and the index can change with
changes in rank or server name.
We use the data-server-id property in the HTML more often as a server_id
than as the index that's currently stored there, so this patches
switches it back to be the server_id, and in the one place we would use
the index, instead uses Array.find to just get the server object instead
of referencing it by index.
Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to enable
2. Administration - Z39.50 Servers, for NATIONAL LIBRARY OF FRANCE
uncheck "Preselected"
3. To be sure you don't have confusing saved preferences, open
Firefox's Developer Tools, in the Storage tab open Local Storage and
select your URL
4. In the row for cateditor_preferences_{your Koha user id}, if there
are any values for selected_search_targets, delete them so you
have "selected_search_targets":{}
5. Open the advanced editor, and click "Advanced »" in the search box
6. You should have Local catalog unchecked, LIBRARY OF CONGRESS checked
because it is preselected, and NATIONAL LIBRARY OF FRANCE unchecked
7. Toggle each checkbox so Local catalog and France are selected, and
LoC is unselected.
8. In a new broser tab, open the advanced editor, and click "Advanced »"
9. You will see Local catalog unchecked, LoC checked, and France
unchecked.
That's the bug.
10. Apply patch, open the advanced editor in a new tab, click "Advanced »"
11. Toggle the checkboxes so Local catalog and France are selected, and
LoC is not selected.
12. Open the advanced editor in another new tab, click "Advanced »"
13. You should see what you just set, Local catalog and France checked,
and LoC unchecked, That's the correct behavior.
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 a8f4fe946cbafd46621a7a94812580ce0104fe7e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 268e6bf0ff717e18ccb79b1d3a5fe2c38a300b88) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Pedro Amorim [Tue, 7 May 2024 15:46:23 +0000 (15:46 +0000)]
Bug 36804: Fix clear filter
1) Visit serials and click "New subscription":
http://localhost:8081/cgi-bin/koha/serials/serials-home.pl
2) Enter '112' on the record input and '1' on the vendor input. Click "Next"
3) 'First issue publication date' -> Enter some date in the past
4) 'Frequency' -> Enter '2/day'
5) 'Subscription start date' Same as step 3)
6) 'Subscription end date' Some date in the future
7) 'Numbering pattern' -> Enter 'Number'
8) Click 'Test prediction pattern'. Click 'Save subscription'
9) On the left side menu -> Click "Serial collection". Click the yellow button 'Edit serials'
10) On the first serial, edit the status to 'Late'. Save.
11) Visit serials claims:
http://localhost:8081/cgi-bin/koha/serials/claims.pl?supplierid=1
12) Input some dates in "From" and "To"
13) Click 'Clear filter'. Notice it doesn't work.
14) Apply patch. Repeat.
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 e6b778b5d49cffcb33ccfa30542c4271d35e60e9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f69ea4e87c0468016296ab6eed3e67fb26eb28e2) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Pedro Amorim [Fri, 3 May 2024 14:07:25 +0000 (14:07 +0000)]
Bug 36774: Remove wrapper if already exists
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c6e2995d278df289065a32f19af7ca9b9226d3ea) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4eee85709c4f215c2bc72bc480291b2d1c08007b) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 11 Jan 2024 11:53:42 +0000 (11:53 +0000)]
Bug 34360: Get distinct biblionumber
This fixes the problem noted in the bug:
[WARN] DBIx::Class::ResultSetColumn::new(): Attempting to retrieve non-unique column 'biblionumber' on a resultset containing one-to-many joins will return duplicate results. at /usr/share/koha/Koha/Objects.pm line 421
We are taking a list of items, assuming the scenario is that these are from a single biblio and possibly some host_items, then searching and ordering conditionally on whether the biblio is a serial.
Current code gets the first biblio from the list - this patch adds a 'DISTINCT' to the results ebfore fetching the column
To test:
1 - Find a biblio in the staff interface
2 - Transfer one of the items a few times
3 - Recreate the issue on the command line:
export DBIC_TRACE=1
perl -e 'use Koha::Items; my $items = Koha::Items->search({biblionumber=>9})->search_ordered(undef,{ prefetch => ['issue','current_branchtransfers'] }); $items->next'
4 - Note warning:
DBIx::Class::ResultSetColumn::new(): Attempting to retrieve non-unique column 'biblionumber' on a resultset containing one-to-many joins will return duplicate results. at /kohadevbox/koha/Koha/Objects.pm line 426
5 - Apply patch
6 - Repeat 3
7 - Error is gone
Signed-off-by: baptiste <baptiste.bayche@inlibro.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 b5388933b64b78ce22b058dd1e5b96e1c0ec78a0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 465a41d7c1866fc7bfbb643419927aae747fe524) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katariina Pohto [Thu, 2 May 2024 11:27:06 +0000 (14:27 +0300)]
Bug 36534: Batch operations when using limit in report
When report results number exceeds the result per page limit, batch
operations link reads "Batch operations with (page limit) records" even
if there are more or less shown records (more when using limit in SQL or
less in the last page of result). This patch fixes the link text to
actual shown records.
To test:
1) Create a report of items with a limit of e.g., 26.
2) Run report.
3) See that number of results shown exceeds 20 but the link says "Batch
operations with 20 visible records".
4) See that the second page shows 6 results but the link is still for 20
records.
5) Apply patch.
6) Run report again.
7) See that the link texts will show correctly 26 records on the first
page and 6 records on the second.
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 e9356afd9f7e8ee16165341b8009282ff9ab3ff3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e6beba64bc95219df8e07c1d9f635e6c41b576ff) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Janusz Kaczmarek [Tue, 30 Apr 2024 10:18:12 +0000 (10:18 +0000)]
Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update
Under some circumstances (e.g. non-standard disk latency) po files fail
to be generated. The output from the gulp po:update --lang xx-XX task
is than like this:
[10:01:39] 'po_update_staff' errored after 6.41 s
[10:01:39] Error: ENOENT: no such file or directory, open '/tmp/koha-5WCc9s/Koha-staff-prog.pot'
This is due to the time dependencies inside the function flush (callback)
(in the function xgettext) in gulpfile.js. It happens that the
/tmp/koha-NNNNNN folder gets deleted before the asynchronous callback
function called by fs.readFile is completed. The callback should copy
the content of the .pot file from /tmp/koha- to its final destination,
while, in parallel in fact, the folder inside /tmp is being removed.
This creates a race condition.
Test plan:
==========
Hard to reproduce. But the race condition found in the code should
be obvious.
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 67b3cbd438f0cee378cfa5236f2673ab6ea32f33) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5291e6b6b5118e08c6bcd38e559029c8b800003e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Janusz Kaczmarek [Tue, 14 Mar 2023 13:22:27 +0000 (14:22 +0100)]
Bug 36554: Document languages from field 041 should be present in 'ln' search field and Languages facet (MARC 21)
In Elasticsearch, the field 041 (subfields: a, d, e, i, j)
is not indexed with 'ln' search field. As a result, records cannot
be found when searching with languages present in 041 (but only
with the one from 008/35-37), and the languages are also missing
from the facet.
Subfields content (only relevant subfields):
$a - Language code of text/sound track or separate title
$d - Language code of sung or spoken text
$e - Language code of librettos
$i - Language code of intertitles
$j - Language code of subtitles
Test plan
=========
0. Have a test installation with Elasticsearch.
1. In ktd with its test data, make a biblio search for a language present
in 041 a/d/e/i/j but not in 008/35-37, e.g. for Japanese (with ln:jpn
or from Advance search). You will get no results.
2. Apply the patch, reindex with:
sudo koha-elasticsearch --rebuild -r -b kohadev
3. Repeat the test. You should get some records and also you should see
the Japanese language in the Languages facet.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d90c2a44e7506ec47a4f9481a1b8693b99244ecb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9b1f7dfa320fc1ba1e176cb18d75c6c51c20bf23) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 29 Feb 2024 16:36:34 +0000 (16:36 +0000)]
Bug 36390: Two minor OPAC CSS fixes
This patch makes corrections to OPAC CSS to address two small issues.
To test, apply the patch and rebuild the OPAC CSS.
- Perform a catalog search which will return multiple results..
- In the table of search results, check the icon and text for the
controls under each title: "Place hold", "Add tag", "Add to cart" etc.
- The colors should be consistent, with a slightly darker blue for the
icons.
- Scroll down until the table header "sticks" to the top of the
viewport.
- There should be no gap between the header row with the pagination
links and the row with the "Select all", "Clear all", etc. controls.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 09119cf9c51e098db891002035213f250f635077) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit eee4ebf0e78cc3dfe13c9f4e736f3107fb42bd02) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Hammat Wele [Thu, 21 Mar 2024 22:53:26 +0000 (22:53 +0000)]
Bug 36393: Renewal with a specific date does not take the new date due that we pick
When we renew a notice with a specific date and we have to override the limit, the new date due is not the date that we picked
To reproduce
1- Log in to the staff interface
1-1. Make sure you have a ciculation rule that allows you to renew
1-2. set the AllowRenewalLimitOverride system preference to Allow and SpecifyDueDate to Allow
2. Check out the item to a Borrower
5. Access the borrower's account and renew it until the limit is reached and note the due date.
6. Go to Circulation, click Renew
7. Enter the item barcode and choose a due date further than the due date from step 5 and submit
8. Click on Override limit and renew button
---> Note that the new date due is not the date that we picked in step 7
9. Apply the patch
10. Repeat step 6, 7 snd 8
---> Note that the new date due is the date that we picked
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c29e4ef1f1cda011867ba69207e4a0a0a74c829d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ebab11e2b0b05aa0a1e91c456d15f02c4483f414) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Wed, 10 Apr 2024 11:56:01 +0000 (11:56 +0000)]
Bug 36137: Make update_totalissues cron always skip the holds queue
To test:
1. Run the update_totalissues cron, the holds queue is updated.
2. APPLY PATCH, restart services
3. Run update_totalissues cron again, this time the holds queue should always be skipped.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 307acdf96b28c722a0027c1eeadb4c98ab38eeef) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bc8788cf93c452d1b94715af4e84341c072fc704) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Janusz Kaczmarek [Thu, 11 Apr 2024 09:21:42 +0000 (09:21 +0000)]
Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21
For MARC 21, canceled/invalid ISBNs (subfield 020 $z) are not being
indexed in Elasticsearch (search fields identifier-standard and isbn),
but it is for UNIMARC (subfield 010 $z). As a result, a user searching
for such an ISBN (e.g. with wrong checksum--and therefor put in 020 $z)
will not find the record in the catalogue.
A new isbn-all Elasticsearch search field 'isbn-all' has been created with
020az (MARC 21, and 010az for UNIMARC), 010z has been removed from isbn
search field for UNIMARC, and 020z has been added to identifier-standard
search field.
Test plan
=========
0. Have a test installation with Elasticsearch.
1. In ktd with its test data, make a biblio search for a cancelled ISBN
e.g. 9780007269854. You will get no results.
2. Apply the patch, reindex with:
sudo koha-elasticsearch --rebuild -r -b kohadev
3. Repeat the test. You should get "The ice princess / Camilla Läckberg".
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 915d585b50868c878e492b2ce7d60f92fd3e8e87) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f382f4a271abffd012cc3df1dda947c99dd0a0b5) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 36567: Get rid of Datetime warning in Circulation.t and dateexpiry.t
Running either t/db_dependent/Circulation.t or t/db_dependent/Circulation/dateexpiry.t
cause following error to be dispalyed:
You are creating a DateTime object with a far future year (9999) and a time
zone (Europe/Helsinki). If the time zone you specified has future DST changes
this will be very slow.
Smallest allowed value is 4999, so we need to use that rather than 9999 in tests.
To test prove t/db_dependent/Circulation.t and t/db_dependent/Circulation/dateexpiry.t.
Sponsored-by: Koha-Suomi Oy Signed-off-by: David Nind <david@davidnind.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 f5e9f9634fd0d3ea1d06ca24141cb10660a2cf66) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6302ec6200fb26f38edbc1a5e127431108dc54a9) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 24abc7c9973ce4b2b91a4b53375ef233faf59304) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bdb4f0c1bbc4b76910f64a687a40dfef00584b99) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Matthias Le Gac [Fri, 8 Mar 2024 21:44:51 +0000 (16:44 -0500)]
Bug 36122: Add unit test
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 69d87031514bb108fb33c4791d6f5a1ff0c0d544) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 47950495491658d6b4ae5cbe388787067fd1c32d) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Matthias Le Gac [Thu, 7 Mar 2024 21:55:37 +0000 (16:55 -0500)]
Bug 36122: NEW_SUGGESTION is sent for every modification to the suggestion
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4ab5e6d29d6a67320a2931e4b9f667879aaadb3d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 866e1269b27f1e28e26f8be1eec0e18279f12e8f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 23 Apr 2024 18:57:54 +0000 (18:57 +0000)]
Bug 36678: Index fields with non-filing characters in both versions
Currently we only remove non-filing characters for sort fields, however, this can make searching difficult.
This patch adds the filing form to the index as well to aid in searching.
To test:
0 - Setup Koha with Elasticsearch
1 - Import the sample record on this report: "L'amour de l'art"
2 - Search for "amour de l'art" - no results
3 - Apply patch
4 - Reindex
5 - Search for "amour de l'art" - result!
6 - Search for "title:amour de l'art" - result!
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 7c20263fd0930997a8da70b8798e0ada623ac2bc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 953ad1871cbafc79c25ef6423efef8392bccc21a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 23 Apr 2024 18:57:45 +0000 (18:57 +0000)]
Bug 36678: Adjust unit tests
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 93a647fa90b13bfc0bc13eb71c445b37498647e3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d3b223c903d59055556fcf7a7bd104026096672d) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 2 Mar 2023 17:01:07 +0000 (17:01 +0000)]
Bug 32565: Add unallocated option to holds queue
Add an unallocated option to CreateQueue and pass through as needed
Avoid deletion of the tmp_holdsqueue, and only check holds
and items that are not currently matched
A future hold with a higher priority will still fail here - because the
item may already be assigned, but on next change to the biblio it would
be corrected
To test:
1) Apply both patches
2) Enable RealTimeHoldsQueue and set HoldsQueueSkipClosed to "open"
3) Add a holiday to the calendar for all libraries for today, visit:
/cgi-bin/koha/tools/holidays.pl
-- Click today's day on the calendar and pick "Holiday repeated every same day of the week"
-- Click "Copy to all libraries". Hit "Save.
4) Place a biblio-level hold on a biblio record and set the pickup location to a library that has available copies, visit:
-- /cgi-bin/koha/reserve/request.pl?biblionumber=76&borrowernumber=51
-- Click the first "Place hold" button to place the biblio-level hold.
5) Verify that that hold got added to the holds queue, visit:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1
6) Place a biblio-level hold on a biblio record where there are no other holds and copies are available at another location, but not the pickup location, visit:
-- /cgi-bin/koha/reserve/request.pl?biblionumber=437&borrowernumber=51
-- On the "pickup at" dropdown, pick something else other than "Centerville", e.g. "Fairfield".
-- Click the first "Place hold" button to place the biblio-level hold.
7) Check the holds queue again, notice that this 2nd hold was not added to the queue:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1
8) Run the updated cronscript:
perl misc/cronjobs/holds/build_holds_queue.pl --force --unallocated
9) Notice nothing changed in the holds queue, visit:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1
10) Remove the holiday we created previously, visit:
/cgi-bin/koha/tools/holidays.pl
-- Click today's day on the calendar and pick "Delete this holiday"
-- Click "Copy to all libraries". Hit "Save.
11) Run the updated cronscript:
perl misc/cronjobs/holds/build_holds_queue.pl --force --unallocated
12) Confirm the second hold is added to the holds queue, visit:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 939f1f389b848e06b7adcd7121ff7629a0ba4adf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75a6e3c3c478633ced797da843a772c2ace86cad) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Thu, 11 Aug 2022 19:43:15 +0000 (15:43 -0400)]
Bug 31345: Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails
Sometimes it would be better for process_message_queue.pl to stop if a plugin hook fails rather than continue processing. It would be nice if that was a command line option.
Test Plan:
1) Install any plugin with a before_send_messages hook
2) Modify the plugin, add a 'die;' statement at the start of the
before_send_messages method of the plugin.
3) Run process_message_queue.pl as usual
4) Note the exit code is 0
5) Run it again with the new -e setting
6) Note the exit code is 1
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 83f9535fabc37be46ab8154d940a7ff614617eb2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff2cce52c56e0cbfb7c8f760618b4b1e8db44d36) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Fri, 26 Apr 2024 18:41:42 +0000 (14:41 -0400)]
Bug 35582: Supress possible warning
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 615c7c5eafd207fdb1adc9a07a063ce83da668c0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f63dbed44ace3c041f7bcec3cc84bc211a5a86f0) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>