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>
Nick Clemens [Wed, 12 Jun 2019 11:43:48 +0000 (11:43 +0000)]
Bug 23102: 404 errors on page causes SCI user to be logged out
To test:
1 - Have something on the SCO page that won't load
Add to SCOUserJS:
</script>
<img src="http://localhost:8080/silk/famfamfam.png"/>
<script>
2 - Enable the SCO and SCI system preferences:
WebBasedSelfCheck: Enable
SelfCheckInModuke: Enable
AutoSelfCheckAllowed: Allow
AutoSelfCheckID / AutoSelfCheckPass to a valid user with permissions
3 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user
4 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl
5 - Sign in using a patron
6 - Enter an unkown barcode, I used "DONTMATTER"
7 - If not logged out, click to 'Return to account summary'
8 - You are asked to sign in again
9 - Repeat with the SCI module
10 - Apply patch
11 - Repeat, but this time you can return to account
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5bab87f76b05bbf8627cf6786975e9e30a5f2f6c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 240f526d06a2070a492799bb9045d4965fcced4b) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Magnus Enger [Fri, 5 Apr 2024 13:41:08 +0000 (13:41 +0000)]
Bug 36517: Fix output from install_plugins.pl
When misc/devel/install_plugins.pl does not find any plugins, it prints
the list of pluginsdir, but with a literal \n separating the dirs, and
no newline at the end.
To test:
- Edit koha-conf.xml and add a second entry for <pluginsdir>, so there
are two entries. The second one could just be a copy of the original.
- Run "perl misc/devel/install_plugins.pl"
- Note the output looks something like this:
No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins\n/var/lib/koha/kohadev/pluginsroot@kohadevbox:koha(master)$
- Apply the patch and run the script again. Output should be:
No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins
/var/lib/koha/kohadev/plugins
root@kohadevbox:koha(master)$
- Sign off
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4848def5e2a336e01bf0dd0ff61a75a30b35f137) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f2a05fadd06f40ad385ed8f7792ac7b68c16e7d7) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch makes the test independent from existing cash registers in
the system.
To test:
1. Enable UseCashRegisters on a fresh KTD
2. Add a cash register
3. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/cashups.t
=> FAIL: Tests fail!
4. Apply this patch
5. Repeat 3
=> SUCCESS: Tests pass!
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 4436a7d41a74bf002fdd80ec97f0be38d40eee22) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19b543a51b59c7a13e5a901c2c31413eee2f2692) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Phil Ringnalda [Fri, 5 Apr 2024 01:59:34 +0000 (18:59 -0700)]
Bug 36531: Serve text/javascript compressed, like application/javascript is
Koha serves static .js files as application/javascript (if /etc/mime.types
says to) and serves them compressed, but output_with_http_headers uses the
currently-correct text/javascript mimetype, and Koha doesn't compress that.
Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable.
2. Open the browser Web Developer Tools to the Network tab
3. Load Cataloging - Advanced editor
4. Click on the line for the framework?frameworkcode=&callback=define load
5. Note the content-type text/javascript, no Content-Encoding line, and
the size of 1.9MB
6. Apply the patches from bug 36463 if they haven't been pushed, then this
patch, and reset_all
7. Repeat steps 1-4, and note a Content-Encoding: gzip header and a
Transferred size around 160KB
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 c52af2cef0d79f20d74ebf170d4d5514b139ea65) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e0c3032b6f397f2b83073a6d274cdcfd370415e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 29 Mar 2024 12:54:30 +0000 (12:54 +0000)]
Bug 36463: Compress application/json
This patch simply adds application/json to the mod_deflate configuration
To test:
1 - Open the netowrk tab in firefox
2 - Load http://localhost:8081/api/v1/libraries
3 - Not the transferred size, and note no 'Content-Encoding: gzip" header
4 - Apply patch, reset_all (or edit /etc/koha/apache-shared.conf)
5 - Reload
6 - Note smaller size, note gzip header
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.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 bccf7764c0e3eea22713edb7d76f90c8d8bf8c2b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8afbbf6615d56ac13a45e3ce658623d159c5a68) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Laura Escamilla [Mon, 18 Mar 2024 19:42:01 +0000 (19:42 +0000)]
Bug 36353: Update relationship value so that it is blank and consistent with other forms
To Test:
1. Choose a User Eligible for a Guarantor:
1. Modify the user profile to include a new guarantor.
2. Upon selecting a guarantor, ensure that the empty option in the 'Relationship' dropdown appears as a blank box.
2. Select a User Eligible for a Guarantee:
1. Navigate to "Add Guarantee" in the top menu.
2. Verify that the guarantor field is automatically populated with the selected user.
3. Confirm that the 'Relationship' dropdown displays the empty option as 'Empty record.'
3. Apply Patch and Refresh the Page for Step 2:
1. After applying the patch, refresh the page for step 2.
2. Ensure that the empty option value for 'Relationship' is now displayed as blank.
4. Sign Off and Have a Great Day! 😊🎉#
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9de44f00f7744b1ad09ffc0d619344872f81305b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75c3ff228e3f5145caec125fcf5a114396e3aaca) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Pedro Amorim [Wed, 21 Feb 2024 13:03:13 +0000 (13:03 +0000)]
Bug 36142: recallsview template param for opac-recall.tt
Test plan:
1) Enable UseRecalls
2) Visit OPAC confirm recall page:
<opac_url>/cgi-bin/koha/opac-recall.pl?biblionumber=76
3) Notice left-side menu 'Recalls history' is not active
4) Apply patch. Repeat.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 44d2303ef7397e352c889ce2405b4d01e9f11fbe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3f731be49000f71ef020c21f02663d12153c62d2) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Philip Orr [Thu, 28 Mar 2024 10:34:32 +0000 (10:34 +0000)]
Bug 36452: correct display of patron message
To test:
1. Before applying the patch:
2. In the staff interface, navigate to a patron
3. Add a new staff message that contains multiple lines (e.g. using
enter for the next line)
4. Save the message and check the display.
It will be a single line.
5. Apply the patch and navigate back to the
patron
6. The message should now be displayed as multiple lines.
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 5e8059a6f83493149ecefc03b9a47c42288a26ee) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 54bb9ffe16aba5fb91aa743f7e2f5b8d176a78dc) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Andreas Roussos [Fri, 29 Mar 2024 06:59:41 +0000 (07:59 +0100)]
Bug 36462: remove extra Home breadcrumb item
In the Staff interface, when viewing (or editing) the authority MARC
subfield structure for a particular field, the Home button breadcrumb
on the top left of the screen appears twice.
This patch fixes that.
Test plan:
1) Try to view (or edit) the authority MARC subfield structure for
a particular field. Notice the 'Home' breadcrumb button/icon is
appearing twice.
2) Apply this patch.
3) Refresh the page, the 'Home' breadcrumb icon should now appear
only once.
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 f7df7819cd4f9135c1eb4e389eee1ef2a144e2b2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f7d4ca168e5dd2bad6f4c994ca1c07b59332c86) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 4 Apr 2024 09:13:04 +0000 (11:13 +0200)]
Bug 36516: Fix useless warning from translation script
I lost too much time trying to know what the translation script outputs
sh: 1: Syntax error: end of file unexpected
To recreate:
touch 'koha-tmpl/intranet-tmpl/prog/en/modules/<' (yes, don't ask!)
koha-translate -i de-DE --dev kohadev
or
koha-translate -u de-DE --dev kohadev
And you get the shell error without any ideas what's happening!
With this patch applied you will not get any errors because the quote
will actually copy the file (what is expected).
But without the quote the cp command will fail and the explanation will be
displayed
sh: 1: Syntax error: end of file unexpected
Cannot copy /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/< to /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/de-DE/modules/< at /kohadevbox/koha/misc/translator/tmpl_process3.pl line 385.
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 0026ee3e971b6556f2fdd97f6173d12337bb7c0f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2001b853f4028c807bf986cdd42c687961f9c67a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This $sth2 is never fetched, we are retrieving the AV cat using
Koha::AV::Categories
Sponsored-by: The Research University in the Helmholtz Association (KIT) 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 4158783eb284cf5f89266d3251f6d647200c0f01) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a2ea0291e7ca79e52e359da28ff6a9c9ab5b1445) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Thu, 21 Mar 2024 14:08:38 +0000 (15:08 +0100)]
Bug 35868: Warning sign for using a patron category that is limited to another library has moved to other side of page
Bug 31422 implemented a warning sign, when a patron has a patron category that you are not allowed to set due to library limitations on the code.
It should appear right next to the field, but might appear on the other side of the page now being easily missed.
This patch simply removes the float:right CSS rule.
To test:
* User's login branch and home library is: Centerville
* Patron category "B - Board" is limited to Franklin
* Create a new patron: Board doesn't show
* Edit an existing patron with another patron category: Board doesn't show
* Edit a patron with Board category from Centerville
=> Check the warning icon with the tooltip is close to the category select
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7356a5cbd48cdb3a7971608f59131152d296a447) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3ba6bb9cdfef55d7e0d416acb4ad953c805756cc) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Fri, 11 Dec 2020 04:42:39 +0000 (04:42 +0000)]
Bug 27198: Fix syntax in marc21-retrieval-info-auth-dom.xml
This patch fixes the syntax in marc21-retrieval-info-auth-dom.xml,
so that one can use the Zebra special retrieval elements documented
at https://software.indexdata.com/zebra/doc/special-retrieval.html
These are very useful when troubleshooting issues with authority
records in Zebra.
Test plan (using KTD):
1. yaz-client unix:/var/run/koha/kohadev/authoritysocket
2. Enter these commands:
. base authorities
. format xml
. elements zebra::snippet
. find e
. show 1
3. Result = diagnostic message:
Diagnostic message(s) from database:
[25] Specified element set name not valid for specified database
-- v2 addinfo 'zebra::snippet'
4. Apply the patch
5. Copy updated file: sudo cp debian/templates/marc21-retrieval-info-auth-dom.xml
/etc/koha/marc21-retrieval-info-auth-dom.xml
6. Stop and restart zebra (no need to rebuild the Zebra index):
. sudo koha-zebra --stop kohadev
. sudo pkill zebrasrv
. sudo koha-zebra --start kohadev
7. Repeat commands in step 2.
8. Result from show 1 = XML output:
Sent presentRequest (1+1).
Records: 1
Record type: XML
<record xmlns="http://www.indexdata.com/zebra/">
<snippet name="Any" type="w">Gontarski, S. <s>E</s></snippet>
</record>nextResultSetPosition = 2
Elapsed: 0.013929
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 10d5f6ef379768663cd6b26a81315ce44b65520d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f129c009a40f9af4f4d9d984058e99829bc21a0d) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Mon, 25 Mar 2024 14:53:10 +0000 (15:53 +0100)]
Bug 35599: Fix Pronouns and HidePersonalPatronDetailOnCirculation
Bug 10950 adds a pronouns text field to the patron record.
Currently it is hidden by system preference 'HidePersonalPatronDetailOnCirculation'.
This patch moves pronouns outside this system preference influence.
Test plan:
1) Add pronouns to a patron
2) Set system preference 'HidePersonalPatronDetailOnCirculation' to "Don't hide"
3) Check you see pronouns in circulation page
/cgi-bin/koha/circ/circulation.pl?borrowernumber=X
4) Set system preference 'HidePersonalPatronDetailOnCirculation' to "Hide"
5) Refresh circulation page
=> Without patch pronouns are hidden
=> With patch pronouns are displayed
Signed-off-by: Hebah <hebah@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 07738adbf08a66fdb91728dedc1362a8a75a3067) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a728c6582828ca458edf647c017e26fe020cb827) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Thu, 25 Jan 2024 21:54:21 +0000 (21:54 +0000)]
Bug 23296: Set patron branchcode when preparing non-digest version
To test:
1. APPLY PATCH
2. Set up circ rules to allow for auto renewals.
3. Set AutoRenewalNotices to 'according to message prefs'
4. Make a branch specific version of the the AUTO_RENEWAL notice.
5. Find a patron belonging to that branch and set the message prefs to allow for a AUTO_RENEWAL. But no digest option!
6. Check some things out and make sure they are eligble for auto renewal.
7. Run the cron.
8. Make sure the patron gets the branch specific notice.
9. Delete the branch specific notice.
10. DO 6-7 again.
11. Make sure they now get the all library notice.
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied one line. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ade75ea56158e6cf87894d0aeba1711e73dbfcda) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8607c04099b2296046236de15a246d7999157f1b) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Wed, 7 Sep 2022 09:24:49 +0000 (11:24 +0200)]
Bug 35573: Correctly display warning when placing a hold
Test plan:
1) Add a basic circulation rule like : 0 hold allowed on patron category
'A' and set AllowHoldPolicyOverride to 'Allow'
2) Make a hold on a patron belongs to this category
3) Normally you should see a warning on item (override needed) but it's
not the case
4) Apply this patch
5) Refresh and repeat step 2
This patch comes from an alternative patch on the original bug (I'm including
the original test plan for your information) :
(Bug 30687 - alternative patch): Always allow to force hold pickup location
If AllowHoldPolicyOverride is enabled and only some pickup locations are
available, you still have the possibility to force one of the others
pickup locations.
But when there are zero pickup locations available, that is not
possible.
This patch change that by always displaying the list of pickup locations
when AllowHoldPolicyOverride is enabled.
Test plan:
1. Apply patch
2. Disable AllowHoldPolicyOverride
3. Create a biblio B with an item I at library A.
4. Configure this library A to not be a pickup location
5. Add a "Default holds policy by item type" for item I type where "Hold
pickup library match" is "item's home library"
6. Try to place a hold on biblio B
You should not be able to place a hold because there is no valid
pickup locations
7. Enable AllowHoldPolicyOverride
8. Try to place a hold on biblio B
You should now see all valid pickup locations in a dropdown list
(with an exclamation mark in front of each option) with none selected
by default
9. Verify you can place a title-level hold and an item-level hold
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 805ea1a00e5e05aae71c508947976b0cfff5b81a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 204b5c76ce3c8ee29b6bd6882c0852fa31fe71d4) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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 33da81f9feb145e357647d456ae3bad0644f6963) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aa149ff575e43c2662d21268d7119906a3e2a938) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Thomas Klausner [Thu, 7 Mar 2024 16:56:13 +0000 (17:56 +0100)]
Bug 36269: Elasticsearch: publisher-location (pl) should use260a/264a
Currently the index `pl` points to 008/15-17. It should
(additionally/instead?) point to 260a and/or 264a.
Test plan (for koha-testing-docker with ElasticSearch via `ktd --es7 up`)
Verify the old/broken behaviour:
* Go to Staff/Advanced Search
* Select "Publisher Location" and enter "cau", start search
* You will get some hits (~16), eg "Perl best practices / Damian Conway", which has 008 of "051222s2005 caua b 001 0 eng d" with "cau" on 15-17
* Edit this record (cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=5)
* Inspect 260$a, which should containt "Sebastopol, CA :"
* Go back to Advanced Search and search for "Publisher Location" = "Sebastopol"
* No hits!
Apply the patch!
* exit ktd and stop it (ktd --es7 down; ktd --es7 stop)
* start it again
* Go to Staff / Administration / Search Engine Config (Elasticsearch)
* Click on the Tab "Bibliographic records" and search/filter for "pl"
* you should see 3 entries for "pl", with Mapping values of "008_/15-17", "260a" and "264a"
* Go to Search,
* Select "Publisher Location" and enter "cau", start search
* same hits as befor
* Search again, but for "Sebastopol"
* Now you'll get 9 hits!!
Bonus: Test 264a
* Got to Admin / MARC bibl framework, select BKS -> MARC structure
* search for tag "264", edit subfields
* in tabs a, b, c: Check the "Editor" Checkbox (Visibility)
* Save changes
* find a book, eg again "Perl best practices" and edit it
* find field 264 and enter "Test" into 264a, Save
* Depending on your setup, you might have to manually re-index the book:
* enter ktd: ktd --shell
* reindex the one book (via --bn) or all (might also need a -d)
/usr/share/koha/bin/search_tools/rebuild_elasticsearch.pl -v -b -d
* Go again to Advanced Search, Publisher Location = "Test"
* You should find the book
If your NOT running ktd, you might be able to just edit the ElasticSearch Mappings to add / change the mapping for "pl" to point to "260a".
One rather harsh way to do this (which I needed to do, because the ES Mappings UI did not work for me) is via this SQL:
update search_marc_map set marc_field='260a' where marc_field='008_/15-17';
Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit df9bc0b86a83d60b7b71924c46087bed7aa4226b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 342c65a680fffe6fb6a5b9b4d8539a5947686168) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds a safe guard for when consumers pass _per_page=0 to
endpoints. This condition is checked for on a centralized place and
avoid reaching the controller in such scenarios that would provoke a
division by zero exception.
To test:
1. Apply the regression tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/pagination.t
=> FAIL: We expect a 400, but get a 500 instead
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! No more explosions for this!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 308bb0830cfe69116e442bad4cd206dd402244be) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b1e9ef93f2181cc63537be6d09027491885dc303) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9a4e3bd49f1a978fbe5d3dc88e36dc5de0fb81f9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9e8657aba7d7f742e2cc2bdf98a55252c021890e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
It appears this bug introduces the first actual use of this function in
the OPAC and thus exposes that bug 31261 didn't fully port the
Date_from_syspref from the intranet.
Martin Renvoize [Mon, 18 Mar 2024 11:35:13 +0000 (11:35 +0000)]
Bug 36341: Add futureinclusive to future holds
This patch adds the flatpickr-futureinclusive data to the input field
for "Hold starts on date" in the OPAC.
We also add 'flatpickr-future' data to the input field for expiration
date as it also doesn't make sense to allow this to be a past data
either.
Test plan
1) Attempt to place a hold on an item from the OPAC
2) Expand the 'Show more options' dropdown
3) Note that without the patch 'Hold not needed after' allows setting to
a date in the past.
4) Enable `AllowHoldDateInFuture` and `OPACAllowHoldDateInFuture` system
preferences
5) The 'Hold starts on date' option should now appear if you refresh
your hold placing page in the OPAC.
6) Note that the above input also allows setting a past date
7) Apply patch
8) Neith input should allow past dates now.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c16ec21f4b77971b19e5c4b5140521c4133f0608) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e3bfca4f02b72e00909272fbfb5fc24abbab49a7) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Tue, 26 Mar 2024 15:19:41 +0000 (16:19 +0100)]
Bug 36432: Remove circular dependency from Koha::Object
Koha::Object depends on Koha::DateUtils, which depends on C4::Context,
which depends on Koha::Config::SysPref, which depends on... Koha::Object
Apart from the circular dependency, the dependency on C4::Context alone
is problematic as it loads a bunch of modules that are not needed at all
in Koha::Object (YAML::XS and ZOOM for instance).
As Koha::Object is used as a base for a lot of modules, we should take
care to only load the minimum required.
This patch moves some date parsing code to specific modules:
- Koha::DateTime::Format::RFC3339
- Koha::DateTime::Format::SQL
and it uses them in Koha::Object and Koha::DateUtils where it is
possible.
Test plan:
1. Do not apply the patch yet and run the following command:
`perl -cw Koha/Object.pm`
It should print several warnings about redefined subroutines, meaning
there is a circular dependency.
2. Apply the patch
3. Run `perl -cw Koha/Object.pm`. It should only say:
"Koha/Object.pm syntax OK"
4. Run the following command:
prove \
t/DateUtils.t \
t/Koha/DateTime/Format/RFC3339.t \
t/db_dependent/Koha/Object.t
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 8d5299639e3f983e95fcf2a9d81febc1406bafdd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b0c862533d74505c8f4fa8760d809942973ea57c) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Wed, 20 Mar 2024 17:29:02 +0000 (18:29 +0100)]
Bug 36376: Display library limitations alert in patron's messages
Bug 31422 added a warning message when library limitations issue in patron edition page.
We should add this patron's messages in circ and details pages.
Like age limitations.
Test plan:
1) User's login branch and home library is: Centerville
2) Patron category "B - Board" is limited to Franklin
3) Edit a patron with Board category from Centerville
4) A message appears "The patron's current category (Board) is limited to other libraries."
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 841dc00ec89dd35cef09890c2f0101f014cc7f92) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ebd8a50e6e48b2e31730fb961dba15f8a0491a7e)
Phil Ringnalda [Thu, 28 Mar 2024 22:02:38 +0000 (15:02 -0700)]
Bug 36461: Advanced editor should disable RequireJS timeout with waitSeconds: 0
We aren't actually doing any error handling with the RequireJS waitSeconds
config, just leaving the advanced editor hanging on loading if it times out,
so instead we should disable it.
Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable
2. Load the Cataloging module home page in Firefox and open Firefox's
Web Developer Tools, and in the Network tab change from "No Throttling"
to "Regular 2G"
3. In the Cataloging page, click Advanced editor, and watch it attempt to
load for 30 seconds, followed by a setTimout error in the devtools console,
and then wait as long as you can stand for anything but the "Loading,
please wait..." to happen in the web page. Nothing ever will.
4. Apply the patch, restart, set EnableAdvancedCatalogingEditor back to
Enable, turn throttling on, load the Advanced editor again, and note that
even though it will take a minute or more to load through the throttling,
the editor does actually load.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 95394217f081a38c3fe66f21d673aa056c83414b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c305b468218bee1ece2e396762d2360ed628d71c) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 36421: Make sure pre-controller errors are correctly logged
If something explodes in Koha::REST::V1::Auth chances are that no logging will happen.
This patch makes sure they are!
To test:
1. Make sure you do NOT have 36420 on your tree
2. Make sure you are looking at the logs:
$ ktd --shell
k$ koha-plack --restart kohadev; tail -f /var/log/koha/kohadev/*.log
3. Use Postman or similar for hitting some known endpoint. Use
the user's cardnumber instead of the userid. On a default KTD launch, the
generated user's cardnumber is '42'.
GET /patrons
=> FAIL: You get a 500 error (expected, fixed on 36420) but no useful logging found.
4. Apply this patch
5. Ctrl+c on the logs and re-run the command
6. Repeat 3
=> SUCCESS: You get a 500, but you also get the exception information logged!
7. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[OK] prove t/db_dependent/api/v1/items.t t/db_dependent/api/v1/unhandled_exceptions.t Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e518e0be2c97782997037383223e57ce2e196df4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0705360fc8dd81f1c09e92859a200bb28c10c643) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>