Commit graph

53267 commits

Author SHA1 Message Date
635e65a330
Bug 36483: Make API controllers use $c->objects->to_api
This patch makes all controller methods using direct $object->to_api, rely on $c->objects->to_api.

Direct ->to_api calling prevents things like embeds, +strings, etc to be dealt with correctly.
In some cases this change reduces the code as the authors extracted the embed structure from the stash and passed it explicitly.

I left out two Patrons.pm cases because I need to study it a bit more.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 12:12:31 +02:00
9aa811c334
Bug 23102: No mock in selenium
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 12:12:31 +02:00
5bab87f76b
Bug 23102: 404 errors on page causes SCI user to be logged out
To test:
 1 - Have something on the SCO page that won't load
     Add to SCOUserJS:
        </script>
        <img src="http://localhost:8080/silk/famfamfam.png"/>
        <script>
 2 - Enable the SCO and SCI system preferences:
     WebBasedSelfCheck: Enable
     SelfCheckInModuke: Enable
     AutoSelfCheckAllowed: Allow
     AutoSelfCheckID / AutoSelfCheckPass to a valid user with permissions
 3 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user
 4 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl
 5 - Sign in using a patron
 6 - Enter an unkown barcode, I used "DONTMATTER"
 7 - If not logged out, click to 'Return to account summary'
 8 - You are asked to sign in again
 9 - Repeat with the SCI module
10 - Apply patch
11 - Repeat, but this time you can return to account

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 12:12:30 +02:00
fee56e8d85
Bug 23102: Selenium test
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 12:12:29 +02:00
cc15deb001
Bug 36494: Flatpickr error on checkout page if the patron is blocked from checking out
This patch add some error-handling to the recent change to
circulation.tt where we handle dates and on-site checkouts. This
prevents an error in the console when the patron is blocked and the
"specify due date" field is hidden.

To test, apply the patch and make sure OnSiteCheckouts is enabled.

- Go to Circulation and check out to a patron.
- Under the restrictions tab, add a manual restriction.
- When the page reloads and the checkout form is no longer visible,
  confirm that there is no error in the browser console.

Confirm that the Bug 18885 test plan still works.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 12:12:29 +02:00
6b54f2932f
Bug 36051: DBRev 23.12.00.019
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:13 +02:00
0ef73b5314
Bug 36051: (QA follow-up) Use IGNORE in INSERT
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:12 +02:00
e739db4000
Bug 36051: (QA follow-up): Use yaml_preference
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:12 +02:00
309e0af9bb
Bug 36051: Add option to specify SMS::Send driver parameters in a system preference
If an SMS::Send driver ( such as Twilio ) requires additional parameters, those
parameters have to be placed in a yaml file named after the SMS::Send driver,
and the path to that file specified in the Koha conf file.

It would be good if we had the option to specify those parameters in a YAML
system preference instead. This would be less complicated and avoid requiring
an administrator to update that data from the backend.

Test Plan:
1) Set up an SMS::Send driver that requires additional options;
   a Twilio account meets these requirements and can be created for
   free. Set this up using the traditional file based system.
2) Verify you can send SMS messages
3) Move the contents of that file into the new system preference
   SMSSendAdditionalOptions
4) Verify you can still send SMS messages
5) Delete the file
6) Verify yet again you can still send SMS messages!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:11 +02:00
a1d5ad87d7
Bug 6796: DBIC schema update
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:11 +02:00
c45487cd11
Bug 6796: DBRev 23.12.00.018
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:10 +02:00
a8c7429cb5
Bug 6796: Code defensively for if library hours are not set
Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:10 +02:00
8017463d34
Bug 6796: day_of_week representation fix
The code here was flawed, DateTime returns a 1-7 indexed array with the
first day being Monday, Koha expects an 0-6 indexed array with the first
day being Sunday.

Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:09 +02:00
688a551e70
Bug 6796: Merge and correct database update
Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:09 +02:00
e2a48eff6d
Bug 6796: Take CalenderFirstDayOfWeek and TimeFormat into account
This patch adds accounting for the `CalendarFirstDayOfWeek` and
`TimeFormat` preferences in the libraries management pages.

