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>
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>
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>
Julian Maurice [Thu, 4 Apr 2024 14:26:00 +0000 (16:26 +0200)]
Bug 36526: Remove circular dependency from Koha::Objects
Koha::Objects depends on Koha::DateUtils, which depends on C4::Context,
which depends on Koha::Config::SysPrefs, which depends on Koha::Objects
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::Objects (YAML::XS and ZOOM for instance).
As Koha::Objects is used as a base for a lot of modules, we should take
care to only load the minimum required.
This patch removes uses of Koha::DateUtils from Koha::Objects.
It was only used in Koha::Objects::filter_by_last_update
filter_by_last_update now requires that the 'from' and 'to' parameters
must be DateTime objects. Previously it would also allow date and
datetime strings. This possibility was only used in two places:
* misc/cronjobs/cleanup_database.pl
* tools/cleanborrowers.pl
Now they call dt_from_string first and pass a DateTime object to
filter_by_last_update
Test plan:
1. Run `perl -cw Koha/Objects.pm`. It should only say:
"Koha/Objects.pm syntax OK" without warnings
2. Run `prove t/db_dependent/Koha/Objects.t`
3. Verify that misc/cronjobs/cleanup_database.pl works as before,
especially with the options --pseudo-transactions,
--pseudo-transactions-from and --pseudo-transactions-to
4. Go to Tools » Batch patron deletion and anonymization, check "Verify
you want to anonymize patron checkout history" and enter a date in
the text input below. Then click Next and verify that the correct
count of borrowers is shown. Click on the "Finish" button and verify
that the circulation history has been correctly anonymized
See also bug 36432
Signed-off-by: Tadeusz Sośnierz <tadeusz@sosnierz.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 675c8263b707c8e1987ac6084272b355deb1b05c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Emily Lamancusa [Sun, 24 Mar 2024 20:07:16 +0000 (16:07 -0400)]
Bug 35559: Correctly parse previous flatpickr date
The Flatpickr configuration for futuredate and futuredateinclusive is
meant to allow the preexisting date, even if it is in the past, to avoid
data loss. As of Bug 30718 - Use flatpickr's alt option everywhere,
that incoming date is in yyyy-mm-dd format, not the configured
human-readable format, and needs to be parsed accordingly.
To test:
1. Place 2 holds on the same bib, both with an expiration date set
2. Set the expiration date for one of the holds to a date in the past
(e.g., in Koha Testing Docker, use the commands:
ktd --shell
koha-mysql kohadev
to access the database directly)
3. Reload the holds tab for that bib
--> Note that the future expiration date will be editable, and the past
expiration date will not be editable
4. In a new tab, go to Administration > Patron Categories
5. Edit one patron category to have an enrolment period date in the future
6. Edit another patron category to have an enrolment period date in the
past (e.g. by accessing the database directly, as above)
7. Reload the Edit pages for each of the above categories (in new tabs)
--> Note that the future enrolment period date will be retained in the
date field, but the past enrolment period date will be blanked out
8. Apply this patchset
9. Refresh the holds tab from step 3
--> Note that both expiration dates are now editable
10. Refresh the 2 patron category tabs from step 7
--> Note that both enrolment dates are now retained correctly
11. Open the date picker on one of the date fields that has a past date
--> Note that other past dates, besides the existing date, are prevented
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 54d884819121ecb18930bbf250dfbb21fc7ecb93) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 17 Apr 2024 10:33:24 +0000 (12:33 +0200)]
Bug 36614: Restore 'phone' on the main patron search
It disappeared at some point (history is tricky here, I didn't manage to
track down what happened, it's a mess)
This patch adds a phone column after the "name and address" one. It's
hidden by default.
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 d4bea3f9c84d97225efc0e07d7f6b9390d86d0d8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
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>
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 456f47cad4060dcd0b003a9ac3d1b67aa378866c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Pedro Amorim [Tue, 12 Dec 2023 10:57:50 +0000 (10:57 +0000)]
Bug 26297: Add tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a43303b88bea5d7fbd0229df1870b9e4f15e6f47) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Pedro Amorim [Mon, 11 Dec 2023 17:30:37 +0000 (17:30 +0000)]
Bug 26297: API specs
Test plan, k-t-d:
1) Access /api/v1/patron_categories
2) Verify the patron categories are correctly listed
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 26297: (QA follow-up) Move to REST::V1::Patrons::Categories
Bug 26297: (QA follow-up) Use search_with_library_limits
JD amended-patch: squashed + tidy
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0e593e59e2a39819e5384f03445a138aa79a7f34) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Pedro Amorim [Mon, 11 Dec 2023 17:31:09 +0000 (17:31 +0000)]
Bug 26297: Add patron categories to_api_mapping
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5b205969a91d325378945cad4e2730152f2417a6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
Fridolin Somers [Thu, 25 Jan 2024 08:50:28 +0000 (09:50 +0100)]
Bug 35903: In cataloguing authority plugin using autocomplete must set operator exact
When cataloguing and using authority plugin, there is auto-completion on inputs and default operator is "contains".
When using auto-completion and selecting a result it would be logical to set operator "exact".
See doc https://api.jqueryui.com/autocomplete/#event-select
This patch also adds auto-completion missing on "Search all headings".
Test plan:
1) Create a new authority Topical Term with heading "Cart"
2) Create a new authority Topical Term with heading "Carthage"
3) Create a new biblio record
4) Use authority plugin on field 650
5) You see current operator are "contains"
6) Enter "Car" in "Search main heading ($a only):"
7) You see auto-completion showing "Cart" and "Carthage"
8) Click on "Cart"
9) You see operator changes to "is exactly"
10) Submit form to see the results
11) Clear form and repeat 6-9 for the three other inputs
Signed-off-by: Michelle Spinney <mspinney@clamsnet.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 36d96180aea6e71d24da116343cd37bd723e808f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Tue, 16 Apr 2024 03:50:21 +0000 (03:50 +0000)]
Bug 36605: Add update_lastseen to handle_patron_status for SIP
This patch extends the TrackLastPatronActivity trigger to cover SIP status messages as well.
Other SIP messages like Checkin/Checkout should be covered by those values in system preference, so
should not need adjustment.
To test:
prove -v t/db_dependent/SIP/Message.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cca7ede28ccd37a56f88b4953aed54304b88833d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
Matt Blenkinsop [Mon, 5 Feb 2024 16:50:32 +0000 (16:50 +0000)]
Bug 35996: Make it clear that --category-code can not be used alone
This patch adds a clarification to writeoff_debts.pl to make it clear that --category-code can't be used as the only filter when running the script. If this is the case, the script just displays the help menu as it is expecting one of the other filters
Test plan:
1) Run perl misc/cronjobs/writeoff_debts.pl --category-code TEST --confirm
2) Observe that the help menu is displayed instead of running the script
3) Check the help menu for the text added in this patch
WNC amended patch - added same warning in the option section
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 875809d66d4e6bde5385d88aad9f05f472a67b6b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 11 Jan 2024 16:21:48 +0000 (16:21 +0000)]
Bug 30324: Don't use default rule if we have a parent rule
Currenty, if we find only a defult rule for a checkout we are ignoring the parent rule.
We should not use the default if there is a parent rule
To test:
1: have an itype BK
2: create an itype BK2, set BK as the parent to BK2
3: create a circ rule for All Patrons, item type BK (displays as "Books (All)" in the circ rules interface), setting total checkouts to 1
4: do not create any rule specifically for the BK2 itype
5: have some BK items and some BK2 items
6: check a BK item out to a patron
7: check a BK2 item out to the same patron, observe you are not blocked from doing so
8: try to check out a second BK2 item to the same patron, get message "Too many checked out. 1 checked out, only 1 are allowed."
9: try to check out a second BK item to the same patrons, get message "Too many checked out. 2 checked out, only 1 are allowed."
10: return both items
11: check a BK2 item out to your patron
12: try to check a BK item out to your patron, get message "Too many checked out. 1 checked out, only 1 are allowed."
13: Apply patch
14: Repeat 7, you are now blocked
15: Other results should be the same
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Michael Adamyk <madamyk@ckls.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d7afd1ca30231dfc5752ddeece123b8471d8b4a4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Alex Arnaud [Wed, 10 Apr 2024 12:03:14 +0000 (14:03 +0200)]
Bug 22613: Add GET endpoint /patrons/{patron_id}/checkouts
This patch adds a new endpoint, for fetching checkouts from a specific
patron.
Test plan:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/patrons_checkouts.t
=> SUCCESS: Tests pass!
3. Run:
$ curl -v -s -u koha:koha --request GET \
http://kohadev.local/api/v1/patrons/{id}/checkouts
test with query parameters (they are the same as for /patrons/{id}/holds
=> SUCCESS: The API works!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 914afffd56b861727aff1309abc54b2950bdca0b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 36482: Make embedding work for GET /libraries/:library_id
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 8cd64b5dd689175a68a8a4b7f6f843cad2d271f0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 36482: Allow embedding desks and cash_registers on libraries endpoints
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 588ef525f3283fc49661597775b7dbfea1b08753) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 36481: Add GET /libraries/:library_id/cash_registers
This patch adds the mentioned route. For the task it:
* Adds Koha::Cash::Register->to_api_mapping with trivial mappings
* Adds a cash_register object definition on the API spec
* Adds a controller to handle requests
* Adds tests for the new endpoint
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ qa
=> SUCCESS: All green! Tests pass!
3. Play with Postman!
4. Sign off :-D
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 ee52b5c252c4fc5defadc28922c422ffd85b1877) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds the mentioned endpoint. For it, it does:
* Add Koha::Desk->to_api_mapping
* Add desk.yaml with the correct data structure for desks
* Add the route to the spec
* Add tests
Note: Lucas and I had doubts about the right return value for when the feature is disabled.
I opted for returning 404 with a message telling the feature is disabled. This can be discussed.
To test:
1. Apply this patches
2. Run:
$ ktd
k$ qa
=> SUCCESS: All green, all tests pass!
3. Play with this using Postman.
4. Sign off :-D
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 afd83c134e2ef4759d0512f713d4f4911f0190f0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 25 Mar 2024 15:42:18 +0000 (16:42 +0100)]
Bug 35353: Add REST API endpoint to retrieve old holds
Same as checkout but for holds, we need to provide a way to retrieve old
holds for a patron.
Test plan:
Create some holds for a patron, cancel and fulfill some, then use the
REST API endpoint with the new 'old' flag set to 1
/api/v1/patrons/42/holds?old=1
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7a32231a52d9d1d5007ad574b8e3b48fd4c99878) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 20 Dec 2023 10:23:52 +0000 (11:23 +0100)]
Bug 35353: DBIC specific
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6fb82fd6e32d0f38f24463c31adf546efe153bc3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 14 Mar 2024 14:01:39 +0000 (15:01 +0100)]
Bug 35558: Do not retrieve the local image if none exists - OPAC
Test plan:
1 - Enable system preferences:
LocalCoverImages
OPACLocalCoverImages
2 - open browser tools network page
3 - Perform an intranet search
4 - Note a request for each bib like:
http://localhost:8081/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=35
5 - Repeat on opac, same requests
6 - Apply patches
7 - Restart all
8 - Repeat searches, note no fetches
9 - Add local cover images to several biblios in the results
10 - Repeat searches
11 - Note the fetches are only for those records with images
12 - Confirm images still load correctly
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 747c9b573b828ee6d38f5085ac6bdbb82f0e3305) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 13 Dec 2023 10:10:24 +0000 (11:10 +0100)]
Bug 35558: Do not retrieve the local image if none exists
On the search results we are fetching the thumbnails of the local cover
images using catalogue/image.pl
Which means 1 GET per results on the page.
This patch suggests to have this information beforehand in order to
reduce the number of hits and network traffic?
However the page load will be slightly slower ofc.
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 8cde45e0723a4b34bdf26c7ef4cfd2d8e767c837) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
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>
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>
David Gustafsson [Fri, 23 Feb 2024 18:41:26 +0000 (19:41 +0100)]
Bug 36160: Use $builder->build_object for patron objects in Circulation.t
1) Set TrackLastPatronActivityTriggers to at least "Checking out an item"
2) Run tests in t/db_dependent/Circulation.t and verify that
failes with "Invalid value passed, borrowers.updated_on..."
3) Apply patch
4) Run Circulatoint.t tests again and verify that no longer
produces this error
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.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 f44e4a72a3bb14fd1cefb7ef94cb700700521eb8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 22 Apr 2024 12:33:33 +0000 (14:33 +0200)]
Bug 36649: Correctly embed biblio when retrieving items when adding to a train
I didn't find when this regression has been introduced but the third
parameter here is the headers, not parameters, we should not repeat
"headers".
Test plan:
1. Add a new processing that contains columns from the database, for example biblio.title and biblio.author.
2. Create a new train.
3. Add items to the waiting list.
4. Click on "Add last x items to the train" button.
5. Choose the train you created on number 2.
6. Choose the processing you added on number 1.
7. Try to click the Submit button.
=> Without the patch nothing happens and there is a JS error in the
console: Uncaught TypeError: item.biblio is undefined
=> With this patch applied the item is correctly added to the train and
the attribute is properly populated.
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 63612311e32a546a6ea1067e0c65ac3199f2f292) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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
Lucas Gass [Fri, 19 Apr 2024 17:22:15 +0000 (17:22 +0000)]
Bug 36652: Pass copy_form template variable
To test:
1. Go to Tools > Notices and slips
2. Pick any notice and try to copy it to another library using the 'Copy notice' column.
3. You are redirected to a blank screen and if you go back to the Notices and slips page the notice has not been copied.
4. APPLY PATCH
5. Try steps 1 - 3 again, but this time you should be correctly directed.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> 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 0e7d2c3db4727c629ab76e01a3f42d6810c89916) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
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>
Thomas Klausner [Fri, 29 Mar 2024 09:20:37 +0000 (09:20 +0000)]
Bug 35345: Add --where option to rebuild_elasticsearch.pl
Sometimes we need to only re-index a subset of our bibliographic data or authorities. Currently this is only possible by enumerating all id (-bn or -ai), which does not work well when indexing eg 100.000 items of a 2.000.000 DB. Re-indexing everything is also overkill.
This patch adds an `--where` flag to misc/search_tools/rebuild_elasticsearch.pl which can take arbitrary SQL (that of course has to match the respective tables) and adds it as an additional param to the resultset to index
To test, start koha-testing-docker with ElasticSearch enabled, for example via `ktd --es7 up
Before applying the patch, rebuild_elasticsearch will index all data:
Biblios:
$ misc/search_tools/rebuild_elasticsearch.pl -b -v
[12387] Checking state of biblios index
[12387] Indexing biblios
[12387] Committing final records...
[12387] Total 435 records indexed
(there might be a waring regarding a broken biblio, which can be ignored)
Auth:
$ misc/search_tools/rebuild_elasticsearch.pl -a -v
[12546] Checking state of authorities index
[12546] Indexing authorities
[12546] 1000 records processed
[12546] Committing final records...
[12546] Total 1706 records indexed
Now apply the patch
Biblio, limit by range of biblioid:
$ misc/search_tools/rebuild_elasticsearch.pl -b -v --where "biblionumber between 100 and 150"
[12765] Checking state of biblios index
[12765] Indexing biblios
[12765] Committing final records...
[12765] Total 50 records indexed
Note that only 50 records where indexed (instead of the whole set of 435 records)
Auth, limit by authtypecode:
$ misc/search_tools/rebuild_elasticsearch.pl -a -v --where "authtypecode = 'GEOGR_NAME'"
[12848] Checking state of authorities index
[12848] Indexing authorities
[12848] Committing final records...
[12848] Total 142 records indexed
Again, only 142 have been indexed.
Sponsored-by: Steiermärkische Landesbibliothek Sponsored-by: HKS3 / koha-support.eu 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 61e7aa374e8b4f85497c55e3741d829123fc4763) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b1aa99e96df314e1ae5f5bc26b8061c74622cd7e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 35967: (QA follow-up) `status` is not nullable
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1b52c5c5395ebc11bde883ef1947fb91fd2e2cf3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Aleisha Amohia [Thu, 1 Feb 2024 00:43:26 +0000 (00:43 +0000)]
Bug 35967: Add REST API endpoint to list patron recalls
This enhancement adds a REST API endpoint to list a patron's recalls:
/api/v1/patrons/{patron_id}/recalls
This depends on the logged in patron having the manage_recalls subpermission.
To test:
1. Log in to the staff interface as your superlibrarian self (Patron A)
2. Go to Koha Administration -> Global system preferences. Enable the UseRecalls system preference
3. Set the relevant recalls circulation and fines rules
4. Search for an item (Item A)
5. Check out Item A to yourself (Patron A)
6. Log in to the OPAC as Patron B, a patron who does not have the manage_recalls permission
7. Search for Item A and request a recall
8. While still logged in to the OPAC as Patron B, hit this URL: https://your-opac-url/api/v1/patrons/patron-b-borrowernumber/recalls (swap out your URL and Patron B's borrowernumber)
9. Confirm you are given an error: "Authorization failure. Missing required permission(s)."
10. Log out of the OPAC and log back in, this time as Patron A
11. Hit the URL again https://your-opac-url/api/v1/patrons/patron-b-borrowernumber/recalls
12. Confirm you are able to view a list of Patron B's recalls
13. Confirm tests pass: t/db_dependent/api/v1/patrons_recalls.t
Sponsored-by: Auckland University of Technology
PA amended: QA follow-up: tidy
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9d8254efd39ef73741eeb80088c1c3378528918e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Pedro Amorim [Thu, 21 Dec 2023 14:11:35 +0000 (14:11 +0000)]
Bug 34574: Add CSS class to datatable select filter
Test plan:
1) Create a new patron category, visit:
/cgi-bin/koha/admin/categories.pl?op=add_form
2) Add a category code, en enrollment period, a category type and a really long description like:
"This is a real long description of the patron category code for demo purposes"
3) Now do the same but for a library, visit:
/cgi-bin/koha/admin/branches.pl?op=add_form
4) Add a library code and a really long name like:
"This is a real long library name for demo purposes"
5) Visit patrons home:
/cgi-bin/koha/members/members-home.pl
6) Hit "Search". Notice the "library" and "category" columns grow in width to match the largest option (added in previous steps)
7) Apply patch, add the following CSS to IntranetUserCSS:
.dt-select-filter{
max-width:200px;
}
8) repeat 5) and 6). Notice the columns no longer grow in width.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> 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 99014e9395c1811e6c9c31cbb781d77f49f05cc8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Tue, 20 Feb 2024 20:49:29 +0000 (20:49 +0000)]
Bug 36138: Add reason to status column on opac-holdshistory, if there is a reason
TO TEST:
1. Turn on OPACHoldsHistory
2. Make some holds for a patron and then cancel them with a reason.
3. Log in as that patron and go to the 'Holds history' tab. Notice the text in the 'Status' column is 'Cancelled' but nothing shows up regarding the reason.
4. Apply patch and try again, this time you should see the reason for cancellation.
Signed-off-by: Esther <esther@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f4f2fdb65f37780004d6d538c090902c20544167) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>