Commit graph

51981 commits

Author SHA1 Message Date
8b5a5f46cb
Bug 30070: (follow-up) Filter out deleted files on the API
EDI uses a 'deleted' flag in the table to denote deleted files, we
should filter those out of the API response.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:57 +01:00
a2fb53a719
Bug 30070: (follow-up) Further javascript fixes
This fixes an issue with the datatables when a message file is found to
be missing the linked vendor or basket details.  This removes the
datatables error: DataTables warning: table id=edi_msgs - Requested
unknown parameter '4' for row 12, column 4.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:56 +01:00
f4498d54ac
Bug 30070: (follow-up) Fix javascript errors
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:55 +01:00
37667e000a
Bug 30070: Add koha_obejct_class(s) to EdifactMessage
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:55 +01:00
97c305081b
Bug 30070: Add unit tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:54 +01:00
b823a51e7a
Bug 30070: (follow-up) Return unless the related object exists
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:54 +01:00
211dc16280
Bug 30070: Update edifactmsgs to use the API
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:53 +01:00
9382571968
Bug 30070: Add fetch endpoint for EDI Files
This patch adds a simple EDI Files listing REST endpoint

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:53 +01:00
027befd8ea
Bug 30070: Add Koha Objects for EDI Message Files
This patch adds the Koha Object based classes assocaited with the
edifact_message table. This table actually contains the raw message
files which may well each contain multiple edifact messages.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-17 11:38:52 +01:00
8e8d4aaef7
Bug 35663: Reword default privacy option in opac-privacy.pl
This patch updates the description of the OPAC privacy page, replacing:

"Default: keep my history according to local laws. This is the default
option : the library will keep your history for the duration permitted
by local laws."

...with:

"Default: keep my history according to library policy. This is the
default option : the library will keep your history for the duration set
by library policy."

This correctly reflects the fact that privacy is managed according to a
Koha cron configuration.

To test, apply the patch and make sure the OPACPrivacy and related
preferences are enabled.

- Log in to the OPAC and click the "Privacy" tab in the left-hand
  sidebar.
- Confirm that the description of the default privacy option is correct.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 16:35:08 +01:00
a34593a95a
Bug 35277: (follow-up) Fix tests
This patch adjusts the tests to mock the Background to ensure it is called
and directly generate the pseudonymized transactions for testing

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 16:35:08 +01:00
71a881c4d6
Bug 35379: Rename tx() parameter to ease translation
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>
2024-01-16 16:35:07 +01:00
eae604c437
Bug 35707: (alternate) Add clearfix to item statuses
This proposed alterantive patch adds changes the status <span>s to
<div>s. A div is basically the block-level equivalent of a span. This
has the same effect of pushing each status onto its own line.

The patch also adds generic "item_status" class to the <div>s as well so
that we can attach a consistent style to all statuses. The patch
includes a small amount of padding on these items in order to repeat
legibility.

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

1) Add an item to stockrotation and trigger the first transfer
2) Place a hold on the item
3) Note that you will now see two statuses, one above the other as
   displayed in the screenshots attached to the bug.

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-16 16:35:07 +01:00
660b4fc218
Bug 35419: Update page title for bookings
This patch updates the structure of the Bookings list page so that the
title can be better translated.

To test, apply the patch and locate a bibliographic record in the
staff interface catalog.

- View the detail page.
- If you don't see a "Place booking" button in the toolbar,
  click "Items" in the sidebar menu.
  - Locate the "Priority" heading, and change the "Bookable" setting to
    "Yes."
- Click the "Bookings" menu item in the left-hand sidebar.
- Check that the page title looks correct and consistent with
  breadcrumbs.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 16:35:06 +01:00
272056791f
Bug 35474: Add icon for protected patrons
This patch adds a "protected" icon (fa-lock) to the patron information
in the sidebar of patron-related pages in the staff interface.

To test, apply the patch and perform a patron search in the staff
interface.

- Edit a patron and go to the "Library management" section.
- Set "Protected" to "Yes."
- Save the record and view the information in the sidebar. You should
  see the lock icon by the patron's name.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 16:35:05 +01:00