We respect CalendarFirstDayOfWeek for both input and display, but we
only respect TimeFormat for input at this time. We need a new template
helper and js helper for formatting just time in the appropriate format,
currently we only have such formatters for full datetimes.

Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:08 +02:00
685357f279
Bug 6796: Fix display of libraries table
Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:08 +02:00
8b0af8bbaa
Bug 6796: Fix api specifications and embed hours in librarly management
Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:07 +02:00
Aleisha Amohia
3db1a76a62
Bug 6796: (follow-up) Displaying library hours
This patch shows the set library hours on a library's view page.
Still to be done:
- show on the Libraries summary page
- write tests
- consider time format settings
- fix translateability of day names in Libraries summary page

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Sponsored-by: PTFS Europe
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:06 +02:00
Aleisha Amohia
41edb937df
Bug 6796: (follow-up) QA test tool fixes
Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:06 +02:00
Aleisha Amohia
b2a6dd0c1d
Bug 6796: Don't add a day if hourly loan period pushes due date
If ConsiderLibraryHoursWhenIssuing is set to shorten the loan period to
the closing time, if the loan period initially pushes the due date to
the following day, the day still gets added when calculating the due
date. We simply need to hardcode the due time here as the due day is the
same as the issue day.

We only need to calculate a due date if ConsiderLibraryHoursWhenIssuing
is set to extend the loan period to the next opening day, as we'll need
to consider holidays/closed days.

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:05 +02:00
Aleisha Amohia
d80ef8df78
Bug 6796: Fix saving of libraries and tests
Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:05 +02:00
Hayley Pelham
ffcfe6d41e
Bug 6796: (follow-up) Fix logic for calculating following day's open hours
Since days for branch hours are stored as 0-6 in the database, when it's
a Saturday (6) incrementing the date leads to an error when issuing an
hourly loan because no opening hours are found for the non-existent day
(7).

This patch fixes this by calculating the tomorrow day and setting it to
0 if it's greater than 6.

This patch also corrects the mappings for days, where local_day_of_week
caluclates the date with Sunday first, which put it out of sync with the
database opening hours days.

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:04 +02:00
Aleisha Amohia
99869d608b
Bug 6796: Consider library hours when calculating due date + tests
This feature adds the ability to set opening and closing hours for your
library and for these hours to be considered when calculating due dates
for hourly loans. If the due date for an hourly loan falls after the
library closes, the library can choose for the due date to be shortened
to meet the close time, or extended to meet the open time the next day.
This feature adds a new table 'branch_hours' for storing the open and
close times per day for each library, and a new system preference
'ConsiderLibraryHoursInCirculation' to choose which behaviour should be
followed when calculating due dates.

To test:
1. Apply patches and update database. Upgrade schema if not applying
patch with schema changes. Restart services.
2. Go to Administration -> Libraries. Edit a library and scroll to the
bottom to find the 'opening hours' section. Test adding and removing
open and close times on various days. Confirm saving works as expected.
3. Add a new library and test adding open and close times works as
expected.
4. Edit your default library and save open and close times for each day.
5. Go to Administration -> Circulation and fine rules. Edit a rule, set
the unit to 'hours' and set the loan period to a number that would cause
a checkout to be due after the close time you just set, i.e. if you set
your close time to be 5pm and your system time is currently 1pm, set the
loan period to be 5 (5 hours) so the calculated due date would be 6pm.
6. Go to Administration -> system preferences. Search for
ConsiderLibraryHoursInCirculation. It should be under 'Checkout policy' in
the Circulation system preferences. Confirm the pre-selected option is
'ignore'. Keep this tab open.
6. In a new tab, get the barcode for an item that has an itemtype
matching the circulation rule you just set.
7. Go to the checkouts for a patron that has a categorycode matching the
circulation rule you just set.
8. Check out your item. Confirm that the checkout is due at the end of
the loan period, not taking closing hours into consideration. Return the
item.
9. Back in your other tab, set ConsiderLibraryHoursInCirculation to
'close', so the due date should be shortened to meet the close time.
10. Check out your item. Confirm the checkout is due when the library
closes. Return the item.
11. Back in your other tab, set ConsiderLibraryHoursInCirculation to
'open', so the due date should be extended to meet the opening time.
12. Check out your item. Confirm the checkout is due the next day when
the library opens.
13. Confirm tests pass t/db_dependent/Circulation/CalcDateDue.t

