Commit graph

24180 commits

Author SHA1 Message Date
0c1a2f54b6
Bug 38783: (follow-up) Remove obsolete .badge-pill class
.badge-pill is from a previous version of Bootstrap. .rounded-pill is
the current version, but I think it looks better without.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-24 12:02:18 +01:00
Leo Stoyanov
9c76bda202
Bug 38783: Added "Checked out" badge for checked out items in the circulation history table.
To test:
1. Make some checkout to a patron so they have a circulation history,
   with some items checked in and some still on loan.
2. Look at the patron's "Circulation history" table. There are four
   possible background colors for each row: #ffffff, #f3f4f4, #F9FAE0,
   and #FFFFCC.
3. Apply the patch, update the CSS (yarn build), and restart everything
   (restart_all).
4. Repeat steps 1-2, if needed. An orange/gold badge will appear under
   the "Return date" column of the table for items that have been
   checked out, and there will no longer be alternating, pale yellow rows.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. I agree that it looks better now than before, and
that it is easier to tell the checked out items from the returned items.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-24 12:02:18 +01:00
414f085781
Bug 38813: Make the 'curbside pickups' tab display selected if so
This patch fixes a wrong condition check in `usermenu.inc` for
determining if the tab should be active.

It currently checks for `ermview`, probably a copy and paste error.

This patch adds a new `curbside_pickups_view` parameter that is passed
instead.

Note: I tidied the code block I changed, inline to avoid extra commits.

To test:
1. Enable the `CurbsidePickup` system preference
2. Log into the OPAC
=> SUCCESS: There's a 'Curbside pickups' tab
3. Click on the tab
=> SUCCESS: The 'Curbside pickups' section gets displayed
=> FAIL: The tab remains inactive
4. Apply this patch
5. Restart plack:
   $ ktd --shell
  k$ koha-plack --restart kohadev
6. Repeat 3
=> SUCCESS: The 'Curbside pickups' section gets displayed
=> SUCCESS: The tab is rendered as active
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-21 15:56:42 +01:00
Emily Lamancusa
cdf12b9bda
Bug 38793: Don't dismiss modal before submitting form
Remove the bs-data-dismiss attribute from the "cancel transfer" button
on the Wrong Transfer modal. The "cancel transfer" button's JS works by
adding a hidden input and then submitting the form - we don't want
Bootstrap to dismiss the modal before the embedded form has been
submitted.

Note: This bug seems to be browser-dependent. So far it has been
reproduced with Firefox, but not Chrome/Chromium or Microsoft Edge

To test:
1. Log into the staff client using Firefox
2. Set up system preferences:
   TransfersBlockCirc - Don't block
   AutomaticConfirmTransfer - Do
3. Find or create an item that belongs to a branch other than the
   logged-in branch
4. Check in the item to trigger a Return to Home transfer
5. Click OK on the modal to confirm the transfer
6. Check in the item again to trigger a Wrong Transfer modal
7. Click the "Cancel transfer" button on the modal
8. Navigate to the bib for that item and check the item status
--> The transfer wasn't cancelled - the item is still in transit
9. Apply patch and refresh the page
10. Repeat steps 6-8
--> Item shows as available - the transfer was cancelled successfully

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-21 15:56:41 +01:00
511ba0e4d8
Bug 38872: Fix the missing occurrences
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-21 15:56:40 +01:00
Emily Lamancusa
747a60f33a
Bug 38919: hold-found1 modal needs block class
After the upgrade to Bootstrap 5, modals need either the block or
noblock class in order to be shown. The class was missing from the modal
that appears when an item is checked in after it is already waiting for
a hold.

To test:
1. Place a hold on an item for pickup at the logged-in branch
2. Check in the item and confirm the hold
3. Check in the item again
--> There is no notification that the item is already assigned to a
waiting hold, just a "Not checked out" message
4. Apply patch
5. Navigate away from the page (we can't simply refresh the page because
   we don't want to resubmit the request just yet)
6. Check in the item again
--> A modal appears notifying of the waiting hold

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-21 15:56:38 +01:00
78c4bc89b1
Bug 36836: (follow-up) Fix incorrect syntax
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-17 13:15:55 +01:00
aff29616ab
Bug 38727: Add missing closing div
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:52 +01:00
7cb370904b
Bug 38727: Improve translatability in categories.tt
This makes the strings easier to translated for maintaining them as a
whole instead of splitting them

Bonus 1: it adds a missing dot for consistency.
Bonus 2: makes a string more idiomatic.

To test:
1. In the categories edit page, check the 3 'If set...' texts
2. Apply this patch and reload
=> SUCCESS: No visual change
3. Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:52 +01:00
94ef3bfb47
Bug 32890: Add DataTables to curbside pickups
This patch modifies the curbside pickups page in the staff interface so
that each table is a DataTable with configurable columns.

The patch also replaces the patron name output with patron-title.inc for
consistency and to display names 'surname, firstname' for correct
column sorting.

To test, apply the patch and restart services.

- Enable the CurbsidePickup system preference if necessary.
- Properly testing requires testing data. You can run this command to
  REPLACE your curbside pickup data with sample data:

  bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh)

