Commit graph

52104 commits

Author SHA1 Message Date
fb02affd57
Bug 34282: Fix availability check in ILL batches
Staging modal area had issues listing availability checks for each request in the batch creation process

To test:
1) Run bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh)
2) Install a metadata enrichment plugin, e.g. https://github.com/PTFS-Europe/koha-plugin-api-pubmed/releases
3) Install and configure an availability plugin, e.g. eds https://github.com/PTFS-Europe/koha-plugin-ill-avail-eds/releases
4) Enable ILLCheckAvailability sys pref
5) Create a new ILL batch and input some pubmedids, i.e. 34898594, 31452466
6) Verify that the availability results show and are working, for each request in the batch

Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk>

Sponsored-by: UKHSA (UK Health Security Agency)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-31 14:44:39 +01:00
acafc292b6
Bug 35389: (QA follow-up) Update circ-nav too
As Katrin spotted, we need to not forget the sidebar menu.

Test plan:
Check if the item is visible/invisible on the sidebar menu of
Circulation. (Depending on StockRotation pref.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-31 14:44:38 +01:00
f7aeff5235
Bug 35389: Hide 'Transfer to send' if StockRotation disabled
Test plan:
Disable StockRotation pref. Check if report is hidden on circ home.
Enable. Check if report is visible.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-31 14:44:38 +01:00
133e2458ba
Bug 35951: Remove useless include category-out-of-age-limit.inc
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
2024-01-31 14:44:37 +01:00
2fe52a72a9
Bug 32474: Store the selected option label
It prevents the label to be removed when the selected option is not
longer in the item list.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:50 +01:00
58283765b7
Bug 32474: Add cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:49 +01:00
123e259a78
Bug 32474: Pass label and identifier
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:48 +01:00
b81afadb16
Bug 32474: Adjust tests
We need to use the same data, for instance we had "license name" and
"first license name" for the license with license_id=1

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:48 +01:00
c5a879d5d9
Bug 32474: Adjust tests - X-Total-Count
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:47 +01:00
5a46403e10
Bug 32474: Fix required
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:47 +01:00
c2830dd1dc
Bug 32474: Fix scroll bump when new data loads
This patch addresses an annoying scroll bump when new data loads. Previously the
scrollbar would jump all the way to the top of the selct before resetting, this
has now been stopped.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:46 +01:00
4a3601f8dc
Bug 32474: Fix duplicate API call
This patch fixes a duplicate API call and fixes the "required" attribute

Test plan as before

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:46 +01:00
409efe6cdd
Bug 32474: Properly call getAll
To encode q parameter correctly, based on bug 33623

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:45 +01:00
5b6761efdf
Bug 32474: Do not fetch all the licenses
Otherwise we are loosing all the point of the pagination!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:44 +01:00
28078a6e25
Bug 32474: Infinite scroll v-selects
This patch is an example ajax based v-select. The v-select will load the first
20 items and then continue to load paginated sections of 20 items as the user
scrolls down. The v-select also offers ajax based searches (unpaginated) and
will return to 20 item pagination if the search is cleared.

Currently the pagination just works with an Intersection Observer based on
scrolling - the main issue with this is that the size of the v-select window
changes every time new data is added to the list and this causes the scrollbar
to jump before resetting at the correct size. This can be a bit annoying,
especially when scrolling quickly.

The only way round this will either be to paginate using buttons i.e.
(previous/next page) or to limit the data to 20 items at all times and
re-paginate when scrolling back up - interested to hear thoughts/suggestions
on this or whether anyone has a magic CSS fix that solves it ;)

The new v-select is only in one location so far as a test - Agreement Licenses

Test plan:
1) You will need to add multiple licenses in order to see the pagination,
   attached is a script that will create 100 dummy licenses at a time if you
   wish to use that
2) Once licenses are created, apply patch and run yarn build
3) Navigate to Agreements and click the New Agreement button
4) Scroll down to the Add new license option and click the button
5) The License select is the InfiniteScrollSelect and should display the
   licenses you have added
6) Open the dropdown and 20 items will be listed
7) Scroll down and as you scroll, more items will be loaded (this can be seen
   in the Network tab in developer tools)
8) Enter a search query and the results should reflect the search query
9) Delete the search query and the dropdown should return to the first 20
   paginated items and pagination will work again when scrolling
10) Try submitting the form with paginate/searched options and the form should
    still work as intended

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:44 +01:00
5fbdc2d7d3
Bug 35483: (follow-up) Trivial indentation changes
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:43 +01:00
Lari Taskula
c20f4568ad
Bug 35483: Restore holds table select to switch item level holds to record level holds
To test:
1. Apply patch
2. Add item level hold to a record/item, make sure patron has no other
   holds on that record