63ec521608
Bug 34479: Update syntax for translatable string
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 16:35:05 +01:00
bd9e3145d7
Bug 35759: (bug 30708 follow-up) Generated dist file not installed for preservation module
It's missing from the Makefile.PL!

Same as erm.js when need to install it.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:17 +01:00
066e349561
Bug 34479: Fix string for translatability
When moved from .tt to .js we need to convert the single
underscore into a double underscore.

Also uses format() to better deal with the variable.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:16 +01:00
21e2ee11fb
Bug 34479: Move patron selection history to a re-useable file
This patch takes some of the functionality for maintaining patron selections and moves it to a new file that can be used in other template files. It also introduces a new method for determining whether to delete the history after an operation is complete, along with an .inc file containing the checkbox that manages this

Test plan:
1) Navigate to Patrons and run a search
2) Use the checkboxes to select some patrons and run the three different options in the menu bar: Add to patron list, Merge selected patrons, Batch patron modification.
3) For each operation, you should see a checkbox asking if you want to "Keep patrons selected for anew operation". N.B. For adding patrons to a list, you will only see this when selecting to add them to a new list
4) When you run the operations, if you select the checkbox to keep the patrons then when you return tho the patron search, those patrons should all be still selected.
5) If you don't check the box, when you return to the search, your patron selection history should be empty and no patrons should be selected
N.B. If you have run a merge operation and elected to keep the patron history, you will only keep the patron who was kept

Signed-off-by: Sharon Dugdale <sharon.dugdale@cumberland.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Michael Adamyk <madamyk@ckls.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:16 +01:00
2de99d0b02
Bug 34479: Add new files to templates
This patch adds two newly created files to the templates to allow the patron selection history to be wiped or persisted as appropriate

Test plan as per previous commit

Signed-off-by: Sharon Dugdale <sharon.dugdale@cumberland.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:15 +01:00
963a3a4715
Bug 35341: Improve processing hard due date and auto renewal date
After quite a struggle, came up with this approach using
flatpickr's parseDate and setDate. Seems to be the best.
The dateformat variable is set in calendar.inc.

Test plan:
Test edit, save, clear rules, focus on both dates.
Toggle all I18N preference date formats.

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

Bug 35341: Do not reinstantiate flatpickr

We do not need to reinstantiate flatpickr, we need to retrieve the
existing instance.

Test plan:
See previous patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
12-01-2024 Squashed both patches. Removed the unused hidden inputs for
hardduedatecompare and added a data attribute for the duedate.
The check with is_valid_date seems no longer needed here. Normally
date is empty or valid. A js warning from parseDate should be
exceptional. Made code for both dates a bit more consistent.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:15 +01:00
Emily Lamancusa
9e168686cc
Bug 35322: (QA follow-up) Perltidy
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:14 +01:00
77f045e9a5
Bug 35322: Add unit tests
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-01-16 12:06:14 +01:00
9b10f69ee3
Bug 35322: Fix the logic for checking for holds in CanBookBeIssued
We are having reports that AllowItemsOnHoldCheckoutSCO and AllowItemsOnHoldCheckoutSIP no longer work. It appreas that in CanBookBeIssued, the ignore reserves check was changed from "check reserves unless the ignore reserves flag was passed" to "check reserves unless the ignore reserves flag was passed *and* we have a recall". I think this was a logic mistake and we want to check reserves unless we have an ignore flag *or* there is a recall.