- Go to Circulation -> Curbside pickups.
  - Test DataTable functionality under each tab: sorting, paging,
    filtering, column visibility, and export.
- Go to Administration -> Table settings -> Circulation -> Curbside
  pickup
  - Confirm that changes made to the configuration of each of the
    4 curbside pickup tables is correctly applied on the curbside
    pickups page.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:51 +01:00
41a2d2edd2
Bug 35152: Convert RoutingListNote system preference to additional contents
This patch moves the RoutingListNote system preference into HTML
customizations, making it possible to have language- and
library-specific content.

To test you should have some content in the RoutingListNote
system preference before applying the patch. Apply the patch and run
the database update process.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from RoutingListNote is now stored there.
- The HTML customization entry form should offer RoutingListNote
  as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Edit the RoutingListNote HTML customization and add unique
  content to the "fr-FR" tab.

- Go to Serials and create a subscription if necessary.
- From the subscription detail page, click "Create routing list" in the
  left-hand sidebar.
- Add one or more recipients to the list and click "Save".
- On the "Preview routing list" page click "Save and preview routing
  slip".
- In the pop-up window with the routing list preview you should see the
  content you added to the RoutingListNote HTML customization.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "RoutingListNote." It should return no results.

NOTE: This patch does not keep the default content which was stored by
the RoutingListNote system preference. Having a default value for that
kind of preference is not standard. Instead I have updated the
description of the RoutingSerials preference to add a mention of the
RoutingListNote HTML customization option.

Sponsored-by: Athens County Public Libraries

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:50 +01:00
0e2c3f1d38
Bug 38681: Add flatpickr to datelastborrowed field in itemsearch
To test:
1. APPLY PATCH
2. Have some checkouts with various issue dates.
3. Go to item search and look for the 'Last checkout date:'
4. Try some different searches and confirm that they work as expected.
5. Change the DateFormat system preference and make sure the search still works with all the DateFormat optoins.

Signed-off-by: William Lavoie <william.lavoie@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:49 +01:00
13fc876876
Bug 38732: Add copy number column to manage bundles table
To test:
1. APPLY PATCH and restart_all
2. Go to an item record and click 'Manage bundle'
3. Make sure the item you are adding has a copy number.
4. Look at the bundle_table and notice the copy number displaying.
5. Make sure you can hide the column ( Gear icon: Columns ) and via Table settings.

Signed-off-by: Hebah Amin-Headley <hebah@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:49 +01:00
1ae30dedf6
Bug 38705: Add serial.publisheddatetext column to OPAC subscriptionst
1. Have or create an item with a serial subscription on it.
2. When receiving make sure you add some publisheddatetext (
   Publication date text )
3. Have a look at the record in the OPAC.
4. In the subscrptions tab there is no 'Publication date text' column.
5. APPLY PATCH and restart_all.
6. Still no 'Publication date text' column is visible.
7. Go to Administration > Table settings
8. Expose the column
9. Reload the OPAC page, you should see the new column.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:48 +01:00
62c418b20e
Bug 38832: Remove authority search from catalogue/search
This one is less obvious, how is it possible to request an authority
search using catalogue/search.pl?

Is it dead code or is it actually used somewhere?

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:47 +01:00
d5267ffa78
Bug 38832: Remove code related to outer_servers_loop and outer_sup_servers_loop
This is clearly dead code as it's never set in the controller file.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:46 +01:00
Petro Vashchuk
143220d0c6
Bug 37832: Fix Rental discount to be decimal like other similar fields
Added decimal input_mode and pattern for "Rental discount (%)" so it functions same way as "Fine amount" or "Overdue fines cap (amount)" rules, allowing user to save decimals only.