Sponsored-by: Catalyst IT
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:04 +02:00
Aleisha Amohia
2216fa9b68
Bug 6796: ConsiderLibraryHoursInCirculation system preference
Sponsored-by: Catalyst IT
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:03 +02:00
Aleisha Amohia
7dac9eb7b5
Bug 6796: Add library_hours table and set opening hours for library
Sponsored-by: Catalyst IT
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:03 +02:00
b4ce5051c1
Bug 35969: (follow-up) Improve wording
As suggested by David Nind. Thanks!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:02 +02:00
35293612a8
Bug 35969: Add error code in opac-sendbasket.pl
No need to carp about empty basket or no reply address.
Just add a simple explanation on the form.

Note that it makes no sense to show the form if the patron
has no email address. We need it as reply-to.

Test plan:
Try opac-sendbasket.pl?bib_list=null
Remove email address from your account, try again.

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: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:02 +02:00
Magnus Enger
4848def5e2
Bug 36517: Fix output from install_plugins.pl
When misc/devel/install_plugins.pl does not find any plugins, it prints
the list of pluginsdir, but with a literal \n separating the dirs, and
no newline at the end.

To test:
- Edit koha-conf.xml and add a second entry for <pluginsdir>, so there
  are two entries. The second one could just be a copy of the original.
- Run "perl misc/devel/install_plugins.pl"
- Note the output looks something like this:

No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins\n/var/lib/koha/kohadev/pluginsroot@kohadevbox:koha(master)$

- Apply the patch and run the script again. Output should be:

No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins
/var/lib/koha/kohadev/plugins
root@kohadevbox:koha(master)$

- Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:01 +02:00
4436a7d41a
Bug 36493: Make cashups test more robust
This patch makes the test independent from existing cash registers in
the system.

To test:
1. Enable UseCashRegisters on a fresh KTD
2. Add a cash register
3. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/cashups.t
=> FAIL: Tests fail!
4. Apply this patch
5. Repeat 3
=> SUCCESS: Tests pass!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:01 +02:00
Emily Lamancusa
d4bbf76eec
Bug 36581: Define ymd in scope for checkouts table
Test plan:
1. Find or create an item with a public or nonpublic note
   (in KTD default data, items on biblionumber 12 have notes already)
2. Check the item out to a patron
--> Checkouts table loading never completes
--> Browser console shows: "Uncaught ReferenceError: ymd is not defined"
3. Apply patch and clear browser cache
4. Refresh the page
--> Checkout table loads and console error is gone

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:00 +02:00
b6a662848b
Bug 36572: (follow-up) More template clean-up
Further testing:
1. Turn off UseCirculationDesks, make sure everything still works.
2. Turn off UseCashRegisters, make sure everthing still works.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:00 +02:00
60564519b0
Bug 36572: Fix and clean-up set library
To test:
1. Have 3 staff accounts to test:
  -STAFF A: superlibrarian
  -STAFF B: loggedinlibrary permission
  -STAFF C: no loggedinlibrary or superlibrarian permission
2. Enable 'UseCirculationDesks' and create some desks. (Admin >
   Circulation desks)