Test Plan:
1) Enable AllowItemsOnHoldCheckoutSCO
2) Place a hold on an item
3) Attempt to check that item out to another patron
4) Note the checkout is blocked
5) Apply this patch
6) Restart all the things!
7) Attempt the checkout again
8) The checkout now succeeds!

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-01-16 12:06:13 +01:00
8f13f74e39
Bug 35651: Add check to make sure user has advanced_editor permission
To test:
1. Turn on the system preference 'EnableAdvancedCatalogingEditor'.
2. Set up a staff user with permissions to editcatlouge but make sure "Use the advanced cataloging editor (requires edit_catalogue)" if OFF.
3. Log in as that patron.
4. Go to a record or create a new one in the basic editor and see the toggle advanced editor button.
5. Try toggling it and you are logged out.
6. APPLY PATCH
7. Try 3 & 4 again, this time there should be no toggle button.
8. Log in as a patron who does havbe the "Use the advanced cataloging editor (requires edit_catalogue)" permission on. They should be able to toggle between editors.

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:12 +01:00
Laura Escamilla
122f29cd8f
Bug 34950: Add availability statuses for in transit and on hold items.
To test:
1. Enable the ILS-DI system preference.
2. Place a hold for a patron and put it in transit.
   Place another hold for a patron that is available for pickup at the local branch.
   And then select an item that is available for checkout but don’t change the status for it.
3. Go to your testing OPAC and make an ILS-DI “Get Availability” call using
   the item ids of the three items you worked with in step 2.
   (i.e. http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=321+323+214&id_type=item)
4. Notice that the availability status for all three items is showing as available.
   The item in transit and the item with a local hold should have a status
   of not available and a message of why they are not available.
5. Apply the patch
6. Use restart_all.
7. Refresh the page and notice that the statuses are now correct.
   The item in transit has a status of not available and an availability
   message of “In transit”.
   The item with the local hold has an availability status of not
   available with an availability message of “On hold”.
   Finally the available item is correctly showing up as available.
8. Sign off and have a wonderful day. :)

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>
2024-01-16 12:06:12 +01:00
e97dac3cbe
Bug 35510: Non-patron guarantor missing from CollapseFieldsPatronAddForm options
This patch adds a missing option to the CollapseFieldsPatronAddForm
system preference so that the "Non-patron guarantor" section can be
collapsed by default.

To test, apply the patch and go to Administration -> System preferences.

- Search for CollapseFieldsPatronAddForm.
- In the dropdown of options you should see an entry for "Non-patron
  guarantor."
- Click "Select all" and save your changes.
- Go to Patrons -> New patron and choose a patron category which can
  have a guarantor (for example J - Juvenile)
- The patron entry page should load with all sections collapsed,
  including the Non-patron guarantor section.
- Uncheck  all options in the CollapseFieldsPatronAddForm
  preference and return to the patron entry form. All sections should
  now appear.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:11 +01:00
5ae5e4367b
Bug 35641: Reduce DB lookups when sending a list of barcodes to inventory
This patch does three things:
1 - Removes a specific query for withdrawn status of each item scanned - we can use the withdrawn field
2 - Removes a specific query for checkouts on each item scanned - we can use the onloan field
    a - additionally we don't need to fetch the checkout as we check it in to the homebranch,
    this is likely incorrect - we should use the current branch, but I preserve behavior for now
3 - Fetches the items ahead of time and builds a hash based on barcode, reduces DB lookups, may raise memory usage

To test:
1 - Checkout some items
2 - Withdraw some items
3 - Generate a lsit of barcodes including some checked out items and some withdrawn items
4 - Enter that list of barcodes into inventory tool
5 - Note your results
6 - Apply patch
7 - Issue the items again
8 - Repeat inventory
9 - Confirm results are the same as before patch

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:11 +01:00
ae8c96f387
Bug 35676: Fix DidYouMean when not configured
When DidYouMean is not configured, there is the following message
displayed:
  "Not what you expected? Check for suggestions"
suggestions is a link to svc/suggestion which does not return content if
the feature is displayed
 90 unless ( @plugins ) {
 91     print $query->header;
 92     exit;
 93 }

We should not see this text, it is supposed to be replaced when the ft
is enabled.

However
  commit 79bf4485c1
  Bug 34866: Use template wrapper for breadcrumbs: OPAC part 4