1. Go to Circulation and fine rules page and save some gibberish into "Rental discount (%)", see that it allows you to do that.
2. Apply the patch, and try same thing again, this time it should only allow you to save decimal numbers.

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:46 +01:00
96b86f9b27
Bug 36585: (QA follow-up) Fix tab spaces
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:45 +01:00
Michael Hafen
212294b7f1
Bug 36585: Improve 'Patrons with the most checkouts' report
Update the 'Patrons with the most checkouts' report (bor_issues_top.pl)
to:
1. Add the total to the CSV output.
2. Change the screen output to only show the patrons name once, instead
   of for each group by column.
3. Add total check out when output to screen.
4. Change item type group by from biblioitems.itemtype to items.itype.

Note: This does not fix the SQL query so that it can run if the
database is in strict mode.

Test plan:
1. If using koha-testing-docker (KTD), set strict SQL mode for your
   database to 0 (that is, turn it off).
   (Edit <strict_sql_modes>0</strict_sql_modes> in
   /etc/koha/sites/kohadev/koha-conf.xml
   (and then flush_memcached and restart_all))
2. Add some data so that a useful report can be generated:
   . Check out and return some items to different patrons in different
     libraries:
     ==> Minimum end result:
         . two items issued to a patron for one library, 1 item issued
           and returned for the same patron at another library
         . one item issued to another patron from another patron
           category for one of the libraries used previously
3. Generate the report with output to screen with a group by, for
   example: 'By' option set to Category code
4. Observe that the patron name is repeated for each column group.
5. Observe that there is no total column.
6. Generate the report with output to CSV.
7. Observe that the total checkouts is not in the CSV.
8. Apply the patch and restart Koha (restart_all).
9. Generate the CSV report again.
10. Observe that the total checkouts is in the CSV.
11. Generate the report to screen again.
12. Observe that there is a total column and the patron name is only
    shown in one column.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:45 +01:00
Baptiste Wojtkowski
ada41ec134
Bug 18657: Add the possibility to add every items to the report
Currently the tool reports:
Incorrect not-for-loan values
Wrong place
Checked out

We should have:
Optional display of items w/o problems
Display of missing/lost items now marked found

TEST PLAN
1 - Mark an item as lost
2 - Go to tools->inventory
3 - Fill in the barcode list with the barcode of the item, notice there
  is one checkbox in "Additional options"
4 - Submit -> there should be no result
5 - Apply patches and redo 1,2&3
6 - Notice there are now 3 checkboxes in "Additional options"
7 - Click on "Add lost items to the report"
8 - Submit -> there is now one line in the report with problem "Item was lost and is now marked as found"
9 - Go to tools->inventory
10 - Click on "Add lost items to the report"
11 - Submit -> there is no line in the report
12 - Go to tools->inventory
13 - Click on "Add items without problem to the report"
11 - Submit -> there is now line in the report with an empty problem

Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:44 +01:00
Baptiste Wojtkowski
175a715078
Bug 18657: Add the possibility to add lost items to the report
Currently the tool reports:
Incorrect not-for-loan values
Wrong place
Checked out

We should have:
Optional display of items w/o problems
Display of missing/lost items now marked found

TEST PLAN
1 - Mark an item as lost
2 - Go to tools->inventory
3 - Fill in the barcode list with the barcode of the item, notice there
  is one checkbox in "Additional options"
4 - Submit -> there should be no result
5 - Apply patches and redo 1,2&3
6 - Notice there are now 3 checkboxes in "Additional options"
7 - Click on "Add lost items to the report"
8 - Submit -> there is now one line in the report with problem "Item was lost and is now marked as found"
9 - Go to tools->inventory
10 - Click on "Add lost items to the report"
11 - Submit -> there is no line in the report
12 - Go to tools->inventory
13 - Click on "Add items without problem to the report"
11 - Submit -> there is now line in the report with an empty problem

Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:44 +01:00
30a2d78d53
Bug 35154: Convert StaffLoginInstructions system preference to additional contents
This patch moves the StaffLoginInstructions system preference into HTML
customizations, making it possible to have language-specific content.

To test you should have some content in the StaffLoginInstructions
system preference before applying the patch. Apply the patch and run
the database update process.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from StaffLoginInstructions is now stored there.
- The HTML customization entry form should offer StaffLoginInstructions
  as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Edit the StaffLoginInstructions HTML customization and add unique
  content to the "fr-FR" tab.

- View the staff interface login page. You should see the
  content you added to the StaffLoginInstructions HTML customization.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "StaffLoginInstructions." It should return no results.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:43 +01:00
d32a1b7063
Bug 37546: Error message output improvements
As suggested by David, I've re-arranged the message output so we pass
'message' first, followed by the error reference inside brackets,
followed by "for SERVER" and finally "result No."

