koha.git
5 months agoBug 35455: Remove = in ICU for indexing/searching
David Cook [Fri, 1 Dec 2023 02:36:56 +0000 (02:36 +0000)]
Bug 35455: Remove = in ICU for indexing/searching

This change more closely aligns ICU and CHR so that ICU also
removes the = character. This fixes issues in ICU when searching
with a : which gets transformed into a =. Without this change,
the Analytics features won't work for titles with a colon in them.

Test plan:
0. Apply the patch and import bibs from Bugzilla (using Staged MARC tools)
1. cp ./etc/zebradb/etc/phrases-icu.xml /etc/koha/zebradb/etc/phrases-icu.xml
2. cp ./etc/zebradb/etc/words-icu.xml /etc/koha/zebradb/etc/words-icu.xml
3. vi /etc/koha/zebradb/etc/default.idx
Change "charmap word-phrase-utf.chr" to "icuchain words-icu.xml" for "index w"
and "icuchain phrases-icu.xml" for "index p"
4. koha-zebra --stop kohadev
5. pkill zebrasrv
6. koha-zebra --start kohadev
7. koha-rebuild-zebra -a -b -f -v kohadev

8. Search for "Awesome title" and open the detail page
9. Note that the "Analytics: Show analytics" line shows up
10. Click that link
11. Note that it opens the "Cool article" record and it displays
"In: Awesome title: awesome subtitle"
12. Click that link
13. Note that it opens the "Awesome title" record

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 7375d82c408ad6963cf3f3cae060b9376ffca91a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5035e12440ba7ae576de0eec10d17e20d300eb42)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35493: Do not show housebound roles as collapsible unless the housebound module...
Lucas Gass [Tue, 5 Dec 2023 17:09:26 +0000 (17:09 +0000)]
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on

To test:
1. HouseboundModule - disabled
2. CollapseFieldsPatronAddForm, add 'Housebound roles'
3. Edit/create a patron.
4. Notice the useless Housebound roles link at the top of the page
5. APPLY PATCH
6. Try 1 - 3 again, this time no Housebound roles at the top ( Show collapsed fields )
7. Turn on HouseboundModule and make sure it now shows

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 49f30ad6ed5f36a6c2e570ab52b8ea2ae7ca8f19)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 83c18ad1c6a3079cae8eff34f1f4712fca8c4f04)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 34644: (follow-up) Additional edits to description
David Nind [Wed, 30 Aug 2023 00:15:26 +0000 (00:15 +0000)]
Bug 34644: (follow-up) Additional edits to description

Linked system preference in description to cross reference, and
and removed the spaces in the bracketed text.

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 5cd21f1139269f5e045d759c31ee98a1ad0915cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8d724b82c156538c5d30006e97fb00344e7710f0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 34644: replacementprice is support by MarcFieldsToOrder but is not listed
Kyle M Hall [Tue, 29 Aug 2023 18:20:19 +0000 (14:20 -0400)]
Bug 34644: replacementprice is support by MarcFieldsToOrder but is not listed

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 341b90b2eefb62a8f2d776f204221083292c2b86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 26fb50672fd3789bb97ff2dd749dd91f65d704f8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 34644: Improve readability of sysprefs
Kyle M Hall [Tue, 29 Aug 2023 17:53:16 +0000 (13:53 -0400)]
Bug 34644: Improve readability of sysprefs

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 61e8073b020746d797a14466cd78b963500bfeb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b5b2d1b678a56d868cf3bd9e0d10b23c5bea39c8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 34644: Add clarifying text to sysprefs to indicate that MarcFieldsToOrder is...
Kyle M Hall [Tue, 29 Aug 2023 17:48:30 +0000 (17:48 +0000)]
Bug 34644: Add clarifying text to sysprefs to indicate that MarcFieldsToOrder is a fallback to MarcItemFieldsToOrder

Clarify that fields will fall back to MarcFieldsToOrder from MarcItemFieldsToOrder.

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 884039bd5af43ffc83aaf1ef93500c6ab56efc2a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5b54a01fa86a52b354fabfc23ae187502933b347)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35600: Prevent checkouts table to flicker
Jonathan Druart [Tue, 19 Dec 2023 10:45:59 +0000 (11:45 +0100)]
Bug 35600: Prevent checkouts table to flicker

The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

This patch makes the table hidden by default, and show it if/when needed

Test plan:
Check an item out, see the checkouts list view
Play with "Always show checkouts automatically", refresh the page
=> UI should behave better than before this patch

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6c8beb2f2ed566dc2e6645d99f2ef0e80eaf726b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 703ee190d94326538d8121563e5dee76aa5b2950)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35491: Add logging to RevertWaitingStatus
Nick Clemens [Tue, 5 Dec 2023 16:27:44 +0000 (16:27 +0000)]
Bug 35491: Add logging to RevertWaitingStatus

This patch simply adds a logaction line to RevertWaitingStatus

To test:
1 - Enable HoldsLog
2 - Place a hold
3 - Fill the hold
4 - Revert the waiting status
5 - Note there is no action log added
6 - Apply patch
7 - Repeat 2-4
8 - Confirm you now have a MODIFY action logged for the reversion

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4e42f1182d14dd0658c984930c11ea3c952b8051)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5ca5900f911ab483cb7bd6bda352399977148481)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 33847: Database update replaces undefined rules with defaults rather than the...
Kyle M Hall [Fri, 26 May 2023 15:42:08 +0000 (15:42 +0000)]
Bug 33847: Database update replaces undefined rules with defaults rather than the value that would be used

Bug 29012 introduces a database update that sets the default values for rules that are required but undefined. This functionally changes the results of the circulation rules.

Instead, this update should find value that is being used for that rule combo and use that as the rule value, only using the default in the case that the derived rule doesn't exist or has a null value.

Test Plan:
1) Check out Koha 22.05.05
2) Create a default all/all/all rule, 3 other rules. Ensure they all have Loan period set to 7, with one of the non-default rules having a Loan period of 14.
3) Delete all but one of the non-default rules with the following query:
   Delete from circulation_rules where rule_name  = 'issuelength' and ( rule_value != 14 and not ( branchcode is null and categorycode is null and itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the all/all/all rule!

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Bug 33847: Rewrite to use SQL

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed, and added reference to new bug too
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f6f2d1ae41ef83629cb25c684d261f98238fe051)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8b04a3f642576a5ad3a06c8ef22b42cada75726e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 30287: (follow-up) Make unit test more reliable in ktd
Martin Renvoize [Sat, 11 Nov 2023 11:06:32 +0000 (11:06 +0000)]
Bug 30287: (follow-up) Make unit test more reliable in ktd

This patch mocks NoticeCSS earlier to ensure we're not inadvertantly
failing due to a local setup in ktd having added to the preference.

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 12e90c8b7d08a927c5fbc2c07792f78d6880cde2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 52772da921c9ad71abcbaab7223b60f5a9ac48de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 30287: (follow-up) Unit test for html_content
Martin Renvoize [Wed, 8 Nov 2023 09:38:18 +0000 (09:38 +0000)]
Bug 30287: (follow-up) Unit test for html_content

This patch adds a unit test for the new `html_content` method introduced
to Koha::Notice::Template in the previous patch.

Test
1) Run the new unit test ;P

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 c260f4a374c3e3fcb335e997842ffb2fa1bd444a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f89d178b063698b643c62b38b93924039b722d94)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 30287: (follow-up) Add content wrap matching send time
Martin Renvoize [Mon, 6 Nov 2023 14:00:21 +0000 (14:00 +0000)]
Bug 30287: (follow-up) Add content wrap matching send time