made this change:
-                    [% IF ( DidYouMean ) %]
+                    [% #IF ( DidYouMean ) %]
                         <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&amp;q=[% querystring | uri %]">suggestions</a></div>
-                    [% END %]
+                    [% #END %]

Which is obviously wrong.

Test plan:
Do not have the ft configured and launch a search (OPAC) that will not
return any results.
=> Without this patch there is the message
=> With this patch applied it is no longer displayed

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:10 +01:00
96681cfa07
Bug 35772: Remove double escaping
Patch as proposed by Jonathan in a comment on bug 29002

If a patron has HTML character in surname or firstname, Select2 will escapeHtml twice.

To test:
* Edit a patron, set firstname: <span>test</span>
* Place booking, search for test
* It shows correctly in the result, but when you select it you will see "&lt;", etc.
* Apply patch
* Verify the display is now corrected.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:10 +01:00
Katrin Fischer
328c5dcdfa
Bug 25691: (follow-up) Update control file with wiki link
This is in case it's needed anyway (see comment on previous patch)

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>
2024-01-16 12:06:09 +01:00
Katrin Fischer
0a49f71e8f
Bug 25691: Replace link to non-existing README with wiki link
This doesn't update the occurrence in the control file
as it says in control.in:

To test:
* Verify all occurrences of the README file have been updated. Exceptions:
  * control (see above)
  * changelog

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>
2024-01-16 12:06:08 +01:00
067034f9e0
Bug 35438: Remove skip_intermediate_commit parameter
It no longer does anything.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:08 +01:00
74bbb89e99
Bug 35438: Transact each record import separately
When importing a staged file we commit every 50 records
For an authority import we are also merging, which can affect many more biblios, and these all end up in the transaction.
This can cause tables locks and issues across Koha

Test Plan:
1) Apply this patch
2) prove t/db_dependent/ImportBatch.t

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-16 12:06:07 +01:00
4d3c838093
Bug 35277: (QA follow-up) POD corrections
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:07 +01:00
cf84410ce5
Bug 35277: (QA follow-up) Fix POD
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:06 +01:00
c4315faba0
Bug 35277: (follow-up) Remove debugging module
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:06 +01:00
c6d6938ef9
Bug 35277: Unit tests
prove -v t/db_dependent/Koha/BackgroundJob/PseudonymizeStatistic.t

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-16 12:06:05 +01:00
1ae58daca8
Bug 35277: Pseudonymize in a background job
This patch adds a new background job for pseduonymization

To test:
 1 - Download the benchmarking script
 2 - Ensure your koha has bcrypt_settings in koha-conf.xml
     See bug 28911
 3 - perl perf_check_pseudo.pl
 4 - Note the slowdown after pseudonymization enabled
 5 - Apply patches, restart all
 6 - perl perf_check_pseudo.pl
 7 - Note improvement
 8 - Enable pseudonymization in sytem preferences
 9 - Perform some checkouts and returns
10 - Verify the background jobs complete successfully
11 - Verify the pseudonymized_transactions table is updated correctly

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-16 12:06:04 +01:00
Emmi Takkinen
deed5233b7
Bug 32477: Fix hiding all columns in item batch mod tools
If one hides all columns in batch item modification tool
and then reloads the page or launches tool again, "Holds"
column isn't displayed and "Itemtype" column is. Also
"Itemtype" columns checkbox remains checked. This happens
because "Itemtype" columns id is out of scope of list of column
numbers set in cookies. This patch adds 3 to number of columns
in variable "allColums" to take account all 3 columns we don't
want to hide.

To test:
1. Find items to modify and modify them with batch item
modification tool.
2. Use "Hide all columns" checkbox to hide all columns.
3. Confirm all columns expect checkbox, "Title" and "Holds"
columns are hidden correctly.
4. Reload the page.
=> Note that "Holds" column is now hidden and "Itemtype"
column is displayed. Also "Itemtype" checkbox is checked.
5. Apply this patch.
6. Repeat steps 1 to 4.
=> "Holds" column should now be displayed and "Itemtype"
hidden. None of the checkbox should be checked.

Sponsored-by: Koha-Suomi Oy
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>
2024-01-16 12:06:04 +01:00
Emmi Takkinen
71a7aa1cdc
Bug 32477: Launch function hideColumns after changing datatables settings
Hiding columns in batch item modification breaks if page is
loaded again. If one hides e.g. column "Collection" and then loads
the page column "Holds" disappears. Also behaviour of checbox
changes for "Collection" column. This happens because we launch
function "hideColumns" before changing datatables settings and
"hidden" column with class "sorting_1" is still present.

