Owen Leonard [Wed, 6 Nov 2024 16:32:33 +0000 (16:32 +0000)]
Bug 38380: Fix other instances of obsolete col-*-offset classes from templates
This patch corrects a few remaining instances of obsolete col-*-offset
classes from a few different templates.
To test, apply the patch and make sure you have the system preferences
AllowCheckoutNotes and ArticleRequests.
- Go to Circulation -> Article requests. If necessary, create an article
request.
- From the list of requests, click Actions -> Cancel request. The
"Confirm deletion" modal form should be well-formatted.
- From the list of requests, under the "New" tab, click a record
title to view the details for that article request.
- In the list of patron requests, click the "X" to delete the
request. The "Confirm deletion" modal form should be
well-formatted.
- Log into the OPAC as a user with checkouts. On your summary page,
under the "Checked out" tab, click the "Add note" button and save a
new note.
- Go to Circulation -> Checkout notes. The layout should look correct.
Toggle the CircSidebar system preference and reload the checkout notes
page. It should still look correct.
- The last change, to the patron clubs template page, only modifies a
comment.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Wed, 13 Nov 2024 05:31:02 +0000 (21:31 -0800)]
Bug 29818: Cannot save subscription frequency without display order
The schema says that subscription_frequencies.displayorder can be null, and
everything else deals with it being null just fine, but if you try to save
a new frequency without specifying display order with strict_sql_modes set,
you get an error.
Test plan:
1. Without the patch, Serials - Manage frequencies - New frequency
2. Description is mandatory, so fill it in, then click Save
3. Boom! Apply patch, restart_all
4. Repeat steps 1-2, and verify that no error is thrown and the new
frequency shows up (at the top of the list since nothing comes before
something)
5. New frequency, fill in Description, try typing something other than a
number in Display order and saving. You should be told to follow the
directions that only numeric characters are allowed
Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Thu, 11 Jul 2024 12:03:40 +0000 (12:03 +0000)]
Bug 37326: decode barcode file in inventory tool
This patch ensures that barcodes uploaded as a file into batchMod are run through
any transformations to match the behaviour of barcodes entered in a list
To test:
1 - Edit BarcodeSeparators system preference to remove \s
2 - Install barcode transformer plugin:
https://github.com/bywatersolutions/koha-plugin-barcode-transformer/releases/tag/v1.2.0
3 - Configure the plguin:
item:
-
match: "^[A-Z]* \| "
search: "^[A-Z]* \| "
replace: ""
-
match: " \| .*$"
search: " \| .*$"
replace: ""
4 - Go to Cataloging->Batch item modification
5 - Enter a list of barcodes into the 'Scan one by one' box like:
ERR | 12345 | ERR
FOO | 23456 | FOO
BAR | 34567 | BAR
6 - Click 'Continue'
7 - Note the barcodes not found are:
12345
23456
34567
8 - Save the barcodes with extra text into a file
9 - Perform batch mod, supplying the barcodes via the file
10 - Note the barcodes not found are the original strings
11 - Apply patch, restart all
12 - Perform batch modification using file again
13 - Note the not found barcodes are the transformed version
14 - Sign off!
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Fri, 6 Sep 2024 01:49:35 +0000 (01:49 +0000)]
Bug 37854: Re-indent HTML (whitespace-only)
This whitespace only change re-indents the HTML
Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Fri, 6 Sep 2024 01:45:27 +0000 (01:45 +0000)]
Bug 37854: Add fieldset.rows so that Javascript works
This change adds a fieldset.rows that the Javascript produced
by C4/Barcodes/ValueBuilder.pm will work here too like it
does for /cgi-bin/koha/cataloguing/additem.pl and
/cgi-bin/koha/acqui/neworderempty.pl
The fieldset.rows element ruins the styling, so we add some context
specific styling to the styling is preserved.
Test plan:
0. Apply the patch
1. Set "autoBarcode" to "generated in the form <branchcode>yymm0001"
2. Create a vendor
3. Create a backet with "Create items when" set to "receiving an order"
4. Add an order (any order)
5. Close the basket
6. Receive the shipment
7. Click in the barcode field
8. Note that you get a barcode like CPL24090001 and not undefined24090001
Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Mon, 11 Nov 2024 22:17:58 +0000 (22:17 +0000)]
Bug 38416: Tidy
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>
David Cook [Mon, 11 Nov 2024 04:40:52 +0000 (04:40 +0000)]
Bug 38416: Add unit tests
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>
David Cook [Mon, 11 Nov 2024 04:30:06 +0000 (04:30 +0000)]
Bug 38416: Failover to MARCXML if cannot roundtrip USMARC during indexing
This change failsover to MARCXML from USMARC if there are any
warnings generated by MARC::File::USMARC::decode when trying to
roundtrip the record.
Test plan:
0. Apply the patch
1. Setup your koha-testing-docker to use Elasticsearch
2. Create a new record with 15,000 characters in the 500$a field
3. Index that record
(e.g. perl misc/search_tools/rebuild_elasticsearch.pl --biblios -v -v)
4. Note that a warning saying the following appears:
"Warnings encountered while roundtripping a MARC record to/from USMARC.
Failing over to MARCXML"
5. View the "Elasticsearch record" on the detail page and note that the
marc_format is MARCXML
6. Perform a search for the record (the keyword should be something that
brings up other results too)
7. Note that the record appears correctly in the search results
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>
Emily Lamancusa [Wed, 16 Oct 2024 14:14:51 +0000 (10:14 -0400)]
Bug 38186: Don't initiate transfer when cancelling hold on lost item
To test:
0. In the Circulation Rules, set the default return policy to "item
returns home (default settings have this already)
1. Find an item belonging to a branch other than the logged-in branch
2. Place a hold on that biblio record for pickup at the logged-in branch
3. Check in the item to set the hold to waiting
4. Set the expiration date to a date in the past
To do this in KTD:
ktd --shell
koha-mysql kohadev
UPDATE reserves SET expirationdate = < yesterday's date >;
5. Set a lost status on the item
6. Go to Circulation > Holds awaiting pickup
--> The hold should appear on the "holds waiting past their expiration
date" tab
7. Click the "Cancel and return to <homebranch>" button next to the hold
8. Open the biblio record for the item
--> Note that the lost status is gone and the item shows as in-transit
9. Apply patch
10. Repeat steps 2-8 on the same item
--> This time, the item is still lost and is not in-transit
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Olivier V [Thu, 24 Oct 2024 14:43:33 +0000 (10:43 -0400)]
Bug 30745: (follow-up) Rewritting the st-date-normalized test
The patch was corrupted, and was rewritten as the original one by
Hammat
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Hammat Wele [Mon, 26 Aug 2024 17:36:10 +0000 (17:36 +0000)]
Bug 30745: Fix error 500 when item is not found while using zebra
Plan test :
- Apply this batch
- Set Zebra as searchEngine
- Go to Cataloging -> # Label creator
- Click on New, Select Label batch
- Click on Add item(s)
- Search for for inexisting items
=> The page should refresh itself (so that it has the same behavior as elasticSearch)
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 30745: Display pagination for the results page
I have fixed the pagination issue when the search returns multiple results.
Test plan:
- Enable elasticsearch
- git to labels/label-item-search.pl
- search using after date only
=> check you get items with date-of-acquisition greater than after
date
- search using before date only
=> check you get items with date-of-acquisition less than before
date
- search using after and before date
=> check you get items with date-of-acquisition between after and
before
- Combine this searches with a specified index
- enable zebra and repeat these tests
pagination tests
- Perform a search that returns more than 20 notices
- Navigate through different result pages using page numbers, the "Next" button, and the "Previous" button
=> On each page, check that "Results X through X of X" displays the correct information
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Alex Arnaud [Thu, 12 May 2022 15:29:52 +0000 (17:29 +0200)]
Bug 30745: handle ES ranges for date of acquisition
Test plan:
- Enable elasticsearch
- git to labels/label-item-search.pl
- search using after date only
=> check you get items with date-of-acquisition greater than after
date
- search using before date only
=> check you get items with date-of-acquisition less than before
date
- search using after and before date
=> check you get items with date-of-acquisition between after and
before
- Combine this searches with a specified index
- enable zebra and repeat these tests
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=30845 Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Alex Arnaud [Thu, 12 May 2022 09:56:04 +0000 (11:56 +0200)]
Bug 30745: Use query builder and search_compat in label-item-search
Test plan:
- apply this patch,
- make some searches in labels/label-item-search.pl using
the 3 form input (index, after date, before date),
- check it works like before
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=30845 Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Tue, 12 Nov 2024 17:50:10 +0000 (17:50 +0000)]
Bug 38428: Use links for stock rotation action buttons
This patch converts the action buttons on the stock rotation rota
manage items page to be links to avoid repeating form values (CSRF tokens, etc)
It moves the confirmation for removal from a rota to be a confirm and not a full page reload.
It also moves the fetch of a transfer into a shared variable.
Lastly, there is some chomping added to remove extra whitespace.
To test:
1 - Enable SotckRotation
2 - Create a rota
3 - Add some stages
4 - Add items to the rota
5 - Test the buttons to advance stage, add 'in demand' and remove
6 - Apply patch
7 - Confirm all buttons continue to function
8 - Sign off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Fri, 15 Nov 2024 13:34:23 +0000 (13:34 +0000)]
Bug 33736: (follow-up) Cleanup and consistency
Given Jonathans comments, this patch performs the requested cleanups.
* We use the new select option for kohaTables for the pickup library
search.
* We add pickup library to the aside filters.
* We remove the empty placeholder 'actions' column.
* We drop the filtering on 'waiting' which will be reintroduced by the
next but in the tree.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Fri, 30 Aug 2024 11:05:59 +0000 (11:05 +0000)]
Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script
This patch skips record indexing and real time holds queue updates when updating the localuse field
from statistics. A note is added to the script that the user should reindex if the localuse field is mapped.
Additionally a verbose option is added to the script, and doubled use of GetOptions is removed.
Lastly, a check is added to confirm the items value is being changed before the value is stored.
To test:
1 - Enable the real time holds queue
2 - Enable Elasticsearch
3 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm
4 - Note all items are touched and reported
5 - Check the background jobs table - there are many jobs generated
6 - Apply patch
7 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm
8 - Note 0 items are reported updated, no new background jobs
9 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm --verbose
10 - No items reported
11 - Update some items in the DB
UPDATE items SET localuse = 99 WHERE itemnumber LIKE '%9';
12 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm
13 - Only the number of items changed above reported
14 - UPDATE items SET localuse = 99 WHERE itemnumber LIKE '%9';
15 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm --verbose
16 - Each item changed reported, and the amounts, and the total items updated.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Tue, 29 Oct 2024 11:35:39 +0000 (11:35 +0000)]
Bug 37910: Update concerns styling to flexbox
With the update to bootstrap 5 we loose some of the absolute and
relative positioning helpers, namely pull-right, which were used in the
catalog concerns pages.
This patch updates the table and modal styling to use modern flexbox
utlities from bootstrap 5 instead to improve the styling and fix the
regressions.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Hammat Wele [Mon, 12 Aug 2024 19:15:04 +0000 (19:15 +0000)]
Bug 36132: Allow to delete multiple patron lists on any page
Plan test :
1. Apply the patch.
2. Create at least 22 patron lists (Navigate to Tools > Patron lists > New patron list).
3. Select the lists you want to delete on the 2nd page
4. Click the "Delete selected lists" button.
5. Confirm that the selected lists have been deleted.
6. Ensure that the button cannot be used if no list is selected.
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>
Phil Ringnalda [Sat, 9 Nov 2024 00:53:23 +0000 (16:53 -0800)]
Bug 38413: Batch operations from item search need to POST to not exceed URL length limits
Batch item modification and deletion accepts either op="show" or op="cud-show"
because sometimes you just have one item and it's saner to GET with one, but
sometimes you've selected 961 items from itemsearch and you need to POST to
not get hit by Apache's "too long" error.
Bug 36630 switched item search from using POST to GET because item search is
confusing. It uses a form with a dummy op and then empties out the form and
adds back contents, and the CSRF protection changed the dummy op to "cud-show"
so it could POST, but didn't notice that the op would be replaced by one that
was still "show." The form needs to go back to POST, the dummy contents need a
comment saying they are just dummies so nobody else gets fooled, and the JS
that replaces the form contents needs to insert a CSRF token and the correct op.
Test plan:
1. Without the patch, Search - Item search, search with no criteria so you
get hundreds of items
2. Change to Show All entries, then Select visible rows
3. Batch operations - Batch item modification
4. Apache should give you an error about your overly long URL
5. Apply patch and repeat steps 1-3
6. After a long pause while Batch item modification swallows the POST, you
should get the batch modification form with all your items.
Sponsored-by: Chetco Community Public Library 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>
Jonathan Druart [Wed, 6 Nov 2024 08:37:02 +0000 (09:37 +0100)]
Bug 38357: Prevent holidays to be wrongly added
This patch resets @holiday_list to an empty array, to prevent holidays
to be accumulated in worker's memory.
If you added single holidays to library A then others to library B,
holidays from A were also added to B.
Test plan:
Go to /cgi-bin/koha/tools/holidays.pl
Define the holidays for Centerville
Select a date
To: another date (pick only 2 days to ease testing)
Set a title "cpl"
Tick "Holidays on a range"
Save
Define the holidays for Fairview
Select *another* date
To: another date (pick only 2 days to ease testing)
Set a title "fpl"
Tick "Holidays on a range"
Save
=> Without this patch Fairview has 4 days of holidays instead of 2
=> With this patch applied the dates you selected are considered
holidays for Fairview
Phil Ringnalda [Fri, 8 Nov 2024 22:08:18 +0000 (14:08 -0800)]
Bug 38378: Serial frequency deletion needs to be converted to POST from GET
Deleting a serial frequency is (or can be) a two step process. If you are
deleting a frequency which is in use, you get back a page warning you that it
is in use, which the CSRF changes converted to a form POSTing with a CSRF
token and the new op cud-del. However, to get there you have to go through
the step that's the only step if the frequency isn't in use, clicking a link
that still thinks the op is named del rather than cud-del. That link needs to
instead be a form with a CSRF token and a POST of cud-del.
Test plan:
1. Without the patch, Serials - Manage frequencies
2. For any frequency, click Delete, click OK in the confirmation popup
3. Nothing happened except your URL changing, the frequency is still there
4. Apply patch, reload Manage frequencies
5. For any frequency, click Delete, click OK in the confirmation popup
6. This time, your frequency was deleted
Sponsored-by: Chetco Community Public Library Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 13 Nov 2024 15:58:50 +0000 (16:58 +0100)]
Bug 38391: Do not redraw on adjusting col vis in drawcallback
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jake Deery [Thu, 14 Nov 2024 16:53:52 +0000 (16:53 +0000)]
Bug 37576: (follow-up) Fix for UserRoles test
This patch, although not directly caused by Bug 37576,
fixes issues with the UserRoles cypress test due
to a change in the data structure brought on by recent
ERM bugs.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Thu, 14 Nov 2024 20:43:52 +0000 (20:43 +0000)]
Bug 33641: (follow-up) Add field to api spec
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I changed the attribute name to match our guidelines (tcohen) Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jake Deery [Thu, 14 Nov 2024 14:34:48 +0000 (14:34 +0000)]
Bug 37576: (follow-up) fix broken cypress tests
This patch is intended to fix failing Cypress tests
by including the correct payload in get_agreement()
found in e2e.js, and by moving get_package to the
e2e.js with corrected payload also
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Eric Garcia [Tue, 6 Aug 2024 19:06:45 +0000 (19:06 +0000)]
Bug 33641: Unit Tests
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Eric Garcia [Tue, 6 Aug 2024 19:01:00 +0000 (19:01 +0000)]
Bug 33641: Code changes
To test:
1. Apply patch, restart_all, updatedatabase
2. Check out an item to a patron
3. Query the database
- select return_branch from issues; should return NULL
- select branchcode from issues; should return the branchcode of the library you checkout the item out from
- select return_branch from old_issues; should match the branchcode from the previous query
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Tue, 6 Aug 2024 17:37:12 +0000 (17:37 +0000)]
Bug 33641: DB update
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 14 Nov 2024 09:57:06 +0000 (10:57 +0100)]
Bug 36640: Fix display of 'Clear filter'
This is a weird one. When using KohaTable the first button was not
displayed if it was a custom button.
Doing the following fixed the problem (adding an empty first elt):
dt_parameters["buttons"] = [{}]
dt_parameters["buttons"].push({the_clear_filter_button});
However adding the definition of the button to $.fn.dataTable.ext.buttons fixed the problem.
As described on https://datatables.net/extensions/buttons/custom#Custom-button-type
This will definitely need to be improved later.(see bug 26553)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 6 Nov 2024 09:32:13 +0000 (10:32 +0100)]
Bug 36640: Remove autoWidth: false for responsive tables
From Owen:
"""
Table columns don't collapse as you change the browser width.
They start collapsed if you narrow the window and reload the page. But they don't expand as you widen the browser window.
"""
I have not found a reason for this in the changelog of the responsive
plugin. Maybe there is another way to fix this?
Owen Leonard [Mon, 28 Oct 2024 13:36:33 +0000 (13:36 +0000)]
Bug 36640: (follow-up) CSS fixes for DataTables controls
This patch adds CSS fixes to try to keep styling of DataTables and
related controls consistent with how it looked before the upgrade.
This version of DataTables introduced a lot of usage of "!important" in
the CSS which severly limited our options. For that reason I modified
the file to remove all of those instances. Both the minified and
unminified versions are changed.
This patch continues the pre-upgrade practice of picking only the
relevant DataTables CSS and including it in our CSS build. This means a
smaller total CSS download for the user and eliminates the "!important"
problem.
Jonathan Druart [Thu, 31 Oct 2024 09:50:20 +0000 (10:50 +0100)]
Bug 36640: Restore previous order sequence behaviour
There was a behaviour change:
https://datatables.net/upgrade/2#Order-sequence
"""
When ordering columns by clicking on their header element, in v1 it would simply toggle between ascending and descending ordering for the columns (controllable with the columns.orderSequence option). DataTables 2 introduces a new option to this parameter, an empty string value which represents no ordering. The default has been updated to make use of this and the ordering sequence that is applied when clicking the header cell is now:
Ascending
Descending
No order
It will repeat that sequence indefinitely as the column header is clicked. As before, it can be controlled using the columns.orderSequence option, and if you wish to restore the default DataTables 1.x behaviour you can do so by setting the default:
Jonathan Druart [Thu, 31 Oct 2024 09:11:28 +0000 (10:11 +0100)]
Bug 36640: Fix itemsearch
We use the regular _dt_add_filter and pass the filters_options for
selects \o/
We need to iterate again to make it easier to write (lot of duplicated
code to build the AV list) but that's for later!
Jonathan Druart [Thu, 24 Oct 2024 09:04:57 +0000 (11:04 +0200)]
Bug 36640: Remove 'deferRender: true'
It's set to true by default now
https://datatables.net/upgrade/2#Deferred-rendering
"""
For this reason, deferRender's default value has been changed to be enabled (true) in DataTables 2.
"""
Jonathan Druart [Wed, 16 Oct 2024 09:52:03 +0000 (11:52 +0200)]
Bug 36640: Remove fnAddFilters
Also centralize and clean the delay code to use DT's debounce.
I have commented the code from initComplete as I don't think it's the
right place. Maybe we need to add it for other table, but then it should
be added when we init DT.
Removed blacklist_keys to keep code clean, could be re-added later if we
really need it.
Jonathan Druart [Thu, 14 Nov 2024 08:48:10 +0000 (09:48 +0100)]
Bug 38011: Fix ReNewSubscription.t
t/db_dependent/Serials/ReNewSubscription.t .. Value not allowed for auto_incr id in Aqbookseller at /kohadevbox/koha/t/lib/TestBuilder.pm line 402.
Null value for subscriptionid in Subscriptionhistory not allowed at /kohadevbox/koha/t/lib/TestBuilder.pm line 415.
Can't call method "enddate" on an undefined value at t/db_dependent/Serials/ReNewSubscription.t line 102.
It's failing when no vendor with id=1 in DB.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Mon, 29 Jan 2024 16:12:15 +0000 (17:12 +0100)]
Bug 14670: Fix tests and import
Sponsored-by: Orex Digital Signed-off-by: Alexandre Noel <alexandre.noel@inlibro.com> Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Mon, 29 Jan 2024 16:16:50 +0000 (17:16 +0100)]
Bug 14670: Use 260 if 264 is empty
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Mon, 29 Jan 2024 16:16:27 +0000 (17:16 +0100)]
Bug 14670: Deal with empty publicatoin date
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Mon, 29 Jan 2024 10:21:35 +0000 (11:21 +0100)]
Bug 14670: Move modal code to an include file
Also add an icon for the "Cite" entry.
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Stenberg [Fri, 23 Oct 2015 13:06:51 +0000 (15:06 +0200)]
Bug 14670: Fix earlier declaration in same scope
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Stenberg [Thu, 22 Oct 2015 14:43:30 +0000 (16:43 +0200)]
Bug 14670: add test for C4::Record::marc2cites
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Stenberg [Wed, 30 Sep 2015 12:55:15 +0000 (14:55 +0200)]
Bug 14670: Add Cite-option to detail page in OPAC
Adds a "cite" option in the tools menu in OPAC detail page for easy citations.
Test plan:
1. Apply this patch
2. Got to OPAC detail page
3. In the tools menu to the right, click the new "Cite" link
4. A modal should appear with four different citation styles (APA, Chicago,
Harvard, MLA)
Sponsored-by: Regionbibliotek Halland / County library of Halland Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Artur [Sat, 7 Sep 2024 16:12:05 +0000 (18:12 +0200)]
Bug 37861: Fix XSS vulnerability in barcode append function
When user inputs were appended directly to the barcode table, the values were not properly escaped, allowing potential XSS attacks. This patch ensures that user inputs are sanitized and safely added to the DOM using .text() and .attr() methods to prevent script injection.
To test:
Enable the "SelfCheckInModule".
Open the barcode input form.
Enter a barcode with HTML or script tags.
Without the patch, observe that the script is executed.
Apply the patch.
Repeat step 2.
Verify that the input is escaped and no script execution occurs.
Check that the barcode is properly appended to the table.
Documentation:
No updates required.
Sponsored-by: KillerRabbitAos Signed-off-by: Bo Gustavsson <bosse@gustavsson.one> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Mon, 26 Aug 2024 01:22:12 +0000 (01:22 +0000)]
Bug 37724: Remove Koha version number from OPAC
This change removes the Koha version number from the OPAC generator
metadata.
Test plan:
0. Apply patch
1. Enable syspref SelfCheckInModule
2. Visit /cgi-bin/koha/opac-main.pl and confirm meta tag doesn't
include version number
3. Visit /cgi-bin/koha/sci/sci-main.pl and confirm meta tag doesn't
include version number
4. Visit /cgi-bin/koha/sco/sco-main.pl) and confirm meta tag doesn't
include version number
5. Click "Help" and confirm meta tag doesn't include version number
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Magnus Enger [Fri, 16 Aug 2024 12:59:20 +0000 (14:59 +0200)]
Bug 33339: (Follow up) Fix more cases of formula=empty
This patch adds formula=empty to:
- Koha::ERM::EUsage::SushiCounter::_build_COUNTER_report_file()
Updated 2024-09-26: Earlier version also removed unnecessary
use of formula=empty from two places.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Kyle M Hall [Thu, 27 Jul 2023 16:30:54 +0000 (12:30 -0400)]
Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files
The system is vulnerable to Formula Injection attacks as the data
stored within the database and exported as CSV/Excel is not being
sanitized or validated against implanted formula payloads
This patch modifies all uses of Text::CSV and derived classes to pass
the "formula" parameter with value of "empty" which replaces formulas
by empty string.
Test Plan:
1) Apply this patch
2) For guided_reports.pl, attempt to export CSV where you've set a column to a formula somehow
( such as "=1+3" )
3) Export that CSV file
4) Note the formula has not been exported
5) Repeat this plan for the remaining scripts that export CSV files
where users can define the outputted data
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Fixed two conflicts. I have tested that this works as advertised on:
- Reports (Download > Comma separated text (.csv)) [Text::CSV::Encoded]
- Circulation > Overdues > Download file of all overdues [Text::CSV_XS]
- misc/export_borrowers.pl [Text::CSV]
This covers all modules used, and both GUI and command line.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Change none to empty in the commit message ! None is the default,
doing nothing. Empty clears the formulas. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 38418: Make SIP/Transaction.t run on all dateformat values
To test:
1. Change the `dateformat` syspref to any value other than `us`(shows as mm/dd/yyyy)
2. Run:
$ ktd --shell
k$ prove t/db_dependent/SIP/Transaction.t
=> FAIL: Tests fail because of the resulting string containing an unexpected date format.
3. Repeat 1-2 with other formats
=> FAIL: SAme
4. Choose `us`
5. Repeat 2
=> SUCCESS: It passes
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
Phil Ringnalda [Fri, 1 Nov 2024 18:22:59 +0000 (11:22 -0700)]
Bug 38328: Cannot delete ILL batch statuses
You are permitted to delete ILL batch statuses that you (rather than the
system) add, but the UI didn't get the CSRF memo about delete ops needing to
be POSTs with op="cud-delete", so it still uses a GET of ?op="delete" and
fails.
Test plan:
1. Set the preference ILLModule to 'Enable'
2. Administration - Interlibrary loan batch statuses - New batch status
3. Give it a name, an uppercase code, and Save
4. Click the Delete button to the right of your new status
5. The page is blank, and if you navigate back to Interlibrary loan batch
statuses, you'll see that yours was not deleted
6. Apply patch, reload page
7. Click the Delete button to the right of your new status, verify it is
deleted
Sponsored-by: Chetco Community Public Library Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Fri, 1 Nov 2024 12:54:09 +0000 (12:54 +0000)]
Bug 38322: Adjust tests
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>