This patch adds a new method to the Koha::Notice::Message class to wrap
content in the same way we currently do at email send time. We then
update the notice preview to use this method so we're embedding
NoticeCSS into that iframe. This means the generated preview should now
exactly match how your notice will display in email clients including
any CSS you may have placed within NoticeCSS.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fixed typo in POD of html_content

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a09986ea51eb0104b006fac40d1dc7e2f6cdeeab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1dc33325041b5c2f94bc0d7acdecb101de16b98c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 30287: Conditionally render notice preview
Martin Renvoize [Mon, 6 Nov 2023 12:50:05 +0000 (12:50 +0000)]
Bug 30287: Conditionally render notice preview

This patch adds conditional formatting based on whether the notice was
generated from an HTML template or a plaintext one. We simply drop the
'html_line_break' filter for the case where the notice should already be
html formatted.

I was tempted to replace the html_line_break for plaintext formatted
notices too as I believe this closer resembles how we actually output
such generated notices.. but I decided that should be for another bug.

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 f83b9ab1ffc7e703804bdc52f30e1994984180b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ebf8e267aca64be7ea8b0741f3d4b7d23a7a6dac)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35309: Remove DT's fnSetFilteringDelay
Jonathan Druart [Wed, 15 Nov 2023 10:44:37 +0000 (11:44 +0100)]
Bug 35309: Remove DT's fnSetFilteringDelay

On bug 35284 we added the delay on the column filters using dt's
throttle builtin function.

