Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f24e0d52e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4fc93fee00)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 57bd44ae0f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a sticky toolbar to the vendors form
Test plan:
N.B: This patchset will not work on a sandbox
1) Navigate to Acquisitions and click New vendor
2) The toolbar should appear at the top of the page underneath Add vendor
3) Scroll down, the toolbar should stick and be given the 'floating' class
4) Scroll back up and the toolbar should unstick and lose the 'floating' class
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 716980ce2f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9cdf597a83)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects the position of the table search box on the course
reserves details pages by warpping the presented table in a 'rows' class
div.
We also update the search box dom configuration in the datatable itself
to match that of other opac tables.
Test plan
1) Add some course reserves to a course
2) View that course on the OPAC
3) Note that the search box for the table is aligned to the top of the
main section of the page and over to the far right almost off screen.
4) Apply this patch
5) Confirm that the display of the search box is now nested just above
the table in the same location as the course reserves list page
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32242f438a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
At some point our SIP server stopped logging fatal errors to either logs or standard error. We should restore this vital functionality.
Test Plan:
1) Apply the first patch which will cause the patron information request
to fail
2) Stop the SIP server
3) Start it again with: perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
4) Trigger the failure with the following command:
./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l MPL --patron koha -m patron_information
5) Note "THIS IS A TEST" is not found in logs or stderr
6) Apply the second patch
7) Repeat steps 2-4
8) Note the error message is now visible from stderr at the command line
and also in the SIP log
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f214db14dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Remove "tag" and "staff" and add the missing "note"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1d10d8b8c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes unused "tag" and "staff" scrubber profiles.
Test plan:
0. Apply the patch
1. prove t/Koha/Plugins/HtmlScrubber.t
2. prove t/Scrubber.t
3. Grep around the code for C4::Scrubber and make sure "tag"
and "staff" aren't used as arguments for C4::Scrubber
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e846abeeb7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This ui_context is supposed to be opac, not staff.
For the purposes of these tests, this is not important, as the ui_context is
only needed for the template params and this is testing if the history check
stage is supposed to show or not.
Reckon this was a copy paste without consequences hence missed, but the code
is now semantically more correct.
prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dfd028871a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Unless there is a cardnumber or an authenticated user
Test plan:
1) Apply only the the tests file highlighting the issue:
prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
2) Notice it fails.
3) Apply this patch.
4) Run tests again. Notice it passes.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a0fcefa22)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ae2e9e23de)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects the "Overdues with fines" page so that the page
title, breadcrumbs, and main heading match the name used in navigation
menus.
To test, apply the patch and go to Circulation -> Overdues with fines.
Confirm that the page title, breadcrumb menu, and page heading are
correct: "Overdues with fines at [library]"
Sponsored-by: Athens County Public Libraries
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 28cf1da6ea)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch applies the same logic to `koha-disable`.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2ffae92a7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Taking advantage of the `get_worker_queues` function introduced in bug
31124, this patch makes `koha-create` start all defined queues.
To test:
1. Run:
$ ktd --shell
k$ sudo -s
k$ koha-create --create-db test
=> FAIL: No mention of `long_tasks`
2. Apply 31124 and then this patch
3. Run:
k$ cp debian/scripts/koha-functions.sh \
/usr/share/koha/bin/koha-functions.sh
k$ debian/scripts/koha-create --create-db test1
=> SUCCESS: `long_tasks` worker is started
4. Sign off :-D
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 45089704fa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes two things:
* Adds a `get_worker_queues` function to koha-functions.sh
* Makes `koha-remove` loop through all the defined queues to stop all
the running workers before trying to remove the unix user for the
instance.
To test:
1. Run:
$ ktd --shell
k$ sudo -s
k$ koha-create --create-db test1
k$ service koha-common restart
k$ koha-remove test1
=> FAIL: There's an error about not being able to drop the instance user
2. Run:
k$ ps -ef | grep test1
=> FAIL: There's a running process for the 'long_tasks' queue worker.
3. Apply this patch
4. Run:
k$ cp debian/scripts/koha-functions.sh \
/usr/share/koha/bin/koha-functions.sh
5. Repeat 1 naming the instance `test2`
=> SUCCESS: The instance is removed correctly. No error about running
processes
=> SUCCESS: No process is running for `test2`
6. Sign off :-D
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 576c496442)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField
2) Log in to the opac
3) Go to "Personal details"
4) Select any value for "Date of birth"
5) Click save
6) This must not yield error 500. (But may be a successful save or a validation error).
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 04ebdd4ac1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c4f7b14906)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Hit cataloguing/addbiblio.pl?frameworkcode=FA
Without this patch you get warnings in the Koha log file:
Use of uninitialized value in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 572.
Use of uninitialized value in substitution (s///) at /kohadevbox/koha/Koha/UI/Form/Builder/Biblio.pm line 55.
with this patch applied: no warning
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0ba11f98f9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
prove t/db_dependent/Koha/Plugins/Recall_hooks.t
should return green
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit db655799ad)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Because we still use CGI::Session (bug 17427), we need to mock
CGI::Session to remove those 2 warnings
rollback ineffective with AutoCommit enabled
Test plan:
Run the tests after this patch, it should be green
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eaaabf66dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
0. APPLY PATCH
1. Make a few AVs for SUGGEST ( reason ) and SUGGEST_STATUS ( status ).
2. Make some new suggestions and give them new statues w/ a reason.
3. The reason should display, in parentheses, in the status column.
4. There should be a status class and a reason class for each.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 35baa3ec46)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
prove t/db_dependent/Koha/Auth/Client.t
should return green
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c695e6ce4c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
prove t/db_dependent/Koha/AdditionalContents.t
should return green
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 827ad21244)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the code in `CheckReserves` survive the non-existence
of the referenced item type in the `items` table for the passed item.
To test:
1. Apply the regression tests
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Reserves.t
=> FAIL: Tests explode like this:
```
Can't call method "notforloan" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 870.
```
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 854783c836)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6c26ce01d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc some calls do not set 'index' var generating idx="idx_".
Set 0 has default value.
Test plan :
1) Enable system preference 'IntranetCatalogSearchPulldown'
2) Go to catalogue advanced search
3) Look HTML source and check you see:
<select class="advsearch" name="idx" id="idx_0">
<select class="advsearch" name="idx" id="idx_1">
<select class="advsearch" name="idx" id="idx_2">
4) In page page toolbar, click 'Search catalog'
5) Click on 'More options' icon
6) Look HTML source of this part and check you see:
<select class="advsearch" name="idx" id="idx_0">
Without patch you see:
<select class="advsearch" name="idx" id="idx_">
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0d39336f71)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This followup corrects a problem in image deletion which isn't really
the same issue (it's not CSRF related) but is another problem with
deletion. The JS for grabbing all the checkboxes by name wasn't working
when there is only one checkbox.
To test, apply the patch and delete all but one image from the patron
card creator image manager.
- Check the checkbox for the last image and click the "Delete selected"
button.
- The image should be deleted successfully.
Sponsored-by: Athens County Public Libraries
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 727b9d2dde)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The patron image deletion operation was not fully updated in Bug 34478.
The individual "Delete" buttons in the table of images need to be
updated to use form-submit.js
Unrelated: I removed an invalid "align" attribute from a <td>.
To test, apply the patch and go to Tools -> Patron card creator -> Image
manager.
- Upload multiple images
- Test the individual "Delete" buttons in the table of images.
- Test that both the "OK" and "Cancel" operations work correctly.
- Test the process of checking one or more checkboxes and clicking the
"Delete selected" button.
- Test that both the "OK" and "Cancel" operations work correctly.
Sponsored-by: Athens County Public Libraries
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f3bfcfa66)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan (ktd):
1) reset_all
2) Run first part of the 241200017.pl atomicupdate manually
koha-mysql kohadev
ALTER TABLE illrequests DROP FOREIGN KEY illrequests_bnfk;
3) Create an ILL request linked to a borrower that doesn't exist (simulate old data):
INSERT INTO illrequests (`backend`, `borrowernumber`,`branchcode` ) VALUES ('Standard', '99999', 'CPL');
4) Run the 2nd part of the atomicupdate manually:
ALTER TABLE illrequests ADD CONSTRAINT illrequests_bnfk FOREIGN KEY(`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE;
5) Notice you get the error:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (., CONSTRAINT FOREIGN KEY () REFERENCES () ON DELETE SET NULL ON UPDATE CASCADE)
6) Run the added query in the patch:
UPDATE illrequests SET borrowernumber = NULL WHERE borrowernumber NOT IN (SELECT borrowernumber FROM borrowers);
7) Repeat step 4)
8) Notice there's no errors
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 94d5c37db8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 688b5961c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 79567178ec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7715e3ae4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Navigate to a vendor record
2) Click the Receive shipments button
3) It will open in a new tab
4) Apply patch - yarn js:build
5) Hard refresh the browser
6) Repeat steps 1 - 2
7) The page will open in the same tab
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 052cc1b6ef)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This followup replaces the $raw filter with `scrub_html type => 'note' |
$raw`.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb19513f48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the notes field to a $raw filter to prevent html
escaping of the data within it.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3bcbb66ded)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Choose a staff patron and assign them the following permissions
- catalogue
- edi_manage
2) Enable the edifact syspref
3) Log in as the chosen staff patron and navigate to Acquisitions > EDI accounts from the left hand menu
4) The breadcrumb will contain Administration
5) Clicking this will result in a permissions error
6) Apply patch
7) Refresh the page and the breadcrumb will now read Acquisitions and will work
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ff366554fe)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch simply adds 'timestamp = current_timestamp()' to the SQL statements
run when editing a biblio. This ensures the tables timestamps are kept in sync
To test:
1 - Choose a biblio in the database and make an update to a 650 field
2 - Check the timestamps in MySQL:
SELECT biblio.timestamp, biblioitems.timestamp, biblio_metadata.timestamp FROM biblio JOIN biblioitems USING (biblionumber) JOIN biblio_metadata USING (biblionumber) WHERE biblionumber=9;
3 - Note the timestamps
4 - Edit the same 650 again
5 - Check the timestamps and note that the biblio_metadata is updated, but the others are not
6 - Apply patch, restart all
7 - Update the 650 again
8 - Check the timestamps, all are updated!
9 - Sign off
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0aa820de32)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Navigate to a vendor record and select the baskets view from the left menu
2) Click "add to basket" in the table
3) A modal will display requiring the user to define a budget and fund
4) Apply patch and restart_all
5) Repeat steps 1 and 2
6) You will get the modal to add to the basket
Signed-off-by: David Nind <david@davidnind.com>
Amended-by: Jonathan Druart
Remove import of GetBudget
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3293ae32bc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove /kohadevbox/koha/t/db_dependent/Koha/Item.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 53a9631335)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1. Install a plugin that does not have any background_tasks, e.g. https://github.com/HKS3/HKS3GeoSearch/releases/tag/v0.12
2. Navigate to http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl, observe a 500
3. Apply patch
4. Observe no 500
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 53630add0d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Prevent SQL injection.
Note: output_error in Output.pm needs further attention, but out
of scope here. (The error passed gets replaced by 404 here too.)
Test plan:
Pass something else than table.field in Line or Column URL param.
(Manipulate URL.)
You should be redirected to 404 error instead of 500.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eedb6cece6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes the exection of the report Acquisitions statistics if you fill only the To date
Test plan:
1 Execute the report Acquisitions statistics filling only To date filter in Placed on or Received on (/cgi-bin/koha/reports/acquisitions_stats.pl) Koha returns an Internal Server Error
2 Apply patch, restart services
3 Repeat step 1, now the report returns the results page as expected
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed superfluous COALESCEs.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 856a85d3af)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds handling for the 264 field in precedence to the 260 for
the generate_marc_host_field method and also adds subfields n and p to
the 245 handling.
Test plan
1) The routine is currently only called during bundle linking so...
1a) Creating a new bundle
* Add a new bib record
* Mark the bib record as a 'collection' type by setting leader
position 7 to 'c'
* Add a new item to this bib record
* You should see a new 'Manage bundle' button available in the
'Actions' column of the Holdings table.
* Clicking 'Manage bundle' should expand the table to include a new
row directly beneath this one.
* Use the new 'Add to bundle' button that appears in this row to
trigger a modal that allows entering the barcode of items you wish
to add to the bundle
* Ensure the 'Add MARC link' checkbox is checked to create 773 links
and trigger the code above
2) Inspect the MARC record for the host biblio and confirm the 773 has
been built.
3) Run unit tests to confirm they now pass
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 300247d2c6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds unit tests to confirm that the 773 record created by
Koha::Biblio now takes account of RDA updates and subfield ordering.
Test plan
1. Apply patch
2. Run `prove ./t/db_dependent/Koha/Biblio.t`.
3. Test fails.
4. Apply next patch in series
5. Run `prove ./t/db_dependent/Koha/Biblio.t`.
6. All tests pass.
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f234fe5a1c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes the JS on the saved SQL reports page so that the
subgroup column filter is correctly cleared when the tab changes. The
wrong table column is targeted.
To test, apply the patch and go to Reports -> Saved SQL reports.
- If necessary, at least two SQL reports, each with in a different group
and different subgroup. For example:
- sql: SELECT * FROM items LIMIT 10;
- group: Catalog
- subgroup: Statistics
...and...
- sql: SELECT * FROM borrowers LIMIT 10;
- group: Patrons
- subgroup: Statistics
- From the saved reports page, go to the tab for one of your reports and
filter by subgroup.
- Switch to a different tab containing SQL reports. The reports should
be shown as expected.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2de0265166)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Download a record you already have in Koha
2. Cataloging > Stage MARC records for import
3. Record matching rule: KohaBiblio (99$c)
4. Stage for import > View batch
5. In the table results there should be a link to 'View' in the 'Diff' column.
6. Notice the Record comparison is not side by side.
7. APPLY PATCH
8. Try steps 1 - 6 again, this time the record comparison should be side by side.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0cafda92b6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Even if severity does not exist. Additionally, only add severity to message if it exists.
Test plan:
1) Apply tests patches. Run tests (they should fail):
prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t
2) Apply this patch and run tests again (they should pass this time).
UI test:
1) Create a new data provider linked to Gale Cengage, service url:
https://api.siqcloud.online/counterapi/r51
2) Add report release 5, customer id: '123', requestor id: '123', report types: 'TR_J1'
3) Run a report for this data provider, from Feb 2025 to Apr 2025. Notice that before applying patches, the job report results in a red bar with no error message.
4) Apply patches, repeat 3. Notice it now results in a nice error message.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 023f935360)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9b0d6260bb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d618dc808f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>