Matt Blenkinsop [Wed, 14 Feb 2024 12:29:01 +0000 (12:29 +0000)]
Bug 36093: Fix missing array reference
This patch adds an array reference where it was previously missed.
Test plan:
Review patch diff and observe that the array reference is now correctly added
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.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 675ffb1b694339fedbe36f13b82b4fc1a8c8772d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 24 Jan 2024 14:49:53 +0000 (14:49 +0000)]
Bug 8461: Display information on withdrawn item when checked in
This patch displays the due date and withdrawn information in the Checked-in items table when 'ShowAllCheckins' is enabled. While the top message is clear, if a staff member checks in two items, then refers to the table they would not have all the information.
To test:
1 - Enable system preference 'ShowAllCheckins'
2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block'
3 - Check out an item to a patron
4 - Mark the item as withdrawn
5 - Check the item in
6 - Note message at top says things like 'Cannot check in' 'Item has been withdrawn'
7 - Note the Checked-in items table says 'Not checked out'
8 - Apply patch, restart all
9 - Check the item in again
10 - Note top message has not changed
11 - Note the table now say 'Item was not checked in' and displays the due date and patron info
12 - Note the table also includes the withdrawn value for the item
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 f5fcdb83e63683fac2c369ba3247d16bbd9f9a05) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
Katrin Fischer [Sun, 17 Mar 2024 16:46:26 +0000 (16:46 +0000)]
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference
The system preferences was added with 0/1 in sysprefs.sql is checked
as boolean. But the .pref file was added with yes/no which both
evaluate as strings to true.
This fixes the .pref file and includes a database update that sets
0 and 1 correctly for the value currently chosen in the pref.
To test:
* Make sure to update RedirectGuaranteeEmail to Enable/Don't enable
before applying the patch
* Verify in the database, that the values was set to yes or no
You can use a report like:
SELECT * from systempreferences WHERE variable = "RedirectGuaranteeEmail";
* Apply patch and run database update
* Verify the value in the database was corrected:
Yes = 1, No = 0
* Change the setting, verify the new value is stored correctly
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 34c85d051d330210227eccf76dd835d6b35b3e60) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 8 Mar 2024 15:25:10 +0000 (15:25 +0000)]
Bug 35394: Correction to booked items logic
This patch fixes the overly extreme message that was designed to appeared
when someone tried to check out a booked item to the wrong user.
However, the message never appeared due to a logic error within
CanBookBeIssued which this patch also resolved.
Test plan
1) Make an item bookable
2) Add a booking for the item to patron A from tomorrow
3) In the database, update the booking start_date to today (or wait a
day before the next step)
4) Attempt to check the book out to patron B.
Note that you are displayed with the new message 'The item is booked
for another patron' and you are unable to check the item out.
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 1ebd742e08494c111a8998bee730ed8bd4bcee37) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
Matt Blenkinsop [Wed, 15 May 2024 10:41:53 +0000 (10:41 +0000)]
Bug 36623: (follow-up) Fix cypress test
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f368156e075e1b3608520cfd6a48d3b1052b07d0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Matt Blenkinsop [Wed, 17 Apr 2024 15:03:53 +0000 (15:03 +0000)]
Bug 36623: Remove localhost reference
This patch removes a reference to localhost from a url within ERM
Test plan:
This is quite hard to test without sushi credentials and is quite an easy fix. Check the patch diff to verify that the localhost reference has now been removed from the url
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 644294e73bb17cc1527aaef5259de54106deb8cc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 17 Apr 2024 10:06:03 +0000 (12:06 +0200)]
Bug 30068: Remove table_settings_borrowers_table from circulation.tt
The history is a mess, but here we init a JS variable that is never
used.
Test plan:
git grep table_settings_borrowers_table
should not return anything after this patch applied
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 e90cba4e3819fd244e9397fec6c1bc0c4984690d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
Thibaud Guillot [Mon, 15 Jan 2024 10:19:51 +0000 (11:19 +0100)]
Bug 35810: Add back to top button on staff pages
Test plan:
1) Apply this patch and rebuild css with 'yarn build'
2) For example, perform a search from catalogue
3) Scroll down to see the button appear and scroll up to see it
disappear
Note that it's works also on patron search etc..
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Pedro Amorim <pedro.amorim@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 926e87de86496003915247bf6d50e4290fd3a1e4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
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>
This case brought my attention as there was a different 'user' parameter being passed.
It turns out we already thought about this, and `objects.to_api` is of course always passing it :-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 5d9396289e6ff754a79e5fad5f450144eb3a1c7c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 36483: Make API controllers use $c->objects->to_api
This patch makes all controller methods using direct $object->to_api, rely on $c->objects->to_api.
Direct ->to_api calling prevents things like embeds, +strings, etc to be dealt with correctly.
In some cases this change reduces the code as the authors extracted the embed structure from the stash and passed it explicitly.
I left out two Patrons.pm cases because I need to study it a bit more.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. 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 635e65a3303a01b90bbc93695b24c98720683f10) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
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>
Janusz Kaczmarek [Fri, 27 Oct 2023 21:06:44 +0000 (21:06 +0000)]
Bug 32707: Unit tests
NB in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t,
I had to modify four existing test by changing Local-number:123456 to
Personal-name:donald -- since Local-number should never be
auto truncated according to the submitted patch.
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 3af36faf3e35a67c987281751000a47eda76e423) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Janusz Kaczmarek [Tue, 24 Jan 2023 09:45:39 +0000 (10:45 +0100)]
Bug 32707: ElasticSearch should not auto truncate (even if QueryAutoTruncate = 1) for identifiers (and some other fields)
Koha with Zebra prevented auto truncation in some circumstances -- see
the first return for ccl inside C4::Search:: buildQuery, before applying
auto truncation, and setting $auto_truncation = 0 for some search
fields.
Koha with ElasticSearch applies auto truncation for all search fields,
not paying attention to these special cases when it should not be done.
This leads to various problems as described in bug 26508, 26608, etc.
The solution would be to prevent auto truncation for certain search
fields, above all – the identifiers. In addition, under no
circumstances should a search field other than of text type be truncated
(an attempt to truncate would generate an exception from ElasticSearch,
e.g. number_format_exception for integer).
Test plan
=========
0. Use the test data sample provided in the bug report. Comment 16 in
the ticket.
Scenario A (authority)
----------------------
1. Enable Elasticsearch engine.
2. Have like 100+ bibliographic records and properly linked authority
records.
3. Reindex ElasticSearch if needed.
4. Enable QueryAutoTruncate systempreference.
5. Find the authority record #1 and note the number of linked biblio
records.
6. Show the detail of authority #1 and compare the number of linked
biblio records.
7. If in the database there are authority records with ids =~ /^1/ (i.e.
10, 11, 12, ..., 100, 101, ...) linked to the biblio records you get
two different numbers of linked records.
8. Also, as lists of linked biblio records (via link: Used in N
record(s) from results view and detail view) you will get two
different sets of biblio records. In particular, on the list generated
from detail view (authorities/detail.pl?authid=1) you will get biblio
records that are in fact not linked to the auth #1 (the list is
generated with &q=an:1).
8.99. Skip to scenario B and come back here after finishing to not have
to unapply the patches and restart services for nothing.
9. Apply this patch.
10. Counts and list of linked biblios should be ok.
Scenario B (analytics)
----------------------
1. Enable Elasticsearch engine.
2. Have three monographic bibliographic records with 001 = 1, 10, 100
(i.e. =~ /^1/).
3. Have an analytical record with 773 $w = 1 (in the test data set - biblio 896).
4. Enable QueryAutoTruncate and UseControlNumber systempreference.
6. Find the analytical record and click on the link generated from 773,
i.e. (In: ... --> catalogue/search.pl?q=Control-number:1). You should see
a list of 100+ records (001 = 1, 10, 100) instead of one (001 = 1).
7. From the biblio # 1 try to go to the analytice records (with Show analytics
link) - you should get 60+ records with from different host records (773 $t)
-- instead of one.
8. Apply this patch. Make sure that control-number and record-control-number
are included in ESPreventAutoTruncate syspref.
9. Repeat steps 6 and 7. You should arrive at the right host record in p. 6
and at one analytical records when looking for analytical records in p. 7
(or more than one, but right, if you modified the test data set).
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 4a0713c80b022b6e71872072192ecf2397a28fed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Janusz Kaczmarek [Wed, 25 Oct 2023 09:05:24 +0000 (09:05 +0000)]
Bug 32707: Add 'ESPreventAutoTruncate' preference
This patch adds a new 'ESPreventAutoTruncate' preference allowing to define
Elasticsearch search fields that should not be autotruncated when 'QueryAutoTruncate'
is active (e.g. barcode).
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 10b43ddd64eeb0a94a887e5936cd25517f72ba9e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 13 Mar 2024 17:32:17 +0000 (13:32 -0400)]
Bug 36307: SMS::Send driver errors are not captured and stored
If an SMS::Send driver succeeds, it returns a value that evaluates to true. Every driver I've inspected uses croak when it encounters a failure state.
When an SMS message fails to send, code hard codes the failure code to NO_NOTES (No notes from SMS driver).
We should store the real error in `failure_code` and display that if the failure code doesn't match a known failure code.
Test Plan:
1) Apply this patch
2) Set SMSSendDriver to any value
3) Generate a pending sms message
4) Run the following query:
update message_queue set status = 'failed', failure_code = "This is a test";
5) View the patron's messages, note the delivery note contains the
contents of the failure code
6) Run the following query:
update message_queue set status = 'failed', failure_code = "SMS_SEND_DRIVER_MISSING";
7) Reload the patron's messages, not the delivery note is now "The SMS
driver could not be loaded".
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 8acdc1e8e9b88436204f6d16c9d5abbc775d8943) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Thu, 29 Feb 2024 22:33:33 +0000 (22:33 +0000)]
Bug 36082: Set branchcode correctly in opac-facets.inc
1. Tools> HTML Customization
2. Choose OPACresultssidebar
3. Create an entry specific to a library.
4. Also try to add this same entry into a translation tab, if installed.
5. Go to the OPAC
6. Login as a patron of that library that the specific OPACresultsidebar is assigned to
7. Search the catalog, and look below the facets,where the OPACresultssidebar would appear.
8. No text.
9. APPLY PATCH
10. Try step 7 again.
11. TEXT!
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 ae975f9eca011473205c2261bc5b45ae4a89b980) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
Emily Lamancusa [Wed, 27 Mar 2024 14:51:34 +0000 (10:51 -0400)]
Bug 36409: Fix capitalization for AcquisitionsDefaultEMailAddress and SerialsDefaultEMailAddress
Replace all instances in files with correct capitalization for the
sysprefs:
SerialsDefaultEMailAddress
AcquisitionsDefaultEMailAddress
Test plan:
1. Apply patch
2. Run database update
3. Go to Administration > System Preferences > Acquisitions
-> Confirm correct capitalization for AcquisitionsDefaultEmailAddress
(should be "Email", not "EMail")
4. Go to Administration > System Preferences > Serials
-> Confirm correct capitalization for SerialsDefaultEmailAddress
(should be "Email", not "EMail")
5. Use git grep to confirm no remaining instances of "EMail" in the code
(other than the new dbrev, original dbrev and original release notes)
e.g. git grep --files-with-matches "EMail"
6. Confirm the test plan for Bug 20755 still works
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c1a137410065a46f6cd8d31a380d0da95c2169d6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Emily Lamancusa [Wed, 27 Mar 2024 14:45:55 +0000 (10:45 -0400)]
Bug 36409: Dbrev for existing installations
Dbrev to change EMail to Email for SerialsDefaultEMailAddress and
AcquisitionsDefaultEMailAddress
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 43e480255d06357416c200b41e59c30c6ae70cac) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
Andreas Jonsson [Wed, 27 Mar 2024 14:15:16 +0000 (15:15 +0100)]
Bug 36439: Remove duplicate section in columns_settings
The patch for bug 33575 was carelessely applied so
the holds section was overwritten by a duplicated
section which cause the table configuration for
the holds-to-pull table to be missing.
Test plan:
* Place a hold on a record that has items (so there is at least one hold to pull)
* Go to the page "holds to pull" and verify that the column settings are present
to the left above the table (<cog wheel icon> Columns).
NOTE: the column settings are cached, so you need to reset memcached
between tests if you want to test with and without the patch.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 38875e920d26faffba0b67226daf1d53f80cfb13) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
Jonathan Druart [Tue, 27 Feb 2024 13:00:06 +0000 (14:00 +0100)]
Bug 36173: Display basket info when cancelling an order
The basketno is missing from the 2 links in acqui/parcel.tt
Better to retrieve the basketno from the order in the controller.
Test plan:
Create an order, receive it
On the parcel view notice that the "Cancel order" link leads to a
confirmation page that does not contain the info of the basket.
It's fixed with this patch applied.
Note: Don't fully receive, but 'Receive shipment' from vendor, choose an invoice, and cancel the order from the list to be received
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 d704495138f93943158e2eff87fd10988fa6ff1f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 7 Mar 2024 10:09:13 +0000 (10:09 +0000)]
Bug 36268: Add a mock for ReplyToDefault
Test plan:
Without this patch, add email address in that pref.
Run Letters.t. It fails.
Now apply patch and run test again. Should pass.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5c71283c897de456db0824018fcb2b0f7931040d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
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>
Pedro Amorim [Wed, 3 Jan 2024 12:01:36 +0000 (12:01 +0000)]
Bug 35685: Fix after creation actions
Test plan:
1) Install FreeForm and enable ILLModule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Configure ILLModuleDisclaimerByType, visit:
/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLModuleDisclaimerByType
Click "edit" and paste the example code into the sys pref value
3) Create a new OPAC ILL request, visit:
/cgi-bin/koha/opac-illrequests.pl?method=create&backend=FreeForm
4) Dont put a type or branch, click 'Create', on the next screen click 'Submit'
5) Notice it explodes
6) Apply patch and repeat. It no longer explodes and now shows an error message.
7) (After FQA): Create a normal request, input type and library, submit the type disclaimer
8) Run:
echo "select * from illrequestattributes;" | koha-mysql kohadev
9) Notice type_disclaimer_date and type_disclaimer_value are correctly saved
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 34aa31b22d8262c108988071949c5bd4dfc78a88) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
Jonathan Druart [Tue, 9 Jan 2024 15:47:56 +0000 (16:47 +0100)]
Bug 35714: Prevent items not linked with processing with a letter code a to be printed
Items linked with a processing which does not have a letter code are not
supposed to be printed.
Currently the code is allowing to "print slip" for items when using the
link on top of the table. It results in an error "No letter_code at
/kohadevbox/koha/preservation/print_slip.pl line 45."
Test plan:
Create a processing without a letter code
Add 2 items to the waiting list then add them to a train
Go to the "show train" view
=> notice that you cannot print slip for those items
Create another processing with a letter code
Edit one of the item and set it the new processing
=> A slip for this item can be printed
Edit the other item and the train to make them use the new processing
=> A slip for those items can be printed
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 335b5b7ad52a7f56bac617e79358d4863a0e0c99) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
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>
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>
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.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04d3cf07a858a5efc129b2f78e62d8dd8148b742) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
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>
Nick Clemens [Mon, 1 Apr 2024 15:34:44 +0000 (15:34 +0000)]
Bug 36394: Fix 'Filter' selection in new line
All other fields in the new line use data-id instead of name, this fixes an inconsistency
To test:
1 - Before this patch select some values, set filter to punctuation - hit 'Add'
2 - Punctuation vlaue is cleared
3 - After patch add a new line and confirm 'Filter' value is saved
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7aabe354ecf406761d3422130cdea2e9da2f4687) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 21 Mar 2024 13:16:23 +0000 (14:16 +0100)]
Bug 36394: Fix footers behaviour on the ES mapping page
In the footers of the tables of the search fields and mappings,
the options selected are not consistent.
Additionally they are not reset correctly when a new line is added.
Test plan:
0. Do not apply to recreate the problem
1. Go to the ES mapping page
2. Click tab "Bibliographic records"
3. At the bottom, notice the Yes/No dropdown lists
=> They are inconsistent, sometimes 'Yes', sometimes 'No'
4. Click Add
=> Values are kept
5. Apply this patch
6. Repeat 1, 2, 3
=> No (first option) is always selected
7. Click Add after you modified some values
=> "No" is selected
Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d12ae6b9e26be680be8789f7f2e10aab92680697) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
Lucas Gass [Wed, 6 Mar 2024 00:02:31 +0000 (00:02 +0000)]
Bug 36227: Add warning when item group has no holdable items
To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Find a bib and add an item group but do not attach any items to the item group.
3. Place a hold from the staff interface.
4. Under Hold next available item from an item group you see the option for your item group, select it and place the hold.
5. It's a hold that can not be filled
6. APPLY PATCH
7. How on the hold page under Hold next available item from an item group there is a 3rd column called 'Holdable items'.
8. Your item group, without any items, should have a disabled radio button and a warning "No holdable items in this item group."
9. Add items to your item group.
10. Now on the hold page in the new 'Holdable items' you should see links for each item, make sure those links work.
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 29873200dfdb0ca0956095674dab440e1ff36d0d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 20 Dec 2023 09:35:17 +0000 (10:35 +0100)]
Bug 35610: Add FK on old_reserves.branchcode
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 943838ed9950f95325558ae71590559bcb349352) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When the user clicks on a hidden tab, 'shown.bs.tab' is triggered and
then another click event is triggered. And because the table was loaded
on tab click, it was loaded twice.
Visually it could have caused the rows to be duplicated (it was random,
probably due to timing, network latency, ...)
I don't know why we need to trigger a click in this case, but removing
this will probably break something else, so the fix here is to load the
table on 'shown.bs.tab' event instead of 'click'
This patch also contains a small fix in refreshReturnClaimsTable which
was reloading the table right after the table initialization.
Test plan:
1. Check out an item, and in the checkouts table, click "Claim returned"
2. Open the network tab of your browser's developer tools
3. Click on the "Claims" tab, verify that only one call is made to
svc/return_claims
4. Verify that the claims table is displayed correctly
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5783d01af00a5bf21527c81a05252d99a2a14e9a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>