3. Enable 'UseCashRegisters' and create some registers ( Admin > Cash
   registers)
4. Use STAFF A ( superlibrarian ) and make sure you can change branch,
   desk and register.
5. Use STAFF B ( loggedinlibrary permission ) and make sure you can
   change branch, desk and register.
6. Use STAFF C ( no loggedinlibrary or superlibrarian permission ) and
   make sure you can change branch, desk and register.
7. Each time you change you should be redirected to the page you were
   previously on.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:25:59 +02:00
a37ebc77b7
Bug 36438: Check object for calling metadata
Resolve: Can't call method "metadata" on an undefined value at catalogue/MARCdetail.pl line 93

The proceeding lines check for $record and respond appropriately.

Test plan:
Call catalogue/MARCdetail.pl with an unexisting biblionumber.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:25:59 +02:00
Emily Lamancusa
66e03ef4e5
Bug 36568: Fix id parameter in template
Fix missed case of changing parameter name from "reports" to "id"

To test:
1. Find or create an SQL report that will return more than 20 rows
2. Run the report
3. Change the "Rows per page" drop-down to a new value
--> An empty page is displayed!
4. Apply patch
5. Repeat steps 2-3
--> The report is displayed with the appropriate number of results

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:25:58 +02:00
Brendan Lawlor
0b4bb48f2c
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in patron-toolbar.inc
This patch removes the 'New patron' and 'Quick add new patron' buttons from the patron tool bar that's included on members-home.pl

To test:
1. Log in with a user with only 'catalogue', 'list_borrowers' and 'manage_patron_lists' permissions
2. From the main page click on Patrons
3. Notice there are 'New patron' and 'Quick add new patron' buttons in the members-home.pl page that lead to permissions errors
4. Apply patch, restart all, reload the page
5. Notice the buttons to add new patrons are gone, but the button to manage patron lists is still there

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:45 +02:00
Brendan Lawlor
33c7c8730b
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in more-member.tt
This patch removes edit buttons and add buttons from the more member page if the user does not have CAN_user_borrowers_edit_borrowers

To test:
1. Log in with a user with only 'catalogue' and 'list_borrowers' permissions
2. Search for a patron
3. Notice there are edit and add (pecil and plus icon) buttons in the patron details page
4. You may have to enable some system prefereences like HouseboundModule to fully test
5. Test that things like Additional attributes and identifiers are still displayed
3. Apply patch, restart all, reload the page
4. Notice the edit and add buttons in the patron details page are gone

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:44 +02:00
Brendan Lawlor
962290a27d
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in members-toolbar.inc
This patch removes the message button and more links from the members toolbar if the user does not have CAN_user_borrowers_edit_borrowers

To test:
1. Log in with a user with only 'catalogue' and 'list_borrowers' permissions
2. Search for a patron
3. Notice the 'Add message' and 'More' buttons in the toolbar only link to permissions errors
3. Apply patch, restart all, reload the page
4. Notice the buttons in the toolbar are gone

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:44 +02:00
a6c62f5fd1
Bug 30897: (QA follow-up) Enable graceful restart by default
This patch enabled the restart by default.

After a poll at hackfest24 we opted to enable this by default and the RM
requested I add the patch to the bug so we don't forget ;)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:43 +02:00
e4af79e513
Bug 30897: Remove recursive parent identification loop
We believe that plack will only spawn from one parent and children
cannot spawn further child processes.. as such we don't need to walk up
the tree.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:43 +02:00
dfd72b2929
Bug 30897: Add option to disable automated restart
This patch adds the ability to disable the automated plack restart we
introduce with this patchset via configuration.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:42 +02:00
57ee369e90
Bug 30897: Limit to plack environments
I had a feeling we'd want to do this when I submitted the proof of
concept, though I hadn't appreciated the wider issues that have now been
highlighted.. it makes a lot of sense to limit to the plack scope.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:42 +02:00
0a0487d884
Bug 30897: Gracefully restart plack after plugin install/remove
This patch adds a graceful plack restart to the plugin
install/uninstall routine to fully allow plugin install to work via the
staff client.