To test:
1. Find items to modify and modify them with batch item
modification tool.
2. In modification page, hide column "Collection". Confirm
correct column is hidden.
3. Reload the page or modify items again.
=> Note that column "Holds" is now hidden and checking checkbox
for column "Collection" behaves incorrectly (unchecked checkbox
shows column, checked hides it)
4. Apply this patch.
5. Repeat steps 1, 2 and 3.
=> Confirm correct column is now hidden when page is loaded again
and checkbox works correctly.

Sponsored-by: Koha-Suomi Oy
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>
2024-01-16 12:06:03 +01:00
1847e2ab56
Bug 35702: Fetch biblios at once and loop
Test plan:
prove -v t/db_dependent/Authority/Merge.t

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

Amended-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Replace $biblio->id with $biblio->biblionumber

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:03 +01:00
c703bb2c1c
Bug 35702: Use framework code from biblio object
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>
2024-01-16 12:06:02 +01:00
ed23bc1364
Bug 35086: (follow-up) Use 5000 as example in conf file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:02 +01:00
ddbd00de72
Bug 35086: Tidy tests
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>
2024-01-16 12:06:01 +01:00
7496a603cd
Bug 35086: Also split chunks when indexing from background job
The es background indexer is designed to combine background jobs when started based on the 'batch_size' option.

While this is helpful for combining individual updates, it can be problematic when there are several large batch modifications, or when worker has stopped and is restarted.

This patch uses the same logic as in the indexer to split the chunks that are sent directly for indexing.

To test:
1 - Follow test plan on previous patch
2 - Confirm items are correctly indexed and jobs marked

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>
2024-01-16 12:06:00 +01:00
9951e230e4
Bug 35086: Add chunk_size option to elasticsearch configuration
Whne performing batch operations we can send a large numebr of records for reindexing at once.
Currently this can create requetss that are too large for Elasticsearch to process. We need
to break these requests into chunks/

This patch adds a chunk_size configuration to the elasticsearch stanza in koha-conf.xml

If blank we default to 5000.

To test:
0 - Have Koha using Elasticsearch
1 - Create and download a report of all barcodes:
    SELECT barcode FROM items
2 - Batch modify these items
3 - Note a single ESindexing job is created
4 - Create and download a report of all authority ids:
    SELECT auth_header.authid FROM auth_header
5 - Setup a marc modification template, and batch modify all the authorities
6 - Again note a single ES backgorund job is created
7 - Apply patch
8 - Repeat the modifications above - you still get a single job
9 - Edit koha-conf.xml and add <chunk_size>250</chunk_size> to elasticsearch stanza
10 - Repeat modifications - you now get several background ES jobs
11 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/Indexer.t

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>
2024-01-16 12:06:00 +01:00
b8d9cce664
Bug 34999: Add unit test
Test plan:
Run t/db_dependent/api/v1/auth.t
[Bonus] Run prove t/db_dependent/api/v1

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:05:59 +01:00
1fc82dd827
Bug 34999: Throw exception for public routes if OPACMaintenance is enabled
Test plan:
[1] Try public endpoint like /api/v1/public/biblios/X/items.
    * Replace X by an existing biblionumber.
    You should receive a 200.
[2] Enable OPACMaintenance. Set to Show.
[3] Try same endpoint. You should get a 503 with a json error.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:05:59 +01:00
6779e64d95
Bug 35756: Correctly serialize patron's data in patron search popup/modal
We are incorrectly using encodeURIComponent in patron-search.inc.
When a new patron is selected, the info message is showing "Patron %s is already in the list"
or "Patron %s added". If the patron has space in their name, they will be substituted with %20.

We are using JSON for select, we can reuse it for add.

Test plan:
Have a patron with spaces in their name
Add users to a fund
Notice that the name is correctly displayed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:05:58 +01:00