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>
lmstrand [Fri, 26 Jan 2024 08:36:00 +0000 (10:36 +0200)]
Bug 35582: Show advanced search languages with selected intranet language descriptions first
To test:
1. Check language dropdowns in advanced search, notice localized
names of the languages are shown first in the menus, then the
selected ui language translations if available or the english translation
2. Apply patch
3. Check language dropdowns, notice the selected ui language's
translations are shown first for the languages (if missing, english
translation), then the localized
language's name.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9c445218deb8daa8704ae48433783e723d8e8649) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2df2fbc309e06f6bb39e430349fb37a2efca3323) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 30598: remove all the console.log redundancies
Please test the patch. Thank you!
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 e0d38c77e6c9fff2d7c39cf523c1517b322ca9c7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9e49fab3ac86bada15ada49e551cf46288651fa7) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 30598: Replacement cost is not copied from retail price when ordering from file
Test plan :
To test :
1- In Acquisitions, create a basket
2- Add an order from a new (empty) record
--> Note that when you enter the "vendor price", it is copied in the "replacement cost" field
3- Add an order from a new file
--> Note that when you enter the "price", the "replacement price" field stays empty
4- Apply the batch
5- Redo step 3 and notice that when you change the 'price', the
'replacement price' syncs with it
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 bed0563e568c4ee13a851d22025d66f36651beec) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cf64df296cd1c97016ae245da847a3ce4ba4ba9d) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 3 Jan 2024 16:01:56 +0000 (16:01 +0000)]
Bug 35689: Add id and classes to each MARC note in OPAC bibliographic details
Building on Bug 14156, this patch updates the OPAC bibliographic
detail page's display of MARC notes to add the tag number in both a
class (for consistent styling across the same tag number) and id (for
unique styling for each repeated tag).
To test:
- As a quick test for custom CSS, go to Administration -> System
preferences and locate the OPACUserCSS preference.
- Add this testing CSS:
- Locate a record with multiple notes fields. In the sample data, record
46, "Viridiana" is a good example which works well with the above CSS.
- On the bibliographic detail page for the record, click the
"Descriptions" tab.
- Each MARC note should be colored according to the tag it comes from.
- Inspect the HTML to confirm that each paragraph also has its own
unique ID.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit dfd4894acbab3af5355b72c859a0a17deef70af5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0a5dbec79759cba07da5f062f2ac2e242228d1cf) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 36295: Space out content blocks in batch record modification
This patch adds a float clearing class to a line break in the batch record modification template to fix a spacing issue in Chrome.
To test apply the patch and go to Cataloging -> Batch record modification
There should be space between the two sections.
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 566894f058759c05922ec3399ba4ca96d27978f6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 813d06de274ed243ba38220e2b9e9f03372baddf) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Tue, 9 Apr 2024 12:02:40 +0000 (12:02 +0000)]
Bug 36295: Space out content blocks in batch record deletion
This patch adds a float-clearing line break to the batch record deletion
template so that the "Record type" section has visual separation from
the record number submission tabs.
To test, apply the patch and go to Cataloging -> Batch record deletion.
There should be padding between the two sections.
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 55fbfffa0efe2efc09baa3a5e4d01595152165e7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8b11a0f8eacc3deff912a0ec6fd4c70e4e59d59e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Tue, 30 Apr 2024 15:13:25 +0000 (16:13 +0100)]
Bug 35977: (follow-up) Cleaner working approach
This patch removes the Date_from_syspref recently added and replaces it
with the correct parseDate call as per bug 35559. We also clean up the
code around setting the input value in the first place and use iso which
is what the rest of flatpickr expects and now is handled correctly in
futuredate pickers.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1ff3d65c7073e5d93502d329b917d886a3665e0b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3880307a9f47433fed1e91dbeaf3fb743c0cd355) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Wed, 7 Feb 2024 15:21:04 +0000 (15:21 +0000)]
Bug 35977: Set holddatefrom default to today
This patch sets the holddatefrom date to today by default on the opac.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> 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 c341b2d37584aca52fcac7243f7ab68f324d002c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 648feb2594ea9454ec7de4996cd6f39deb8450e7) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Mon, 15 Apr 2024 14:21:03 +0000 (14:21 +0000)]
Bug 16567: Correct RSS feed validity errors
This patch corrects a few markup errors in the XML feeds to make the
feeds validate correctly. The template has been largely re-indented to
improve readability and eliminate tab characters.
To test, apply the patch and perform a search in the OPAC.
- Open the RSS link appearing after the "Your search returned..."
header.
- Depending on how your browser handles XML documents you may need to
view source on the page to see the actual XML markup.
- Copy the source and paste it into the W3C feed validator:
https://validator.w3.org/feed/#validate_by_input
- The feed should be found to be valid.
- In my tests you'll get a "Recommendation" about "Self reference
doesn't match document location." I think this recommendation
doesn't apply.
Perform the same test with the other two available formats: Atom and
OpenSearch:
- Change the end of the RSS feed url from '&format=rss' to
'&format=atom' and validate the result.
- The same "self reference" recommendation will come up, and again I
think we can ignore it.
- There is another recommendation about "Two entries with the same
value for atom:updated." The updated time is set to the same time
as the feed itself (the time when the feed was generated. Maybe
this is incorrect. If so we need a follow-up that exposes a
different value to the template. biblio.datecreated maybe?
- Change the end of the feed url from '&format=atom' to
'&format=OpenSearchDescription' and validate that result.
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.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 ee960bd45f7535aec058d3984891e21b255ace12) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1557d835a886229209fa887ca315b3766b2037df) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 26 May 2023 19:00:13 +0000 (19:00 +0000)]
Bug 32695: Fix search strings for 775, 780, 785 and 787
In the past due to some misunderstanding of the MARC standard
we built the search links for these fields using $a and $t with
the title index. But we actually need to search $t as title
and $a as author.
This patch fixes the templates for the MARC 7xx fields:
* 775
* 780
* 785
* 787
To test:
* Ensure systme preference 'UseControlNumber' is set to don't
* Create a record with the linking fields above
* Look at the OPAC and staff interface detail views
* Verify the content of your fields shows and the links combine a+t as a title search
* Apply patch
* Verify you have nicely formatted links now
Nick Clemens [Fri, 19 Apr 2024 12:29:31 +0000 (12:29 +0000)]
Bug 30318: Don't reset messaging preferences when form is empty
In testing, the messaging preferences are set in the form when EnhancedMessagingPreferences is enabled.
Switching categories silently updates the preferences unless you have made changes, in which case the
user is warned and can confirm if they want to reset or not. The code only applies to patron creatoin, and
does not seem to be taken into account during OPAC self-registration.
It seems the silent defaulting when saving can be removed in favor of the current updates/warns in the actual
form.
To test:
1 - Set some messaging preferences for at least two categories
2 - Enter a new patron
3 - Confirm switching categories correctly defaults the messaging preferences
4 - Edit the preferences and switch to another category with defaults
5 - Confirm the warning appears, and preferences are set if confirmed and ignored if not
6 - Set to a category with defaults, uncheck all, and save
7 - Ooof, patron is defaulted
8 - Apply patch
9 - Repeat 1-5 and confirm nothing has changed
10 - Set to a category with defaults, uncheck all, save
11 - Confirm patron is saved with no preferences
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 70fde44d4f6eef25e177012318e7acaa0ce740c3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 86cc4b4d245f704a306ee10cc0ebde89cc40273a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Pedro Amorim [Fri, 8 Mar 2024 11:49:26 +0000 (11:49 +0000)]
Bug 36282: Chomp whitespace around opac i18n strings
Same logic as bug 26816 but to OPAC
Test plan:
1) Apply test plan patch only
2) Visit opac home:
<opac_url>/cgi-bin/koha/opac-main.pl
3) Notice there's a space between 'Translated string' and ':', even though the markup does not contain a whitespace
4) Apply 2nd patch
5) Notice the white space is gone
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b9f97ec015e4f101546e308754db4ed532987fde) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5559ebc3bf8a6d3a3462e1367ce3901084cc7501) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 17 Apr 2024 09:48:16 +0000 (11:48 +0200)]
Bug 34963: Restore the ability to blank fields when editing a suggestion
Regression introduced by bug 23991.
We don't want to remove the fields from the edition if they are empty.
Ideally we should have separate parameters for edition and search, but
this is the low-effort fix, and hopefully won't introduce side-effects.
Test plan:
Try to edit a suggestion and blank some fields
Try to search for suggestions using the search form on the left of the
screen
Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cd1f4145fe091314895a4f8a4f73a5b3a5f8bb87) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e6a2b1afde992359d0a0ad860701838438a9ebaf) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Thu, 21 Mar 2024 14:17:35 +0000 (14:17 +0000)]
Bug 36386: Pass user and group to Net::Server
This prevents the User/Group Not Defined warns in syslog.
Test plan:
Restart sip and check your syslog.
KTD Test Plan:
1) Stop your SIP server
2) Run "perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/koha-conf.xml"
We need valid XML without any valid SIP settings to the output goes
to the command line
3) Note the warnings
4) Apply this patch
5) Repeat step 2
6) No warnings!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2973a4e81a2878b8d2654477b2556ad1b1fb4e46) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 89ce196ea77e0e46d6d66b1710325673b753bbd3) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 36420: Allow Basic authentication using `cardnumber`
This patch makes the API Basic authentication work with cardnumbers.
The used `checkpw_internal` method already does the fallback check.
To test:
1. Apply the unit tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/auth_basic.t
=> FAIL: Tests explode! [1]
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
[1] This highlights an underlying bug! Instead of getting 403, etc we get a 500. This is because of the internal fallback mechanism allowing the cardnumber+password combination, but then the Koha::Patron->find... not finding :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 154a2ea9ad5b6e911a504b8798f5ffe6df1c2297) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd58ce2a036e9b762f3e5418b7b670532de5dd05) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5c3ad38157f483aeb4ff26048a838b3ba6ad34fc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa768d5ed4a1b273d049679017c2ef0c4c7bdc20) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Mon, 26 Feb 2024 15:59:29 +0000 (15:59 +0000)]
Bug 30987: Fix relationship fields for patron full and quick add forms
To test:
1. APPLY PATACH and restart services.
2. Find the borrowerRelationship system preference. The description should no longer include the words "Leave empty to deactivate."
3. Populate the system preference with at least 1 choice.
4. Find a patron category with can_be_guarantee set to 'Yes'.
5. Quick add a patron of that type, making sure the relationship field shows in the Patron guarantor section. ( You have to +Add gaurantor before this field will show )
6. The values in the dropdown should refelct the borrowerRelationship values.
7. With BorrowerMandatoryField make relationship mandatory.
8. Try step 5 again, this time the Relationship field should be mandatory.
9. Remove the field from BorrowerMandatoryField and add it to BorrowerUnwantedField.
10. Do step 5 again, the relationship field should not show on the quick add form.
Signed-off-by: Myka Kennedy Stephens <mkstephens@fosgail.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 fccbd327d9f93925917e7a4f478ab72c1d1f2363) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7083a9dfbeff7a69a681e275a83c97239654b764) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 28268, in
Koha::MetadataRecord::Authority::get_all_authorities_iterator,
introduced a warning:
warn "Something went wrong reading record for authority $row->authid: $@\n";
But a method cannot be called from within quotes in Perl - extrapolation
does not work for functions/methods. So, if something really goes
wrong, this line of code produces a warning like:
Something went wrong reading record for authority
Koha::Schema::Result::AuthHeader=HASH(0x55cf7e0d0958)->authid: Empty
String at /usr/share/perl5/MARC/File/XML.pm line 450.
which is not very informative -- authid is missing.
Test plan
=========
Hard to reproduce. This problem occurs only in rare cases of some weird problem
in stores authority data or if a auth record had been deleted after a ES reindex
action has been initiated. But the problem in the code and the fix seem obvious.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9c2510ea2ef1db46bf42cf948b6c599250d6dd9e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fb3473dfe3abe71b9545f19035d47e84f59c69d6) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Janusz Kaczmarek [Wed, 26 Apr 2023 23:04:48 +0000 (01:04 +0200)]
Bug 36552: Update record 'date entered on file' when duplicating a record
The 'date entered on file' (MARC21: 008/0-5, UNIMARC: 100a/0=7) of a record created
by duplication of an existing record should be set to the current date instead of
having the value of the original record.
Test plan
=========
1. Check the 'date entered on file' of an existing biblio / authotiry record
(MARC21: 008/0-5, UNIMARC: 100a/0=7).
2. Duplicate the record by Edit > Edit as new (duplicate)
3. Control the 'date entered on file' value - it will equal to that of the
original record.
4. Apply the patch (restart plack).
5. Repeat step 2.
6. Check the date - it should be the current date.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> 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 dd8f9e1266f2b93b0d57f1f1289d49f61129391e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0cd9d2f1842a93beb4dfb5cba26c64602bdf2d68) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Fri, 25 Aug 2023 17:37:46 +0000 (17:37 +0000)]
Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date'
Test Plan:
1) Test importing a patron with the "from the current membership expiry date" option,
note it does not work
2) Apply this patch
3) Restart all the things!
4) Re-test, note the expiration was renewed from the patron's current
expiration date!
Signed-off-by: David Nind <david@davidnind.com> Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> 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 b89d744e868cd93632d6b84f5f39116a475d342e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3a99bc8bb1cc95c7d1abcff3ffa7bccd72f68b1d) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 1 Apr 2024 14:32:08 +0000 (14:32 +0000)]
Bug 36473: Handle Invalid Metadata Exceptions in totalissues.pl
This patch wraps the call for record in an eval, and catches any invalid metadata
exceptions, letting the warning show, but allowing the script to continue
To test:
1 - In default KTD record 369 has problems, otherwise you need to break a record
2 - Run : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v
3 - It dies at record 369 (or the one you broke)
4 - Apply patch
5 - Run again
6 - It succeeds, but skips the bad record
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 f3d2f34d7a6aeead30b40a30b239f15c6c94a7f2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d397da65c02ee40243aacdc3382e68b84e040921) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>