Test plan
1. list your worker processes with something like htop
2. install a plugin
   https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases
3. note that the PIDs of the workers stay the same and no sign of
   restart (no PID changes and no CPU activity that the workers would
   have if they were starting)
4. apply patches and restart services
5. unistall plugin
6. notice worker restart
7. install plugin
8. notice worker restart
9. downgrade plugin
10. notice worker restart
11. upgrade plugin
12. notice worker restart
13. disable and enable plugin
14. *no restart*

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:41 +02:00
747f513231
Bug 36511: Some scripts missing a dependency following Bug 24879
These files needed the addition of 'use C4::Auth qw( check_cookie_auth
);'.

To test, apply the patch and restart services.

- If necessary, enable the LocalCoverImages system preference.
- Open the browser console and then the "Network" tab. You can click
  "Images" to filter for the correct kind of request.
- Perform a catalog search. After the search has loaded, check that
  there are no 500 errors in the Network tab.

- Go to Cataloging -> Label creator.
- If necessary, create a label batch and add some items.
- Export your batch and test both the "Download as CSV" and "Download as
  XML" links. Both should trigger the correct download.

- Go to Serials -> Claims, and select a vendor with late issues.
- Select all late issues and click "Download selected claims" at the
  bottom of the page.
- Your CSV file should download correctly.

The file acqui/check_uniqueness.pl has been corrected as well but I'm
not sure how to test it!

Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-10 09:09:50 +02:00
14b69a254e
Bug 33568: (follow-up) Fix duplicated key in item spec
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-04-09 09:55:28 +02:00
Phil Ringnalda
c52af2cef0
Bug 36531: Serve text/javascript compressed, like application/javascript is
Koha serves static .js files as application/javascript (if /etc/mime.types
says to) and serves them compressed, but output_with_http_headers uses the
currently-correct text/javascript mimetype, and Koha doesn't compress that.

Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable.
2. Open the browser Web Developer Tools to the Network tab
3. Load Cataloging - Advanced editor
4. Click on the line for the framework?frameworkcode=&callback=define load
5. Note the content-type text/javascript, no Content-Encoding line, and
   the size of 1.9MB
6. Apply the patches from bug 36463 if they haven't been pushed, then this
   patch, and reset_all
7. Repeat steps 1-4, and note a Content-Encoding: gzip header and a
   Transferred size around 160KB

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-08 15:41:12 +02:00
69ad327379
Bug 36463: (follow-up) Adjust other occurence (intranet)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-08 15:41:11 +02:00
bccf7764c0
Bug 36463: Compress application/json
This patch simply adds application/json to the mod_deflate configuration

To test:
1 - Open the netowrk tab in firefox
2 - Load http://localhost:8081/api/v1/libraries
3 - Not the transferred size, and note no 'Content-Encoding: gzip" header
4 - Apply patch, reset_all (or edit /etc/koha/apache-shared.conf)
5 - Reload
6 - Note smaller size, note gzip header

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-08 15:41:11 +02:00
Phil Ringnalda
d7702d6fad
Bug 36379: Fix auth_finder.pl to not expect the op cud-do_search
The authority finder just does a GET for a list of search results, it
doesn't create or update or delete, so the template that thinks the op
is do_search is correct.

Test plan:
1. Cataloging - New record
2. In the 1 tab click the Tag editor icon at the end of 100 subfield a
3. In the popup, click Search, and nothing happens, no results are shown.
4. Apply patch, reset_all
5. Repeat steps 1-3, see that you get results.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-08 15:41:10 +02:00
a64383de16
Bug 32707: (follow-up) Fix link in system preference description
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:50 +02:00
c57e25a408
Bug 32707: DBRev 23.12.00.017
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:50 +02:00