This follows the Z39.50 suggestions more closely whilst still including
our level of detail for Server + Result number.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:42 +01:00
03afbb442c
Bug 37546: Output error message from ZOOM in Z3950 errors
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:42 +01:00
ea6a4db1b6
Bug 36836: Amend translation fixes
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:41 +01:00
Katrin Fischer
beb8770bc9
Bug 36836: Fix translation issues in ERM module
This tries to fix multiple translation issues in the ERM module.
This includes:

* Making strings translatable
* Using double quotes instead of single around strings according to
  coding guidelines
* Fixing some translations where the variable was marked for translation,
  but not the strings themselves:  ...>{{ $__(item.tab_name) }}</a

To test:
* Apply patch
* Run yarn build
* Make sure you have a clean work space in git
* Run gulp po:update lang de-DE (or another language)
* Verify the strings from the patch set now appear in the po files

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Amended-by: Jonathan Druart
-                                        {{ $__("Uploaded on:") }}
+                                        {{ $__("Uploaded on") }}:
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:41 +01:00
020f709d64
Bug 38502: Use Bootstrap alert info class for messages on table settings page
This patch updates the table settings template to add style to
informational messages.

To test, apply the patch and go to Administration -> Table settings.

- Go to Catalog -> detail -> holdings_table. Above the table's settings
  you should see a message, "Please not that if a field..." It should
  have the standard Bootstrap "info" style.
- Go to Cataloging -> additem. You should see a similarly styled
  message, "Changes made below..."

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:40 +01:00
04aa82aa23
Bug 38149: Adjust tidy of some vue and js files after prettier upgrade
Fix xt/js_tidy.t and xt/vue_tidy.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 15:56:15 +01:00
1264622399
Bug 38632: Add tests
You need bug 38461 to run successfully this test.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 15:27:29 +01:00
0fefe2bed5
Bug 38632: Do not show all columns when displaying the filters
Yet another visibility bug fix for this specific table.
When the filters are displayed the table is destroyed and recreated.
We should not save the visibility changes made by DT and consider them
changes made by the user.
A temporary variable is used to store the user settings duringt this
action, then we restore them once it's done.

Test plan:
Go to the detail page of bibliographic record with items
Click on "show filters"
=> Only columns displayed should still be displayed
Retry but show/hide some columns before you display the filters
=> Only columns displayed should still be displayed

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 15:27:28 +01:00
12e0d722c4
Bug 38461: Bypass the clipboard for tests
There are known bugs with Cypress trying to play with the clipboard, and
I don't manage to make the tests pass consistently (also tried realClick
from cypress-real-events)

Here I am suggesting to not click on the button, but simply retrieve the
url (which needs a bit of work in the existing code).

We don't test the "Copied!" tooltip and the behaviour of the button, but
at least the tests pass!

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>
2025-01-16 15:27:27 +01:00
aab60455b5
Bug 38461: Fix random failures
All this is weird.
I found this and implemented it:
https://stackoverflow.com/questions/69425289/javascript-prompt-cause-document-is-not-focused
It was still not enough to reduce the failures.
The wait and adding the focus to the window seems ok.
If I remove one of those 3 hacks, I still get failures...

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>
2025-01-16 15:27:26 +01:00
91fd218fc6
Bug 38470: Add missing double quotes to some Javascript
This change adds some double quotes where quotes were missing,
and replaces single quotes with double quotes, which prevents XSS.

Test plan:
0. Apply the patch
1. Create a subscription
2. Using the ID from the subscription, go to this page:
http://localhost:8081/cgi-bin/koha/serials/subscription-detail.pl?
print_routing_list_issue=1&subscriptionid=<SUBSCRIPTIONID>

3. Note that you're able to generate a print slip
(You may need to allow popups)

4. To check the security vulnerability is fixed, try the proof-of-concepts
attached to the bug report

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-14 15:44:54 +01:00
b898d117b7
Bug 38468: Add double quotes to some template strings
This change adds double quotes to some template strings where
quotes are missing all together or single quotes are used incorrectly.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
2. Click on "Gairm"
3. Use the search result navigation box to go to the next result
   On the left of the page. Just bellow the breadcrumb and
   left of the record title.
4. Note that everything loads correctly