3. Go to /cgi-bin/koha/reserve/request.pl?biblionumber=xxx where xxx is
   the record you placed the hold for
4. Under "Existing holds" table, in "Details" column you should see
   "Only item <barcode>" dropdown
5. Select "Next available" from the dropdown
6. Click Update hold(s)
7. Observe dropdown is gone and cell value has changed from
   "Only item <barcode>" to "Next available"
8. Cancel the hold and add two item level holds for the same patron
9. Under "Existing holds" table, in "Details" column you should see
   "Only item <barcode>", but no select dropdown

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:43 +01:00
b5ccd83c6f
Bug 35936: Fix saving existing report with incorrect AV category
When an existing report is saved and an incorrect AV category is selected,
the UI is asking "do you want to save anyway", but the "Update SQL" button
leads to a blank page and the report is not saved.

On bug 33966 the value is been adjust to 'update_sql' but this incorrect
was left.

To test you need to use the browser inspector to adjust the value of the
selected option.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:42 +01:00
Katrin Fischer
731a549b71
Bug 35300: Add page-section to invoice files page
To test:
* Enable AcqEnableFiles system preference
* Go to acquisitions
* Search for a vendor and receive shipment
* Enter an invoice number and create new invoice
* Finish receive
* Click on 'manage invice files' link
* Upload a sample file
* Verify the table is missing the usual white background
* Apply patch
* Verify the the table now displays with the usual white
  background

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>
2024-01-30 17:48:42 +01:00
5b58afd466
Bug 35406: (follow-up) More HTML fixes
This patch fixes even more markup errors and HTML validation issues.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:41 +01:00
26af3cae5d
Bug 35406: Fix typo in holds queue viewer template
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:41 +01:00
Katrin Fischer
dbc67ce351
Bug 35368: Add public to "Add a new checkout" in API documentation
Without this patch the "Add a new checkout" label showed
up twice in the Checkouts section of the API documentation.
This adds (public) to the end of one, to make it possible
to distinguish them.

To test (ON YOUR HOST MACHINE):
1. Run:
   $ cd api/v1/swagger
   $ docker run --rm -v $(pwd):/api --workdir /api redocly/cli \
           build-docs swagger.yaml --output index.html
2. Open the generated index.html in your browser
3. Verify doubled up headings
4. Apply patch
5. Re-run docker command form 1.
6. Verify there are now 2 different labels and "(public)" is on the
   right one.

Note: if you have wrong permissions on the file, chown it to your
own user to open it in the browser.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-30 17:48:40 +01:00
baa7c050d1
Bug 35922: Fix www/batch.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 14:08:40 +01:00
b222ced1cb
Bug 30230: (follow-up) Fix permission check in staff interface navigation
The patron module should now show up in the staff main navigation on
top of the page if the user only has the new list_borrowers permission.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:12 +01:00
2b4cf14e74
Bug 30230: (follow-up) Update missing descriptions
One of the follow-ups fixed the description in the
atomic update, but missed the SQL and include files.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:12 +01:00
1a6686cb99
Bug 30230: DBRev 23.12.00.006
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:11 +01:00
cd9a3c3a07
Bug 30230: (QA follow-up) Also add list_borrowers to the singular endpoint
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:11 +01:00
6da8a7c46b
Bug 30230: (QA follow-up) Add unit tests for API definition change
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:10 +01:00
Thibaud Guillot
8c32b44df5
Bug 30230: (follow-up) Add list permission on home-search include and update atomic update file
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:10 +01:00
7b6ef3fd47
Bug 30230: (follow-up) fix unit test
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:09 +01:00
Thibaud Guillot
8e047a1f19
Bug 30230: (follow-up) Fix display issue on search bar
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:09 +01:00
Thibaud Guillot
fc75a344b8
Bug 30230: Add new 'list_borrowers' permission
When a patron search is performed only a user with edit_borrowers
permission can search by name. Search can works only with cardnumber but
it makes searching less intuitive I think.

So, as mentioned in the discussion, I've added a new 'list_borrowers' permission,
completely independent of 'edit_borrowers', so that I can search for a member via the interface
and get the results. In addition to the permission to perform check in and checkouts, this no longer poses an obstacle to simple use.

Test plan:

1) Check with a user without 'edit_borrowers' permission that the patron search can only be performed with cardnumber
2) Apply this patch
3) Make the updatedatabase to add new 'list_borrowers' permissions
4) Set 'list_borrowers' permission on one user and see the difference

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:08 +01:00
c1bf46d1e7
Bug 35535: Allow for cancellation of holds with or without a reason
TO TEST:
1. Have a waiting hold on a particular barcode
2. Have at least 1 HOLD_CANCELLATION auth value
3. Check in the barcode and try to cancel the hold on the modal while
   selecting a reason.