From doc:
https://datatables.net/plug-ins/api/fnSetFilteringDelay
"""
Please note that this plug-in has been deprecated and the dt-init searchDelay option in DataTables 1.10 should now be used. This plug-in will not operate with v1.10+.

Test plan:
Note that column filtering still work as before (test on different
tables, see bug 35284 for the list)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 8bb8282d6868b458237fe2b0638dc810c116077b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 967ed52dd23bd8e4ba598ffe20a2fbdf2708aaf7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35405: Remove noise from MARC::Record in SearchAuthorities
Marcel de Rooy [Mon, 27 Nov 2023 15:12:41 +0000 (16:12 +0100)]
Bug 35405: Remove noise from MARC::Record in SearchAuthorities

We are calling ->field with an undef parameter.
MARC::Record does not like that and says:
  Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202.
For now, a fix at our side.

Test plan:
Run SearchAuthorities without passing an authtypecode.
Without this patch, it results in a warning per hit.
With this patch, the noise should be gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ac02c1d2adc883cc6ff6b749c271cb165d337436)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 30213b67aed36719c20ec28539d90e300601eee5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35204: Prevent an expired password from throwing a 500 error
Matt Blenkinsop [Wed, 6 Dec 2023 10:03:45 +0000 (10:03 +0000)]
Bug 35204: Prevent an expired password from throwing a 500 error

Currently when a patron with an expired password is authenticated via the API a 500 error is returned rather than a 400 "Validation failed" error. This patch catches the return value for an expired password and returns the validation failure before the patron search is attempted.

Test plan:
1) Choose a patron and set their password expiry date to a date in the past
2) Send a request to auth/password/validation as an authenticated user with that patron's details
3) The response should be a 500 error
4) Apply patch
5) Repeat steps 1-3 and this time the response should be a 400 code with an error message of  "Password expired"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f3bb88505245228d97a4e39612b17a688df64a79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit df9d4b0f55fa6b4c430a77686d8e00804eed88de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35204: Add unit tests
Matt Blenkinsop [Mon, 18 Dec 2023 11:00:06 +0000 (11:00 +0000)]
Bug 35204: Add unit tests

prove t/db_dependent/api/v1/password_validation.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 711f9a041a706ed3f025afd6da0259879396ea58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 86be92a6084d4475b004f6ffce2e14fb21917f50)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35496: (QA follow-up): tidy up code
Victor Grousset/tuxayo [Wed, 13 Dec 2023 15:38:09 +0000 (16:38 +0100)]
Bug 35496: (QA follow-up): tidy up code

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d0732252ab3e0ed854dce800018c01ccbad89c2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1c2269488c6e5982d2788fa558204a4befa8b13)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35496: Open article requests tab by default on opac-user.pl after placing an...
Lucas Gass [Tue, 5 Dec 2023 18:04:47 +0000 (18:04 +0000)]
Bug 35496: Open article requests tab by default on opac-user.pl after placing an article request

To test:
1 - Turn on ArticleRequests
2 - Place an  Article Requests on the opac
3 - Note after placing the request the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-article-requests
4 - Note the article request tab is not active
5 - APPLY PATCH and restart_all
6. Try steps 2 - 4 again, this time the article request tab should be open by default.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 33ba9c270173703181e4c7f6e03656eea29c0b27)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7ad7038936af4adf3cd57f1f2339f5a6adf850ce)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35495: Open holds tab by default on opac-user.pl after cancelling a hold
Lucas Gass [Tue, 5 Dec 2023 17:47:50 +0000 (17:47 +0000)]
Bug 35495: Open holds tab by default on opac-user.pl after cancelling a hold

To test:
1 - Go to the opac-user.pl page for a user with some holds and cancel a hold.
2 - Note after placing the hold the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3 - Note the holds tab is not active
4. APPLY PATCH and restart all
5. Now after cancelling a hold, the refreshed page should have an active hold tab.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cc9e40869af83f1eff4f54577a48050f628c9a5c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d4c0bd27f737885e1562e4ff07cc41ebbc378ffe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35492: Open holds tab by default on opac-user.pl after suspending a hold
Lucas Gass [Tue, 5 Dec 2023 16:50:37 +0000 (16:50 +0000)]
Bug 35492: Open holds tab by default on opac-user.pl after suspending a hold

To recreate:
1. Go to the opac-user.pl page for a user with some holds and suspend
   a hold.
2. Note after placing the hold the URL is:
   http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3  Note the holds tab is not active
4. APPLY PATCH and restart all
5. Now after suspending a hold, the refreshed page should have an active
   hold tab.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9076f0ba3d11875028e87fae314ae993c196cb2a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3259bcf9794762283e80a8bec28dc3594accba1b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35488: Open holds tab by default on opac-user.pl after placing a hold
Lucas Gass [Tue, 5 Dec 2023 16:40:15 +0000 (16:40 +0000)]
Bug 35488: Open holds tab by default on opac-user.pl after placing a hold

1 - Place a hold on the opac
2 - Note after placing the hold the URL is:
    http://localhost:8080/cgi-bin/koha/opac-user.pl?#opac-user-holds
3 - Note the holds tab is not active
4 - APPLY PATCH and restart_all
5 - Try steps 1 - 3 again, this time the holds tab should be opened.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d8bd46d0d7dcc80ece69f3c8f869ec7113401d65)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ce728a04f9adb66c2ed9bc180e30196c4034b4a3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35428: Remove temporary files for gulp po tasks
Jonathan Druart [Wed, 29 Nov 2023 09:02:50 +0000 (10:02 +0100)]
Bug 35428: Remove temporary files for gulp po tasks

gulp po:update will generate 1 /tmp/koha-* directory per task.

We need to remove them when the script does not longer need them.

Test plan:
0. Do not apply this patch
1. ls -ltr /tmp
2. gulp po:update --lang es-ES
3. ls -ltr /tmp
=> Notice new koha-* directories
Repeat 2, 3
4. Apply this patch and try again
=> No new directories when the job is done

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ba7b62d1fc171f346176cd454f86747fea7928f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a4a2d02d3c2d6aa8dab3def86800a467a01fc66d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35498: Allow tab to indent lines and trigger autocomplete
Matt Blenkinsop [Wed, 6 Dec 2023 15:13:20 +0000 (15:13 +0000)]
Bug 35498: Allow tab to indent lines and trigger autocomplete

This patch allows the tab key to indent lines as well as trigger autocomplete.

Test plan:
1) Apply patch, navigate to reports and create a new SQL report
2) Click in the text editor and press tab, it should indent and then trigger the autocomplete options
3) Type something to select from the autocomplete box and press tab - it should autocomplete that option
4) Type any word and then press space. Now press tab and it should indent again

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f9b3866ebfa78b39dcf6aac6ef4c0e1a5679f7f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ef1255372d01302e5605c005dfb37749f714ed18)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35310: Show current renewal value of the currently active check out
Pedro Amorim [Fri, 10 Nov 2023 11:31:28 +0000 (11:31 +0000)]
Bug 35310: Show current renewal value of the currently active check out

Test plan, with the previous 2 patches applied:

1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on 'View' in front of 'Current renewals'
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice it shows the renewals as expected
5) Return the same item: 39999000003192
6) Repeat 1) to 3). Notice it shows 2 current renewals even tho only 1 corresponds to the currently active check out
7) Renew again. Notice it shows 3 current renewals even tho only 2 correspond to the currently active check out
7) Apply this patch. Notice it now only shows 2 current renewals

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e756faf860c7475e2761e45f3ebc152c34a2d036)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b242a03a30943eda94762374e3526b14c2f57ebd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35310: Only show 'Current renewals' link if item is currently checked out
Pedro Amorim [Fri, 10 Nov 2023 11:01:58 +0000 (11:01 +0000)]
Bug 35310: Only show 'Current renewals' link if item is currently checked out

1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on "View" in front of "Current renewals"
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice it shows the renewals as expected
5) Return the same item 39999000003192
6) Repeat 3). Notice it never loads renewals and network console shows HTTP error 400
7) Apply this patch. Repeat the test plan. Notice the 'Current renewals' no longer shows for the item because it is no longer checked out, so whatever past renewals are no longer 'current'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ebba646b46455d308cf9e8777bd9af92080156ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 467626119ad739330e2fec4c7b111ab3a4b520f9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoBug 35310: Only show 'Current renewals' <li> entry if there are current renewals
Pedro Amorim [Fri, 10 Nov 2023 11:00:55 +0000 (11:00 +0000)]
Bug 35310: Only show 'Current renewals' <li> entry if there are current renewals

'Current renewals' is always showing, even if empty.

Test plan:
1) Checkout an item to Koha user, barcode 39999000003192
2) Renew that barcode
3) Visit the items page of the biblio record, click on "View" in front of "Current renewals"
/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
4) Notice all items have the 'Current renewals' label entry, but only the checked out item in step 1) has the 'Current renewals' label entry
5) Apply patch. Notice only the item with current renewals is showing the 'Current renewals' label entry with the respective value.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 942c4a0535dbbf46746e849758d7dfc741187bec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9eacb4b40f1c35d2e713ef04ca376ace44408eef)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoUpdate release notes for 23.05.07 release v23.05.07
Lucas Gass [Wed, 3 Jan 2024 14:56:41 +0000 (14:56 +0000)]
Update release notes for 23.05.07 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 months agoIncrement version for 23.05.07 release
Lucas Gass [Wed, 3 Jan 2024 14:06:33 +0000 (14:06 +0000)]
Increment version for 23.05.07 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 34091: Fix typo log-modules in help for cleanupdatabase.pl
Fridolin Somers [Fri, 1 Dec 2023 17:55:57 +0000 (07:55 -1000)]
Bug 34091: Fix typo log-modules in help for cleanupdatabase.pl

This parameter is actually --log-module.

Test plan :
Run misc/cronjobs/cleanup_database.pl -h
Confirm you see --log-module

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 289e06edea3284ddc5b61c57a4a62a657328c3f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 22d44fd2f24ea71de31f76fc2ed4f78fe725845e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35436: Copy is not translatable in OPAC Search History
Adolfo Rodríguez [Thu, 30 Nov 2023 10:12:13 +0000 (11:12 +0100)]
Bug 35436: Copy is not translatable in OPAC Search History

Test plan
1 Enter in OPAC Search History in a language other than English and
  check that Copy is not translated
2 Apply patch, restart services
3 Regenerate the templates for that language
4 Repeat step 1 and check that Copy appears now translated

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e3f961777786b0ebae9fa76d50e8c40a4cb664e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 118da7f0b3a2fc7f2e00ceed5774a6a7e4ddc680)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35344: Warn on patron image upload if missing cardnumber
David Cook [Thu, 16 Nov 2023 05:08:30 +0000 (05:08 +0000)]
Bug 35344: Warn on patron image upload if missing cardnumber

This change displays a warning message instead of the patron image
upload feature in the patron record when the patron is missing the
cardnumber.

Without this change, the staff user can try to upload a patron image
but it will silently fail. This change warns the staff user of the
cardnumber requirement for patron image upload.

Test plan:
0. Apply the patch
1. Enable the "patronimages" system preference
2. Go to http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
3. Click "Add" over the patron image placeholder
4. Note the "Upload photo" button and the ability to take a patron photo if your
device has a camera
5. Remove "cardnumber" from BorrowerMandatoryField
6. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
7. Edit the patron to remove the cardnumber
8. Click "Add" over the patron image placeholder
9. Note that no patron image upload features appear. Instead, only
a warning appears stating that the patron needs a cardnumber before
the patron image upload can be performed

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 855b8bc66e3bf1d012d0caeab938556eb520fd51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0a8908bddb1a75f539e596893a257de0aac24fa6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35414: Silence warn related to number_of_copies
Magnus Enger [Wed, 29 Nov 2023 13:58:08 +0000 (14:58 +0100)]
Bug 35414: Silence warn related to number_of_copies

To test in ktd:
- Tail the logs with "sudo tail -f /var/log/koha/kohadev/plack*.log"
- Find a record in the staff client
- Add an item to the record
- Observe "[WARN] Argument "" isn't numeric in subroutine entry ..."
  in /var/log/koha/kohadev/plack-intranet-error.log
- Apply this patch
- restart_all
- Tail the logs again
- Add another item
- Observe the absence of the earlier warning

Thanks to Jonathan Druart for suggesting this particular solution!

Signed-off-by: Owen Leonard <oleonard@myacpl.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 8ba9ea8a87e0d6653261d90d743cd75328ad0b99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aad41dd27a37ab42a6aa9606d56a031b6f67a180)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 34516: Upgrade database fails for 22.11.07.003, points to web installer
Kevin Carnes [Mon, 27 Nov 2023 08:40:55 +0000 (09:40 +0100)]
Bug 34516: Upgrade database fails for 22.11.07.003, points to web installer

MySQL requires key length for indexes of text columns, while MariaDB
sets it automatically for utf8mb4.

Test plan:
1. Setup Koha to use MySQL (e.g. ku-my8)
2. Downgrade database with the following commands (e.g. koha-mysql
   kohadev):
   ALTER TABLE `biblioitems` MODIFY COLUMN `publishercode` varchar(255);
   ALTER TABLE `biblioitems` DROP INDEX `publishercode`;
   ALTER TABLE `biblioitems` ADD INDEX `publishercode` (`publishercode`);
   ALTER TABLE `deletedbiblioitems` MODIFY COLUMN `publishercode` varchar(255);
   ALTER TABLE `deletedbiblioitems` DROP INDEX `publishercode`;
   ALTER TABLE `deletedbiblioitems` ADD INDEX `publishercode` (`publishercode`);
   UPDATE systempreferences SET value="23.0600006" WHERE variable = "Version";
3. Attempt to upgrade the database (e.g. koha-upgrade-schema kohadev)
4. Notice the error about "key specification without a key length"
5. Apply patch
6. Attempt to upgrade the database (e.g. koha-upgrade-schema kohadev)
7. Notice that the database is upgraded
8. Sign off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Perltidied the database update file.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4c6517767a86947361b81e0f718ec3833c5d5a33)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b07a87ae43f578c30e752933e9ad5a5a8871fd73)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35408: Fix import job link
Jonathan Druart [Tue, 28 Nov 2023 08:11:43 +0000 (09:11 +0100)]
Bug 35408: Fix import job link

After importing titles from a list there is a link to the background job
that is displayed.
This link points to /cgi-bin/koha/admin/background_jobs/:id
There is a route to this path in routes/erm.js, to redirect to the
correct URI /cgi-bin/koha/admin/background_jobs.pl?op=view&id=:id
However this link will not work if we are accessing it from outside the
ERM app/module, or if we are opening it in a new tab/window.

The idea was interesting, but does not work...

Test plan:
Create a new ERM local package, a new list (virtual shelf), add some
items to the list.
Go to E-resource management > eHoldings > Local > Titles > Import from a list
Click "import"
Notice the "see job" link and click it

=> Confirm that with this patch applied you can open it in a new tab
without getting a 404

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 09d5355ffb6381b531b5d42cc97b17c1e9790da4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 32eccd89749d6fa3f5d71cc01be79c00dda0dddf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35352: Allow SMSalertnumber to be hidden via BorrowerUnwantedField
Lucas Gass [Thu, 16 Nov 2023 14:58:56 +0000 (14:58 +0000)]
Bug 35352: Allow SMSalertnumber to be hidden via BorrowerUnwantedField

To test:
1. Add a value to SMSSendDriver like 'Emial'.
2. Go to BorrowerUnwantedField and attempt to hide "Mobile phone number (smsalertnumber)"
3. Go to members/memberentry.pl and see the field is not hidden.
4. APPLY PATCH
5. Try step 3 again and this time the field should be properly hidden.

Note: This patch also includes some indentation changes.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6aa971be01987e041dcb55a71ad2f36e3f2c40d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2aaadaad09e96d982bef65f66c553b8630fd73e3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35410: Use "Online resources" label in search results
David Nind [Mon, 4 Dec 2023 03:23:03 +0000 (03:23 +0000)]
Bug 35410: Use "Online resources" label in search results

Update the staff interface and OPAC XSLT files to use
"Online resources" as the label in search results, instead of
"Online access". This matches the label used in the detail page
for a record.

Test plan:
1. Search for perl in the staff interface and OPAC (or add to
   an existing record a URL to 856$u with 4 for the first
   indicator).
2. For any search result that displays the "Online access" label,
   view the detail page for the record.
3. Note that the detail page uses the label "Online resources".
4. Apply the patch and restart_all.
5. Repeat steps 1 and 2.
6. Note that the search result pages now show "Online resources" for
   the label, matching the detail page.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6c8ad081a610b6e6b9cdbd3fdd519a2ca4dce3a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c5f9158dca9804847ee7e74080e16e8d1ef41825)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35453: Fix wrong 'Laserdisc)' string on 007 builder (MARC21)
Tomas Cohen Arazi [Thu, 30 Nov 2023 12:46:48 +0000 (09:46 -0300)]
Bug 35453: Fix wrong 'Laserdisc)' string on 007 builder (MARC21)

Steps to reproduce:
1. On cataloguing, open the 007 builder.
2. Choose material type 'Video recording'
3. On 04 choose g - Laserdisc
4. Click save
=> SUCCESS: 'g' correctly shows on the 007
5. Edit the 007 again
=> FAIL: on 04, 'g - Laserdisc)' is displayed
6. Apply this patch
7. Repeat 4 and 5
=> SUCCESS: no trailing ')'
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f48ef52cfc786bd969ceb03a782b037a10d854d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0659f6afd28c1e6e2e9f79f12e711381f9931382)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35441: Fix typo 'UniqueItemsFields' system preference
Fridolin Somers [Wed, 29 Nov 2023 19:13:38 +0000 (09:13 -1000)]
Bug 35441: Fix typo 'UniqueItemsFields' system preference

Typo in message :
NOTE: Fields listed in the 'UniqueItemsFields' system preference will not be copied

The preference is Item without 's' : 'UniqueItemFields'

Test plan :
1) Check system preference 'UniqueItemFields' contains values
2) Go to acquisition to create a new order from new record
3) Check the note you see with the system preference

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 08cc74a9b60d85fcdf5b3febfa5653111a16d9ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0aea3a0f42f79768725933c2b552334a4dc8ef09)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
6 months agoBug 35327: Fix capitalization of language name
Lari Taskula [Mon, 13 Nov 2023 23:21:17 +0000 (23:21 +0000)]
Bug 35327: Fix capitalization of language name

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Updated opac to OPAC.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8c309ea53d4422b53641a2b7fbd46310df7d9fb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fed4126e5ce6a7ee97324b3733ba06b647db814f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
7 months agoUpdate release notes for 23.05.06 release v23.05.06
Fridolin Somers [Tue, 28 Nov 2023 19:02:20 +0000 (09:02 -1000)]
Update release notes for 23.05.06 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoIncrement version for 23.05.06 release
Fridolin Somers [Tue, 28 Nov 2023 18:24:44 +0000 (08:24 -1000)]
Increment version for 23.05.06 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35290: (follow-up) Perltidy formatting corrections
Owen Leonard [Thu, 9 Nov 2023 19:46:35 +0000 (19:46 +0000)]
Bug 35290: (follow-up) Perltidy formatting corrections

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 350aa94b5e4d5013429fa574ac1598ba4cab7c5c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35290: Sanitize field input on cataloguing/ysearch.pl
David Cook [Wed, 8 Nov 2023 23:39:45 +0000 (23:39 +0000)]
Bug 35290: Sanitize field input on cataloguing/ysearch.pl

This change sanitizies the field input on cataloguing/ysearch.pl

Test plan:
0. Apply the patch and restart/reload Koha
1a. "Add marc21_field_260b.pl plugin to 260$b in the Default framework"
1b. Go to http://localhost:8081/cgi-bin/koha/admin/marc_subfields_structure.pl?
op=add_form&tagfield=260&frameworkcode=#subbfield
1c. Choose "marc21_field_260b.pl" from the dropdown next to "Plugin"
1d. Click "Save changes"
2a. "Add new record"
2b. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=
3. Click on tab "2" and scroll down to 260 "b"
4. Type in "Ori" into 260 subfield b
5. Some autocomplete suggestions should appear

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4160afa3d74abb703ec1c461156f1b5a061480b3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35291: (QA follow-up) Tidying script for QA test tools
Aleisha Amohia [Thu, 23 Nov 2023 21:08:09 +0000 (21:08 +0000)]
Bug 35291: (QA follow-up) Tidying script for QA test tools

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b30898c8bf48b828080c557186dcb25b980ffb48)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35291: Validate filepaths in linking files
David Cook [Thu, 9 Nov 2023 00:49:54 +0000 (00:49 +0000)]
Bug 35291: Validate filepaths in linking files

Validate that the files in linking files are contained within the ZIP.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bae5256216f3ad911af3ef4dd944174448c85eaa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35291: Don't allow symlinks for link files in cover image ZIP
David Cook [Thu, 9 Nov 2023 00:23:45 +0000 (00:23 +0000)]
Bug 35291: Don't allow symlinks for link files in cover image ZIP

There's no reason to allow symlinks for link files in cover image
ZIP files. Preventing their use prevents someone from uploading
a symlink pointing to an existing file on the Koha server.

Test plan:
0. Apply patch and restart/reload Koha
1. Create a PNG cover image
2. Create a datalink.txt file that contains something like the
following:
29,Untitled.PNG
3. Turn on "LocalCoverImages" system preference
4. Upload via http://localhost:8081/cgi-bin/koha/tools/upload-cover-image.pl
5. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
6. Note the cover image has been uploaded

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4b019fcbb041649bf4e19e95d59117fb9b422c05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35291: Prevent leaks from FS
Jonathan Druart [Wed, 8 Nov 2023 16:14:55 +0000 (17:14 +0100)]
Bug 35291: Prevent leaks from FS

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6023acd648110297a87c65d1b6d024584ac1bc06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35174: update control files for koha-l10n dependency package
Mason James [Thu, 16 Nov 2023 10:06:27 +0000 (23:06 +1300)]
Bug 35174: update control files for koha-l10n dependency package

 to test...

 - apply patch
 - build koha-common package
 - install koha-common package, and confirm koha-l10n package is installed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 months agoBug 35174: Don't run gulp po commands if po dir is missing
Jonathan Druart [Thu, 16 Nov 2023 07:45:15 +0000 (08:45 +0100)]
Bug 35174: Don't run gulp po commands if po dir is missing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 months agoBug 35174: Add misc/translator/po to .gitignore
Jonathan Druart [Thu, 16 Nov 2023 07:44:56 +0000 (08:44 +0100)]
Bug 35174: Add misc/translator/po to .gitignore

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 months agoBug 35174: Add a warning to the about page
Jonathan Druart [Thu, 16 Nov 2023 07:43:43 +0000 (08:43 +0100)]
Bug 35174: Add a warning to the about page

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 months agoBug 35174: Do not explode if po dir does not exist
Jonathan Druart [Thu, 16 Nov 2023 07:27:10 +0000 (08:27 +0100)]
Bug 35174: Do not explode if po dir does not exist

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 months agoBug 35174: Remove .po files from Koha
Koha translators [Wed, 22 Nov 2023 08:32:36 +0000 (09:32 +0100)]
Bug 35174: Remove .po files from Koha

7 months agoBug 35307: Add a hidden input for expired holds
Nick Clemens [Mon, 13 Nov 2023 16:02:46 +0000 (16:02 +0000)]
Bug 35307: Add a hidden input for expired holds

To test:
 1 - Place 3 holds on a bib, each for a different patron
 2 - IN the db, set the first hold to be expired:
    UPDATE reserves SET expirationdate='2023-01-01' WHERE reserve_id=1;
 3 - Refresh the holds page for the biblio
 4 - Note the first hold now says 'Expired' in the expiration date column
 5 - Set an expiration date for the last hold
 6 - Click 'Update holds'
 7 - Note the date is applied to the second hold
 8 - Delete the holds
 9 - Apply patch
10 - Repeat 1-6
11 - Confirm only the correct hold is updated

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
7 months agoBug 35266: Fix biblio check in opac-MARCdetail
Marcel de Rooy [Mon, 6 Nov 2023 13:11:49 +0000 (13:11 +0000)]
Bug 35266: Fix biblio check in opac-MARCdetail

We should check before retrieving metadata.

Test plan;
Try /cgi-bin/koha/opac-MARCdetail?biblionumber=X
Replace X by a not-existing biblionumber.
Verify that you get a 404 error page.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
JD amended patch: Use ternary op

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 54bdcaef66ef6b121918b8922020a50d1d0177c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35012: Apply change to all events
Marcel de Rooy [Thu, 9 Nov 2023 13:16:05 +0000 (13:16 +0000)]
Bug 35012: Apply change to all events

We should not just look at Click.

Test plan:
[1] Apply the example patch for a Blur action in barcode.pl.
[2] Check that barcode.pl is active in your framework and that
    autoBarcode is not disabled.
[3] Open the browser dev console.
[4] Tab a few times through barcode in the neworderempty form of
    Acquisition. If you leave the field, the Blur event fires.
    => Without this patch you will see two console lines (FF may
    show a little '2' icon at the right side) added. With this
    patch just one.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e9326f0e86881f95fd79b2dd7a2e9578ab517116)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35012: Prevent Click handler firing twice
Jan Kissig [Tue, 10 Oct 2023 11:36:04 +0000 (13:36 +0200)]
Bug 35012: Prevent Click handler firing twice

test plan:
a) build a new basket + order line using "item create on placing an order"
b) in the item creation dialog (neworderempty.pl) please use the webbrowsers dev tools to analyze the [...] button next to subfield d (Date acquired) and inspect the events that get fired by clicking
c) notice the Clicktag_952_subfield_d_* event gets fired twice.
d) apply patch and reload page
e) there should be only 1 click handler left (besides the jquery one), which points to the Clicktag_952_subfield_* function

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
See also bug 35298. You may have seen that the Focus event of dateaccessioned
did not fire. But that is related to use of Flatpickr in this plugin.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ec3fe5d41e03d969b876f0948e81389b0a20df4c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35276: Remove authentication params from suggestion hash
Marcel de Rooy [Tue, 7 Nov 2023 12:57:42 +0000 (13:57 +0100)]
Bug 35276: Remove authentication params from suggestion hash

These would be forwarded to Koha::Objects->as_list and crash on
unknown column.

Test plan:
Logout from staff.
Enter URL /suggestion/suggestion.pl
Without this patch, it crashes. Now it does not.

Note: The crash may show auth_forwarded_hash but I also saw
koha_login_context passing by. Same issue.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2821c7962ca7594f029f4c7fdb0c2f70028eb9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35298: Remove focus handler from dateaccessioned plugin.
Marcel de Rooy [Thu, 9 Nov 2023 08:05:34 +0000 (08:05 +0000)]
Bug 35298: Remove focus handler from dateaccessioned plugin.

Test plan:
Verify that setting focus to date acquired field in items editor
fills date of today when field is empty but does not replace existing
date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0583deac95b35f1ad96493262e922d7ac3eef102)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35103: Add option to gulp tasks to pass a list of tasks
Jonathan Druart [Thu, 19 Oct 2023 07:41:03 +0000 (09:41 +0200)]
Bug 35103: Add option to gulp tasks to pass a list of tasks

You can now generate the messages.po for all languages with:
  gulp po:update --task messages

or for only es-ES
  gulp po:update --task messages --lang es-ES

It may be helpful for the "update po" script that will be used on
weblate.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 months agoBug 27992: [23.05] (follow-up) Fix unit test with unblessed patron
Fridolin Somers [Mon, 13 Nov 2023 19:12:08 +0000 (09:12 -1000)]
Bug 27992: [23.05] (follow-up) Fix unit test with unblessed patron

7 months agoBug 21284: [23.05] (follow-up) Fix unit test with unblessed patron
Fridolin Somers [Mon, 13 Nov 2023 19:04:24 +0000 (09:04 -1000)]
Bug 21284: [23.05] (follow-up) Fix unit test with unblessed patron

7 months agoBug 35187: [23.05] (follow-up) Fix missing line breaks in WELCOME notice
Jonathan Druart [Sat, 11 Nov 2023 10:04:06 +0000 (11:04 +0100)]
Bug 35187: [23.05] (follow-up) Fix missing line breaks in WELCOME notice

yaml was broken because of extra space

7 months agoBug 35144: Update style of 'Required' label for OPAC patron attributes
Owen Leonard [Tue, 7 Nov 2023 19:06:13 +0000 (19:06 +0000)]
Bug 35144: Update style of 'Required' label for OPAC patron attributes

This patch makes some changes to style and markup of the part of the
OPAC patron entry form which displays patron attribute entry fields.

To test, apply the patch and rebuild the OPAC CSS.

- Create at least two patron attributes which have both "Display in
  OPAC" and "Editable in OPAC" checked: One which is linked to an
  authorized value, one which isn't. At least one attribute should be
  mandatory. At least one attribute should be repeatable.
- Test the form using either patron self-registration or by logging in
  to the OPAC and clicking the "Personal details" link in the sidebar.
- Check the appearance of required fields in the form, including the
  mandatory patron attributes.
- Confirm that the "Clear" and "New" controls look good and work
  correctly, including fields cloned with the "New" button.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dd70e43b66fc2a887c5a5d6afc165ebf20469354)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35273: Fix item selection when receiving
Jonathan Druart [Tue, 7 Nov 2023 10:23:34 +0000 (11:23 +0100)]
Bug 35273: Fix item selection when receiving

For partial receives with items created on order, the
aqorders_items table was not correctly updated when only
some of the ordered items were received.

To test:
1) Create a basket with creating items on order
2) Create an order line with 3 items
3) Close basked
4) Receive shipment and create invoice
5) Receive your created order line
6) Edit first item displayed, add barcode
7) Check checkbox and receive
8) Verify the order line has been split 2:1
9) Receive again - notice all 3 items are showing.
  We should only see the remaining 2
10) Undo receive
11) Apply patch
12) Repeat steps 5)-9)
13) Verify that in step 9) only the remaining 2 items display now.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4fd674761199c2cce6ffbd0c272ee22f19711c4f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 29007: Add cancellation reason input on check in
Thibaud Guillot [Fri, 3 Nov 2023 14:30:04 +0000 (15:30 +0100)]
Bug 29007: Add cancellation reason input on check in

Test plan:

1) Check an item in with already a confirmed hold
2) Cancel the hold, it was cancelled without possibility to choosing a
   reason
3) Apply this patch and do it again, you must see an input to choose
   your cancellation reason (list from VA)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fe93b31ec73f22712189f9e4d385ec453b1cbd5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35284: Fix tests
Jonathan Druart [Thu, 9 Nov 2023 09:45:32 +0000 (10:45 +0100)]
Bug 35284: Fix tests

This fix patrons_search.t but other selenium tests certainly need
adjustements

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dbf07b8cd3143660449cc49d855d2ceca56a42fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35284: Add throttling to column filters
Jonathan Druart [Thu, 9 Nov 2023 07:58:41 +0000 (08:58 +0100)]
Bug 35284: Add throttling to column filters

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5220dd6004ff34d29c29e1e139d6d17ccecff9b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35284: Fix Vue tables
Jonathan Druart [Thu, 9 Nov 2023 07:58:11 +0000 (08:58 +0100)]
Bug 35284: Fix Vue tables

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8738dcd9886cdb5d91e481e11d0d1c730a9e9127)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35284: Add DT delay to kohaTable
Jonathan Druart [Wed, 8 Nov 2023 21:23:20 +0000 (22:23 +0100)]
Bug 35284: Add DT delay to kohaTable

To test:
* When a specific initComplete exists (general patron search)
* When no specific initComplete exists (cities)

=> KO
* ERM tables display twice the "show X entries" dropdown list
* Column filters are not affected

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3819f4a57c9c208746e7f147ab085c36ccaf7d68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35008: (QA follow-up) Add selenium unit tests
David Cook [Fri, 10 Nov 2023 01:06:39 +0000 (01:06 +0000)]
Bug 35008: (QA follow-up) Add selenium unit tests

This patch addds selenium tests for the ILS-DI feature.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a89aee37239495a7a655d99a3a910ecdd3fce835)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35008: Make ILS-DI not require auth when OpacPublic disabled
Aleisha Amohia [Sun, 8 Oct 2023 21:59:19 +0000 (21:59 +0000)]
Bug 35008: Make ILS-DI not require auth when OpacPublic disabled

To test, disable OpacPublic and ensure a call to ilsdi.pl will still return expected results from a private browser, not logged into the OPAC.

Sponsored-by: Auckland University of Technology
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb130f559ecc0a232adce9a8af0084a99d6e9a81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35283: Add missing subfield h to action note 583 in OPAC detail page
Katrin Fischer [Thu, 9 Nov 2023 21:33:10 +0000 (21:33 +0000)]
Bug 35283: Add missing subfield h to action note 583 in OPAC detail page

$x is nonpublic note, so it makes sense to only display it in staff, but
$h is Jurisdiction and we should show it in OPAC and staff alike.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 653dc1b2214d0ebb291766406354c69cfa57c7e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35283: Add missing subfields h and x to field 583 for staff XSLT
David Cook [Wed, 8 Nov 2023 02:24:01 +0000 (02:24 +0000)]
Bug 35283: Add missing subfields h and x to field 583 for staff XSLT

This change adds the missing subfields h and x to field 583 for
the detail XSLT in the staff interface.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29
2. Click on tab "5"
3. Scroll down to 583 and click on "ACTION NOTE" to expand subfields
4. Fill in using the following example:
   583 0#$adowngraded$c19910110$hJoe Smith$otitle$xfrom secret FRD to confidential NSI
5. Click "Save"
6. Note that the "Action note" now shows "Joe Smith" and "from secret
   FRD to confidentail NSI"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d74a89e2dabe355f05c4c45b6b39e581509e1c16)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 33164: Do not prevent processing of all error messages
Aleisha Amohia [Mon, 23 Oct 2023 22:28:55 +0000 (22:28 +0000)]
Bug 33164: Do not prevent processing of all error messages

This follow-up patch removes the use of $exit_required_p completely. The sysprefs BlockReturnOfLostItems and BlockReturnOfWithdrawnItems are handled in other scripts, and should not prevent the processing of all returns error messages when enabled.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 64460e4f4e01d8cb84a8037f444e5f7739a6bd40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 33164: Ensure return claim message shows if lost item return blocked
Aleisha Amohia [Tue, 7 Mar 2023 22:07:04 +0000 (11:07 +1300)]
Bug 33164: Ensure return claim message shows if lost item return blocked

This fix ensures that a return claim confirmation always shows, even if
the return of lost items has been blocked by BlockReturnOfLostItems
being enabled.

To test:

1. Set BlockReturnOfLostItems system preference to Block
2. Check out an item to a patron
3. Go to the patrons page and claim a return on the item
4. Check in the item and keep checking in the item. Notice the message
"Item is lost, cannot be checked in." shows every time, but the return
claim message only shows sometimes.

5. Apply the patch and restart services

6. Check in the item and keep checking in the item. Confirm both the
lost message shows and the return claim message shows every time.
7. Confirm the return of the item is still blocked.

Sponsored-by: Pymble Ladies' College
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f56880812323a003d3d9d043c10c3142d397ac4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35278: Fix warn from column_settings.pl
Marcel de Rooy [Mon, 6 Nov 2023 14:00:49 +0000 (14:00 +0000)]
Bug 35278: Fix warn from column_settings.pl

We need to add scalar to the calls. These parameters are not meant
to be used as multi_param.

Test plan:
Try With and without this patch on staff:

Try: /cgi-bin/koha/admin/columns_settings.pl
=> WITHOUT: No warnings
=> WITH: Same. No change.
Try: /cgi-bin/koha/admin/columns_settings.pl?module=acqui&page=basket
=> WITHOUT: Opens module, scrolls down. CGI::param called in list context in logfile
=> WITH: Opens module, scrolls down.
Try: /cgi-bin/koha/admin/columns_settings.pl?module=acqui&page=basket&table=orders
=> WITHOUT: Opens module, scrolls down. CGI::param called in list context in logfile
=> WITH: Opens module, scrolls down.

Try: /cgi-bin/koha/admin/columns_settings.pl?module=acqui&module=admin
* Hash like: panel => acqui, admin => page, undef  => table, undef => modules, $modules (SHIFTED)
=> WITHOUT: Acqui expanded showing: There is no page using the table configuration in this module.
=> CGI::param warning in log.
=> And: Problem = a value of table has been passed to param without key
=> And: Problem = a value of modules has been passed to param without key
=> WITH: Only the first module (Acqui) should be expanded.

Try: /cgi-bin/koha/admin/columns_settings.pl?module=acqui&module=admin&page=basket&table=orders
* Hash like: panel => acqui, admin => page, basket => table, orders => modules, $modules hash (SHIFTED)
=> WITHOUT: Acqui expanded showing: There is no page using the table configuration in this module.
=> And: CGI param log warning.
=> WITH:: Opens Acqui. Second module ignored. Scrolling.

Try: /cgi-bin/koha/admin/columns_settings.pl?module=admin&module=acqui&page=basket&table=orders
* Hash like: panel => admin, acqui=> page, basket => table, orders => modules, $modules hash (SHIFTED)
=> WITHOUT: Admin expanded showing: There is no page using the table configuration in this module.
=> And: CGI param log warning.
=> WITH: Admin should be expanded (page and table ignored, not in Admin). No scroll.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1b11de87b991ddae4d31861c9cdc321ce45d229d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34413: Fix style of Flatpickr in iOS mobile view
Owen Leonard [Thu, 9 Nov 2023 13:21:06 +0000 (13:21 +0000)]
Bug 34413: Fix style of Flatpickr in iOS mobile view

This patch updates Flatpickr CSS in the OPAC and staff interface so that
date fields are displayed correctly in iOS mobile views.

To test, apply the patch and rebuild the OPAC and staff interface CSS.

- In the OPAC, click "Create new account"
- In the account entry form, confirm that the date of birth field looks
  correct and that the date-picker works as it should.
- In the staff client, go to Patrons -> New patron.
- Check the date of birth field in this form too.

This patch has been tested in the Xcode iOS device simulator with iOS
17. While I wasn't able to reproduce the problem in Firefox, I was able
to use the developer tools' responsive design mode to trigger the mobile
view and thus be able to see the styles which are being applied:

- In the OPAC, on the "Create new account" screen, open the Web
  Developer Tools panel (Tools -> Browser tools -> Web Developer Tools).
- Click the "Responsive Design Mode" button in the upper-right corner of
  the developer tools panel (it looks like a phone and tablet together).
- The main browser window will now how some settings at the top.
- In the first dropdown, choose an iPhone model.
- The date of birth field should now be styled differently because of
  the addition of a "flatpickr-mobile" style.
- Right-click the field and choose "Inspect." In the developer console
  you can see the styles which are being applied to the field. One of
  those should be ".flatpickr-input.flatpickr-mobile"

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9e9fa64d5a9f8966c45a923b258c994df70ac35f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35295: Move JS asset in returns.tt
Lucas Gass [Wed, 8 Nov 2023 21:18:27 +0000 (21:18 +0000)]
Bug 35295: Move JS asset in returns.tt

To Test:
1. Place a hold
2. Check-in an item of the held record
3. No hold modal ðŸ˜±
4. APPLY PATCH
5. Hold modal!!!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 771334218acc2a5eb97bac1eab38a53543084444)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35254: Add import_record_id to order inputs
Nick Clemens [Fri, 3 Nov 2023 20:10:01 +0000 (20:10 +0000)]
Bug 35254: Add import_record_id to order inputs

This patch follows the logic of bug 32166 and adds specific inputs for each order to avoid any misalignment when some records are not imported

To test:
1 - Find a vendor in acquisitions
2 - Create or find an open basket
3 - Add to basket form a new file
4 - Stage file and add to basket
5 - Select the second record in the list
6 - Enter price info
7 - Save (don't forget, you need to set item type in the second tab)
8 - The order has no price info!
9 - Apply patch
10 - Repeat 3-7 above, staging file fresh
11 - Confirm order has correct prices
12 - Test with a file with many records
13 - Confirm any combination of choosing/skipping records works as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7e2f6d66d6a8cae55d3c879ec2ce89af59439ffa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35262: Improve OPAC self registration confirmation page
Owen Leonard [Mon, 6 Nov 2023 19:40:06 +0000 (19:40 +0000)]
Bug 35262: Improve OPAC self registration confirmation page

This patch corrects logic in the OPAC self registration confirmation
template so that the right column markup is shown when various
combinations of OpacNav, OpacNavBottom, and OpacNavRight are displayed.

To test, apply the patch and enable the PatronSelfRegistration system
preference, and deactivate the PatronSelfRegistrationVerifyByEmail
preference.

- Go to the OPAC and start the process of registering online.
- Fill in the form and submit it.
- On the registration confirmation page, check that the layout looks
  correct.
- Test with the presence of various combinations of OpacNav,
  OpacNavBottom, and OpacNavRight HTML customizations.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 64edb692458262133818553c4cbfa86ca3612260)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35206: Adjust style of add button on curbside pickups administration
Owen Leonard [Tue, 31 Oct 2023 17:10:15 +0000 (17:10 +0000)]
Bug 35206: Adjust style of add button on curbside pickups administration

This patch adds Bootstrap classes to the "Add" button on the curbside
administration page, in the "Curbside pickup hours" section. This makes
it consistent with the markup of similar buttons in the interface and
makes it slightly smaller so that it fits better in the form.

To test, apply the patch and make sure the "CurbsidePickup" preference
is enabled.

- Go to Administration -> Curbside pickups.
- Fill out the form, including the "New slot" fields in the "Curbside
  pickup hours" section.
  - Confirm that the corresponding "Add" button looks correct, and that
    it works to add your new slot.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc70e17f5d07ad8988a1a4a02e0049abc7428547)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34328: DBRev 23.05.05.003
Tomas Cohen Arazi [Wed, 8 Nov 2023 20:36:37 +0000 (17:36 -0300)]
Bug 34328: DBRev 23.05.05.003

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f4001d5462a3490d04e65b3cf7a45174b9eb4b86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34328: Make update idempotent
Martin Renvoize [Fri, 6 Oct 2023 09:41:20 +0000 (10:41 +0100)]
Bug 34328: Make update idempotent

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Perltidied the atomic update.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1dd482bb8ebf7091dfff913ad9dc8f8a0e6f328d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34328: (follow-up) Add description to en_GB
Martin Renvoize [Fri, 21 Jul 2023 07:21:23 +0000 (08:21 +0100)]
Bug 34328: (follow-up) Add description to en_GB

This follow-up adds the language description string for Scottish Gaelic
to the en_GB translation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 037619ab95d502086fe9727536fad9496301d2e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34328: Add Scottish Gaelic to languages
Martin Renvoize [Thu, 20 Jul 2023 15:31:40 +0000 (16:31 +0100)]
Bug 34328: Add Scottish Gaelic to languages

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44aa68c3dfa2b067b317cdb1c6578e517e115d46)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 21284: (QA follow-up) Fix QA script issues
Kyle M Hall [Fri, 3 Nov 2023 16:45:22 +0000 (16:45 +0000)]
Bug 21284: (QA follow-up) Fix QA script issues

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit db19d3f18d8eaffce7def6adc6c86941b9d33d34)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 21284: (QA follow-up) Rename itemonhold and recordonhold
Kyle M Hall [Fri, 3 Nov 2023 16:43:47 +0000 (16:43 +0000)]
Bug 21284: (QA follow-up) Rename itemonhold and recordonhold

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37c8cf6e34de8db5a3147ffed9cfa96e075080f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 21284: ILS-DI: Allow GetPatronInfo to tell if a loaned item is on hold by someone...
Matthias Meusburger [Fri, 27 Apr 2018 14:22:28 +0000 (16:22 +0200)]
Bug 21284: ILS-DI: Allow GetPatronInfo to tell if a loaned item is on hold by someone else.

This patch adds two new entries in the loans section of GetPatronInfo response:

 - itemonhold: number of holds on this specific item.
 - recordonhold: number of holds on the record.

It allows an ILS-DI client to know if a loaned item is already on hold by someone else, and how many holds there are.

Test plan:
1. Apply the patch.
2. Enable the ILS-DI system preference.
3. Check out an item for a patron and make sure there no other holds at either an item or record level.
4. Check that the new itemonhold and recordonhold entries displayed are equal to zero (example: http://127.0.0.1:8080/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=19&show_contact=0&show_loans=1).
5. Add either a record or item level hold for the record used in step 2.
6. Check that itemonhold and recordonhold values are incremented accordingly.
   Note: a hold at an item level counts as a hold at a record level, but not vice-versa.
7. Run the tests and make sure they pass: prove t/db_dependent/ILSDI_Services.t
8. Sign-off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d1d5811279fe6a2c8fc0953142fffe3adc9f249b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34938: (QA follow-up) Tidy code
Kyle M Hall [Fri, 3 Nov 2023 15:58:30 +0000 (11:58 -0400)]
Bug 34938: (QA follow-up) Tidy code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d373a55f4aa185c7e86aa3d3b14cb689c31e849)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34938: Add collection column to hold ratio report
Lucas Gass [Wed, 27 Sep 2023 18:38:31 +0000 (18:38 +0000)]
Bug 34938: Add collection column to hold ratio report

To test:
1. Create enough holds on items so that they will appear on the holds ratio report.
2. Visit circ/reserveratios.pl by going to Circulation > Holds ratios
3. No collection column.
4. Apply patch and restart services
5. Look again at circ/reserveratios.pl, now you should see a collection column.
6. Ensure that the data in the column looks correct.
7. Go to Administration > Table settings to ensure you can hide that column, and other columns in the table.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b0dedd61a488812a1180a1e748186e66e1c9a9fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35198: Sort database column names alphabetically on automatic item modification...
Owen Leonard [Tue, 31 Oct 2023 13:48:11 +0000 (13:48 +0000)]
Bug 35198: Sort database column names alphabetically on automatic item modification page

This patch modifies the automatic item modification by age page so that
the rule entry form sorts <select>s alphabetically, making it easier to
find the entry you need.

The [% FOR field IN... %] directives now include the "sort" method, e.g.

    [% FOR field IN agefields.sort %]

To test, apply the patch and go to Cataloging -> Item modifications by
age

- Click the "Add rules" button, then the "Add rule" button.
- Check the "Age field," "Conditions," and "Substitutions" dropdowns to
  confirm that the choices are listed alphabetically.
- Fill in the form and save the rule.
- Go back and edit the rule you created. Check that the dropdowns are
  still correct.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fd258280482e0c84bf6baf61d7054b1c628e53f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 33050: Tidy
Tomas Cohen Arazi [Wed, 8 Nov 2023 13:10:23 +0000 (10:10 -0300)]
Bug 33050: Tidy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f88cb1da4fdef813c74b5eb890df8d12d72c47ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 33050: Allow to specify quote char in runreport.pl
Fridolin Somers [Thu, 23 Feb 2023 06:40:14 +0000 (20:40 -1000)]
Bug 33050: Allow to specify quote char in runreport.pl

Add to script misc/cronjobs/runreport.pl quote char arg (only for CSV).
See perl doc https://metacpan.org/pod/Text::CSV#new

This patch also adds missing '--separator' in POD.

Test plan :
1 - Write a SQL report
2 - perl misc/cronjobs/runreport.pl --format csv 1 (or correct report number)
3 - Note you get double quotes
4 - Apply patch
5 - Repeat #2 - no change
6 - perl misc/cronjobs/runreport.pl --format csv --quote "'" 1
7 - Now it is single quote delimited
8 - perl misc/cronjobs/runreport.pl --format tsv --separator "'" 1
9 - Error is reported, you cannot set quote unless csv
10 - Try empty string as quote

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d604ac2a942354bc903bc9c697d8b18d412e39b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34557: DBRev 23.05.05.002
Tomas Cohen Arazi [Wed, 8 Nov 2023 13:04:23 +0000 (10:04 -0300)]
Bug 34557: DBRev 23.05.05.002

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2b6ec7064e3ecd6297b7fa27367babdba0c74f0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34557: (follow-up) Make link more like button in staff interface
Owen Leonard [Fri, 18 Aug 2023 07:02:24 +0000 (07:02 +0000)]
Bug 34557: (follow-up) Make link more like button in staff interface

This patch adds Bootstrap button style to the link and changes the text
from "Load your checkouts" to "Show your checkouts."

The patch adds an anchor to the link so that the browser jumps down the
page a bit making the checkouts more visible.

The patch also corrects the includes for Font Awesome files. No icons
were loading because of incorrect asset links.

To test, follow the previous patch's test plan, checking that the button
looks correctly styled and that the page reloads with the checkout form
at the top.

Confirm that Font Awesome icons are loading throughout the page.

Signed-off-by: AndrewA <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fbe06c7d9cb3f60d7b1553f462bbc9725d899fe9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34557: Add SCOLoadCheckoutsByDefault system preference
Nick Clemens [Thu, 17 Aug 2023 09:10:54 +0000 (09:10 +0000)]
Bug 34557: Add SCOLoadCheckoutsByDefault system preference

This patch adds a enw system preference SCOLoadCheckoutsByDefault

When enabled, a patron's list o fcurrent checkouts will be loaded when the sign in to the SCO
module. If disabled, they will see link to load their checkouts. In either case, a new section
is added to the SCO to show a brief display of the last checked out it

To test:
1 - Enable WebBasedSelfCheck system preference
2 - Browse to:
    http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
3 - Sign in the SCO user (or enable AutoSelfCheck)
4 - Sign in as a user with several items checked out
5 - Confirm you see a list of items checked out
6 - Apply patches, updatedatabase, restart_all
7 - 'Finish' and login patron to SCO again
8 - Confirm you still see the list
9 - 'Finish'
10 - Chenge the system preference
11 - Sign in to SCO, confirm checkouts do not load
12 - Confirm you see 'Load your checkouts' link
13 - Check an item out
14 - Confirm you see the last checkout, but not a list
15 - Attempt to checkout an item that cannot be checked out
16 - Confirm "Return to account summary" does not load checkouts
17 - Click "Load your checkouts"
18 - Confirm they load
19 - Check out another item, confrim they remain and are updated
20 - Checkout an item that cannot be issued
21 - Confirm 'Return to account summary' loads the checkouts again

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: AndrewA <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c801ea1323dd5247a8c4e1477b800d18f64f28b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 35253: Add classes to materials specfied message on check in and checkout
Lucas Gass [Fri, 3 Nov 2023 17:48:00 +0000 (17:48 +0000)]
Bug 35253: Add classes to materials specfied message on check in and checkout

To test:
1. APPLY PATCH
2. Add a materials specified message to an item. ( 952$3 )
3. Add the following CSS to your IntranetUserCSS:

    .mats_spec_label { color: white; background: purple;  }
    .mats_spec_message { color: white; background: green; }

4. Checkout that item. Notice the message should be green and the label (Note about the accompanying materials:) should be purple.
5. Check in that item. Notice the message should be green and the label (Note about the accompanying materials:) should be purple.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f2bdac94d5821900b35e610184b806a38ddd9f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 months agoBug 34704: Remove regex for adding additional line breaks to print templates
Katrin Fischer [Tue, 7 Nov 2023 22:31:31 +0000 (22:31 +0000)]
Bug 34704: Remove regex for adding additional line breaks to print templates

This makes sure that we don't change the line breaking for either
HTML nor plain text print notices.
For plain text, the <pre> is used to keep the line breaks as defined
in the notices template.
For HTML we require on the line breaks added by block elements in the
HTML notice, not adding any additional ones like before.
This gives the full control of the formatting to the notice editor.

To test:
* Make sure your patron doesn't have an email address
* Make sure to check the hold filled notice in messaging preferences
* Place a old on any item
* Checkin the item
* Confirm hold
* Verify notices tab shows the Hold (print) notice
* ./misc/cronjobs/gather_print_notices.pl ./ --html
* Verify the generated file has the HTML output wrapped in pre.
* Reformat the HOLD print notice to be HTML by setting the checkbox.
  Mmake sure to add some empty lines for (they should not print later)
  and some <br>, <p>, <div>  - They should be reflected in the notice later.
* Repeat test.
* All should be well :)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4c15ad658d59d7f63d27fe61dc102ecd4c22a03d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>