5. To test that the security hole has been fixed, try some of the
proof-of-concept attacks provided for biblionumber and searchid

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-14 15:44:53 +01:00
cc6fbe0500
Bug 37727: Prevent CSV Formula injection via DataTables
This change prevents CSV Formula injection on DataTables exports
by escaping formula with a single quote prefix as per OWASP recommendations.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/members/memberentry.pl
?op=edit_form&destination=circ&borrowernumber=51
2. Add the following in a "Circulation note"
=SUM(1+1)
3. Go to http://localhost:8081/cgi-bin/koha/members/member.pl
?quicksearch=1&circsearch=1&searchmember=koha
4. Click "Export" and choose "Excel" and "CSV"
5. Open those downloaded files in Excel
6. Note that the =SUM(1+1) function is prefixed with a single quote,
and is not automatically executed

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. The problematic "cell" is exported as "'=SUM(1+1)".
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-14 15:44:53 +01:00
Caroline Cyr La Rose
3fc855f568
Bug 38856: Typo: EmailAddressForPatronRegistrations - "chooose"
This patch fixes a typo in the description of the
EmailAddressForPatronRegistrations system preference.

To test:
1. Apply patch
2. Go to Administration > System preferences
3. Search for EmailAddressForPatronRegistrations
4. Read the description (2nd line) and make sure the spelling is correct

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:33 +01:00
Caroline Cyr La Rose
55632527fc
Bug 38845: OpacNoItemTypeImages required to show item type images in staff interface advanced search
This patch makes it so that the noItemTypeImages system preference is
the one that controls the display of item type images in the staff
interface advanced search page. It was previously erroneously managed by
the OpacNoItemTypeImages system preference.

To test:

1. Add images to item types, if there aren't any already (KTD has them by default)
   1.1. Go to Administration > Item types
   1.2. Click 'Edit' next to one of the item types
   1.3. Choose an icon
   1.4. Click 'Save changes'

2. Disable OpacNoItemTypeImages

3. Enable noItemTypeImages (already enabled in KTD)

4. Go to the advanced search page
   --> The item types don't have any images next to them

5. Apply patch and refresh the page
   --> The item type images should be displayed

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>
2025-01-10 19:19:31 +01:00
90774b33a7
Bug 38855: (bug 22056 follow-up) Remove 'test' directory template-side
This should have been removed by bug 22056

Signed-off-by: William Lavoie <william.lavoie@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:30 +01:00
ecd0604a8d
Bug 38505: CirculateILL: Add UNKNOWN_BARCODE warning message
Test plan, before applying patches:
1) Enable ILLModule system preferece.
2) Create a book ILL request:
  <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) After creating a Book ILL request, go to its detail page and click on the newly created linked biblio
4) On the biblio detail, click 'NEW' -> 'New item', add type and home library + current library (dont enter a barcode)
5) Repeat 2) -> Click confirm request and continue.
6) Click "Check out" -> If theres a problem with the patron (expired or max checkouts hit) it'll say "A problem with patron occurred". Fix that adn click c"check out" again.
7) Notice the message "An unknown error occurred while trying to checkout the item"
8) Apply patches. Repeat. Notice the message you now get is 'The bibliographic record's item contains an unknown (or empty) barcode.'.

This patch also adds a link to the respective biblio for Staff members'
convenience.

Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:29 +01:00
90304e7632
Bug 38505: ill-requests.tt: Use .alert-warning when .alert exists
Cosmetic changes only.

Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:29 +01:00
5a3380a751
Bug 38232: Pass exemptfine value into circ-needsconfirmation-modal form
To test:
1. FinesMode on
2. CircConfirmItemParts on
3. have an item with a materials specified note (952$3)
4. Check in item with 'forgive overdue charge' selected, no materials note, box stays checked.
5. Check in item with 'forgive overdue charge' selected, with a material note, Materials note checkin deselects the box.
6. APPLY PATCH
7. Try steps 4-5 again, the correct value should be retained in the 'forgive overdue charge' checkbox.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:22 +01:00
Phil Ringnalda
3bd4a9fad6
Bug 38853: Make 'Cancel selected' on holds table work
Because 'Cancel selected' on the table of existing holds uses
$("#cancel_modal_form #inputs").empty; rather than empty();, it fails to
clear out whatever things are in there before it puts in the things it wants.
That leaves things in a confused state, and makes it fail to actually cancel
holds.

Test plan:
1. Without the patch, add a hold to any bib record
2. Select the checkbox for the hold you placed, then click 'Cancel selected'
   and confirm that you want to cancel
3. Note that there's no message box about a background job having been
   enqueued, and no matter how long you wait, the hold doesn't go away