=> SUCCESS: You can cancel a hold when selecting a reason.
4. Repeat 1-3 but not selecting any reason.
=> SUCCESS: Hold cancelled correctly.
5. Delete all HOLD_CANCELLATION auth values.
6. Repeat Try 1-3
=> SUCCESS: No reason displayed
=> FAIL: Cancelling does nothing. There's an error in the browser
   inspector
7. Apply this patch
8. Repeat 1-3
=> SUCCESS: No reason displayed
=> SUCCESS: Cancelling works
9. Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: amended the test plan to make it clearer
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:07 +01:00
898da9e4eb
Bug 35753: Remove Checkbox() function
To test:
1. APPLY PATCH and clear browser cache.
2. Have multiple additional content items ( news/HTML customization/Pages )
3. From one of the pages ( news/HTML customization/Pages ) click the 'Delete selected' button. Since no items are checked you should see the 'Please select content to delete' alert.
4. Check some items and click 'Delete selected' they should be correctly deleted.

Note: There is no change in behavior from this patch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:07 +01:00
95e19e758a
Bug 35774: Use itemnumber instead of biblioitemnumber
With Bug 33639 already pushed to master there should be NO change in behavior.

To test:
1. APPLY PATCH
2. Create one or more item groups for a bib if needed
3. Create a new item, and at the bottom of the 'Add item' screen, select the item group to which you want this item added. Save.
4. The item should succesffuly be added to the item group.
5. Add a new item and to the same record and this time try the 'Create a new item group' from the dropdown.
6. Name the new item group.
7. Make sure it is correctly added to the item group.

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-01-29 12:25:06 +01:00
f7d95ab8fb
Bug 34853: Switch to 'div' as suggested
This patch switches us from '<span class="clearfix">' to '<div>' so
we're just using a block level elemenet instead of manipulating an
inline element to act like a block.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:06 +01:00
939ad01baf
Bug 34853: Add clearfix span to Invoice links
This patch adds a clearfix span around the invoicenumber and EDI message
display texts which should result in them each having their own line.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:05 +01:00
lmstrand
4509614561
Bug 35396: Replace Datatables' column filters throttling with input timeout
This patch replaces throttling filter events with a typing timeout for datatable filtering events. This patch should increase filtering responsiveness to datatables that have column filtering enabled across Koha.

To test:
1) Get a datatable with multiple results showing in intranet, for example search patrons with no search string to get all patrons in a filterable datatable result view or open Receive orders page that shows pending orders and order lines in Acquisitions like /cgi-bin/koha/acqui/parcel.pl?invoiceid=xxx
2) Type a character into a Datatable column filtering field
=> notice a filtering event fires right after the first character has been entered
3) Keep typing
=> notice multiple sequential filtering events being fired during the typing and one at the end when typing has stopped
4) Apply patch
5) Start typing into a filtering field
=> Note that during typing no filtering events are being fired unless the time between entering characters exceeds 500ms
6) End typing into the filter field
=> notice that just one filtering event fires at the end of typing if characters were entered sequentially faster than 500ms apart.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:04 +01:00
c67067744c
Bug 35445: Require OPAC user to confirm self-registration with button push
This change requires the OPAC user to confirm self-registration with
a button push when verifying registration using an emailed token.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Set syspref PatronSelfRegistrationVerifyByEmail to "Don't require"
2. Create a patron using the self-registration on the OPAC
3. Note that no confirmation step is needed when self-registering
4. Set syspref PatronSelfRegistrationVerifyByEmail to "Require"
5. Create a patron using the self-registration on the OPAC
6. Look in message_queue to find the URL with the token to
visit in the browser
7. Visit that URL
8. Note that the page says "Registration pending" and asks you to
click a button labeled "Confirm"
9. Click the button labeled "Confirm"
10. Note that the self-registration is confirmed and details are
shown on the page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:04 +01:00
Thibaud Guillot
45c4b936f5
Bug 35514: Fix total cost update when adding multiple items to order
Test plan:

1) Create a basket and add an order line to go on neworderempty.pl
   (the new order form)
2) Choose to add one item and repeat the operation
3) See on form that the total cost is updated without update vendor
   price
4) Now add multiple items, for example, "2" you will see that the total
   cost is not updated
5) Apply this patch, refresh form and repeat steps 3 to 5

Signed-off-by: Michał Dudzik <dudzikmichal@wp.pl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:03 +01:00
28510d473f
Bug 35530: Tell UserCSS and UserJS in libraries administration are for OPAC
In libraries administration new fields UserCSS and UserJS are for OPAC,
this should be in label.

This patch uses text "Specific OPAC CSS", since the system preference OPACUserCSS as help :
Library specific CSS can be defined in ...

Test plan
1) Go to Administration >  Libraries
2) Modify a library
3) Check you see new labels

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>
2024-01-29 12:25:03 +01:00
602521a80a
Bug 35578: Simplify the code using intersect
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:02 +01:00
0ecb02eff9
Bug 35578: Validate "Where" in OPAC Authority search
This patch adds validation to the "Where" field in OPAC Authority search.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Go to http://localhost:8080/cgi-bin/koha/opac-authorities-home.pl
2. Type "test" into "Term(s)" field
3. Click "Submit"
4. Confirm a result is found

5. Repeat the above using "Where" values of "in the complete record",
"in any heading", and "in main entry"

6. Using the HTML inspector in the browser, change the value of
the selected option of the "marclist" select element to
"this is broken"
7. Click "Submit"
8. Confirm a result is found (ie it's not throwing a fatal error
anymore)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:02 +01:00
7ef044cffd
Bug 35742: Fix removal of added user from fund
On the fund edition page, if a new user is added the "Remove" link does
not remove the user.

Test plan:
0. Do not apply this patch
1. Edit a fund
2. Click "Add users"
3. Search for patron and add some users
   => Notice that the "Remove" link does not remove the user
4. Apply this patch and repat 1, 2, 3
   => Notice that the "Remove" link remove the user

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:01 +01:00
426324062d
Bug 35743: Fix patron's category selection in the column filter
The "category" filter is not selected in the column filter dropdown.

Test plan:
0. Do not apply this patch
1. Search for patron, select a patron's category
   => Notice that the "Category" column has a column filter, but no
      option is selected
2. Apply the patch
3. Repeat 1
   => The "Category" column has the option you selected in the filter
      block.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:01 +01:00
f7171c0a6c
Bug 35745: Fix 'Set suggester' of a suggestion
On the suggestion edit form, if a suggester is selected using the "Set
to patron" (and patron search), the details of the selected patron will
contained "undefined" for the library's name and patron's category
description.

Test plan:
Edit a suggestion, click "Set to patron", select a patron
Notice that with this patch the library's name and patron category is
correctly displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:00 +01:00
5464d11099
Bug 35744: Implement +strings for GET /patrons/:patron_id
In order to retrieve the library's name and patron category's
description alongwith other patron's info.

Test plan:
Run the following command before and after this patch:

% curl -u koha:koha --request GET 'http://localhost:8081/api/v1/patrons/42' --header "Content-Type: application/json" --header "x-koha-embed: +strings" | jq

Notice that you now have _strings which contains the library's name and
patron category's description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:24:59 +01:00
e8c0438d87
Bug 35800: Remove item.can.be.edited check
To test:
APPLY PATCH
1. Check out an item to a patron from library A
2. Give permissions to a patron from library B
   (example of a circulation staff account)
     - circulate
     - catalogue
     - borrowers ( including view_borrower_infos_from_any_libraries )
     - reserveforothers
     - updatecharges
     - suggestions
     - lists
     - clubs -> enroll
3. If necessary, change the username and password of that staff member in order to be able to log in
4. In a private browser window, log in as the staff member
5. View the record with the checked out item
6. You should see the name/cardnumber of the patron the item is checked out ot.
7. Turn off the view_borrower_infos_from_any_libraries for this patron.
8. Now on the record detail page you should see text like `Checked out to A patron from library Midway : due 01/28/2024`.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:24:59 +01:00
cb7921d8d0
Bug 35833: Silence few warnings from searching
Resolve:
[2024/01/18 11:31:24] [WARN] Use of uninitialized value $hits in numeric eq (==) at /usr/share/koha/opac/opac-search.pl line 612.
[2024/01/18 11:31:24] [WARN] Use of uninitialized value $times in subtraction (-) at /usr/share/koha/C4/Search.pm line 1715.

Test plan:
Look for a few search expressions without results.
Check log without and with patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:24:58 +01:00
857d8f4d82
Bug 35833: Fix warnings from C4/Koha
[2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 600.
[2024/01/18 11:52:40] [WARN] Argument " " isn't numeric in numeric eq (==) at /usr/share/koha/C4/Koha.pm line 659.

Note: According to the code in MARC::Field the indicator returned cannot be undef. So we do not return new
uninitialized warnings.

Test plan:
Check your log before and after patch.
Possibly you may need to create a record with spaces as field indicators.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:24:58 +01:00