4. Apply patch, repeat step 2, note that there's now a message box, and
   when the background job finishes, that the hold has been deleted.

Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:19 +01:00
Leo Stoyanov
c500a8ac8c
Bug 37927: Fixed report name on page title not showing up when viewing SQL
To test:
1. Create a SQL report.
2. Go to /cgi-bin/koha/reports/guided_reports.pl?id=1&op=show.
3. Inspect element the page, go to the head, and find the title; it should have no report name or id.
4. Apply patch.
5. Redo steps 1-3 to see the fix.

Signed-off-by: Imani Thomas <imani.thomas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:17 +01:00
8c3a42aa02
Bug 38147: Fix Edit and Cancel translatability in booking table
It seems that "Edit" was not picked by the translator script because there was a TT tag
on the same line.

See comment 0 for a test plan.

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>
2025-01-10 17:59:45 +01:00
e32533ef22
Bug 38827: DataTables - Do not filter when inputs lose focus
On a table using DataTables and the REST API wrapper with the column
filters, if one input is used to filter the table the query will be made
twice: when the user stopped typing and when the input will lose the
focus.

Test plan:
Search for patron
Open the dev console, "Network" tab
In the "Card" column filter enter "0000"
Notice that the table is filtered and that a request has been made
Click outside of the "Card" input
=> Without this patch another request (the same) is made and the table
updated
=> With this patch applied no request is made when the input loses the
focus.

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 17:59:44 +01:00
Emily Lamancusa
ee7a4aa4ee
Bug 38588: (follow-up) OK button needs to resubmit returns.pl
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 17:59:40 +01:00
Emily Lamancusa
4b94b6546d
Bug 38588: Don't generate a second transfer when printing transfer slip
When an item is checked in that should automatically return to its home
branch, AddReturn generates the appropriate transfer. In some cases, the
Print Slip button generates a second transfer, which now causes an
exception to be thrown.

In returns.pl, the op cud-dotransfer is used when a transfer was not
initiated previously and the librarian has confirmed they want to
initiate and send a transfer. The op cud-transfer is used when a
transfer has already been generated and the page needs to send or
cancel the transfer.

This patch updates the op from the modal to ensure that the correct of
the two options is generated according to whether a transfer was already
initiated or not.

To test:
1. Find or create an item that belongs to a branch other than the
   logged-in branch
2. In a new tab, check in the item - this should trigger a Return to
   Home transfer (keep the bib record tab open for later)
3. Click "Print Slip"
--> Internal server error - 'Active item transfer already exists'
4. Apply patch and restart_all
5. Check in item again and cancel the transfer
6. Check in item again to generate new transfer
7. Click "Print Slip"
--> Checkin page loads correctly
--> Refresh bib record and confirm item shows as in-transit
8. Enable syspref ShowAllCheckins
9. Repeat steps 5-7
--> Ensure item displays correctly in checkins table
--> Refresh bib record and confirm item still shows as in-transit
10. Repeat steps 5-7, except this time click "Yes" instead of "Print
    Slip"
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
10. Set syspref TransfersBlockCirc to Don't Block, and set
    AutomaticConfirmTransfer to Enable
11. Check in the item again and cancel the transfer
12. Check in the item to generate new transfer
13. Click away from the modal without selecting a response
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
14. Check out the item to a customer
15. Check the item in and click "Yes"
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
16. Repeat steps 14-15, clicking "Print Slip" instead of "Yes"
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
17. Repeat steps 14-15, clicking away from the modal without selecting a
    response
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 17:59:40 +01:00
7d2f41adee
Revert "Bug 36025: Incorrect clause in patron search"
This reverts commit 79085c4723.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-07 15:47:54 +01:00
885f33bdd6
Bug 38738: Only close select element if needed
Preparation: Create additional fields for table 'subscription', visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=subscription

2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c

Test plan, apply both patches:
1) Add a new serial subscription, visit:
/cgi-bin/koha/serials/subscription-add.pl
2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box.
3) Notice the message 'This message should only show if a select input is present' only shows for select inputs, i.e. it's only closing the element when it needs to

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-07 15:47:53 +01:00
11500e7352
Bug 38724: Do not show the filters when updating col vis (if not needed)
(In reply to Brendan Lawlor from bug 38632 comment #7)
> During testing I noticed small related bug in current main. On the
> bibliographic record details page if you click to configure columns and you
> add or remove a column it automatically shows the column filters too, but it
> does not toggle the filter link to 'Hide filters` so you have to click twice
> to hide them.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-02 11:11:22 +01:00