erm.tt built the logged_in_user_lists JS array by manually
interpolating each shelf's id/name into a JS string literal, escaped
with the TT html filter:
id: "[% shelf.shelfnumber | html %]",
name: "[% shelf.shelfname | html %]",
The html filter escapes <, >, &, and " -- enough to stop the
<script>-tag and </script>-breakout scenario from the original bug --
but it does not escape backslashes. A list name ending in a backslash
(e.g. "foo\") escapes the closing quote of the JS string literal,
unbalancing it and throwing a JS syntax error that breaks the whole
inline <script> block on every ERM page (including the unrelated
`const logged_in_user = ...` a few lines below), reproducing the
"broken UI" half of the original bug via a different character.
Build the id/name pairs as an actual array of hashes and JSON-encode
them with To.json(), after escaping each value with the html
vmethod. JSON encoding (via the JSON module) correctly escapes
backslashes and quotes for use inside a JS string, while keeping the
values HTML-escaped so they stay inert if ever written into the DOM
via innerHTML (as the DataTables render callback in
EHoldingsLocalTitlesFormImport.vue does).
Test plan:
1. Enable the ERMModule system preference.
2. Create a list named: backslash test \
3. Go to /cgi-bin/koha/erm/eholdings/local/titles/import (or any
other ERM page).
=> Without this patch: the page's inline script throws a syntax
error ("Invalid or unexpected token") and
"logged_in_user_lists is not defined", breaking the Vue
component.
=> With this patch: the page loads without errors and the list is
shown correctly in the table.
4. Also verify the original bug's script-tag scenario still works:
create a list named <script>alert("booh!");</script> and confirm
it displays as inert text, not executing, on the same pages.
(cherry picked from commit afa208e950efae6c3a6e27c74af6d9184602b737)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
const logged_in_user_lists = [% To.json(logged_in_user.virtualshelves.unblessed) | $raw %];
If you have a script tag in a list name the UI will be broken, and there
is potentially a XSS vulnerability
Test plan:
Create a new list with name="<script>alert("booh!");</script>"
Go to /cgi-bin/koha/erm/eholdings/local/titles/import
or any ERM views
=> Without this patch the UI is broken
=> With this patch applied it's not and the table is correctly populated
with the lists
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 614ca3d992f4674afc8c1cae90e6d055c7008b0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan
1. Search for a patron and open the patron details page.
2. Under "Patron restrictions", add a manual restriction with the following comment:
<img src=x onerror="alert(document.domain)">
3. Save the restriction.
4. Navigate to the patron checkouts page:
/cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
Verify that the JavaScript payload executes.
5. Edit the patron record:
/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=xxx
Verify that the JavaScript payload executes.
6. For OPAC - Go to OPAC Verify that the JavaScript payload executes - /cgi-bin/koha/opac-user.pl
7. Apply the patch.
8. Repeat steps 4, 5 and 6.
9. Verify that:
1. No JavaScript is executed.
2. The page loads normally without any alert dialog. Applicable for both the staff and opac.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 2993acb641d2d9fcfeee47918ab70cf29951c720)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The "Most-circulated items" report built its SQL by concatenating the
Criteria and Filter request parameters directly into the query, with no
bind placeholders and no whitelist on the Criteria identifier. An
authenticated staff user with the reports permission could inject
arbitrary SQL and read any data reachable by the Koha database user.
This validates the Criteria parameter against a fixed allow-list of the
report's own column options (matching reports/cat_issues_top.tt) so it
is safe to use as a SQL identifier, and binds every Filter value with a
placeholder in both the column-header query and the main calculation
query. The Limit parameter is validated as a plain integer.
This mirrors the fix already applied to the sibling
reports/bor_issues_top.pl (bug 42369).
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to Reports > Most-circulated items (reports/cat_issues_top.pl)
3. Run the report with various Criteria and Filter values, confirm the
output is correct and no errors appear
4. Before the patch, a Filter value or the Criteria containing SQL (a
single quote followed by a subquery) broke out of the query. After
the patch, confirm such input is treated as a literal value: you get
normal output or an empty result, with no SQL error, no delay, and no
data leak
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
(cherry picked from commit b6cdb398237ddfc3d3da97a0246c5a3a69fdaf9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Filters are broken for many reasons. Previous patch contains some
(little) tidying.
There are 3 parts in this patch:
1 - The column name is incorrectly named in the dropdown for "branch",
it is added in this patch
2 - There is a definition for 'Day' and 'Month', but not for 'Week', it
is also added in this patch
3 - Dbh variables are passed in the string definition AND in the call. I
removed them from the string definition since it violates the coding
guidelines.
Test plan:
1. On an fresh ktd db, run the script provided here (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8127#c3) to fill the database with checkins/checkouts:
Visit http://your_koha:8081/cgi-bin/koha/reports/cat_issues_top.pl
2. Run a baseline test with following params:
Checkout date from 01/01/2020
Checkout date to: tomorrow
Library: Any library
Fill nothing else
Notice it is works
3. Test with some limits (Library, Week, and any other), notice you encounter errors on Library and Week, and that any other is empty, without error.
4. Apply patch
5. Rerun 2-3 and notice you now have results. Check with each possible limit, limiting to 5. Test once with 10 as a limit.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2b78fd1de0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
It reads position 12-18 and "six positions". Since the length is
18, the final position is 17.
Test plan:
Test 006 plugin in basic editor.
Switch type of material to CF (computer files).
Check length of 006 in editor when saving the 006 form.
Note: this patch is cherry-picked from Bug 40284
Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: Lawrence O'Regan-Lloyd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit a34e362d6d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Add the 26.11 release team as voted at the development meeting.
Pedro Amorim as Release Manager, with Tomás Cohen Arazi and Martin
Renvoize as RM Assistants. Lisette Scheer as QA Manager with a
19-person QA team. David Cook as Security Release Manager.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The angle-bracket delimiter notation in the POD prose (e.g.
PATTERN<DELIM>) caused the POD parser to treat the trailing letter of
each word as an unknown formatting code (N<>, T<>). Replace with
C<s/PATTERN/REPLACEMENT/FLAGS> and a parenthetical note that any
non-space delimiter is accepted.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
- t/C4/ClassSplitRoutine/RegEx.t (new): exercises _apply_substitution via
the public split_callnumber interface — basic substitution, alternate
delimiters, \n/$n backrefs, /gi combined flag, /e rejection, and malformed
or uncompilable rules (including the new logger warn path).
- t/Koha/Regex/Replacement.t: extend the subst() helper to handle the ig/gi
combined modifier and add a subtest that confirms case-insensitive global
replacement and backref case preservation.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
When eval { qr/$pattern/ } fails (e.g. the admin-configured s/// contains
an invalid regex), _apply_substitution previously returned silently with no
indication of why the rule was skipped. Add a Koha::Logger warn so the
failure appears in the log and is diagnosable without a debugger.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Note: While the methodology in Koha::Regex::Replacement may seem
bespoke, it's similar to how Python's re.sub(pattern, repl, string)
regex substitution works.
Unit tests:
prove -v t/Koha/Regex/Replacement.t \
t/SimpleMARC.t \
t/db_dependent/MarcModificationTemplates.t \
t/Labels_split_Regex.t
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
C4::ClassSplitRoutine::RegEx::split_callnumber ran the admin-configured rule
through eval "\$cn_item =~ $regex", executing arbitrary Perl. Parse the
rule as s<DELIM>PATTERN<DELIM>REPLACEMENT<DELIM>FLAGS, reject the /e flag,
compile the pattern with qr// and expand the replacement as data via
Koha::Regex::Replacement::expand_template, so the rule is applied without
eval.
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Koha::SimpleMARC::_modify_values and Koha::Items::apply_regex wrapped the
user replacement in a string and ran it through s///ee, so an interpolation
block such as \@{[ system(...) ]} executed arbitrary Perl. Expand the
replacement as data via Koha::Regex::Replacement::expand_template under a
single /e instead, which keeps capture-group replacements working but never
runs the input as code.
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Add a small single-pass helper, Koha::Regex::Replacement::expand_template,
that expands a user-supplied regex replacement string as data: numbered
backreferences ($1..$n, ${n}, the legacy \1..\9 form), named captures
($+{name}, ${name}) and the \n \r \t escapes. Every other character is
copied through literally, so \@{...}/${...} interpolation blocks end up as
text rather than being run. This is used to replace the s///ee double-eval.
The routine is fully qualified at the call sites rather than exported, and
case folding is left out to keep it small.
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The original fix only whitelisted agefield, condition_field, and
substitution_field at the point they're saved in
tools/automatic_item_modification_by_age.pl, leaving the actual
consumer of the stored syspref, C4::Items::ToggleNewStatus, trusting
agefield and substitution field unchecked. agefield is spliced
directly into raw SQL (TO_DAYS($agefield)) and so can't be
parameterized like an ordinary value; substitution field reaches a
dynamic method call ($item->$field($value)). Any future or
alternate writer of the automatic_item_modification_by_age_configuration
syspref would have reopened both holes without touching the form at
all.
This adds the same allow-list validation directly in ToggleNewStatus
(falling back to the safe default agefield, or skipping the
substitution/condition, exactly as before for missing values), shares
the age-field allow-list between the two files via a new
GetAutomaticItemModificationAgeFields() in C4::Items so it can't drift
between them, and logs rejected values via Koha::Logger instead of
silently discarding them so tampering leaves an audit trail.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Amended-by: Jonathan Druart:
Replace , with ;
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 3b53d6711d)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
(cherry picked from commit 5cf846f9f8)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The original fix only whitelisted image_name at the point it's saved
in edit-layout.pl, leaving the actual injection sink in create-pdf.pl
unparameterized. This adds defense-in-depth by fixing the query itself,
avoids a redundant duplicate call to get_all_image_names() (already
fetched earlier in the script as $image_names), and logs rejected
image_name values instead of silently discarding them so tampering
attempts leave an audit trail.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 5b825da072)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit dc4403aae0)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit c5968932fc)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Ensure no regressions are introduced, run:
prove t/db_dependent/Koha/AdditionalContents.t
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>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit cb22264499)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1. Create two patron accounts:
* One patron whose home library matches the library assigned to the page.
* One patron whose home library is different from the library assigned to the page.
2. Create a new page with the following settings:
* Display location = OPAC
* Library = a specific library
* Publication date = Today
* Title and Content = minimally necessary content
3. Save the page.
4. Right-click the OPAC link and copy the link address.
5. Open the link in an incognito or private browser window without signing in.
* Confirm that the library-specific page is not displayed.
* Confirm that a 404 page is shown.
6. In the incognito window, sign in using the patron account whose home library matches the page library.
7. Open the copied OPAC link again.
* Confirm that the page is displayed.
8. Sign out and sign in using the patron account whose home library does not match the page library.
9. Open the copied OPAC link again.
* Confirm that the page is not displayed.
* Confirm that a 404 page is shown.
10. Edit the page and change Library to All libraries.
11. Open the OPAC link in an incognito or private browser window without signing in.
* Confirm that the page is displayed.
12. While signed in as each patron account, open the OPAC link again.
* Confirm that the page is displayed for patrons from both libraries.
13. Create or edit a page with the following settings:
* Display location = Staff interface
* Library = a specific library
* Publication date = Today
* Title and Content = minimally necessary content
14. Sign in to the staff interface using a staff account whose library matches the page library.
15. Open the page from the staff interface.
* Confirm that the page is displayed.
16. Sign out and sign in using a staff account whose library does not match the page library.
17. Open the staff page link directly.
* Confirm that the page is not displayed.
* Confirm that a 404 page is shown.
18. Edit the staff page and change Library to All libraries.
19. Open the page while signed in with staff accounts from both libraries.
* Confirm that the page is displayed for both accounts.
20. Repeat the OPAC and staff interface checks using Display location = Staff interface and OPAC.
* Confirm that the page is displayed in both interfaces for users from the matching library.
* Confirm that users from a different library receive a 404 page.
* Confirm that pages assigned to All libraries are available in both interfaces.
Signed-off-by: David Cook <dcook@prosentient.com.au>
(cherry picked from commit 2dff8abf7f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This change fixes the branch comparison between the Page
and the user. Previously, it was doing a numeric "!=" and now it
does the string comparison "ne". Also, if no environmental variable
is set for the default branch, it defaults to an empty string
for anonymous (ie non-authenticated) users.
Test plan:
0. Apply the patch
1. restart_all
2. Log into the staff interface
3. Go to Tools
4. Click on "Pages"
5. Create a Page for All Libraries for the OPAC
6. Copy the "OPAC" link in the "Page URL" table cell and open it
in a private window or a separate browser
7. Note that the page appears
8. Now change the "Page" to a specific library
9. Revisit the URL in the private window
10. Note that it now gives a 404 error
11. Log into the OPAC with a user whose library matches the libary
of the Page
12. Note that now you can view the URL again
13. Change the library of the user or the Page
14. Note that you cannot see the Page now
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16df1a33b2)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1 - Attempt to save a report containing "select force_password_reset_when_set_by_staff from categories"
2 - observe koha prevents this save
3 - apply patch, restart services
4 - repeat step 1
5 - observe your report now saves and runs successfully
While adding this new field to the list of allowed fields, I changed "whitelist" to "allowlist" as suggested by the terminology guide: https://wiki.koha-community.org/wiki/Terminology
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 fdc57489a1)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit be019f4f92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
- Guard against undefined itemtype before calling ->bookable on it
- Return 0 (not bookable) when no itemtype is found and item-level
bookable is not defined
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 99410bc27c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 327cb59546)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
- Add test case for the scenario where an item has no itemtype
because both items.itype and biblioitems.itemtype are NULL
- Note: We must set biblioitems.itemtype to NULL before creating the
item because Koha::Item->store() automatically populates itype from
biblioitems.itemtype when itype is not set
Test plan:
- Apply this patch only
- Run: prove t/db_dependent/Koha/Item.t :: effective_bookable
- Verify test 6 FAILS with "Can't call method 'bookable' on an
undefined value"
- Apply the follow-up patch
- Run the test again
- Verify all tests PASS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 26ffc16c38)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 00457f7e73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When either the <listen id=biblioserver> entry or the
<server id=biblioserver listenref=biblioserver> section
is not present in koha-conf.xml, the Staff interface > About page
triggers a 500 Internal Server Error.
Test plan:
1. Edit koha-conf.xml and Comment out:
<!--<listen id="biblioserver">unix:/path/to/zebradb/bibliosocket</listen>-->
2. Restart Apache: sudo systemctl restart apache2 (or restart_all)
3. Go to Intranet > About
==> Internal Server Error (500)
4. Now restore the <listen> line and instead comment out the entire
<server id=biblioserver listenref=biblioserver>...</server> block.
(Note that the commenting around <!-- The stuff below is used to enable SRU...
interferes with adding a closing comment after </server> -
close the comment before that section and add a comment around </server>.)
5. Repeat step 2, 3
==> Internal Server Error (500)
6. Apply the patch
7. Repeat step 2, 3
==> There is no Error (500)
Note: Zebra status: Error message from Zebra: 10004
8. Uncomment <server id=biblioserver listenref=biblioserver> </server>
and Repeat Step 1
9. Repeat step 2, 3
==> There is no Error (500)
Note: Zebra status: Zebra server seems not to be available. Is it started?
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03fc6994a5)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 1b837562b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When creating a new Koha instance using the two-step workflow
(`koha-create --request-db <instance>`, followed by
`koha-create --populate-db <instance>`), some log files under
/var/log/koha/<instance>/ end up with incorrect ownership.
Specifically, intranet-error.log and opac-error.log are owned
by root:root instead of <instance>-koha:<instance>-koha.
This patch fixes that.
Test plan (tailored for KTD):
1) Before applying this patch, run the following commands
inside your KTD Koha container:
$ sudo koha-create --request-db test1
$ SQLPASS=`sudo grep password: test1-db-request.txt | cut -c 16-`
$ mysql -hdb -uroot -ppassword -e "CREATE DATABASE koha_test1;"
$ mysql -hdb -uroot -ppassword -e "GRANT ALL PRIVILEGES ON koha_test1.* TO 'koha_test1'@'%' IDENTIFIED BY '${SQLPASS}';"
$ mysql -hdb -uroot -ppassword -e "FLUSH PRIVILEGES;"
$ sudo koha-create --populate-db test1
$ ls -l /var/log/koha/test1/
total 8
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:35 indexer-error.log
-rw-r--r-- 1 test1-koha test1-koha 1278 Feb 9 15:35 indexer-output.log
-rw-r--r-- 1 root root 0 Feb 9 15:35 intranet-error.log
-rw-r--r-- 1 root root 0 Feb 9 15:35 opac-error.log
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:35 worker-error.log
-rw-r--r-- 1 test1-koha test1-koha 1828 Feb 9 15:35 worker-output.log
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:35 zebra-error.log
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:35 zebra-output.log
Notice the incorrect user/group ownership on two
files: `intranet-error.log` and `opac-error.log`.
2) Apply this patch, remove the `test1` instance along
with the database request text file, and copy the
modified script to its system-wide location:
$ sudo koha-remove test1
$ sudo rm test1-db-request.txt
$ sudo cp debian/scripts/koha-create /usr/sbin/koha-create
3) Repeat the commands in Step 1. This time, the output of
the last command should resemble the following:
total 8
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:42 indexer-error.log
-rw-r--r-- 1 test1-koha test1-koha 1520 Feb 9 15:42 indexer-output.log
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:42 intranet-error.log
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:42 opac-error.log
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:42 worker-error.log
-rw-r--r-- 1 test1-koha test1-koha 1828 Feb 9 15:42 worker-output.log
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:42 zebra-error.log
-rw-r--r-- 1 test1-koha test1-koha 0 Feb 9 15:42 zebra-output.log
All files should now have the correct user/group ownership.
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ee861e256)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit a45a642f35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If no orders exist yet, there is a JS error in the console:
Uncaught TypeError: can't access property "DataTable", table is
undefined
Test plan:
0. Do no apply this patch
1. Create a new subscription and go to the detail view
2. Open the console and notice the JS error
3. Apply this patch
4. Confirm that the JS error is gone
5. Create an order from this subscription
6. Confirm that the orders table is displayed
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da121583a4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit da718a2a57)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If PatronSelfRegistration we should ignore (i.e. do nothing) if
--del-exp-selfreg is passed to cleanup_database.pl
It prevents the script to warn that the pref is not set.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit d331c7aba8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 768f2a4882)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates cpanfile to reflect the real minimum version
needed for MARC::File::XML. This is particularly important
due to vulnerabilities in version 1.0.1
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: mason james <mtj@kohaaloha.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 00655de4d0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 8943833fb1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The "Cite" option in the OPAC is missing the subtitle (245) in MARC21.
To recreate:
1. Add a record or find a record with a subtitle (in KTD, biblionumber 58 has a 245 http://localhost:8081/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=58
2. In the OPAC, go to the record
http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=58
3. Click "Cite"
--> The subtitle is not in any of the citations
4. Apply the patch
5. Repeat step 2 and 3
--> The subtitle is now shown
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 412e4e4d95)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit ea6fd886a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1- have a MARC record with Type of Material "BKS - Books" that does not have an 006 defined (biblio 1 in the KTD default data will work)
2- edit the biblio in the basic editor
3- open the tag editor for the 006
4- observe that the values along the top of the tag editor window show a value of "" (blank) in position 17
5- click Save in the tag editor window
6- confirm that the values in the 006 tag end with a space
7- open the 006 tag editor again
8- observe that the values along the top of the tag editor window no longer show any value for position 17. Instead, they end with the zero in position 16
9- click Save in the tag editor window
10- confirm that the values in the 006 tag now end with a zero, not followed by a space
11- save your biblio
12- edit the biblio in the basic editor again, get warning "The following fixed-length control field(s) have an invalid length: 006. Please fix."
13- APPLY PATCH and restart_all
14. Try editing the 006 value again, the whitespace should be preserved and you get no error.
Signed-off-by: Justin Swink <Justin.Swink@littleelm.gov>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1a0501f5e8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit f26f323aee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Make some fields for OPAC self registration required.
2. Create a new patron via self reg.
3. Fill out those required fields as an empty string like " ".
4. Submit the form, it succeeds.
5. APPLY PATCH, restart_all
6. Try again. Required fields with only whitespace are treated as if they were empty.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 12426b5924)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 01df1563bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
- Go to Circulation > Bookings to collect
- Click Help
- Verify it links to the correct manual section
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f53159bfa4)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit d6f529c38c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The indexation step has been removed by
commit d2820f57d6
Bug 34788: (QA follow-up)
Koha/ERM/EHoldings/Title.pm
- C4::Biblio::ModBiblio( $record, $self->biblio_id, '' );
+ C4::Biblio::ModBiblio( $record, $self->biblio_id, '', { skip_record_index => 1 } );
From the commit message:
2) The background job now uses skip_record_index to avoid queuing indexing jobs for every new biblio and instead queues one job at the end
it's then missing when we add or edit a local title.
Test plan:
1 - Enable ERMModule
2 - Go to ERM
3 - eHoldings->Titles
4 - New title
5 - Populate the form
6 - Check the create bibliographic record box
7 - Save
=> Confirm that the biblio is now indexed
8. Edit the title, modify a value, tick the box, save
=> Confirm that the biblio is now indexed with the new value
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 5dcec8b803)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 1dac2edcf6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Testing plan:
- Set EmailPurchaseSuggestions to BranchEmailAddress
- Go to create suggestion on the staff side /suggestion/suggestion.pl?op=add_form
- Create a suggestion with Library: Any
- 500 error: inbound_email_address is not a method of undef
- Apply patch & repeat
- Suggestion created
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 33a8dc5d6f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit f699bb4c50)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Add the 26.11 release team as voted at the development meeting.
Pedro Amorim as Release Manager, with Tomás Cohen Arazi and Martin
Renvoize as RM Assistants. Lisette Scheer as QA Manager with a
19-person QA team. David Cook as Security Release Manager.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f0bb03d6e9)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit bbff807136)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Update the 25.11 QA team to reflect the definitive list from the
dashboard. Remove Aleisha Amohia and Julian Maurice who did not
appear in the final count, and add John Vinke, Matt Blenkinsop,
Alex Carver and Victor Grousset who did. Reorder by descending
QA count.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5d12a83751)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This change fixes an SQL injection in the circulation stats.
Test plan:
0. Apply the patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/issues_stats.pl
3. Try out a bunch of options
4. Try to break it
5. Note that you just get output and no errors
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit da14a2f672330d445b442cd057bd72688bfb0c37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change fixes SQL injection in bor issues top
Test plan:
0. Apply patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/bor_issues_top.pl
3. Try out all the different options
4. Try to break it
5. Note that you get output and no errors
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0d1efd812b9d1d6ac8fe71b7115f5368b8ba271f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change fixes SQL injection in issues avg stats
Test plan:
0. Apply the patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/issues_avg_stats.pl
3. Try out all the different options
4. Try to break the report
5. Note that you always get output instead of errors
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit f0d3bf850b8ff85c9393126763b1477d1cdc5c09)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change cixes an SQL injection in cat stats
Test plan:
0. Apply patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/catalogue_stats.pl
3. Try out different values
4. Try to break the report
5. Note that you just get output and not errors
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
(cherry picked from commit a9f741b79d231d81e7cdaef2201b8c00c9efe349)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change fixes an SQL injection in the acq stats.
Test plan:
0. Apply the patch
1. sudo koha-plack --restart kohadev
2. Go to /cgi-bin/koha/reports/acquisitions_stats.pl
3. Try out a bunch of options
4. Try to break it
5. Note that you just get output and no errors
NOTE: In a fresh KTD you likely don't have any actual statistics
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch fixes the BZ 33363 database update, so that it
selects uses with the "suggestions" permission rather than the "catalogue"
permission.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 0442f4ce2c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 4c8e0f0a6d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change removes an SQL injection vulnerability from catalogue_out.pl
Test plan:
0. Apply the patch
1. Go to koha-conf.xml and change the following:
<strict_sql_modes>1</strict_sql_modes>
to:
<strict_sql_modes>0</strict_sql_modes>
2. sudo koha-plack --restart kohadev
3. Go to /cgi-bin/koha/reports/catalogue_out.pl
4. Try out the various options and note no errors occur
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This bug refactors the preview sql buttons to pass the permissions granted for each report to
the javascript that clones and updates the modal.
That allows us to check for the appropriate permissions when preparing the buttons for the modal
and to remove any that are not allowed.
This allows for different permissions per report for future devs
(see bugs 42406, 16631)
To test:
1. Create some reports
2. Create a user with only execute_reports permissions
3. Login as that user and go to Reports > use saved
4. In the actions column click the ^ and select 'Preview sql'
5. Notice delete button renders and works to delete
6. Apply patch and restart_all
7. Repeat step 4, now only the Run report button renders and works
8. Add permissions for create_reports
9. Repeat step for, now Edit, Duplicate, Schedule and run buttons render and work
10. Add permissions for delete_reports
11. Repeat step 4, confirm the delete button renders and works
12. Confirm the preview sql button works to preview different reports
We also fix some error in the script, several wrong things there:
* delete was not replaced with cud-delete
* missing op for the creation of new reports
* update and run requires two permssions
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Scott Barter <sbarter@aacpl.net>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Bug 40524 fixed XSS issue in koha-tmpl/intranet-tmpl/prog/js/datatables.js
But in 24.11 and lower, DataTable are also build with koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc
So same fix needs to applied.
Also in 24.11.x and lower the columns use "noExport" instead of "no-export"
Test plan:
Use the one from Bug 40524
Signed-off-by: David Cook <dcook@prosentient.com.au>
When a staff member writes off an accruing fine and the item is
subsequently checked in (backdated or in fine-free mode), the fine
amount is recalculated downward via adjust(). The previous code
unconditionally created an OVERPAYMENT credit whenever the adjusted
outstanding went negative, regardless of whether the existing credits
were reversible payments or non-reversible writeoffs/discounts.
This caused patrons to receive an erroneous credit equal to the
written-off amount, since writeoffs should simply be absorbed when
the underlying fine shrinks - no refund is due.
The fix calculates the total non-reversible credits (writeoffs,
discounts, cancellations) applied to the debit using the existing
filter_by_non_reversible method, and only generates an OVERPAYMENT
credit for the portion attributable to reversible cash payments that
exceed the recalculated fine amount.
Test plan:
1. Write off an accruing fine in full
2. Check the item in (backdated or fine-free)
3. Confirm no overpayment credit is generated for the patron
Signed-off-by: Benjamin Daeuber <BDaeuber@fargolibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 44483cab32)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The buttons in the plugins home page ("Upload plugin" and "View plugins by class") become misaligned when you have the git repository search bar.
To test:
1. Add a github/gitlab repository in koha-conf.xml
- In ktd shell, open /etc/koha/sites/kohadev/koha-conf.xml
- Somewhere under <config> insert the following (or your own)
<plugin_repos>
<repo>
<name>Solutions inLibro</name>
<org_name>inLibro</org_name>
<service>github</service>
</repo>
</plugin_repos>
- Save the file
- restart_all
2. Go to Administration > Manage plugins
--> Buttons are misaligned
3. Apply the patch
4. Run command « yarn build »
5. Repeat step 2
--> buttons are aligned nicely
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit d2d49dfdc6)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1. Find or create a record in Kkoha.
2. From the record detail page click "Edit" and "Manage items"
3. Begin adding a new item
4. For any of the dropdowns that contain an authorized value ( LOST, DAMAGED, WITHDRAWN, CCODE, LOC ) click on the dropdown and begin typing an AV that doesn't exist.
5. You should see the text (select to create) appear, click it.
6. Now a modal appears "Create a new authorized value"
7. Fill out the required parts and click 'Save'.
8. Kaboom, 500 error:
9. APPLY PATCH, clear browser cache.
10. Try again, this time it should work.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 4ba95d70e8)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
It would be at least helpful to add a reference to get_transfer here,
since we are replacing it here.
Used the opportunity to update the older comments
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit eaa354e277)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch removes a fetch of the item object followed but get_transfer to simply search the
transfers by itemnumber and status
To test:
1 - Add many items to your records
https://github.com/kidclamp/handy-koha-script/blob/main/randitems.pl
NOTE: this script makes a lot of items withdrawn or damaged, undo that for more dramatic difference
UPDATE items SET withdrawn=0,damaged=0
perl misc/search_tools/rebuild_elasticsearch -v
2 - Set Koha system preferences to display more results and check more items:
maxItemsInSearchResults 60
numSearchResults 50
3 - Do a search, several times, note the time it takes
4 - Apply patch, restart all
5 - Repeat search several times, note the time it takes
6 - Confirm it is better after the patch
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 5d62b4f614)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The "Copy shareable link" button on the item search table creates a link
based on the current URL, but an item search does not update the current URL
with the search parameters.
This patch copies the code to generate the URL with search parameters and
uses it to update the current URL.
Test plan:
1. Click "Item search".
2. Perform an item search (e.g. Home library is Centerville).
3. Click the "Copy shareable link" button on the right side of the screen
above the table.
4. Paste and visit the link.
5. Observe that you only see the search page without any results.
6. Apply patch.
7. Repeat steps 1-4.
8. Observe that you see the results with the table settings.
9. Sign off.
Sponsored-by: Lund University Library
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit bfd33ed339)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This change makes the "Scheduled for automatic renewal" text appear
in the staff interface and OPAC only if both the issue has auto_renew
and the borrower has autorenew_checkouts set. These are the criteria that
automatic_renewals.pl uses for processing automatic renewals.
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Checkout an item as an automatic renewal
(ie either set it as Automatic renewal using the checkout option or have
the circ and fines rules set to use Automatic renewals)
3. View the checkout in both the staff interface and the OPAC
4. Note that they both show "Scheduled for automatic renewal" or
"This item is scheduled for auto renewal" for the OPAC
5. In the patron record change "Allow auto-renewal of items" from
"Yes" to "No"
6. Note that the text talking about the item being scheduled
for automatic renewal no longer displays
Bonus points:
1. Run 'perl ./misc/cronjobs/automatic_renewals.pl -v'
2. Note that the automatic renewal doesn't show when "Allow auto-renewal
of items" is set to "No" but it does show when it's set to "Yes"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 99e9bcf25e)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan:
1. In system preferences, set PatronQuickAddFields to include userid
(Username).
2. Go to Patrons and choose Quick add new patron.
3. Fill at least Surname, Card number, and Username
(use a value clearly different from a surname-based username).
4. Save the patron.
5. Observe on the patron details page that Username is auto-generated
(not the value entered in quick add).
6. Apply this patch.
7. Repeat steps 2-4 with a new patron.
8. Verify on the patron details page that Username now matches the
value entered in quick add.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 8903df398a)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The warnings:
[WARN] Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)
at /kohadevbox/koha/reports/issues_stats.pl line 224.
appears in the plack-intranet-error.log.
It happens because a numerical comparison was used to compare the dates
instead of a string comparison.
To test:
========
1. Observe plack-intranet-error.log.
2. In staff interface go to Reports > Statistics wizards > Circulation.
3. Select date "From" and date "To" then submit.
4. Two warnings appear in plack-intranet-error.log.
5. Apply the patch; restart_all.
6. Repeat 2-3. No warnings appear in log.
Sponsored-by: Ignatianum University in Cracow
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 330d148704)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This bug adds Koha::Patron::Message::message_without_newlines, which has been added to C4::SIP::ILS::Patron in lieu of Koha::Patron::Message::message. The aim of this change is to prevent SIP2 units from crashing out when they encounter a patron message with newlines (\n or \r) in it, as units generally use a newline character to denote the end of a SIP2 transaction.
To test:
a) go to /cgi-bin/koha/sip2/institutions
*) create an institution, name CPL, timeout 300, the rest default
b) go to /cgi-bin/koha/sip2/accounts
*) create an account, userid koha, institution CPL, terminator crlf, the rest default
c) go to /cgi-bin/koha/members/moremember.pl?borrowernumber=51
*) click add message in toolbar
*) enter some multi-line message e.g. test[RETURN]1[RETURN]2[RETURN]3[RETURN][RETURN][RETURN]
d) run tail -f /var/log/koha/kohadev/sip-output.log, keep this window open
e) run ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l CPL --patron 42 -m patron_information
f) look at the tail log, notice how the MSG 64 line has a newline before the final pipe (|) character
== APPLY PATCH ==
g) restart_all
h) repeat steps e-f
i) notice how in the tail log, the MSG 64 line now has the final pipe character contiguously placed with the successive characters
== SIGN OFF ==
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit a16316a5c3)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
If a message ends in a non-alphanumeric character, that character is stripped from the message.
For example:
6300120260210 182641 AOMPL|AA23529000035676(|
64 00120260210 182831000000000000000000000000AOCPL|AA23529000035676|AEHenry Acevedo|BLY|BHUSD|BV0|CC5|BD4345 Library Rd. Springfield, MA 44224|BF(212) 555-1212|PB19580530|PCS|PIY|AFGreetings from Koha. |
versus:
6300120260210 182641 AOMPL|AA23529000035676(|ACkoha|
64YYYY 00120260210 182835000000000000000000000000AOCPL|AA23529000035676(|AE|BLN|AFInvalid cardnumber|
The former should be returning the same "Invalid cardnumber" message the latter does.
Test Plan ( assumes you are using KTD ):
1) Install telnet: sudo apt install -y telnet
2) telnet 127.0.0.1 6001
3) Log in with: 9300CNkoha|COkoha|CPMPL|
4) Send the patron information request: 6300120260210 183346 AOMPL|AA23529000035676(|
5) Note you get a patron back
6) Apply this patch
7) Restart SIP!
8) Repeat steps 2-5
9) Noe you doe not get a patron back in the response!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 4a03a9dce2)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
- Biblio::check_booking counts current checkouts toward the
unavailable pool to detect booking clashes
- It counts checkouts on ALL items for the biblio, including
non-bookable ones (e.g. items with an excluded item type)
- When only a subset of items are bookable, checkouts on
non-bookable siblings incorrectly reduce the available pool,
producing false clashes
- Restrict the checkout query to only count items whose
itemnumber is in the bookable items set
To test:
1. Have a biblio with at least two items, where one item is
bookable and the other is not (bookable = 0).
2. Check out the non-bookable item to a patron.
3. Attempt to create a booking for the bookable item.
4. Without the patch: a clash is detected even though the
bookable item is available.
5. Apply the patch.
6. Repeat steps 2-3.
7. Verify the booking succeeds without a false clash.
8. Run: prove t/db_dependent/Koha/Biblio.t
and confirm the new subtest
"checkouts on non-bookable items do not cause false clashes"
passes.
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit e4be46c2c5)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The warning
[WARN] Use of uninitialized value in string eq at
/kohadevbox/koha/circ/del_message.pl line 54.
appears in plack-intranet-error.log
Test plan:
==========
1. Observe plack-intranet-error.log
2. Search for any patron and go to "Check out" tab.
3. Add message for patron. Added message is shown in "Message" area
with "Edit" and "Delete" links.
4. Click "Delete" and confirm modal.
5. Warning appears in plack-intranet-error.log
6. Apply the patch; restart_all
7. Repeat 3-4. No warning appears.
Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 42908f8c68)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch renames BibTex to BibTeX (with a capital X) for the staff interface
cart and list download options, to match the OPAC.
Test plan:
1. Log in to the staff interface and search for a term that returns
results.
2. Add some records from the results to the cart (select records >
Add to cart).
3. Add some records from the results to a new public list (select
records > Add to list > New list > name the list > make it a
public list > Save).
4. Note the download options for the cart and the spelling: Cart >
Download > BibTexi (with a lowercase X).
5. Note the download options for lists and the spelling: Lists >
Public lists > select the list > Download list > BibTex (with a
lowercase X).
6. Go to the OPAC and search for a term that returns results.
7. Add some records from the results to the cart (select records >
Add to cart).
8. Note the download options for the cart and the spelling (with a
capital X): Cart > Download > BibTeX.
9. Note the download options for lists and the spelling (with a
capital X): Lists > Public lists > the name of your list >
Download > BibTeX.
10. Apply the patch.
11. Recheck the download options in steps 4 and 5.
12. The option should now show as BibTeX (with a capital X).
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 07e1f36a63)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This change fixes a typo from pa_loo to pa_class, so that
the ID attribute of the fieldset is properly set when using PA_CLASS
to group patron attributes.
Test plan:
0. Set up two PA_CLASS values
1. Set up two patron attributes which are viewable/editable on the
OPAC and assign them one class each
2. Go to http://localhost:8080/cgi-bin/koha/opac-memberentry.pl
3. Look at the HTML and note that fieldsets for both PA classes
have the ID of "aai_"
4. Apply the patch
5. Reload the page http://localhost:8080/cgi-bin/koha/opac-memberentry.pl
6. Note that now the fieldsets have ID attributes of
"aai_<PA_CLASS code>".
7. Rejoice as now it's easier to use Javascript and CSS and have valid
HTML!
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 28a54105ab)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch fixes a bug where, context-dependent, LinkWrapper can keep
referencing back to links that should be out of scope.
This was causing odd behaviour whilst writing Bug 14962 - namely, links
returning as the same value in a table of multiple rows due to
LinkWrapper treating linkData.href as one and the same for each row.
TO TEST:
== APPLY PATCH ==
a) enable ERMModule syspref, go to /cgi-bin/koha/erm/erm.pl
b) notice all links and buttons still work as expected
c) go to /cgi-bin/koha/sip2/sip2.pl
d) notice all links and buttons still work as expected
e) go to /cgi-bin/koha/acquisition/vendors
f) notice all links and buttons still work as expected
g) enable PreservationModule syspref, go to
/cgi-bin/koha/preservation/home.pl
h) notice all links and buttons still work as expected
== SIGN OFF ==
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 12fdf33139)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch adds the "Middle name" to the Contact information on moremember.pl,
and it adds "Preferred name:" when it differs from the "First name:". This
provides maximum clarity to staff users.
Test plan:
0. Apply the patch
1. Go to the "Patrons" module and search for or add a new patron
2. Add a firstname, a middle name, and a surname. Also add a "Preferred name"
which matches the firstname.
3. Go to "Details" on the sidebar, and note that "First name", "Middle name",
and "Surname" appear in the "Contact information".
4. Edit the patron and change "Preferred name" to a name that does not
match the "First name"
5. Go to "Details" on the sidebar, and note that "Preferred name" now shows
as well.
6. Enjoy fully comprehending which name is which for the patron!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 5ecf2cc9b0)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
- The empty state message was shown when available_lists was empty
but the patron was already on all existing lists
- Add !in_lists guard so the message only displays when the patron
is truly not on any list
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 53a8761a42)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
- When no patron lists exist in the system, the patron lists
tab on the patron detail page renders completely blank
- Other tabs follow the convention of showing a message in
the empty state (e.g. "Patron has nothing on hold.")
- Add an empty state message with a link to create a new
patron list, matching the established pattern
To test:
- Go to a patron detail page and click the "Patron lists" tab
- If no patron lists exist, observe the tab is blank
- Apply patch
- Repeat the above steps
- Verify the tab now shows "Patron is not on any list." with
a link to create a new patron list
- Click the link and create a patron list
- Return to the patron detail page and verify the "Add patron
to list" dropdown now appears instead
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 5d9a2ec188)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan:
Before applying the patch:
1. Go to acquisitions
2. Go to Purchase Suggestions
3. Create a purchase suggestion (for ease of testing, select Centerville for the library)
4. On the table, click on the suggestion number
5. Observe the suggestion does not populate, including the breadcrumbs, but the url does contain the suggestion number.
6. Apply the patch
7. restart_all
8. Rpeat steps 1-4
9. Observe the suggestion now populates and can be edited.
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 6cb1868e19)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch prevents the UI to randomly change the language when reaching
addbooks
The problem is that getlanguage is called BEFORE get_template_and_user,
without, and "interface" (C4::Context->interface) is not set yet.
Open C4/Languages.pm, search "sub getlanguage"
We first read the cache, then if there is no interface we reach
GetTranslatedLanguages that does return languages in a random order,
then we pick the first one
765 @languages = map { $_->{rfc4646_subtag} } @{ getTranslatedLanguages( $interface, $theme ) };
783 $language = shift @languages unless $language;
We must call getlanguage AFTER that the cache is populated.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit da64305067)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The Handler::run change to skip disabled plugins broke the
RecordsFromMarcPlugin subtest in ImportBatch.t. The MarcFieldValues
plugin was installed but never enabled, so Handler::run returned
early. Add $plugin->enable() before calling RecordsFromMarcPlugin.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 645ace7353)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
It appears that edi_cron.pl will run disabled EDI plugins. It uses Koha::Plugins::Handler::run that does not check if the plugins is gets are disabled.
Koha::Plugins::Handler::run needs to be fixed to not run disabled plugins.
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Plugins/Plugins.t
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 435cf5cba1)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Adds a new subtest to t/db_dependent/Koha/Patron.t covering
fixup_cardnumber and the autoMemberNumValue counter:
- Normal increment bumps the counter
- Renaming a patron's cardnumber does not free it for reuse
- Deleting a patron does not free their cardnumber for reuse
- Counter wins when ahead of db_max
- db_max wins when ahead of counter
- Legacy fallback when the syspref row is absent
Also adds autoMemberNumValue to the exceptions list in
t/db_dependent/check_sysprefs.t. The preference is managed internally
by Koha::Patron::fixup_cardnumber -- it is not user-configurable and
has no entry in the admin preference YAML files.
Test plan:
1. prove t/db_dependent/Koha/Patron.t
2. prove t/db_dependent/check_sysprefs.t
3. prove t/db_dependent/Koha/Plugins/Barcode_transform_hooks.t
(confirm the patron_barcode_transform hook is still called twice
during store when autoMemberNum is enabled).
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
When autoMemberNum is enabled, Koha picks the next cardnumber as
MAX(numeric cardnumber in borrowers) + 1. If patron A's auto-generated
cardnumber is later changed (e.g. they get a physical card) or the
patron is deleted, the original number becomes "free" and the next
self-registrant is assigned it -- inheriting anything third-party
services (OverDrive, Hoopla, unauthenticated self-check) have keyed on
the cardnumber.
This patch makes Koha::Patron::fixup_cardnumber use a monotonic counter
(the autoMemberNumValue syspref) so that once a number has been
auto-generated for any patron, it is never auto-generated again.
The syspref row is locked with SELECT ... FOR UPDATE inside the
existing txn_do, which serialises concurrent callers via InnoDB
row-level locking and addresses the race condition raised against
earlier revisions of this patch.
The formula is: next = MAX(counter, db_max) + 1. When the counter is 0
(pre-upgrade or missing syspref), this degrades gracefully to
db_max + 1 -- the legacy behaviour -- so no feature toggle is needed.
The counter is only bumped when Koha actually auto-generates a
cardnumber; plugin- or caller-supplied values do not touch it.
Test plan:
1. Enable autoMemberNum.
2. Self-register patron A via OPAC, note cardnumber N.
3. Edit patron A in the staff interface, change cardnumber to
something non-numeric like "MANUAL-XYZ".
4. Self-register patron B.
5. Confirm B gets N+1, NOT N.
6. Delete patron A.
7. Self-register patron C.
8. Confirm C gets N+2, NOT A's original number.
9. Install a plugin implementing the patron_barcode_transform hook;
confirm it still runs and its value is honoured (counter is not
bumped when the plugin supplies a cardnumber).
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Introduces a new system preference, autoMemberNumValue, which tracks
the highest auto-generated cardnumber ever issued. It is seeded from
the MAX cardnumber across both borrowers and deletedborrowers so
pre-upgrade deletions do not free numbers for re-issuance.
This preference is managed internally by Koha::Patron::fixup_cardnumber
and has no UI (no YAML entry).
Test plan:
1. Apply the atomicupdate:
perl installer/data/mysql/updatedatabase.pl
2. Verify the preference exists:
SELECT * FROM systempreferences WHERE variable = 'autoMemberNumValue';
3. Confirm the seed value matches:
SELECT GREATEST(
COALESCE((SELECT MAX(CAST(cardnumber AS SIGNED)) FROM borrowers
WHERE cardnumber REGEXP '^-?[0-9]+\$'), 0),
COALESCE((SELECT MAX(CAST(cardnumber AS SIGNED)) FROM deletedborrowers
WHERE cardnumber REGEXP '^-?[0-9]+\$'), 0)
);
4. Re-run the atomicupdate and confirm the already-exists warning.
5. Drop the syspref, re-apply the atomicupdate, confirm it seeds
correctly on fresh installs via mandatory/sysprefs.sql.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Test plan:
Create a list with name=<script>alert("booh!");</script>
Delete it at the OPAC
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Test plan:
Read the patch. Look for the var in the script.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This change removes useless success_* calls, removes an unnecessary
'use URI::Escape qw( uri_unescape );' in the Perl, adds a missing
response function argument, uses a safe sink for the "verdict" element
to make the content setting a bit cleaner.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Test plan:
/cgi-bin/koha/cataloguing/editor.pl
Click "Macros", "New macro..."
Enter <script>alert("booh");</script>
OK
Click on the macro name, run macro, delete macro, mark as public:
Nothing should trigger an alert
QA:
- $( '#macro-list li[data-name="' + name + '"][data-id="' + id + '"]' ).addClass( 'active' );
+ $( '#macro-list li[data-id="' + id + '"]' ).addClass( 'active' );
Why did we need name and id to select the macro?
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Replace the no-op `#job_callback` existence check with a recursive
`cy.wait('@jobPoll')` that loops through each `/api/v1/jobs/*` poll
response (arriving every ~1s) until it sees `status: finished`. This
avoids any fixed timeout — the test proceeds as soon as the API signals
completion, however long that takes on a given machine.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c513dee502)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
To test:
1. APPLY PATCH
2. yarn build
3. cypress run --spec t/cypress/integration/Tools/ManageMarcImport_spec.ts
4. It should now pass
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 b190813020)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
I think there has been a mix in the different fixes, and 24.11 diverged
from main
My suggestion here is to use a different column as "Status" is a
specific one
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Local cover images are no longer displayed in OPAC lists since Bug 41078.
In Koha versions prior to 25.05.05, local cover images were correctly displayed in OPAC lists.
This appears to be a regression.
To reproduce
1. Set the system preferences LocalCoverImages and OPACLocalCoverImages to Show.
2. Find a bibliographic record and open the record detail page.
3. Upload a local cover image file for the record.
4. Create a public list and add the record to the list.
5. In the OPAC, open the public list.
--> The local cover image is missing.
6. Apply the patch.
7. Reload the OPAC list page.
--> The local cover image is now displayed correctly.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 40ae10bed9)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan:
prove t/db_dependent/Reserves.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 2d9c05c4c0)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The term 'If any unavailable' is not very clear but it is also
very hard to find something short and better.
A next available hold is possible when at least one item is
unavailable (checked out, on order, waiting/transit hold).
A item level hold is possible when the specific item is
unavailable.
Test plan:
Read the patch. The code did not change.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 6fb28b5583)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan (ktd):
1 - Have henry acevedo have no mail and set messaging preference "Hold filled to sms"
2 - Have edna acosta have not messaging preference
3 - Place an hold on two books for edna acosta and henry acevedo, check in both books and select the button to fill the hold
4 - Check in notices and see that both received a notice
5 - Apply tests and run tests -> they should fail
6 - Apply patch, run rest -> they should pass
7 - Unfill both holds and fill them back. Henry should keep receiving notices while Edna should not anymore.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 505e58d1d2)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Two unit tests have been moved/replaced to fit the desired behaviour
- "patron notified when item set to waiting" -> does not fit the desired behaviour.
The desired behaviour for mails/sms is already tested
The desired behaviour for prints is changed to "patron not notified if
no messaging preference is specified"
- "patron not notified a second time (bug 11445)" -> Moved into
_koha_notify_reserve tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 24b7f4eacb)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
If you click Edit on a line with a note, the note field is not displayed
in the editing line and is blanked upon save (i.e., the note is lost,
even if you made no edits on the note). Value of the note is stored to
data-attribute which was changed to use Bootstraps own data-attribute.
So now the value must be fetched with keyword "bsContent" instead of
just "content".
To test:
1. Add note for a circulation rule.
2. Edit the rule.
=> Note that notes value is not displayed in editing row.
3. Apply this patch.
4. Edit rule again.
=> Note that notes value is now displayed as expected.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 57dc4c7c20)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Set 'EasyAnalyticalRecords' to 'Show'.
2. Find or create a parent record that has at least 2 items on it. Note the itemnumbers and the framework.
3. Edit that framework so you can add a 773$0, 773$9, and 773$t
4. Find or create a child record.
5. Make at least 2 773 entries on the child record. Add the biblionumber of the host record to the 773$0.
6. In each entry for the 773$9 add one of the itemnumbers from the host record.
7. For the 773$t and the biblio title of the host record.
8. Save.
9. Now attempt to put a hold on the child record.
10. 500 error:
11. APPLY PATCH and restart_all
12. Try placing the hold again, this time it succeeds.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit aee23d1eb7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch modifies the Acquisitions and Cataloging Z39.50 search forms
so that the pagination form includes a hidden ISSN input. This is
necessary for the form to submit the same search parameters each time
the user requests a new page of results.
To test, apply the patch and go to Acquisitions.
- Search for a vendor, and create a basket if necessary.
- Add to the basket and choose "From an external source."
- In the "ISSN" field, enter a partial ISSN number, e.g. 0361, and
search.
- At the bottom of the search results, click the "Next page" button.
- The second page of results should load correctly. At the top of the
table of results it should say "You searched for: ISSN: 0361"
- Perform the same test in Cataloging:
- Cataloging -> New from Z39.50/SRU
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 6041a1ddc5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit adds the missing accesskey attribute to the print button in the circulation template.
Test plan:
1. Try to checkout an item that is waiting for pickup.
2. Try to print the checkout receipt using the alt+shift+p keyboard shortcut.
3. Verify that nothing happens when using the shortcut.
4. After applying this commit, try the same steps again.
5. Verify that the print button now works with the alt+shift+p keyboard shortcut.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 3183fd17d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Steps to reproduce :
1 - Go to http://localhost:8081/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1 and fill in a new item.
2 - Visit http://localhost:8081/cgi-bin/koha/acqui/parcels.pl?booksellerid=1, type an invoice name and validate. Inspect both "Cancel order" and "Cancel order and catalog record". Notice the link in "Cancel order is broken"
3 - Apply patch
4 - Repeat 3 and notice the referrer is well formed.
For a reason I ignore, it does not seem to have an impact on main, but
on the 24.11 I tested, if you click on cancel order, after confirming
the deletion and clicking on "ok", you will be asked again to confirm,
however the deletion has been performed
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 92353e5294)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When checking in an item that has both a hold and a stock rotation
repatriation transfer, both modals would appear simultaneously,
overlapping each other and making it impossible to interact with
either one properly.
This occurred because:
1. The hold modal showed when 'waiting' was set
2. The transfer modal condition checked for 'reserved' but not 'waiting'
3. Both modals had the "block" class, causing simultaneous display
This patch ensures holds take precedence over stock rotation transfers
by adding a check for the 'waiting' flag to the transfer modal condition.
When a hold is found, only the hold modal displays. The stock rotation
transfer can be handled at a subsequent check-in, which is appropriate
since holds are patron-facing and time-sensitive, while stock rotation
is an internal process that can be deferred.
Test plan:
1. Enable StockRotation system preference
2. Navigate to Cataloging->Stock rotation
3. Click '+ New rota' and fill out with any values
4. Click 'Manage->stages' for the Rota
5. Add a stage for Centerville for 1 day, and Midway for 1 day
6. Return to rotas
7. Click Manage->items for the rota
8. Add an item
9. Return to rotas
10. Click 'Activate'
11. On the command line run the stock rotation job:
perl misc/cronjobs/stockrotation.pl -x
12. There should be one item for initiation
13. Run it again, there should be one stationary item
14. Place an item specific hold for the item, for pickup at Midway
15. Check the item in at Centerville, confirm transfer
16. Check the item in at Midway, confirm hold
17. Run the stock rotation job again:
perl misc/cronjobs/stockrotation.pl -x
18. There should be one item for repatriation
19. Check in the item again at Midway
20. Before patch: Two overlapping modals appear (hold + transfer)
21. After patch: Only the hold modal appears
22. Confirm the hold - no transfer modal should appear
23. The stock rotation transfer will be handled at the next check-in
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit bbcb45ddc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes it so that invoice-files.pl returns 404 if
AcqEnableFiles is disabled
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to /cgi-bin/koha/acqui/invoice-files.pl?invoiceid=999
3. Note that you see a 404 page
4. Change "AcqEnableFiles" syspref to "Do"
5. Go to /cgi-bin/koha/acqui/invoice-files.pl?invoiceid=999
6. Note that you now see a "Files for invoice" page
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch updates the jQuery validation plugin in both the staff
interface and the OPAC to the latest version, 1.21.0.
To test, apply the patch and clear your browser cache if necessary.
Test various pages in the staff client to confirm that form validation
works as expected:
- Patron password change form:
- Password must conform to minPasswordLength
- Password must not contain leading/trailing spaces
- Passwords must match
- Administration -> Add or edit budget:
- Description, start date, and end date are required
- Start date must be before end date
- Administration -> Add or edit Z39.50/SRU server:
- Server name, hostname, port, and database are required
- Port, rank, and timeout must be a number
Perform the same check of the "Change password" form in the OPAC.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 1b7c356243)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Instead of re-fetching the patron object.
This also adjusts tests:
prove t/db_dependent/Koha/ILL/Requests.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit a19a6cf1ef)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan, k-t-d:
1) Apply tests patch, run:
prove t/db_dependent/Koha/ILL/Requests.t
2) Notice it fails. Apply the second patch. Repeat. Notice it passes.
Test failure explanation (before fix patch):
# Failed test 'Cardnumber not supplied and couldnt find additional_contents for all libraries. Dont show copyrightclearance'
# at t/db_dependent/Koha/ILL/Requests.t line 1067.
# got: 'copyrightclearance'
# expected: 'commit'
Its searching the copyrightclearance additional_contents for the provided branchcode param (illrq->patron->branchcode) (and finding one) when it shouldn't. That parameter is only to be utilized for the newly created ILL request's library. The branchcode filter of the additional_contents must the be logged in user's cardnumber, not params->{branchcode}. If no logged in user exists and this stage is reached (ILLOpacUnauthenticatedRequest), then only 'All libraries' ILLModuleCopyrightClearance are to be fetched, as expected.
Human test plan, before applying patches:
1) Enable ILLModule
2) Logged in as koha:koha, create an OPAC request, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
3) Pick any library not Centerville (the default library of the 'koha' user)
4) Notice the created request's library is CPL (Centerville). It ignored the library selection from the form.
5) Apply patches. Repeat. Notice the request's library is now the one that was selected on the form.
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit d6ce5833b7)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 5485218dfd)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch fixes the variable name meant to display the circulation desk
name when the waiting hold was checked in at a specific circ desk.
A revised test plan to test this specific case:
- Install a new langage
gulp po:update --lang fr-CA
./misc/translator/translate install fr-CA
- Log in to the staff client and set your circulation desk
- Requires that the UseCirculationDesks preference is enabled and at
least one desk is defined in Administration -> Desks.
- Place a hold to be picked up at your logged-in library
- Check in the item on hold and confirm the hold
- Go to the record details page. In the holdings table you should see
this under "Status" for that item:
--> "Waiting at [library], undefined since [date]."
- Check the translation files
cd misc/translator/po/
git grep "Waiting at" fr-CA*
--> There is no "Waiting at %s, %s since %s."
- Apply patch
- Update strings again
- Check translation files again
--> The string should be there
- Translate the string (making sure to remove the fuzzy line if any)
- Install the translation again (only the translate install part)
- Check the record details page again. You should now see:
--> "Waiting at [library], [desk] since [date]."
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit d97d8354a3)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1. Go to members/moremember.pl?borrowernumber=X where X is borrowernumber of a patron with a surname
2. Look under contact information and notice surname is missing.
3. APPLY PATCH and look again.
4. Surname should be included.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f94283fdc5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds handling of the "no-html" flag to patron-title.inc. The
OPAC alert subscriptions page passes the "no-html" flag but the include
file wasn't written to include it.
To test, apply the patch and log in to the OPAC as a user who has a
title (salutation).
- Add a serial subscription and set a notification template
- Go to the OPAC and subscribe to the email notification for this
subscription
- Go to the patron account > Alert subscriptions tab
- Verify that the last column shows an "Unsubscribe from email alerts"
button.
- There should be no errant HTML.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
It has been removed in the controller by the previous patch.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit 98833e04d74be26c5efa3bc1718ac8a32063223f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch forces download of invoice files rather than showing
them inline where they can potentially perform XSS
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Find or create an active vendor
3. Create a basket if one doesn't already exist
4. Receive a shipment for the vendor
5. Create an invoice
6. Go to the invoice
7. In the URL change invoice.pl to invoice-files.pl
(or turn on AcqEnableFiles and go to it that way)
8. Upload an image file (e.g. SVG) or PDF
9. Click on the filename
10. Note that instead of displaying in the browser,
the file will be downloaded
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit 9ef05dfa7ec321a5bc7c84e0732d3d4ede945702)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch updates the plugin wrapper to include the reports menu and have the breadcrumbs list reports instead of admin or tools when method="report"
To Test:
1. Install the Kitchen Sink Plugin
2. Navigate to Reports->Report plugins->Run Report.
3. Observe the admin menu shows
4. Apply the patch
5. Repeat step 2
6. Observe the report menu shows and the breadcrumbs are for the report module.
7. Check that the tools and configuration show the appropriate tool/admin context.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 09860c5816)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This ensures that when the dialog is closed, even when clicked outside of it, the messages are correctly removed, same as if the 'close' button had been clicked.
Test plan:
- create a data ERM provider /cgi-bin/koha/erm/eusage/usage_data_providers/add
- dummy data should be sufficient
- then go to data providers list /cgi-bin/koha/erm/eusage/usage_data_provider
- open web development tools console (F12 firefox)
- click on "Run now"
- dismiss dialog by clicking outside the modal!
- click again on "Run now"
- check the logs for errors
- any other clicks to create a modal won't work now ("run now", "delete")
Apply patch. run yarn js:watch or yarn js:build. Repeat.
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 3908b7bc1c)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This test ensures that when extended attribute validation fails during
patron creation via the API, no welcome email is sent. This validates
the fix where extended_attributes() validation was moved before the
welcome email is enqueued.
Test plan:
1. Apply this patch
2. Run: prove t/db_dependent/api/v1/patrons.t
3. Verify all tests pass, including the new test that confirms no welcome
email is sent when extended attribute validation fails
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 4d2f80925d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test Plan:
1. Configure Koha with: AutoEmailNewUser = "Send" and create a mandatory extended attribute that will cause validation to fail; for example, set for the attribute to display in the OPAC, to be editable in the OPAC, and to be mandatory. That means this bug must be tested before Bug 40220, where the validation failure is resolved.
2. Setup your Postman, or any other mock API software, to obtain an OAuth token (/api/v1/oauth/token) and to register a patron (/api/v1/patrons).
3. With the OAuth token, send a POST request to /api/v1/patrons with valid patron data and invalid or missing mandatory extended attribute data.
4. Observe the API response with the 400 error and notice that the welcome email was delviered despite the fact that no patron account was created.
5. Apply the patch and repeat step 3. Notice that the API response still contains the 400 error, but no welcome email was sent.
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 328b77458f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change prevents CSRF on opac-patron-consent.pl by
adding checking of the "op".
Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Set system preference PrivacyPolicyConsent to "permissive"
2. Log into the OPAC and go to this path:
/cgi-bin/koha/opac-patron-consent.pl?check_GDPR_PROCESSING=1
3. Note that it doesn't change the consent
4. Go to this path:
/cgi-bin/koha/opac-patron-consent.pl?check_GDPR_PROCESSING=0
5. Note that it doesn't change the consent
6. Click the "Yes" radio button and click "Save"
7. Note it changes the consent to Yes
8. Click the "No" radio button and click "Save"
9. Note it changes the consent to No
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This change validates the displayby parameter in suggestion.pl
in order to prevent SQL injection.
Test plan:
0. Do not apply the patch
1. Log into the staff interface
2. Visit the path /cgi-bin/koha/suggestion/suggestion.pl?
op=else&displayby=status+AND+EXTRACTVALUE(1,CONCAT(0x7e,@@version))
3. Notice a 500 error is generated
4. In the error logs, the MySQL version number will appear
5. Apply the patch
6. koha-plack --restart kohadev
7. Visit the path /cgi-bin/koha/suggestion/suggestion.pl?
op=else&displayby=status+AND+EXTRACTVALUE(1,CONCAT(0x7e,@@version))
8. Notice that no error is generated
9. Try each of the "Organize by" options on the left nav bar
10. Note that none of them generate an error and that the option is
retained after clicking "Go"
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
To test:
1 - Check out an item to a patron, backdated to be overdue
2 - Log in as that user to the OPAC
3 - From 'Your summary' - click the overdue tab, click renew
4 - 500 Error
5 - Apply patch
6 - Reload the page and repeat
7 - Success!
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0219e4baf8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 75e25b4699)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
When an element should be ignored by screen readers, it should have no
title attribute or an empty title attribute, in addition to a null alt
attribute.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 672982a683)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f6ad2409df)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
A accessibility audit has highlighted that some of the decorative images on
the opac have alt text which is often followed by a spen that also contains the same
text. This results in screen readers reading this information twice.
The suggested solution is to set the alt text to null in these instances.
Test Plan:
Prior to applying patch:
1) Navigate to Koha OPAC
2) Carry out a search
3) On one of the records right click on the Material Type: under the heading
4) Select Inspect
5) Note that the image has an alt text that matches the span that follows
6) Click on the item title and repeat the process for the icon below the contributors.
7) Scroll down to the holdings table and repeat the process for the image in the Item Type column
8) Apply the patch
9) Repeat the steps above and notice that the alt is now null in order to ignored by screen readers
11) Note that for the Dev tools may show alt but if you right click on the page and select View Page Source you will see that the code is alt="" as expected by screen readers
12) Note that for alt tags that have been updated in the xsl files e.g. the small icons that follow 'Material Type: ' may be cached.
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c5f99a3150)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8a6c09f9e3)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch prevents the end-user to get the ugly 500 "malformed JSON
string" when something wrong happens with the plugin search. It happens
currently in ktd with the plugin repos listed in $KOHA_CONF
An error is reported to the UI
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 438e51351d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a69f7a88ab)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch makes it so that a successful SSO will return you to
the place where you initiated the SSO. This is especially useful
when doing searches, placing holds, etc.
Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Set up OIDC SSO using
https://wiki.koha-community.org/wiki/Testing_SSO
2. Go to http://localhost:8081/cgi-bin/koha/circ/circulation-home.pl
3. Do a staff login using SSO
4. Note that you're redirected to
http://localhost:8081/cgi-bin/koha/circ/circulation-home.pl
after the successful login
5. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
6. Do a OPAC SSO login
7. Note that you're returned to
http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
after the successful login
8. Logout of the staff admin and OPAC
9. Note your URL ends in ?logout.x=1
10. Try logging back into them using SSO
11a. Note that you're logged in and not automatically logged out
11b. Note that if you're on the OPAC, you should be redirected
to opac-user.pl instead of opac-main.pl or the root path
12. If you change the domain for the SSO users to something
that your user does not match, try logging in again, and note
that the error message should display on mainpage.pl or opac-main.pl/opac-user.pl
for the OPAC. (This is because these are the pages that show SSO errors.)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit dbadb00d7b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch includes an initial draft of a proposed SECURITY.md
guideline for reporting security bugs to Koha.
Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit d640840178)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Make edi_order lowercase so that matching is case insensitive.
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit c681b0a18f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes the 'Processings' breadcrum element not be tied to a component but a plain string with the link disabled. This was causing errors:
- Breadcrumb element empty
- Error in the browser console
To test:
1. Enable the Preservation module
2. Go to Home > Preservation > Settings
3. Use the 'Add a new processing' button
=> FAIL: The breadcrumb has 'Settings > > Add processing' (i.e. is missing 'Processings' between >)
4. Click on 'Edit this processing'
=> FAIL: Same error, different context
5. Check the browser console
=> FAIL: You see something like this:
```
[Vue Router warn]: No match found for location with path "/cgi-bin/koha/preservation/settings/processings" devtools-BLCumUwL.mjs:59:1
```
6. Run the cypress tests for this module:
k$ run_cypress --spec t/cypress/integration/Preservation/Settings.ts
=> FAIL: The breadcrumb navigation is broken
7. Apply this patch
8. Rebuild things:
$ ktd --shell
k$ yarn build
9. Fully refresh the page (Use cmd+shift+r on macOS, ctrl+shift+r on Linux/Windows)
10. Repeat 2-6
=> SUCCESS: The breadcrumb is no longer broken
=> SUCCESS: No errors/warnings about this in the browser console
=> SUCCESS: Tests pass!
11. Sign off :-D
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 30e48928d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds IDs to the fieldsets on the staff interface search form
(Search > Item search), to make CSS customization easier.
Test plan:
1. Go to Search > Item search in the staff interface.
2. Right click: Inspect(Q)
3. Use ithe Search HTML bar to search for fieldset IDs:
- "librarylocation"
- "access_and_condition"
- "barcodesearch"
- "callnumber_checkouts"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 6967fe8d02)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - In the staff client do a search
2 - Select all results
3 - Add to list -> new list
4 - Scroll down, list name field is cut off
5 - Apply patch
6 - Close the list window and add to list again
7 - List name field is now visible
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 5cff1c453e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f6e0424add)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change updates the print format to use the built-in formatter
for operations like trim, strip HTML, strip newlines, and not
decoding entities.
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/acqui/basket.pl?basketno=1
2. Click "add to basket"
3. Type "test" next to "From an existing record" and click "Submit"
4. On the "Gairm" row, click "Add order"
5. Fill in the required fields
6. In the "Internal note" put the following:
abc123
7. Click "Save"
8. In the Orders table, click "Export" and then "Print"
9. Note that the print page loads correctly, you can see the internal note,
and you cannot see lines for "Add internal note",
"Edit internal note", or "Add vendor note"
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
It seems that port numbers are stuck at 21. Editing them does not change the port number in the database.
Test Plan:
1) Check out Koha 25.05
2) Try to edit an EDI vendor account port
3) Note the change doesn't save
4) Apply this patch
5) Restart all the things!
6) Note you can edit the port again!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 03542dc217)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - load the Circulation Statistics wizard
2 - confirm Home library, Holding library, and Patron library default to selecting the logged-in branch
3 - apply patch, restart_all, reload page
4 - confirm Home library, Holding library, and Patron library default to a blank selection
5 - confirm queries with those blank selections are not limited by items.homebranch, items.holdingbranch, or borrowers.branchcode
Signed-off-by: Katherine Wolf <wolf@sarsf.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b2d3ec043c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 701bb15059)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test (ktd):
- Sign into the admin side
- Go to Administration > Authorized Values
- Edit or add to SUGGEST_FORMAT such that one AV has a different lib_opac
- Sign into the public catalog
- Go to purchase suggestions /cgi-bin/koha/opac-suggestions.pl?op=add_form
- Note that the AV in the 'Item type' dropdown does not use your lib_opac text
- Apply the patch and refresh the page
- Now the AV uses the lib_opac text
Sponsored-By: California College of the Arts
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ff461167fd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 91b362041e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Add at least one rule to the default-circulation-rules table that contains a patron category.
2. Now add a "Default checkout, hold and return policy" rule.
3. Inspect the "Unset" button:
<a href="#" class="delete-branch-cat btn btn-default btn-xs" data-categorycode="T" data-branch="*"><i class="fa fa-undo"></i> Unset</a>
4. APPLY PATCH and clear browser cache
5. Try again, this time you should be able to delete the rule.
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d16b9f0311)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fbee8b9f0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This enhancement ensures the due date stored in items.onloan is changed when a recall causes a checkout due date to change.
To test:
1. Enable UseRecalls syspref and set corresponding circulation rules:
- Recalls allowed
- Recalls per record
- On shelf recalls allowed - set to "If any unavailable"
- Recall due date interval - set to 1
- Recall pickup period
2. Check out an item to a patron (Patron A)
2a. Make sure this patron has a primary email address set
2b. Check the patron's messaging preferences - make sure this patron has the 'Email' checkbox checked for the 'Return recalled item' notice
3. Go to Tools -> Notices & slips and find the RETURN_RECALLED_ITEM notice. In the Email notice, change "[% checkout.date_due | $KohaDates %]" to "[% item.onloan | $KohaDates %]" and Save.
4. Log into the OPAC as another patron
5. Search for the item checked out in step 2, and place a recall on that item
6. Search for that item in the staff interface
=> Note that the item status says, "Checked out to <patron>: due <tomorrow>"
7. Create the following SQL report in the reports module, using the barcode of the item that was recalled:
SELECT onloan FROM items WHERE barcode='xxxxxxxxx'
8. Run the report
=> The onloan value is still set to the item's original due date, not the updated due date of tomorrow
9. Go to Patron A's account again and view their Notices tab. Click on the 'Notification to return a recalled item'
=> The original due date is used in the notice.
10. Apply the patch and restart services
11. Reset to run the tests again:
- Check in the item, but do not confirm the recall in the pop-up
- Go to the biblio detail page and cancel the recall
12. Repeat steps 2 to 5.
13. Run your report again (step 8)
=> The onloan value should now show the updated due date of tomorrow
14. View Patron A's latest 'Notification to return a recalled item' notice (step 9)
=> The updated due date should be used in the notice.
15. Confirm tests pass
- t/db_dependent/Koha/Recalls.t
Sponsored-by: Auckland University of Technology
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 95f2639d64)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7c8dbf75ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When changing library in circ/set-library.pl, desk and register values
were not being properly cleared from the session. This caused stale
desk/register data from the previous library to persist, resulting in:
- Incorrect cashup displays showing wrong library's register
- POS defaulting to registers from different libraries
- Session state inconsistent with visual UI
Three issues fixed:
1. Template: Changed register "None" option ID from "set-library-noregister"
to "noregister" to match JavaScript expectations (consistent with desk handling)
2. Desk logic: Changed condition to use defined() and explicitly clear session
when "No desk" is selected
3. Register logic: Added session clearing when "No register" is selected and
fixed condition to handle empty initial state
Test plan:
1. Select Library A with Register 5
2. Change to Library B without selecting a register
3. Verify register is cleared from session (check POS page)
4. Repeat for desk selection
5. Verify explicit "-- None --" selection clears session values
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 92d6fcf2bd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit bb90bd0bab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When receiving items in the acq module, the "Edit" link in the items
table for orders with items created when ordering is not recognizable
as link, but appears just formatted as normal text.
To test:
* Create a basket with items 'on order'
* Add an order line with 2+ items
* Close basket
* Receive shipment for the same vendor
* Click on "receive" link
* Verify the "Edit" in the items table on the left is formatted as a
link
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 46bfbfee2d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4b6bb36310)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The filtering condition was not correct, the presence of a line in
the transfer table is not enough to now if the item is in transit.
Here we filter reusing the same conditions as
Koha::Item::Transfer->in_transit
Test plan:
Have at least 2 items for a given bibliographic record
Transfer item 1
Transfer item 2
Receive/Fullfill the transfer for item 1
Item 1 is now available and item 2 is in transit
Go to items record and filter holdings table with status "In transit"
=> Only item 2 is displayed
Filter holdings table with status "Available"
=> Only item 1 is displayed
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0485296221)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 01d8c0f1ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
After bug 35659 that added the OAI harvester to Koha the -d switch
for deleting authorities before importing with bulkmarcimport.pl
was broken and resulted in a FK error.
Switching from truncate to DELETE FROM like we already did for items,
biblio etc. fixes the issue.
To test:
- Make sure you have some authorities in your database
- Export some into a file for importing
- Run bulkmarcimport -a -d --file <filename>
- Verify you get the a DB FK constraint error.
- Apply patch
- Repeat steps, verify the script now works as expected again
* Existing authorities are deleted
* File is imported
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 59d07337de)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit eb6241644a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the JS for the modal printer to make it more
reliable.
I found that in recent versions of chrome the print dialog failed to
open and instead you were just faced with a flash of white before the
new tab autoclosed and no print takes place.
Test plan
1) Enable cash registers and point of sale preferences
2) Add a debit type and mark it as 'Can be sold'
3) Add a cash register
4) Use 'Point of sale' to sell one of the above item for cash against
the register you just created.
5) Navigate to the register and 'cashup'
6) Click the 'summary' link to display a modal
7) Use the 'Print' option in the modal and confirm you face a print
dialog and can print
8) The print tab should be closed and you should be back to Koha
Signed-off-by: David Nind <david@davidnind.com>
Bug 38072: Ensure the printing tab closes
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed and tidied.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit af31453c63)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit dd68cc79e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Due to a bug in PDF::API2 or related libraries,
you cannot export a PDF if you do not have write
permission on the PDF template. We bypass this
problem by taking a string copy of the PDF template
and working on that instead.
Test plan:
0. DO NOT APPLY THE PATCH YET
1. chmod 444 /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/pdf/*.pdf
2. Create a basket with a vendor
3. Add an order to the basket
4. Close basket (and attach the basket to a new basket group with the same name)
5. Go to "Closed" tab and click "Export as PDF"
6. Note that you get an error when you try to open it in Adobe or some other PDF program
7. Apply the patch and restart koha (e.g. koha-plack --restart kohadev)
8. Try to "Export as PDF" again
9. Note that this time there is no warning and your PDF opens just fine
10. Repeat the "Export as PDF" process for every option of the
system preference "OrderPdfFormat". Every option should work
without errors.
11. Celebrate!
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a6ba625592)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 020e862d32)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
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 cee02bbf3b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 420fb7148a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Set AllowRenewalOnHoldOverride to 'Dont allow'
2. Set OverduesBlockRenewing to "block renewing"
3. Checkout an item and mark it as overdue.
4. Place a hold on that item to someone else
5. Now go look at the issues table for that patron/item
6. Check "Override renewal restrictions:"
7. Now a checkbox should appear in the "Renew" column, check it.
8. Click "Renew selected items"
9. After the "Renew failed: on hold" appears the spinning icon should
disappear.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d51dc1fc69)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9fb160eca8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We should not allow anonymizing patrons with failed login attempts
when the pref FailedLoginAttempts has not been set.
Test plan:
Run the test again from the previous patch. This should pass now.
Choose a patron with a positive value (say 55) in borrowers.login_attempts
or modify one. (NOTE: This patron will be anonymized in the test plan.)
Empty pref value for FailedLoginAttempts.
Set PatronAnonymizeDelay to 1.
Fill dateexpiry for this patron to yesterday.
Run cleanupdatabase.pl -confirm -v and check if the patron was NOT anonymized.
* Anonymized 0 patrons
Now set FailedLoginAttempts to a value (say 55) so that the patron is
considered as locked. (This unrealistic value is for testing only.)
MAKE SURE that you will not be anonymizing more patrons than you like
in the next step! (Set login_attempts to value < 55 for all other patrons.)
Run cleanupdatabase.pl -confirm -v again and check if the patron was anonymized.
* Anonymized 1 patrons
Restore the changed pref values.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 291c2f103d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 2fb7dab4a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Run the test without applying the follow-up patch.
The test should fail. This shows that we need the fix and will help
avoid future regressions.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 f4ff248b5c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9a2e2c3101)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Add some debit types that can be manually invoiced.
2. Go to members/maninvoice.pl?borrowernumber=X where X is your
borrowernumber
3. In the type dropdown see that the entries are sorted by code not
description.
4. APPLY patch and restart_all
5. Try again, now it should sort by code.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 644e4af1f6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a5c8ee1631)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1/ Have several borrower attributes set up so you can see how they sort
2/ Go to Tools > Batch patron modification
3/ Notice the "Patron attribute:: dropdown near the bottom
4/ It is sorted by the attribute code, not the description.
5/ APPLY PATCH and restart_all
6/ Try again, it should sort by the description
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 29f9518785)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c63b49d8d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds missing "Required" labels next to two mandatory fields
in the second page of the new serial subscription form.
To test:
1. Go to Serials
2. Click 'New subscription'
3. Enter a biblionumber in the 'Record' field (e.g. 230)
4. Click 'Next'
5. (Click 'OK' to confirm that you are not adding a vendor)
--> On the page 'Add a new subscription (2/2)' the fields 'Frequency' and 'Subscription start date' are red to indicate that they are mandatory, but there is no 'Required' note next to them.
6. Apply patch and refresh the page
--> It should say 'Required' next to all the mandatory fields (in red)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bb7a1371c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f90a00164b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Reduce params given to process method.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac7861bbe2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 69657d03f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. create a credit type that can be applied manually
2. create a debit type that can be applied manually
3. apply both a credit and debit to your patron (make sure auto-reconcile is off)
4. look at your patron's account in the staff interface, see values in the "account type" column
5. look at your patron's account in the OPAC, see the "Type" column is blank
6. Apply the patch - restart_all
7. Refresh the patron’s account in the OPAC — clear browser cache if necessary. The Type columns should now be populated.
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a399374a2d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 66dde68869)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f59557d2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d572b6f422)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Every click of the "Search" button on members/members-home.pl or other area that utilizes patrons searching,
will trigger another patron search api request. This button should be disabled until the first searches results are displayed.
To demonstrate, open the network tab of the developer console on your web browser. Note each click if the button show another patron search api request.
Test Plan:
1) Browse to members-home.pl
2) Open the network tab of the developer console on your web browser
3) Double click the Search button
4) Note the two api requests in the network tab
5) Apply this patch
6) Reload the page
7) Double click the Search button
8) Note only one api request is made
If your results come back too fast, you may perform an initial search,
then change the number of results from the default 20 to "All" to
create a search that will take longer.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7db2818bf0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e203ba8dcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
They are failing randomly for too long.
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 ef51ce1bd4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6733943bd3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
It may have made sense in the past but I don't think it does anymore. It adds an odd bottom spacing to the button
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e59ad2eb48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 445a942cf0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To reproduce:
1) Enable ILLModule
2) Visit ILL requests:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl
3) Where 'List requests' show, it should show 'Refresh'.
4) Apply patches, refresh, notice it now shows 'Refresh'.
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c60be45364)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a334a1554c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Merging patrons only required edit_borrowers permission
but would result in a patron deletion.
This patch requires a new merge_borrowers subpermission
To test:
1. Give a patron the following permissions
catalogue, edit_borrowers, list_borrowers
2. Log into the staff interface as the patron
3. Do a patron search and select 2 patrons
4. Click merge patron - success - a patron got deleted
5. Apply patch, updatedatabase and restart_all
6. Repeat steps 3 and 4 - you can't
7. Add the new permission for merge_borrowers
8. Repeat steps 3 and 4 - now you can
9. prove t/Koha/Auth/Patrons.t
Sponsored-by: CLAMS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5ce9d5af4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 576b80bb1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Should be reverted as soon as Bug 40163 is backported.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 433e964526)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Run xt/check_apache_conf.t again. Should pass now.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5c0fb862ba)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit afe93c21a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] chmod 755, shebang, remove Data::Printer, enable NoWarnings
one regex delimiter; replaced a grep by a map
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1572ea7578)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8416af851b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes the spelling of edit_items in the suggestion text in
an edit_catalog subpermission.
Test plan:
0. Go to a patron record
1. Click on more -> set permissions
2. Scroll down and expand the Edit Catalog
3. Notice the line says edit_item is required but the permission needed
is edit_items
4. Apply patch
5. Repeat steps 0-3
6. Confirm the suggestion text in the edit_catalog subpermission now
reads edit_items
Sponsored-by: CLAMS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1e3f2ccf2c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 09be4fb7f4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch simply skips undefined records - this prevents the error
though it doesn't explain why we get undef records here and a Z39 search
from standard cataloging just returns nothing.
This prevents a breakage of the search.
To test:
1 - Have LOC defined as a Z39 Source (standard in KTD)
2 - Open the advanced editor
3 - Search for ISBN 9780520401129
4 - Search explodes, logs like:
AH01215: stderr from /kohadevbox/koha/svc/cataloguing/metasearch: Can't call method "raw" on an undefined value at /kohadevbox/koha/Koha/MetaSearcher.pm line 267., referer: http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl
AH01215: stderr from /kohadevbox/koha/svc/cataloguing/metasearch: Magic number checking on storable file failed at /usr/lib/x86_64-linux-gnu/perl/5.36/Storable.pm line 443, at /kohadevbox/koha/Koha/MetaSearcher.pm line 144., referer: http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl
5 - Must refresh the page to clear the bad error message
6 - Apply patch
7 - Repeat search - no results, LOC says 'Permanent system error'
8 - You can close the results and do a new search
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7185201e93)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 5c0c4bcb6a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
System preference ClaimReturnedWarningThreshold manages the display of a patron message in case of too many claims.
But this preference may be empty. It is created empty in installer/data/mysql/mandatory/sysprefs.sql.
This generates a warning :
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 128.
Test plan :
1) Set systempreference 'ClaimReturnedWarningThreshold' empty
2) Go to a patron details page
3) Check there is no warning in logs
4) Go to a patron check-out page
5) Check there is no warning in logs
6) Set systempreference 'ClaimReturnedWarningThreshold' with an integer (ie 5)
Repeat from 2)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 27230e64ad)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 86f3a33a2c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. prove t/db_dependent/Koha/Item.t
2. Observe failing test
Subtest: test empty string warning
1..1
not ok 1 - No warnings were produced
Failed test 'No warnings were produced'
at t/db_dependent/Koha/Item.t line 3656.
found warning: Argument "" isn't numeric in addition (+) at /usr/local/lib/x86_64-linux-gnu/perl/5.34.0/DateTime/Duration.pm line 70.
didn't expect to find a warning
Looks like you failed 1 test of 1.
not ok 9 - test empty string warning
Failed test 'test empty string warning'
at t/db_dependent/Koha/Item.t line 3657.
Looks like you failed 1 test of 9.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 120ef099fc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 17b379984b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Rebased for 25.06.
Resolves:
Use of uninitialized value in string eq at /usr/share/koha/catalogue/MARCdetail.pl line 203.
Test plan:
Make sure that there is a combination of framework/field/subfield having
an entry in marc_subfield_structure where kohafield is NULL.
To force this for default fw on 020$q:
update marc_subfield_structure
set kohafield=NULL
where tagfield='020' and tagsubfield='q' and frameworkcode='';
Pick a biblio in this framework having that field/subfield. Or create
a 020 with $q filled. Hit catalogue/MARCdetail now.
Without this patch, it triggers the warn. With this patch, it does not.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 40d1cdeeb1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 96c574853d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The order of the columns in the yaml file must match the order of the
columns in the template file.
Test plan:
Confirm that, with bug 30633 applied, you can pick "shelving location"
as the default sort order and that the items are correctly sorted by
shelving location.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9f42c5fe28)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 78ee3caa6f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates our Select2 initialization script to update the
strings used as title attributes on the "X" control which appears in a
Select2 dropdown when you've made a selection.
The updated text reads "Clear selections" in order to eliminate the
ambiguity of the word "items."
To test, apply the patch and clear your browser cache.
- Go to Catalog -> Item search.
- Make one or more selections in any of the Select2 dropdowns (e.g. Home
library, current library, item type, etc.).
- An "X" should appear at the end of the field after you've made one or
more selections.
- Hover your mouse over the "X." The title which appears should read
"Clear selections."
Sponsored-by: Athens County Public Libraries
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a8dd0bc13f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 98ec1e1134)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
As well as the fund list view (admin/aqbudgets.pl)
Signed-off-by: Sarah Berry <sberry@pascolibraries.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7dac6055b2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7076be71db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch changes target='blank' to target='_blank' in system
preferences.
To test:
1. Apply the patch
2. Check the following system preferences, click on the links,
make sure every click opens in a new tab
- UniqueItemFields
- PatronSelfModificationMandatoryField
- PatronSelfRegistrationBorrowerMandatoryField
- PatronSelfRegistrationBorrowerUnwantedField
- PatronSelfModificationBorrowerUnwantedField
- EmailFieldPrecedence
- BorrowerMandatoryField
- BorrowerUnwantedField
- PatronQuickAddFields
- PatronDuplicateMatchingAddFields
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4d1a556c15)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8555a7a78e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This is caused by Bug 36742. It exists in main but starts in 24.11.
The OPAC advanced search now automatically applies a limit to the 'Location and availability' section using the patron's logged in library, even if there are multiple libraries in the system.
This feature must be depending on system preference 'SearchMyLibraryFirst'.
1) Set system preference 'SearchMyLibraryFirst' to 'Don't limit'
2) Go to OPAC
3) Authenticate with a user
4) Go to advanced search
5) Check there is no library selected in 'Location and availability'
6) Select a library and submit
7) Clik on 'Return to the last advanced search'
8) Check the library is selected in 'Location and availability'
9) Set system preference 'SearchMyLibraryFirst' to 'Limit'
10) Go to OPAC
11) Authenticate with a user
12) Go to advanced search
13) Check library of patron selected in 'Location and availability'
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d14619158e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e4026f08a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The singular form is wrong and only exists in textual context.
This is a result of git grep | xargs sed.
Test plan:
Read the patch.
git grep BorrowerLog
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4a267d0e9b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f59d8c46e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Update the version in DB:
> update systempreferences set value="25.1100000" where variable="version";
restart_all
prove t/Koha/Manual.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8358957f57)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f298d75280)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5beaaf171d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fc8e8ad055)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Description from comment 0
When creating an SQL report and it contains the column itemnumber, we
activate batch operations above the table. The itemnumber column can be
renamed, using the syntax [[itemnumber|Exemplarnummer]], which gives us
the option to translate the column name into something nicer for
display.
But: if you then send to batch item edit, the items are not
transmitted.
Test plan:
1) Create a report:
select itemnumber, itemcallnumber from items;
2) Send some items to batch item edit, verify the items are shown above
the item form
3) Update the report:
select [[itemnumber|Exemplarnummer]], itemcallnumber from items;
4) Verify the report still shows as before with the batch options
available and only the column being renamed.
5) Send some items to the batch item edit again
=> verify the items are shown above the item form
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 26d740f267)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a021250a87)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch puts back a missing space between "Delete" and the fa
thrashcan. It is atm the lonely button without this space in the modal
No test plan needed. The change is too trivial.
Just check that lines before in the code have the desired space. The
missing space creates a weird sensation while looking at the window.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a95f5ea73a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a4ea95c924)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The cashup functionality on both /pos/register.pl and /pos/registers.pl
pages was using GET requests via anchor tags, which could cause
duplicate cashup records when users refreshed the page after performing
a cashup.
This patch implements proper POST/REDIRECT/GET pattern with CSRF
protection:
1. Convert anchor tag buttons to proper HTML forms with submit buttons
2. Add CSRF token protection to all cashup operations
3. Change operation from 'cashup' to 'cud-cashup' for CSRF compliance
4. Implement redirects after successful cashup operations to prevent
resubmission
5. Update JavaScript to populate form fields instead of href attributes
This ensures cashup operations follow HTTP semantics properly (POST for
state changes) and prevents duplicate submissions while maintaining the
existing user experience.
Test plan:
1. Apply patch and restart services
2. Go to Point of Sale > Cash registers
3. Click "Record cashup" on any register - should open modal
4. Click "Confirm" - should perform cashup and reload page
5. Refresh the page - should NOT create duplicate cashup record
6. Go to Point of Sale > Register for individual register
7. Click "Record cashup" - should open modal
8. Click "Confirm" - should perform cashup and reload page
9. Refresh the page - should NOT create duplicate cashup record
10. On registers page, try "Cashup all" button - should work correctly
11. Verify all existing functionality (modals, summaries) still works
12. Check browser developer tools - all requests should be POST for
cashup operations
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 26f1f91a13)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d4d9a849b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If no shipment_budget is set then undef is set as key of the hashref
which generates a warning:
Use of uninitialized value $row[0] in hash element at /usr/lib/x86_64-linux-gnu/perl5/5.40/DBI.pm line 2122.
Later we only access the hashref by budget_id, so this change seems
safe.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f073262263)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d4fd8fd299)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch alters the code to append instead of prepend, removing the need to reverse the list
To test:
1 - Write a report to get some patron
SELECT cardnumber,surname FROM borrowers WHERE cardnumber <>'' ORDER BY rand() LIMit 6
2 - Enabled 'showLastPatron' and set count to 3
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=showLastPatron
3 - Copy the barcodes in order from the report and search for them in patron search, you'll want two tabs so you can keep report open
4 - Notice at 4th patron that list order has changed
5 - When 5th patron is loaded, the 4th is removed from the list
6 - Apply patch
7 - Clear the list
8 - Repeat the test plan, but note that list order does not change
9 - Confirm the patrons are removed from the list in expected order when adding new
10 - Change the count to 1 and search for several patrons, ensuring the last patron link is always correct
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f689133aaf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 0ca35af93a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 412879a418)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fb29ac4205)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When the authorised value of a REPORT_GROUP is numeric the filtering
does not work.
Test plan:
Create a new REPORT_GROUP av "123" (the description can be alphanumeric)
Create a new report and assign it to this new group
Confirm that with this patch the filtering works when the "123" tab is
selected
Signed-off-by: George <george@nekls.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bed343d5ed)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 82a10f632d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We should remove the regex metacharacters from the string or JS code
will raise an error and the query won't be generated, leading to the DT
neverending loading problem.
Test plan:
Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=4
In the global "Search" of the items table, search using a regex
metacharacters in order to form a broken regex (eg. '[')
=> Without this patch there is a JS error in the console "Uncaught
SyntaxError: unterminated character class" and you get the "Processing"
that never ends
=> With this patch applied the search succeeds.
Signed-off-by: Mathieu <mathsabypro@gmail.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0f6f5ab252)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c338abe8c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - save and run a report of "SELECT borrowernumber FROM borrowers"
2 - observe your results page does not include the Show Data Menu button
3 - save and run a report of "SELECT cardnumber FROM borrowers"
4 - observe your results page does include the button
5 - save and run a report of "SELECT borrowernumber, cardnumber FROM borrowers"
6 - observe you are once again buttonless on the results page
7 - apply patch
8 - run your report from step 1, observe you now have the button
9 - run your report from step 3, observe you still have the button
10 - run your report from step 5, observe you now have the button
11 - confirm that the batch actions dropdown only includes the patron actions once
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5e5ffeea82)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8c8128a7ba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes malformed entries in .mailmap that were causing
display issues and incorrect author mapping.
Issues fixed:
- Marjorie Barry-Vila: Missing closing '>' in email address
- Mathieu Saby: Incorrect alias format instead of proper mailmap format
(was using excessive padding with alias, now uses proper
'Name <email> OldName <email>' format)
These structural issues were breaking terminal display in tools like
tig and preventing proper author consolidation.
Test plan:
1. Apply patch
2. Run: git log --oneline | head -20
=> SUCCESS: Authors display correctly
3. Check in tig or other git tools
=> SUCCESS: No excessive column width issues
4. Verify mailmap functionality:
git shortlog -sn | grep -E 'Mathieu|Marjorie'
=> SUCCESS: Authors properly consolidated
5. Sign off :-D
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
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 6c3153a481)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 52b59aa736)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes the display logic for the LOC classification field
(050).
The current issue is that the inner components (each subfield) gets
separated with the pipe symbol (|) instead of grouping the components
together and using the separator for the outer 050 occurences.
To test:
1. Open a record to edit it
2. Add 050 like this:
```
050 4 $aE337.5 $b.O54 2025
050 4 $aE415.7 $b.A44 2025
```
3. Save
=> FAIL On the staff interface it displays:
```
LOC classification: E337.5 | .O54 2025 E415.7 | .A44 2025
```
4. Apply this patch
5. Run:
$ ktd --shell
k$ restart_all
6. Reload the detail page
=> SUCCESS: Things display correctly!
7. Sign off :-D
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2d85c9f4a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 1ad044b981)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The default sort order for Koha's patron search includes many columns, some of which are not indexed:
[% CASE 'name-address' %] {
"data":"me.surname:me.preferred_name:me.firstname:me.middle_name:me.othernames:me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
Depending on the number of patrons in the database, and the specific configuration of the server, this can end up generating a query that creates a temp table in the hundreds of gigabytes of data or more. Not only does this risk crashing a database server with insufficient disk space, it's also incredibly slow.
We've found a compound index prevents the issue and also makes the search much faster. InndoDB indexes have a fixed maximum length which is too small ( 3072 bytes ) to encompass the full data for all the fields we need to sort by.
The following works well as a comprise to keep the index length within the maximum:
CREATE INDEX idx_borrowers_sort_order ON borrowers (
surname(100), -- 400
preferred_name(80), -- 320
firstname(80), -- 320
middle_name(50), -- 200
othernames(50), -- 200
streetnumber(20), -- 80
address(100), -- 400
address2(75), -- 300
city(75), -- 300
state(40), -- 160
zipcode(20), -- 80
country(40) -- 160
);
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Perform a patron search
4) No change in behvior should be noted!
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 63c44cbd0e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b8fa49bb73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The routine to create the message can return nothing if there is no content,
we should handle this case and not attempt to send.
To test:
1 - Test plan from last patch
2 - Apply this patch
3 - POST to patron API again
4 - Success!
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1fa513be9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 91da4b4b38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Currently we assume BadParameter has been thrown with a parameter that is a valid patron field.
It may only include a message, or it may have come from outside the patron object, we should
handle all cases.
To test:
1 - Wrap "WELCOME" notice content in conditional:
[% IF borrower.categorycode != 'SELFREG' %]
...
[% END %]
2 - Enable preference AutoEmailNewUser
3 - Attempt to self register a patron via API with body:
{"surname":"PATRON","firstname":"PROBLEM","library_id":"CPL","category_id":"SELFREG","email":"eample@example.org"}
4 - Response error: "Given does not exist"
5 - Apply this patch, restart all
6 - Repeat 3
7 - Response error: "Exception 'Koha::Exceptions::BadParameter' thrown 'Parameter message_id cannot be empty if passed.'\n"
8 - It's uglier, but actually helpful
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ae14a11937)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7036902f57)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
For some reasons t/db_dependent/ILSDI_Services.t fails if run after
t/db_dependent/api/v1/biblios.t
When we modify the MARC subfield structure from the tests we must flush
the cache.
Actually I don't understand why the tests are even passing.
I have not tracked down why it only fails when run after t/db_dependent/api/v1/biblios.t
Test plan:
0. Do not apply this patch
1. prove t/db_dependent/api/v1/biblios.t t/db_dependent/ILSDI_Services.t
It fails
# Failed test 'Title hidden in output as expected'
# at t/db_dependent/ILSDI_Services.t line 874.
# got: '1'
# expected: '0'
2. Apply this patch, repeat 1.
=> it's green!
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b6aab57065)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit adbc9548fd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Cronjob cleanup_database.pl usage is wrong :
Usage: $0 [-h|--help] [--confirm] (...) [--bg-days DAYS [--bg-type TYPE] ]
Those args has been renamed jobs-days and jobs-type.
Also some args are missing.
There are too many args, I propose to remove them from there, one need to read the full help.
Test plan:
Run command line `misc/cronjobs/cleanup_database.pl -h`
You see first line:
Usage: misc/cronjobs/cleanup_database.pl
-h --help prints this help message, and exits, ignoring all
...
Signed-off-by: Anke Bruns <anke.bruns@gwdg.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3aefbaeaf6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d46e9d25a9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If the holds reminder cronjob would send a reminder on a holiday,when holidays are taken into account, it also will send it on the subsequent holidays and the first open day.
This bugfix adds a check to the cron when --holidays is set to skip sending the notices for that library if today is a holiday.
To Test:
Before applying:
1. Create a hold for a patron (I used patron 23529000035676 and 39999000000252)
2. Ensure your patron has an email address set and the hold reminder email selected.
3. Set the hold to waiting by checking it and confirming the hold.
4. In Tools->Calendar add a holiday to yesterday and a seperate holiday to today.
5. On the command line (the date should be set to 5 days ago for my commands to work and any dates adjusted accordingly)
koha-mysql kohadev
update reserves set waitingdate="2025-09-25"
exit
perl misc/cronjobs/holds/holds_reminder.pl -days 3 -t -v -holidays --date 2025-09-29
6. Observe that 1 notice would have sent to your patron
7. On the command line
perl misc/cronjobs/holds/holds_reminder.pl -days 3 -t -v -holidays
8. Observe that 1 notice would have sent to your patron
9. On the command line
perl misc/cronjobs/holds/holds_reminder.pl -days 3 -t -v -holidays --date 2025-10-01
10. Observe that 1 notice would have sent to your patron
11. Apply patches
12. Repeat the last command from step 5 and step 7
13. Observe that no notice should be sent for your patron
14. Repeat step 7
15. Observe that a notice should be sent for your patron.
16. Run
perl misc/cronjobs/holds/holds_reminder.pl -days 5 -t -v
17. Confirm the notice should be sent for your patron
18. Sign off
Signed-off-by: Katie Bliss <KEBliss@dmpl.org>
Bug 35700: (QA follow-up) fix POD and $today
This patch replaces the inncorrectly removed POD note and replaces $today with the more correct $date_to_run for checking if we should be skipping sending the message on the day.
Amended-by: Jonathan Druart
Squashed and adjusted commit title
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b895eb9b7d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 00ee0cc163)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Read POD.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f0991861e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ae9b83ae96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Should be reverted as soon as Bug 40163 is backported.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 43c06a34ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds debug logging to C4::SIP::Sip::MsgType::_initialize() to help
identify when critical fields (patron_id, item_id) are parsed as empty values.
Empty critical fields in SIP messages can later cause DBIx::Class constraint
errors when passed to Koha::Objects->find() operations, generating confusing
'Odd number of elements in anonymous hash' errors in SIP server logs.
The enhanced logging helps administrators identify the root cause by logging
when empty patron_id or item_id fields are detected during message parsing.
To test:
1. Apply regression tests patch first
2. Run:
$ ktd --shell
k$ prove t/db_dependent/SIP/MsgType.t
=> FAIL: Debug logging tests fail (no enhanced logging present)
3. Apply this patch
4. Run:
$ ktd --shell
k$ prove t/db_dependent/SIP/MsgType.t
=> SUCCESS: All tests pass, debug logging works correctly
5. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 220fdce180)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c7330715b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
These tests verify that C4::SIP::Sip::MsgType correctly parses SIP messages without
creating problematic arrayref field values, and validates enhanced debug logging for
empty critical fields.
Test Coverage:
• Message parsing with correct protocol versions (PATRON_INFO/HOLD/RENEW use v2, CHECKOUT
uses v1)
• Empty patron_id and item_id field detection with debug logging
• Malformed delimiter handling (double delimiters, trailing empty fields)
• Multiple consecutive empty fields in single message
• Confusing delimiter patterns that could break parsing
• Verification that parsed fields are strings, not arrayrefs
• Working siplog mock infrastructure in C4::SIP::Sip::MsgType
Arrayref Prevention Tests:
Tests verify message parsing DOESN'T create empty arrayrefs that would later cause "Odd
number of elements in anonymous hash" errors when passed to Koha::Objects->find()
operations.
Enhanced Debug Logging Tests:
Tests validate that empty critical fields (patron_id, item_id) are detected during
parsing and generate appropriate debug messages to help troubleshoot downstream
constraint errors.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 499b23d63c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 116d3d9f06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change makes it so that the ILS-DI GetRecords output for
"marcxml" will contain the OPAC version of the record.
Test plan:
0. Apply the patches
1. prove t/db_dependent/ILSDI_Services.t
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29
3. Click "Settings" to change the framework to Default, and click "Save"
4. Go to http://localhost:8081/cgi-bin/koha/admin/marc_subfields_structure.pl
?op=add_form&tagfield=245&tagsubfield=a&frameworkcode=#subafield
5. Untick the "OPAC" box and click "Save changes"
6. Go to system preferences
7. Change "ILS-DI" to "Enable"
8. Change "ILS-DI:AuthorizedIPs" to 0.0.0.0/0
9. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29
10. Note that you cannot see the title in the MARCXML.
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 02aba8c0b2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 0ec1ea7fc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change adds the missing interface parameter which
Bug 38233 initially added.
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 e5a302d968)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 1e35ae3e20)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Automatically redirect users who try to submit a PR at GitHub to instructions on how to submit patches and close the PR. Better experience for potential new developers (since they get immediate feedback, while still in the flow for submitting the patch).
The sparse checkout of readme is probably required, so that the gh command knows on what repo to work with.
Based on: https://github.com/mozilla-firefox/firefox/blob/main/.github/workflows/close-pr.yml
Signed-off-by: Imani Thomas <imani.thomas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d6b95024bc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f3538049b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Place a hold on many items
2. Change the "Pickup at:" dropdown" to something else
3. Notice the "Pickup location:" dropdowns do not change with it
4. APPLY PATCH
5. Try steps 1 & 2 again. This time the dropdpwns should adjust accordingly
Signed-off-by: Chip Halvorsen <chip.halvorsen@westlakelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3ffeb14e4b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 2f273e4655)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The bug 32950 fix introduced a regression that broke copy_field operations
when copying between different fields or when copying a subfield to itself
within the same field.
The original fix correctly handled moving subfields between different
subfields within the same field (e.g., 020$z to 020$a) by using
field_exists() to identify which fields have the source subfield.
However, this logic was applied too broadly:
1. Cross-field operations (e.g., 650$a to 651$a): The fix passed source
field_numbers to _update_subfield for the target field, causing it to
look for non-existent target field positions. This resulted in
insert_fields_ordered creating new fields out of order.
2. Same-field, same-subfield operations (e.g., 952$d to 952$d): The fix
prevented copying to fields that didn't have the source subfield, but
the original behavior was correct for duplicating a subfield to itself.
This patch restricts the bug 32950 logic to only apply when:
- Source and target fields are the same AND
- Source and target subfields are different
Additionally, it ensures field_numbers are not passed to _update_subfield
when copying between different fields.
Test plan:
1. Run prove t/SimpleMARC.t
2. All tests should pass, including:
- Cross-field copy operations (650$a to 651$a)
- Same-field, different-subfield operations (020$z to 020$a)
- Same-field, same-subfield operations (952$d to 952$d)
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 83126898de)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b30e54a86c)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Moving one subfield to another was failing for repeatable fields where
the field to be moved doesn't exist in the first instance. When moving
subfields within the same field type (e.g. 020$z to 020$a), existing
subfield values in fields that didn't contain the source subfield were
being overwritten with values from other fields.
This patch fixes the issue by determining which fields actually contain
the source subfield and only updating those corresponding target fields,
preserving existing values in fields that don't have the source subfield.
The fix adds logic to _copy_move_subfield to:
1. Use field_exists() to identify which fields have the source subfield
2. Pass these field numbers to _update_subfield for targeted updates
3. Preserve all existing functionality while fixing the data loss bug
Test plan:
1. Create a MARC modification template to move 020$z to 020$a
2. Create a record with multiple 020 fields:
- Some with existing $a values
- Some with $z values to be moved
3. Apply the template
4. Verify existing $a values are preserved
5. Verify $z values are moved to $a only in appropriate fields
6. Verify $z subfields are removed after the move
Signed-off-by: Bernard Scaife <bernard.scaife@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 346dd2073a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8166a95f2a)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This test verifies that when moving subfields between repeatable fields,
existing values in fields that don't contain the source subfield are
preserved.
The test creates multiple 020 fields:
- Some with existing $a values
- Some with $z values to be moved to $a
After applying the move template, it verifies:
- Existing $a values are preserved
- $z values are moved to $a only in fields that had $z
- $z subfields are properly removed after the move
Signed-off-by: Bernard Scaife <bernard.scaife@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit daa661f86c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 84839808bb)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Executing marc_ordering_process.pl will fail to run with the following errors:
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 21: =head1: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 23: marc_ordering_process.pl: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 25: =head1: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 27: --confirm]: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 27: --verbose]: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 27: ./marc_ordering_process.pl: No such file or directory
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 29: or,: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 31: 0: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 33: =head1: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 35: This: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 36: If: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 38: =head1: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 40: =over: command not found
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 42: syntax error near unexpected token `newline'
/usr/share/koha/bin/cronjobs/marc_ordering_process.pl: line 42: `=item B<-v|--verbose>'
This is due to an inadvertent newline before the shebang of the script.
Test Plan:
1) Run ./misc/cronjobs/marc_ordering_process.pl
2) Note the error
3) Apply this patch
4) Run ./misc/cronjobs/marc_ordering_process.pl
5) No error!
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a067423f3f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit edec2009dc)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1. Select an existing record and manage items (or create a new record) so that you are on the additem.pl form.
2. Notice that the fields are uneven lengths.
3. Apply the patch. Do a yarn build and restart_all. Clear your browser cache if necessary.
4. Refresh the additem.pl page and notice that the fields are all the same length now.
5. Sign off and have a great day!
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 932c1c07dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9b4891ea2f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan:
Login at OPAC.
Pass an unexisting reserve_id in a opac-modrequest.pl URL.
Verify that you get a 403 redirect.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 013a469b45)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 79c93d7a3d)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan, k-t-d, don't apply patches yet:
1) Enable ILLModule
2) Create a new ill request at:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Pick any type and any library, pick '42' for patron. This is the 'koha' user.
4) Create the request, click 'Send notice to patron'. Pick any template. Notice nothing is shown on the UI.
5) Apply patches. Repeat. Notice you get the message:
"The requested notice was NOT queued for delivery by email, SMS".
6) Edit the 'koha' patron and tick the following boxes on 'Patron messaging preferences':
- Interlibrary loan ready
- Interlibrary loan unavailable
7) Go back to the request and click 'Send notice to patron' and pick any option again. Notice now you get a success message.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bd5b58cd9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 82c23565be)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Its tran_fail, not tran_error.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dbbdfaa7f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6e64b1b432)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
it only tests for the presence of "switch"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d996664353)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 316c59c3e3)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan:
Enable PrivacyPolicyConsent; you can set it to Permissive.
Check if the OPAC user page (tab Consents) shows it correctly now.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2a7d8cddc2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit eb8b5e60cb)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The es_indexer_daemon.pl was missing handling for the case where
Koha::BackgroundJob->connect() returns undef without throwing
an exception (which happens when connection fails silently).
This adds the missing warning for that case, matching the behavior
in background_jobs_worker.pl.
Test plan:
1. Set JobsNotificationMethod to 'STOMP'
2. Configure invalid STOMP settings that cause connect() to return undef
3. Run es_indexer_daemon.pl - should show connection warning
4. Verify jobs are still processed via database polling
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9ca0e183b5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f39c370980)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The background job workers are showing STOMP/RabbitMQ connection error
warnings even when the JobsNotificationMethod system preference was set
to 'polling', which doesn't require a message broker connection.
This patch adds checks for the JobsNotificationMethod preference before
displaying connection warnings, so warnings only appear when STOMP is
actually expected to be available.
Changes:
- misc/workers/background_jobs_worker.pl: Check syspref before warning
- misc/workers/es_indexer_daemon.pl: Check syspref before warning
Test plan:
1. Set JobsNotificationMethod to 'polling'
2. Run background_jobs_worker.pl - should not show STOMP warnings
3. Run es_indexer_daemon.pl - should not show STOMP warnings
4. Set JobsNotificationMethod to 'STOMP' without RabbitMQ running
5. Run workers - should show appropriate STOMP connection warnings
6. Sign off :-D
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4ff1f4ca9c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c9f4566aa6)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
- The combobox dropdown in modals scrolled with the modal body instead of overlaying, due to Bootstrap's overflow: hidden on
modals clipping extending content.
- Added context parameter to combobox config; setting context: 'modal' uses Popper's fixed positioning strategy for proper
overlay.
- For reference: https://popper.js.org/docs/v2/constructors/#strategy
To test:
1. Make an item bookable
1.1. Go to a record (e.g. http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=285)
1.2. Go to the Items tab on the left side of the screen
1.3. Under Bookable, choose Yes and click 'Update'
2. Place a booking
2.1. Click 'Place booking' at the top of the detailed record screen
2.2. Fill out the form
2.3. Click 'Submit'
3. Try to cancel the booking
3.1. Go to the 'Bookings' tab on the left side of the screen
3.2. Click 'Cancel' next to the booking
--> A modal appears with a text field for the cancellation reason
3.3. Click 'No, do not cancel'
4. Add one authorised value in BOOKING_CANCELLATION
4.1. Go to Administration > Authorized values
4.2. Search for BOOKING_CANCELLATION
4.3. Click 'Add'
4.4. Fill out the form
4.5. Click 'Save'
5. Redo step 3
--> The option appears as a dropdown below the text field -- OK
6. Add one or two more authorised values
7. Redo step 3
--> The options appear as a dropdown below the text field -- OK
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f6df86c170)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4b734ebaca)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Jenkins failed with:
21:50:07 koha_1 | # got : '2025-06-26T19:50:06Z'
21:50:07 koha_1 | # expect : '2025-06-26T19:50:07Z'
A guess is that we change second between the 2 dt_from_string calls, and
the comparison fails.
One thing however: it seems that we want to deal with timezone correctly
here, but if we change the timezone in koha-conf.xml, the tests fail...
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Change looks good, but does not work for another timezone.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 73719c417f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a712b68635)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1a2a7e4619)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 428ea2baf6)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
We should not call discard_changes after accessing ->id but before
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9e8b9f607a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3c55573d4f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
We were ignoring whole files and parsing the whole file to check if
location and 201 were together. It's way better to check per subroutine.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a32495bf58)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4c331a9bc8)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To reproduce
1- Enable the ERMModule system preference
1- Go to Administration > System Preferences
2- Search for ERMModule
3- Change the value to "Enable"
4- Click on "Save all e-resource management preferences"
5- Return to the main screen
1- Create an agreement
1- Go to e-resource management
2- Click on "Agreements"
3- Click on "New agreement"
4- Fill out the form (mandatory fields)
- Agreement name: Natural Medicines
- Status: Active
5- Click on "Submit"
2- Edit the agreement
1- Click on "Agreements"
2- Click on "Edit" to the right of the Natural Medicines agreement
3- Click on "Submit"
--> Something went wrong: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
We got the same error when editing a license, a package or a title
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ddbd11cbad)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 5d8ba2c368)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch uses the PDF::Reuse::Barcode algorithm for calculating barcode
background box length relative to barcode length in order to determine
the actual barcode width and thus the X scale factor required to re-size
that barcode so that it fits on the label width (or rather the
"Barcode width" which is a percentage applied to the label width
to create a narrower usable surface for the barcode and barcode background
box).
To test:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=29
2. Add an item with barcode 123456, add an item with barcode 39999000001310399991,
and ensure an item with barcode 39999000001310 already exists
3. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=batch
4. Create a patch that uses 3 items using 39999000001310, 2 items with 123456,
and 2 items with 39999000001310399991
4. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=layout
5. Edit the layout "Label Test"
6. Change the "Barcode width" to 1, and enable "Draw guide boxes", and click "Save"
7. Export the batch using the template "Avery 5160 | 1 x 2-5/8" and the layout "Label Test" and open as PDF
8. Note that the whole barcode fits inside the red guidebox (there should be some
overlap of white on top of the red guidebox but that is normal since we're using 100% of the
barcode label width).
9. Edit the "Label Test" layout to try "Code39 + Modulo43" and "Code39 + Modulo10" and retry batch export
10. Edit the "Label Test" and try different "Barcode width" like the usual default .8
11. Celebrate that your barcodes fit on the label!
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9da5f23f96)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e06e3d8ec9)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
For other tables than those from Vue apps, table_node is the node and we
need to retrieve the object before accessing the attr function
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9af7d9dfd7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cfa17e1bc5)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The item search table is different from the other tables.
It is using server-side but its own way (not using the REST API).
Test plan:
Search items and filter using the column filters: collections, library,
item types, AVs, etc.
QA: I am not very happy with this patch but, feel free to suggest a
better fix!
Note that "results" was too generic and it felt better to adjust it.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 825172c9f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 01d94090c7)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
If you select an option in a column filter, the "exact" behaviour will
only apply to the first attribute mapped to this column
eg. on the patron search we have "Libraries" mapped to library.name and
library.library_id. If you select Centerville/CPL, the generated q
parameter will be {name: CPL, id: {like: "%CPL%"}}
This is caused by:
if (value.match(/^\^(.*)\$$/)) {
value = value.replace(/^\^/, "").replace(/\$$/, "");
On the second parameter we have lost the ^$ markers
Moving it out of the loop fixes the problem (and does not impact the
other behaviours: we search the same value for all the attributes
Test plan:
Create a library with code=CPLL and use if for a patron
Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl
Click search
Select "Centerville" in the "Libraries" column filter
=> Without this patch you get the patrons from CPL and CPLL
=> With this patch applied only patrons from CPL are listed
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9e437a4089)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 66e8f837dd)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1. Have some holds
2. Go to reserve/request.pl?biblionumber=x for your biblionumber
3. Change at least one hold priority to 'del'
4. Notice the toolbar above the table with Update Hold, Cancel selected, Cancellation reason now looks wonky.
5. APPLY PATCH
6. Try again, the display of the toolbar should be better.
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fd1adddb35)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cf828af0a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Odd number of elements in anonymous hash at /kohadevbox/koha/serials/acqui-search-result.pl line 84.
it's coming from closedate that is empty, and output_pref that will
reach this return:
278 if ($str) {
279 local $@;
280 $dt = eval { dt_from_string($str) };
281 Koha::Exceptions::WrongParameter->throw("Invalid date '$str' passed to output_pref") if $@;
282 }
283
284 return if !defined $dt; # NULL date
if str is undef, we don't enter if l.278 and return l.284
which will shift the elements of the hash (because of the list context)
We force the scalar and we are good.
There was no side-effect because closedate was the last of the list.
Note that total (and the 'count(*)' key) is not used in the template.
Test plan:
Create an order for a basket of the first vendor "My vendor" and hit
http://localhost:8081/cgi-bin/koha/serials/acqui-search-result.pl?supplier=d
Without this patch you get the warning
Odd number of elements in anonymous hash at /kohadevbox/koha/serials/acqui-search-result.pl line 84.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 71619f90e5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6ebf2b7e45)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
For the maps, one of the key characteristics is the information about
the scale of the map (in MARC 21 - in the field 255:
https://www.loc.gov/marc/bibliographic/bd255.html). Currently, we do not
display it neither in intranet view, nor in OPAC.
Test plan:
==========
1. Modify any bibliograhic record inserting a 255 field with example
content. (You may need to make the subfields visible in the editor by
modifying the MARC framework).
2. Verify in Normal view (intranet) and in OPAC that you are unable to
see the inserted data.
3. Apply the patch ; restart_all.
4. Verify in Normal view (intranet) and in OPAC that you are now able to
see the cartographical data from 255 field.
Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Fixed some indentation
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e225b8b3b5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6b106ee8cc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch corrects a minor markup error in the OPAC's cookie consent
modal, removing a "type" attribute from an <a> tag.
To test apply the patch and make sure you have the CookieConsent system
preference enabled.
- Go to the OPAC. You should see a cookie consent banner across the
bottom of the page.
- Click "More information."
- Click "Cancel" in the modal window. The modal should close.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Noah Tremblay <noah.tremblay@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 86d79a48d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7d8b9337c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
To test:
* Add a subscription and receive 1-3 issues
* Set the DateFormat system preference to format unlike yyyy-mm-dd
* Go to the OPAC
* Verify dates show corectly on the subscriptions tab itself
* Click on more details
* Verify dates how correctly in the full history
* Verify the dates on the brief history show correctly.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 96cf2d9935)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 5da371a3d7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If weekly repeatable holidays are set, Koha ignores these days when other holidays are set using the Holidays repeated yearly on a range option.
To test:
1) Navigate to Tools > Calendar
2) Click on a weekend date on the calendar to open the Add New Holiday option
3) Give your holiday a title and select Holiday repeated every same day of the week
4) Click on the calendar again and set a holiday from 20 December 2021 to 06 January 2022
5) Give your holiday a title
6) Select Holidays repeated yearly on a range and click save
7) Using the calendar, navigate forwards to December 2024 and note that there are days that should be highlighted in the holdiay period that are not highlighted
8) Apply Patch
9) Run the reset_all command
10) Repeat the steps above
11) Notice that now when you click forwards through the calendar, all of the dates for your holidays repeated yearly on a range are still selected
Signed-off-by: Marion Durand <marion.durand@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c36498fd1d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4ba00dc292)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Go to item search.
2. Enter parameters that retrieve more than 500 items.
3. From the item search results page, show All entries, then "Select visible rows."
4. Select either Export selected results to CSV or Barcode file.
5. A resulting error message of either "This site can't be reached. The connection was reset" or a 400 Bad request page with a URL with all the item numbers inserted appears.
6. APPLY PATCH
Try steps 1 - 4 again, this time it should export.
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8f1fff8b70)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a17f6cf5ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds comprehensive unit tests for the add_field function
to verify that all types of line endings (Unix \n, Windows \r\n,
Mac \r, and mixed) are properly normalized to spaces to prevent
SIP message corruption.
Tests cover:
- Unix line endings (\n)
- Windows line endings (\r\n)
- Mac line endings (\r)
- Mixed line ending combinations
- Normal text without line endings
- Empty values
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b535f20596)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6260f6c40d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Patron messages containing carriage returns, line feeds, or CRLF
combinations can break SIP protocol communication since CR is used
as the SIP message terminator. This causes message parsing failures
and protocol errors in self-check systems.
The previous regex only handled single carriage returns (\r),
missing Windows CRLF (\r\n) and Unix LF (\n) sequences.
This patch normalizes all line ending variations to spaces to
prevent SIP message corruption while preserving message content.
Test plan:
1. Go to a patron record and click "Add message"
2. Select "Add message for OPAC..." from dropdown
3. In a text editor (e.g., Word), create a message with line breaks:
"This is line one[Enter]This is line two[Enter]This is line three"
4. Copy and paste this multi-line text into the message box and save
5. Run the SIP emulator: misc/sip_cli_emulator.pl
6. Execute a patron information request for this patron
7. Before patch: Observe message breaks at line endings, corrupting
the SIP response
8. Apply patch and restart SIP server
9. Repeat steps 5-6
10. After patch: Verify the message appears as single line with
spaces replacing line breaks: "This is line one This is line two
This is line three"
11. Test with different line ending types (Windows, Mac, Unix) to
ensure all variations are handled correctly
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Adjusted the comment in Sip.pm
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit affa3e62fd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 5709be47e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Just jumping to the next biblionumber (and adding found biblio recs) is
more user friendly than crashing without any further clarification to
the user.
Note that this should be a rare exception when the URL is not manipulated
(someone deleting a biblio while another wants to add it to a list).
For another bug: The template is not designed to handle the situation that
no biblio is found at all.
Test plan:
Select a biblio to add to a list and add a not-existent biblionumber
to the URL.
Without this patch, that URL will crash. With this patch, it will
silently ignore a wrong biblionumber.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 60b1cf95c4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8198f36473)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The username field would not appear in the quick add form despite being marked as required in BorrowerMandatoryField.
This was due the interaction between a change introduced by Bug 38459 and the dummy input for the username field.
This patch moves the dummy input so that the true input is the last child that the change in Bug 38459 targets.
This allows the username field to appear when added to BorrowerMandatoryField.
Test plan:
0. (Before applying the patch, follow the replication tests as in the comment above.)
1. Login to the Koha staff interface
2. Search system preferences for BorrowerMandatoryField
3. Toggle on Username (userid) so it is added to the list of fields and save your changes.
4. Navigate to /cgi-bin/koha/members/memberentry.pl?op=add_form&categorycode=PT, notice that username still shows and is marked as required
5. Navigate to /cgi-bin/koha/members/memberentry.pl?op=add_form&categorycode=PT&quickadd=true, notice that the username field does show.
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6b92afd73f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e1fe71f372)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - apply patch
2 - go to advanced cataloging editor
3 - perform a keyword z39.50 search from the quick search, note results
4 - click Advanced and see Keyword is also a search option here
5 - repeat your search, confirm results match those frmo step 3
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dcbf3b51b1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6c8fb24ef1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test:
1. Have a record (A) with 3 items.
2. Create an item group with 2 of these items.
3. Have a second record (B) with 4 items
4. Create an item group with 2 of these items.
5. Merge the two records together keeping record A
6. Results will show that all items are moved over to record A, but the item group from record B, is not there.
7. Apply patch
8. Create a new record (C) with 3 items.
9. Create an item group with 2 of these items
10. Merge this into record A
11. The item groups are moved!
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f7897d7d81)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ba8d8ea3bc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch now sets tabindex to -1 if a disabled class is applied to a
control, and removes it when the class evaporates. This improves
accessibility by making these disabled items non-focusable.
To test:
a) make a search on the OPAC
b) tab through the selections toolbar, notice how visually disabled
items are focusable
APPLY PATCH
c) repeat steps a-b, notice how the elements are no longer focusable
SIGN OFF
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 40782: (follow-up) Tidy results-list.js
Tidy converts single quotes to double quotes
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c6402b951)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fe12e361f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change just repairs moredetail.tt to re-apply the fix from bug 16157
which seems to have only been partially applied back in 2016.
Test plan:
0. Apply the patch
1. Set the "Damaged status", "Withdrawn status", and "Lost status" for an item
2. Create a user that only has "catalogue" permission and log in as them
3. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<biblionumber from item>
4. Note how "Withdrawn status", "Lost status", and "Damaged status" all appear now
Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9278eed6f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e9b45d28a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a missing "Title" header in the Inventory csv export.
Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/tools/inventory.pl
2. Check the "Export to CSV file" checkbox and click "Submit"
3. In the export, note that the A1 cell now says "Title"
Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c5a9f270ba)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9bcc48d7e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
I have no idea why this is fixing the test!
Without this patch they fail:
t/db_dependent/Koha/EDI.t .. 1/5
# Failed test '14 log lines recorded for passed invoice file'
# at t/db_dependent/Koha/EDI.t line 725.
# got: '12'
# expected: '14'
# Failed test 'Warn recorded for transferring items'
# at t/db_dependent/Koha/EDI.t line 728.
# 'Unmatched item at branch:WID'
# doesn't match '(?^u:transferring.*)'
# Failed test 'Warn recorded for transferring items'
# at t/db_dependent/Koha/EDI.t line 728.
# ''
# doesn't match '(?^u:transferring.*)'
# Failed test 'Warn recorded for unmatched item'
# at t/db_dependent/Koha/EDI.t line 728.
# ''
# doesn't match '(?^u:Unmatched item at branch:.*)'
# Looks like you failed 4 tests of 32.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ec2fbf3a4d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 2ee0a54788)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When using TestBuilder to build an order the tests will fail when the object will be saved:
00:09:41 koha-1 | # Looks like you planned 58 tests but ran 26.
00:09:41 koha-1 |
00:09:41 koha-1 | # Failed test 'cancel() tests'
00:09:41 koha-1 | # at t/db_dependent/Koha/Acquisition/Order.t line 1042.
00:09:41 koha-1 | Cannot insert order: Mandatory parameter quantity is missing at t/db_dependent/Koha/Acquisition/Order.t line 868.
00:09:41 koha-1 | # Looks like your test exited with 255 just after 14.
00:09:41 koha-1 | [22:03:54] t/db_dependent/Koha/Acquisition/Order.t
This happened on Koha_Main/3350
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 621b75ddf0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ba7b962235)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The following tests must pass:
prove t/db_dependent/api/v1/erm_usa*
prove t/db_dependent/Koha/ERM/EUsage/*
prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t
prove t/db_dependent/api/v1/erm_custom_reports.t
prove xt/author/Text_CSV_Various.t
Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
If you apply this patch before the other one:
prove t/db_dependent/Koha/Biblio.t
Will fail. Apply both patches. The above now passes.
This highlighted something. Following the test plan I can't reproduce
this anymore. In order to reproduce, the check-outs need to happen
before the bookings, otherwise when the check-outs happen on an existing
booking it'll 'complete' or 'cancel' the booking thus not causing the
error.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1617927b99)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b3a9ed2262)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1) Have a record with 8 items.
2) Place a booking on 6 of the items (6 bookings total) for a full month
(e.g. August)
3) Check-out all 6 of those bookings
4) Attempt to place a new booking for one of the 2 free items for end of month, e.g. (Aug 26 -> Aug 28).
5) It will fail with error "Booking conflicts". This is because the code
is adding 6 checkouts with 6 bookings = 12 which is higher than 8
bookable items.
6) With this patch, check-outs that refer to an existing booking are
excluded, so the check becomes if 8 - 6 > 0 (which passes the check) rather than 8 - 12 > 0 (which fails the check)
Run existing tests:
prove t/db_dependent/Koha/Item.t
prove t/db_dependent/Koha/Biblio.t
prove t/db_dependent/Koha/Booking.t
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a729b4442)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4530773512)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds unit tests.. but it also adds some FIXME and QUESTION
statements to those tests
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 888ec190ef)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit bb8da54478)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. In circ rules set a Default waiting hold cancellation policy to allow hold cancellation requests.
2. Add a hold for a patron and create a hold cancellation request.
3. Check the item in via SIP, I used the SIP emulator:
kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l MPL -su term1 -sp term1 -m checkin --patron 23529000035676 --item 39999000001310
4. The hold remains.
5. APPLY PATCH, restart_all
6. Try 2 - 4 again, the hold should be cancelled
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2246bfbb4a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 80253423db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Place an item on hold. Run the holds queue (perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl)
2. Go to Circulation > Holds queue and notice that the filter under Publication details says "Author" as the placeholder.
3. Apply the patch. Restart_all
4. Repeat step 2 or refresh the page. Notice that the placeholder text for Publication details now says "Publication details"
5. Sign off -- have a wonderful day! :D
Signed-off-by: Lawrence ORegan-Lloyd <hello@lawrenceol.dev>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 902ab4b009)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 648a3cd7d3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Currently request_transfer checks for the existence of a current transfer on the item, and a new one can either be
enqueued or replace this transfer. This patch adds a check to see if the requested transfer matches an existing transfer
on the item. In the case that it does we simply return that transfer rather than create a new transfer.
This has the effect of eliminating 'WrongTransfer' generation if an item is checked in twice at the same branch, which feels correct.
To test:
1 - place a hold on an item that is currently at branch A, for pickup at branch B
2 - check your item in at Branch A, click to confirm the hold and transfer (print slip if you want to)
3 - sudo koha-mysql kohadev: SELECT * FROM branchtransfers -- See one transfer
4 - check your item in at Branch A again, get a message that the item is supposed to go to Branch B. Don't click on the modal yet
5 - repeat 3 -- See two transfers, one cancelled as WrongTransfer, one pending
6 - Click 'Confirm and transfer' on the modal
7 - repeat 3 -- See three tranfers - the two from before and a new active transfer
8 - DELETE FROM branchtransfers
9 - Apply patch, restart all
10 - repeat 3 - no transfers
11 - Check item in at branch A again and confirm
12 - repeat 3, one transfer
13 - Check item in, don't confirm the modal
14 - repeat 3, one transfer
15 - Confirm the modal
16 - repeat 3, one transfer
17 - Check the item in at branch C
18 - repeat 3, two transfers - one cancelled WrongTransfer, one active
19 - Confirm modal
20 - repeat 3, two transfers
21 - Check item in at branch B
22 - repeat 3, two transfers, one cancelled, one completed
Signed-off-by: Christine Lee <chlee@pascolibraries.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit acdc512cea)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 93b5d837cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - Check out an old version of Koha and set some columns settings for holdings tables, or:
UPDATE columns_settings
SET columnname = CONCAT("holdings_",columnname)
WHERE module = 'catalogue' AND page='detail' AND tablename = "holdings_table";
UPDATE columns_settings
SET columnname = CONCAT("otherholdings_",columnname)
WHERE module = 'catalogue' AND page = 'detail' AND tablename = "otherholdings_table";
2 - perl -e 'use C4::Installer; my $result = C4::Installer::run_db_rev("/kohadevbox/koha/installer/data/mysql/db_revs/240600064.pl"); warn Data::Dumper::Dumper($result)'
3 - SELECT columnname FROM columns_settings WHERE module="catalogue" AND page="detail" AND ( tablename="holdings_table" OR tablename="otherholdings_table");
4 - Confirm column names are correct
5 - repeat 2
6 - Confirm column names are not affected on subsequent runs (items_group does not become group)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1f4e2712b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b71d4d3e94)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1) Perform an item inventory, be sure to have some items with problems
:) like 'wrong place'
2) On table if item has 'wrong place' problem (maybe others cases ?) if
it's linked to collection code just the AV code appears not the label
3) Apply this patch
4) Refresh page, normally that's okay now
Sponsored-by: BibLibre
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 25b9895c8d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a3abffea85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch simply reduces our matching pattern to ensure the string is an exact match, rather than partial
To test:
- Create LOC authorized values of ADULT with description "Adult" and ADULTG with description "Adult - Grab and Go"
- Find a record with items and set one item to shelving location "Adult"
- Find a second record with items and set one item to shelving location "Adult - Grab and Go"
- Create an Item Search for Shelving location and select 'Adult' only
- Search and get one result from the record selected above
- Click Copy shareable link and paste/go in new tab
- See that the results now include both records from above
- Click Edit search button and notice that the Shelving location 'Adult - Grab and Go' was added to the selected criteria for the search
- Apply patch
- Repeat original search for 'Adult' location
- Click 'Copy shareable link'
- Open in new tab and confirm correct results
- Repeat with a search for 'Adult - Grab and Go' and confirm shareable link gets the correct results
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4d3ebcbe69)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6a7bf9a8d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We have reports of progressive slowdown on the circulation page during
long sessions. A likely cause might be a block in `circ/circulation.tt`
that attaches a new keypress handler to `#barcode` on every submit. Some
submits do not navigate (e.g. waiting holds modal, quick slip on empty
barcode), and pages restored from the bfcache keep previously attached
handlers. Over time, listeners accumulate and the UI becomes sluggish.
This patch installs a single, namespaced keypress handler at page load,
guarded by an in-flight flag toggled on submit. The handler shows the
“Barcode submitted” modal and prevents typing only while a submit is
in flight. The flag is reset on bfcache restores via `pageshow`. This
preserves existing UX while keeping the listener count constant.
Test plan:
1. Before applying the patch, open circ/circulation.pl for any patron.
2. In the browser console, run:
(function () {
const el = $('#barcode')[0];
const dataFn = jQuery._data || jQuery.data;
const ev = (dataFn && dataFn(el, 'events')) || {};
return (ev.keypress || []).length;
})()
Note the keypress handler count.
3. Enter a barcode and submit. Use the browser Back button to return.
4. Re-run the IIFE from step 2. The count has increased.
5. Repeat steps 3–4 a few times and observe the count continues to grow.
6. Apply the patch.
7. Reload the page and re-run step 2; count should be ~1.
8. Enter a barcode and submit. Use Back to return. Re-run step 2.
The count remains ~1 across submits and back/forward navigations.
9. Confirm UX is preserved:
- While submit is in flight, pressing keys in `#barcode` shows the
“Barcode submitted” modal and prevents typing.
- Waiting holds flow still shows its modal and behaves as before.
- Submitting with an empty barcode still triggers the quick slip
behavior per system preference and does not add handlers.
10. Optional: Simulate scanner behavior by pressing Enter rapidly after
submit. Verify the handler count remains stable.
Signed-off-by: krimsonkharne <philip.orr@posteo.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b3c1261777)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 11c0675696)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Go to Administration > Additional Parameters > Identity providers
2. Click on +New identity provider
3. Notice that the "Add default OAuth configuration" and "Add default
OAuth mapping" buttons are not too visible. They just look like text
unless they are hovered on.
4. Apply the patch, restart all
5. Refresh the page and view the buttons again. The button visibility
has improved.
6. Sign off and have a nice day!
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 e20b9c8359)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f72596c441)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change fixes the Checkout status on moredetail.pl so that it
actually shows "Not checked out" when it's not checked out.
Test plan:
0. Apply the patch
1. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29 on a fresh KTD
2. Note that the "Checkout status" is "Not checked out"
3. Check out the item to someone
4. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29
5. Note that it says "Checked out to <person> Due back on <date>"
6. Renew the item
7. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29
8. Note that it says "Checked out to <person> Last renewed <date>, Due back on <date>"
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 59d43e8d48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ad886b5869)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
-Same test plan as with "Book drop mode" but for "Forgive overdue charges"
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 771815b88d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c0cb2e6b85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Put an item in transfer to a different library than the logged in branch
2. Go to Circulation > Check in
3. Choose the "Book drop mode" option and check in a few items NOT from step 1.
4. See the "Book drop mode" choice is remembered after every selection.
5. Check in the item from step 1 to make a wrong transfer
6. The modal pops up for wrong transfer, click confirm
7. Now the choice of "Book drop mode" is forgotten.
8. APPLY PATCH
9. Try again, this time the "Book drop mode" selction should be retained
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 13b82826cb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6d4be440f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Set the 'item-level_itypes' system preference to 'Bibliographic record'
2. Go to any record that contains items and look at the holdings table.
3. Click 'Show filters'.
4. Notice that the Status column doesn't appear to have a filter.
5. APPLY PATCH
6. Try again, the Status filter should appear correctly. Make sure all other filters appear correct.
7. Set 'item-level_itypes' back to 'specific item'.
8. Make sure the filter still appears correctly. Make sure all other filters appear correct.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d5adba9101)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 58fb7cd002)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a relator term that was added to the MARC code list for
relators in the June 4, 2025 technical notice. The new term is waw -
Writer of afterword.
To test:
1. Apply patch and reset_all
2. Go to Administration > Authorized values
3. Search for the RELTERMS list and click on it
4. Search for waw
--> There should be an entry for waw - Writer of afterword
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 17acb0c157)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8e6e70cd35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a relator term that was added to the MARC code list for
relators in the April 3, 2025 technical notice. The new term is wfw -
Writer of foreword. This technical notice also deprecates an existing
term, aui (author of introduction), in favour of the new term.
To test:
1. Apply patch and reset_all
2. Go to Administration > Authorized values
3. Search for the RELTERMS list and click on it
4. Search for wfw
--> There should be an entry for wfw - Writer of foreword
5. Search for aui
--> Term should not exist
Note : This update includes a term deprecation. I decided to go ahead
and remove it from the authorized values list because, unlike for MARC
frameworks, a nonexistent value will not delete data from the records.
It will simply say "aui (Not an authorized value)". Furthermore, this
only affects new installations. Nothing will be deleted from existing
installations, unless the libraries themselves remove the authorized
value. They can make a batch modification before deleting it if
necessary.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38a5b8190d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4e0697968c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds new relator terms that were added to the MARC code list
for relators in the Februrary 2, 2025 technical notice. The new terms
are ink - Inker, and pnc - Penciller.
To test:
1. Apply patch and reset_all
2. Go to Administration > Authorized values
3. Search for the RELTERMS list and click on it
4. Search for ink
--> There should be an entry for ink - Inker
5. Search for pnc
--> There should be an entry for pnc - Penciller
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit add898d8a9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4eaea617ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes the DB revision idempotent.
To test:
1. Fix the Koha version right before the broken upgrade:
$ ktd --shell
k$ koha-mysql kohadev
> UPDATE systempreferences SET value="23.1200052" WHERE
variable="version"; \q
2. Restart everything (memcached should be enough)
k$ restart_all
3. Run:
k$ updatedatabase
=> FAIL: You get:
```shell
Upgrade to 23.12.00.053 [19:34:35]: Bug 36755 - Increase length of 'code' column in borrower_attribute_types
ERROR: C4::Installer::foreign_key_exists(): DBI Exception: DBD::mysql::db selectrow_array failed: Table 'koha_kohadev.pseudonymized_borrower_attributes' doesn't exist at /kohadevbox/koha/installer/data/mysql/db_revs/231200053.pl line 11
```
4. Apply this patch
5. Repeat 3
=> SUCCESS: Update runs smoothly!
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4066d2a4fc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b394a6dec8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Go to http://localhost:8081/cgi-bin/koha/members/recallshistory.pl?borrowernumber=19
and confirm that with this patch applied you see the "Home library" of
the patron in the patron's info block (top left)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8a576c2bf3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 61a08eb2e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When debugging this reported issue, I didn't know where to add these
fields, let's make it more obvious for users who can manage those
To test:
1 - Be a user who can manage item search fields
i.e. have manage_item_search_fields permission
2 - Go to item search
3 - Note a link to Manage item search fields
4 - Confirm it works
5 - Be a user without the permission
6 - Go to item search
7 - There is no link!
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e7b960e655)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f45b325307)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch checks for a custom field value and preselects it in the
dropdown if present
To test:
1 - Browse to Administration - Item search fields
2 - Add a new search field pointing to a marc field with some known
value on a record with items
3 - Browse to Item search
4 - Construct a search using your new field and search
5 - From results click 'Copy shareable link'
6 - Go to the link
7 - No results or wrong results!
8 - Edit the search
9 - Note your custom field is not selected
10 - Apply patch
11 - Visit the link again
12 - Correct results!
13 - Edit search
14 - Custom field is correctly selected!
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 14b485c6db)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 684cad615c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch removes this wrongly added embed and adjusts the patron holds
history to use `pickup_location.name` instead.
To test:
1. Have a patron with some past holds from different branches
2. Browse their holds history
3. Search on the 'Library' column by name
=> SUCCESS: It works :-D
4. Apply the patch
5. Run:
$ ktd --shell
k$ yarn api:bundle
k$ koha-plack --restart kohadev
6. Repeat 2-3
=> SUCCESS: Still works!
7. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 260a0af5db)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9488baf31f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When adding a document that does not use 010d as price document, but 071d, the price is not imported from koha since it only checks 010d and 345d.
To reproduce:
1 - Create a Koha item, make sure there is neither 010d or 345d
2 - Add a 071d and fill a price
3 - Export the item as marcxml
4 - If you do not have one: in acquisition, create a vendor, a basket associated to this vendor, and a line associated to this vendor
5 - Add a line to any open basket, select: import "from a new file" and
select the exported marcxml -> The price in 071 is not imported
6 - Apply patch
7 - Repeat 5 -> the price is properly imported
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 1cb2f97e8c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 404280c868)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds column configuration to the table settings for the
"Available funds" table on the Acquisitions home page. If a table has
column configration, hidden columns should be hidden in the
configuration rather than in the in-page table options.
To test, apply the patch and restart all services.
- Go to the Acquisitions home page
- In the "All available funds" section, you should not see "active" and
"budget period" columns.
- NOTE: You may have to clear you browser's Local Storage in order for
the change to show.
- If you go to Administration -> Table settings -> Acquisition ->
acq_acqui-home you should see that the first two columns are hidden by
default and cannot be toggled.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6df6337080)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This bug is caused by the code that is intended to hide the export column when disabled failing
because the value of exports_enabled is "0" and not 0
To test:
1 - Checkout an item to a patron
2 - Disable ExportCircHistory
3 - Load the patron's circulation table on the Check Out tab
4 - Notice no export column
5 - Click 'Export' above the table and you can export
6 - Go to the patron's circulation table on the Details tab
7 - The export column shows
8 - Try to export - JS error
9 - Apply patch
10 - Clear local storage in the browser
11 - Repeat 3-6 - no more export column and you can export
12 - Enable ExportCircHistory
13 - Confirm the circ table on both pages hsows the export column and can be exported
(You may need to clear local storage again)
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Janne <janne.seppanen@lahti.fi>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4800537201)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch restores the renewal date input field (with a date
picker) for Circulation > Renew. This was missing.
It changes the behavor slightly so that it mirrors Circulation >
Check in. A settings icon is included in the barcode field,
clicking this then shows the date field with the date picker
(and any other options).
Previously on the renewals page (24.05.x and earlier), there was
no settings icon in the barcode field and the date input field
with date picker was already shown.
This user interface pattern is used elsewhere in Koha, and this
chnage will help improve consistency.
Test plan:
1. Browse to Circulation > Check in.
2. Note the settings icon in the barcode form field.
3. Click it to show the the return date field with a date picker,
and other options.
4. Browse to Circulation > Renew.
5. Note there is no settings icon.
6. Apply the patch.
7. Repeat step 4 - note that there is now a settings icon.
8. Click the settings icon to show the renewal date form field.
9. Click the input field to show teh date picker.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
PA amended: Squashed both patches for 24.11
To test:
1 - Create a new basket - 'Gonna transfer'
2 - Add an order to the basket
3 - Create another basket 'Has the transfer'
4 - Return to first basket and transfer order to second
5 - Return to second basket, click 'Add to basket' and inspect the modal
6 - Note basketno says 'Gonna transfer'
7 - apply the patch
8 - redo steps 1 through 6 with fresh baskets and the modal should have the correct values
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
An accessibility audit highlighted that when logged in you cannot tab
to the log out link in the welcome menu. The search history link in
the same menu was also unable to be tabbed to. These links were also
not able to be reached using arrows.
The links for Your Lists, Private Lists and New List could be reached
using the arrows on the keyboard but not via the tab option.
Test plan:
1) Navigate to the Koha OPAC.
2) Ensure you are logged in.
3) Use tabs to navigate the site.
4) When you reach the Welcome menu press enter.
5) Note that you can tab to 'Your Account' and the 'Clear' icon but not
to 'Search History' or to 'Log Out'
6) Tab also to the hamburger menu and press enter
7) Note than you can navigate this menu via the arrows on the keyboard but
not via the tab button
8) Apply patch
9) Repeat steps 1-7
10) Note that you can now tab to all of the above links
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a83c07da19)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Put a few items on hold and make note of the barcodes.
2. Check out one of the items to a patron who doesn't have the hold
3. Check the cancel hold radio button
4. Also check the Remember for the session for this patron
5. Click 'Yes, check out'
6. Notice the item is checked out and the hold is cancelled
7. No checkout another on hold item to the same patron
8. No confirm screen ( good )
9. The item is checked out ( good )
10. The hold is not cancelled. ( bad )
11. APPLY PATCH and restart all
12. Try steps 1 - 9 again. This time the 2nd hold should be cancelled.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6b80dec84d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Enable AudioAlerts
2. Set something up in the SCO to play a sound from an external source. ( I used #sco_main as my selector )
3. Go to SCO and try to trigger the sound, nothing plays.
4. APPLY PATCH
5. Try steps 2 and 3 again, this time you should hear the sound from an external source.
Signed-off-by: Andrew <andrew.auld@openfifth.co.uk>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9f16b085b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The link at the top of the item editor page to "Jump to add item form"
tries to scrollIntoView the element with id="additema", but that element
only exists while you are adding a new item. While you are editing an
existing item, it is replaced by an element with id="edititem".
Whichever element you have at the moment is always just below the form
with id="f", so we can just scroll that into view instead.
Test plan:
1. Without the patch, go to the details page for any bib record with at
least one item, and click the Edit button on the row for an item in
the holdings table.
2. You should be scrolled down to the form for editing that item
3. Scroll up to the top of the page, click the Jump to add item form
link
4. You will not be scrolled back down to the form
5. Apply patch, shift+reload page
6. Now the link should scroll you back down to the form
7. Return to the biblio details page, click Edit - Manage items and
verify that the Jump to add item form link still works when you are
not editing an existing item
8. Click the Add multiple copies of this item button and add 30 items
9. Make sure that the link still scrolls the form into view both while
you are editing an existing item, and while you are adding a new item
Sponsored-by: Chetco Community Public Library
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fcf705e2e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
To reproduce:
- Set ERMModule = Enable
- In the Acquisitions module I added 4 vendors, with names
X, A, C, Y, in that order
- Went to E-resource management > Agreements > New agreement
- In the "Vendor" dropdown, the vendors are listed in the
order they were entered: X, A, C, Y
To test:
- Applied the patch + restart_all + run "yarn js:build" in the
cloned Koha repo inside KTD
- Shift-reload the "New agreement" page
- Vendors are in alphabetical order
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f6fd36ab77)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If you try to add two licences with the status 'controlling' to an
agreement record, the error modal duplicates the error message
'Only one controlling license is allowed'.
Test Plan:
1) Enable ERMModule sys pref
2) Add an agreement record
3) Add two licence records
4) Edit the agreement record and associate both license records to the agreement
5) Try to set both licenses to status 'controlling'
6) Note error modal duplicates the error message 'Only one controlling license is allowed'
7) Apply the patch, run yarn js:build and then hard refresh the browser
8) Repeat steps 1 to 5 and enjoy the single error message!
Signed-off-by: Magnus Enger <magnus@libriotech.no>
I took the liberty of fixing up the commit message a bit.
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f201ea5076)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If a column contains a dropdown list (for libraries for instance), the
width of the column will be modified, but DT's fixed header need to be
adjusted.
Test plan:
One example where this problem can be observed is the "holds to pull"
table: "Title" is followed by "Libraries".
Test without and with the patch, and confirm that the display/offset is fixed.
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>
(cherry picked from commit 8e808e97b3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
TEST PLAN:
1 - go to /cgi-bin/koha/tools/letter.pl
2 - click on New notice -> claim serial issue (or any other one)
3 - Fill required fields with random string
4 - Save -> if it breaks, go to
5 - Open a network panel (F12 -> network)
6 - Filter on letter.pl
7 - Fill another new notice -> the arguments of the form page have been
passed in the address of the POST request.
8 - Apply patch
9 - Repeat the whole process and see it works now
Signed-off-by: Magnus Enger <magnus@libriotech.no>
I can't recreate the problem, but the change seems sensible enough
and does not seem to introduce a regression, I can still save a
new letter/notice.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 248013a2a9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
As suggested by David, I've re-arranged the message output so we pass
'message' first, followed by the error reference inside brackets,
followed by "for SERVER" and finally "result No."
This follows the Z39.50 suggestions more closely whilst still including
our level of detail for Server + Result number.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d32a1b7063)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Absolutely no idea why the previous code was not selecting MARCXML (MARC
was passed and so the import failed)
cy.get('select[name="format"]')
.select("MARCXML", { force: true })
.should("have.value", "MARCXML");
But I found a bug in the JS code: we are supposed to auto-detect .xml
file and pre-select MARCXML. So let's rely on that behaviour!
sample.mrc is actually an xml file so it makes sense to rename it
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0802e46e18)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3c7ddb4070)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Commands like .select() are queued. We need to prevent the should to
happen before the select is executed.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9ebfd8d462)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b8709b9df0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
From bug 39606:
"""
Why are you taking screenshots?
The wait statements will certainly cause random failures.
cy.wait(5000);
cy.wait(2000);
Notice the following couple of lines:
cy.get("#fileuploadstatus").contains("100%");
cy.get("legend").contains("Look for existing records in catalog?").should('be.visible');
It makes Cypress wait 10s until "100%" appears (ie. the file is updated), then the block with the dropdown lists you are going to interact with to be visible.
You should almost never use cy.wait.
"""
Test plan:
yarn cypress run --spec t/cypress/integration/Tools/ManageMarcImport_spec.ts
should still pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f12bbbf010)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 1406d3b7a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. APPLY PATCH
2. cypress run --spec "t/cypress/integration/Tools/"
3. Tests should pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b0cfcea861)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Make an item or item type 'Bookable'
2. Place a booking for that item
3. Go the 'Bookings' tab for that item.
4. Edit the booking
5. Submit the edit request and see at the top of the modal "Failure"
6. APPLY PATCH
7. Try editing bookings, now it should work.
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7a125d7cc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
0. Have some bookings that are ready to collect.
1. Load the bookings to collect report.
2. Table does not load.
3. APPLY PATCH
4. Try again, table loads.
5. Make sure you can filter by 'Pickup library'
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 139fff4b27)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The last patron menu uses the value "hiddenborrowername." I've made that use preferred_name instead of firstname. When a patron's preferred_name is not manually set/edited, it automatically takes the value of firstname, so we don't need an IF in the template toolkit here.
To test:
1 - have a patron with a preferred_name and one without
2 - get both patrons in the Last Patron dropdown, confirm they both show firstname
3 - apply patch, restart services, clear cache, reload page
4 - get your patrons in Last Patron again, confirm now one shows preferred name and the other firstname
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 829186d77d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When OPACHoldsIfAvailableAtPickup preference is set to Don't allow and circulation rules allow on-shelf holds only if any unavailable, and we have a record with a checked out copy at Centerville and an available copy at Midway, a Midway patron should not be able to place a hold for pickup at Midway since the Midway copy is available.
This is the setting:
- circulation rules allow on-shelf holds only if any unavailable
- OPACHoldsIfAvailableAtPickup is set to Don't allow
To test:
1. Set up the circulation rule so that on-shelf holds are allowed ('Yes')
2. Create a record with two items, one at Centerville and one at Midway
3. Check out the Centerville item
4. Log into the OPAC with a Midway patron (I used Henry Acevedo)
5. Try to place a hold on the record
--> Midway is not a valid pickup location (correct behaviour)
6. Cancel
7. Change the circulation rules so that on-shelf holds are only allowed 'if any unavailable'
8. Try to place a hold on the record from the OPAC again
--> The system allows you to place the hold for pickup at Midway (incorrect behaviour)
9. Optionally, check the Holds to pull for Midway (the hold is there, it shouldn't)
10. Optionnaly, check in the Midway item (it is trapped for Henry's hold)
11. Apply the patch
12. Try again to place a hold on the record from the OPAC
--> it is impossible to select Midway, Midway is not a valid pickup location
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>
(cherry picked from commit e303854076)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes DB inconsistencies introduced in bug 34587
Test plan:
1) Run 'updatedatabase'
2) There should be no errors
3) Check the database and observe the correct assignment of the following columns
- erm_counter_logs.importdate
- erm_counter_files.date_uploaded
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] chmod 755 on new dbrev
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 50ef9576d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. On a bib with one item place a hold for pickup at library A and Library B
2. Check the item into library A
3. Set the first hold's expiration date to the past
4. On Holds awaiting pickup > Holds waiting past their expiration date
In the actions column click the 'Cancel hold' button
5. Notice the alert says 'This item is on hold for pick-up at'
with no library name
6. Apply patch and redo steps 1-4
7. Confirm the alert include's Library B's name
This item is on hold for pick-up at Library B
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c095e09ff9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When editing a child while Childneedsquarantor active, trying to delete
a guarantor while saving a non-patron guarantor will prevent the user
from saving. However, if an adult has expired, some librarian would like
to remove the account and let some information in non-patron guarantor.
TEST PLAN
Before applying patch
1 - Open Lisa Charles'page, add Henry Acevedo as Guarantor, also fill
Guarantor surname and firstname
2 - Edit the page and try and remove Henry Acevedo, it won't work
however there is still one guarantor
3 - Apply patch
4 - Try and remove Henry Acevedo -> it will work
5 - add HA as a guarantor again
6 - try and remove him AND let guarantor firstname and surname empty ->
you can't
7 - Add HA and Edna Acosta as guarantor
8 - Remove HA and ler guarantor firstname and surname empty -> you can
Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e0be89266d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
1. Turn on the SavedSearchFilters system preference
2. Go to advanced search, select a number of item types and search
3. Save the search
4. Enter a search term (such as power)
5. select the filter. Observe the following message:
Error: Unable to understand your search query, please rephrase and try again.
6. Apply patch
7. Repeat steps 4 & 5, search should work as expected.
8. Sign off!
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d6c2124b29)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
With Bug 36552 we set 'date entered on file' (MARC21: 008/0-5)
of a record created by duplication of an existing record to the current
date instead of having there the value from the original record.
The same should be done for the advanced editor (for now, it retains
the date of the original record).
Test plan:
==========
1. Enable EnableAdvancedCatalogingEditor systempreference.
2. Open any record in advanced editor to make it default. Go back to
record normal display.
3. Make a duplicate: Edit > Edit as new (duplicate)
4. Note that the date in 008/0-5 is of the original record, not of
today.
5. Apply the patch ; restart_all.
6. Repeat p. 3. The date in 008/0-5 should be of the today. If not,
refresh browser's cache (Ctrl+Shift+R etc.) to get the fresh
version of the JS.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c0b3310ab8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Perl can interpolate hashrefs but not method calls. This results in messages like "Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58." when running the edi_cron.pl cronjob.
Test Plan:
1) Enable EDIFACT
2) Create a fake EDI account with a bad FTP server in it
3) Run edi_cron.pl
4) Note the errors like:
Cannot connect to Koha::Schema::Result::VendorEdiAccount=HASH(0xaaab059252f0)->host: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58.
5) Apply this patch
6) Run edi_cron.pl
7) Note the errors are now like:
Cannot connect to test.example.com: Name or service not known: My Test at ./misc/cronjobs/edi_cron.pl line 58.
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>
(cherry picked from commit 26e7c07302)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the "variables" SCSS file in the OPAC and staff
interface in order to disable the "smooth scroll" behavior introduced in
Bootstrap 5. This was an unexpected and unintentional change.
The patch also corrects another unexpected side-effect of the BS5
upgrade: A change to the "cursor" property of elements with a
".placeholder" class. This class is used by the multiple-select jQuery
plugin found in some system preference controls.
To test, apply the patch and rebuild the staff and OPAC CSS.
- Clear your browser cache if necessary.
- In the staff interface, go to Administration -> System preferences ->
Circulation, and click "Patron restrictions" in the left-hand sidebar.
The page should jump immediately to that section without any scrolling
effect.
- Go to the "Article requests" section of that page. Hover your cursor
over a dropdown which doesn't have any option selected. Your cursor
should not change to a "waiting" cursor.
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>
(cherry picked from commit 09c79110a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch simply adds the holdingbranch to the SIP item as current_location
To test:
1 - Find an item and check it in at a different location than its homebranch
2 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR -m item_information --item 39999000004151
3 - Note no AP field is returned
4 - Apply patch, restart all
5 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR -m item_information --item 39999000004151
6 - You see the current holdingbranch in the AP field
7 - Return the item to its homebranch
8 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR -m item_information --item 39999000004151
9 - Confirm home and holding branches are the same now
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0049543314)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 27486 renamed system preference "delimiter" into "CSVDelimiter"
This patch just replaces the commented code with a TODO text
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 269ad710b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
OPAC record detail pages include https://schema.org microdata information
in the HTML page markup, such as CreativeWork.
It incorrectly includes the "Product" type - this is not needed
and is also rejected by some search engines, for example
... vocab="http://schema.org/" typeof="CreativeWork Product" ...
(Koha maps schema.org to the RDFa Lite syntax https://www.w3.org/TR/rdfa-lite/)
Test plan:
1. Look at HTML source of a details page for a record in the OPAC.
2. Search for schema.org
3. Note that it there are two typeof entries:
.. vocab="http://schema.org/" typeof="CreativeWork Product" ...
4. Apply the patch.
5. Refresh the page and look at the HTML source again.
6. Note that the "Product" schema.org type is removed:
.. vocab="http://schema.org/" typeof="CreativeWork" ...
7. Sign off.
Sponsored-by: Karlsruhe Institute of Technology (KIT)
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>
(cherry picked from commit 4adc1a065f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds the fast_cataloging permission to those checked when a duplicate is found
Additionally, the barcode was missing from the duplicate check and is now added to be passed forward
To test:
1 - Create or choose a borrower and grant permissions:
catalogue
circulate
borrowers: list_borrowers
editcatalogue: fast_cataloguing
2 - Log in as that patron
3 - Search for another borrower and go to checkout screen
4 - Enter random string as barcode to checkout
5 - Item is not found, click to fast catalogue
6 - In the editor type into 245$a 'Perl best practices' - or another title that exists in your system
7 - Get a notice of duplicate with options:
Yes: View existing items
No, save as new record
8 - Clicking 'Yes' will take you to the record details page - you cannot add an item because record is not FA framework
9 - You can click 'back' to return to the messages
10 - Clicking 'No' will create a new record and take you to the details page - you can add an item (Edit->manage items)
but barcode has been dropped
11 - Apply patch
12 - Repeate 3-6
13 - You now get options:
Yes: View existing items (you cannot add items to an existing record)
No, save as new record
14 - 'Yes' will take you to details view
15 - Click back
16 - 'No' will take you to the edit items screen and populate the barcode
17 - Saving the item should return you to patron and issue item
18 - Repeat again with a staff patron with full permissions and confirm saying 'Yes' completes the fast catalogin workflow as expected
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6812b170a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 34889 moved to additional contents.
Remove call in opac pages.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cef1685925)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 34869 moved additional contents.
Remove call in opac/opac-search.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a210683610)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We also use a badge without a text-bg-# class on the modal claims
include.. this patch adds the same text-bg-info to that.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 79e872915f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
With bootstrap 5, a 'badge' class should always be accompanied by a
text-bg-# class. This second class sets the badge color and an
appropriate forground text color to ensure appropriate contrast.
Steps to test:
1. Enable the ability to mark items as "Claimed Returned" by setting
the ClaimReturnedLostValue system preference.
2. Check out an item to a patron, and backdate the due date so that it
becomes overdue.
3. Navigate to: /cgi-bin/koha/circ/overdue.pl to view the overdue item.
4. Mark the item as "Claims Returned".
5. Observe the display: the claim return date text uses #fff (white),
which is not visible on white table rows and has poor contrast on
grey rows.
6. Apply the patch
7. Clear cache in browser and observe the display: the claim return date
badge is now blue with black text.
8. Sign off and have an amazing day! :D
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2f4f34de0a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When building queries for matchign Zebra uses OR to combine searches - Elasticsearch
has been effectively using 'AND' - this patch checks whether and_or has been passed
and follows the variable when present.
To test:
1 - Have an import file of auths with multiple 035
2 - Setup an authority matching rule
Search index: other-control-number
Score: 1000
Tag: 035
Subfields: a
3 - Make sure Koha is using Elasticsearch
4 - Stage file without matching, import file
5 - Stage file again, using your matching rule
6 - Note all records match
7 - Setup Cataloging->Marc modification template
8 - Add an action to delete first 035 field
9 - Run it against the records you just imported
You can use a report:
SELECT authid FROM auth_header WHERE authid > #### (find the lowest new record number in batch you imported)
10 - Change matching rule in batch to none, then back to your rule
11 - No matches!
12 - Apply patch, restart all
13 - Set matchign rule to none, then back to your rule
14 - Matches!
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised!
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1 - Add a new Z3950 server with basic information filled out, it doesn't need to be valid
2 - Add a second copy via the DB:
INSERT INTO z3950servers SELECT null,host,port,db,userid,password,servername,checked,rank,syntax,timeout,servertype,encoding,recordtype,sru_options,sru_fields,add_xslt,attributes FROM z3950servers WHERE id=6;
3 - Delete the copy, assuming it is on page one, it works
4 - Spam the DB with the SQL above and create 20+ entries
5 - Open the Z3950 admin page
6 - Go to second page of servers
7 - Attempt to delete any entry
8 - Nothing happens
9 - APPLY PATCH
10 - Try deleting again, it should now work.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a009011d5c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If only one EAN is defined for the library, the Create EDIFACT order
button template used the eans.0 object instead of its ean field.
As a result, the data-ean attribute contained an object, not the EAN
string. Fixed by explicitly accessing the field: eans.0.ean.
Steps to reproduce:
1. Ensure only one Library EAN is configured in
/cgi-bin/koha/admin/edi_ean_accounts.pl.
2. Create a new basket.
3. Inspect the HTML of the Create EDIFACT order button.
4. The data-ean attribute will show an object instead
of EAN string — e.g. Koha::Schema::Result... (this is the bug).
5. Apply the patch and reload the basket page.
6. Inspect the HTML again — data-ean should now show
the EAN string (fixed).
7. Click the button, confirm basket closure, then go to EDIFACT messages
(/cgi-bin/koha/acqui/edifactmsgs.pl) and verify the message was created.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The default value for stateDuration is 7200 (2h). Which means DataTables
will ignore the saved state if reused after this delay.
Additionally is causes problem on some tables where the default state is
not restored and all columns are displayed.
From https://datatables.net/reference/option/stateDuration
```
Please note that the value is given in seconds. The value 0 is a special value as it indicates that the state can be stored and retrieved indefinitely with no time limit.
```
We are going to set it to 0 so that the state is only lost/reset after a
logout
Test plan:
Ideally you can should edit this file and set saveState to 60 (seconds),
so it's easy to test.
Do not apply this patch and confirm that the state is not restored after
either 60s or 2h (if you modified the file or not).
It is a problem on the checkout list table as extra columns (like
"Today's checkouts") are displayed.
With this patch applied the state should be restored correctly.
If you logout the state will be lost however.
Ideally we might want to store user's preferences on the server.
Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ad11a32584)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c2a7a1906c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a8afc9f8d7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes the `data` attribute nullable. This happens when
`$job->finish()` is called with no parameters.
To test:
1. Apply the regression tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/jobs.t
=> FAIL: Tests don't pass, a 500 is returned when `finish()` was called
with no data
3. Apply this patch
4. Rebuild the API spec:
k$ yarn api:bundle
5. Repeat 2
=> SUCCESS: Tests pass! The API doesn't explode
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b0f21ad50a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 01e3a6f600)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change removes the install target's dependency on "all". There
is no clear reason why "install" would need to depend on all other
build targets.
After you remove this dependency, running "make" and "make install"
work the way you'd expect them to work. "make" does the build and
"make install" does the install.
Test plan:
0. DO NOT APPLY THE PATCH YET!
1. Setup intall target
sudo mkdir /opt/koha
sudo chown kohadev-koha /opt/koha
2. Clean build env
rm -rf blib Makefile /opt/koha/*
3. perl Makefile.PL
Installation mode (dev, single, standard) [standard] single
Please specify the directory in which to install Koha [/var/lib/koha/kohadev/koha] /opt/koha
NOTE: Otherwise accept all defaults
4. make
NOTE: build-resources.PL is run and the blib directory is populated
5. make install
NOTE: build-resources.PL is run and the blib directory is populated and the built
files are installed to /opt/koha
6. Apply the patch now
7. mv /opt/koha /opt/koha.bak
8. Re-setup install target
sudo mkdir /opt/koha
sudo chown kohadev-koha /opt/koha
9. Clean build env
rm -rf blib Makefile /opt/koha/*
10. perl Makefile.PL
Installation mode (dev, single, standard) [standard] single
Please specify the directory in which to install Koha [/var/lib/koha/kohadev/koha] /opt/koha
NOTE: Otherwise accept all defaults
11. make
NOTE: build-resources.PL is run and the blib directory is populated
12. make install
NOTE: Only the install step is run
13. diff -r /opt/koha /opt/koha.bak
14. Note that there are no differences between the two directories
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0d06c27e75)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We store an encrypted version of the passwords for vendor's interfaces, but we don't utf8 decode it after it is decrypted
Test plan:
0. Do not apply this patch
1. Create or edit a vendor and add at least one interface with non ascii
characters, eg. émyPassword❤
2. Go to the detail view of the vendor and click the "Show password"
link
=> The password is not correctly utf8-decoded
3. Apply this patch, repeat 2
=> The password is correctly displayed
4. Repeat 1 and 2
=> The password is correctly displayed
Note that maybe we should make sure the encrypt_hex is getting a valid
utf8-encoded variable.
(cherry picked from commit 25a805e8e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Enable Syndetics
2. Have a record with an 024 and 1st indicator.
3. Do a search to return the record from step 3.
4. The image does not display.
5. APPLY PATCH
6. Try step 3 again, this time the cover image should display properly on the OPAC results page.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2d484d326b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
As elsewhere in the code, we should use a state variable for our
'bib_searcher' object to avoid overhead of extra ES connections.
Worth noting - we don't actually use the 'bib_searcher' at all during
record auto linking as we pass skipmetadata
To test:
0 - Apply patch
1 - Enable biblio auto linking
AutoLinkBiblios, CatalogModuleRelink, LinkerRelink
2 - Stage and import a marc file
3 - Confirm record authorities link as expected
4 - Search authorities in the staff interface
5 - Confirm usage counts are shown for results
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e2207cb478)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Currently when adding to a basket from a new/staged file, we don't check whether a matched record still exists when importing. This patch changes the conditional check to be based on the existence of the biblio record rather than just on the biblionumber from the match
Test plan:
1) Stage and import a record into Koha
2) Stage the same record again, this time matching on ISBN
3) Check that the match has been found in the batch details
4) Delete the original record that you imported in step 1
5) Find a basket, and add to it from a staged file
6) Choose the file/record you imported in stage 2
7) Select the record and save to add the orders
8) You will get a 500 error
9) Apply patch and restart_all
10) Refresh the page to re-submit the form
11) The form should submit correctly
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 37538b22a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 08da4b33b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a new option to Elasticsearch to skip facets in build_query and
build_query_compat.
There should be no behavior change, however, queries to ES should be simpler
To test:
1 - Export some record from Koha
2 - Stage the records for import, matching on 999c
3 - Confirm expected matches
4 - Switch batch to use ISBN for matching
5 - Confirm expected matches
6 - Apply patches, restart all
7 - Switch batch to use 999c
8 - Confirm matches
9 - Switch batch to use ISBN
10 - Confirm matches
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d73e3399ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Correct preference is 'DefaultHoldExpirationdateUnitOfTime'.
Also no reason for ";".
Test by running : prove t/db_dependent/Reserves.t
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b79fb6aedf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 26176 renamed 'AutoLocation' to 'StaffLoginRestrictLibraryByIP'
Needs to be fixed in test suite
Test plan:
Enable 'StaffLoginRestrictLibraryByIP' in prefs
Run : prove Auth.t
Should pass
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ea6e31c39b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Typo in system preference call 'OPACFineNoRenewalsIncludeCredit'
=> 'OPACFineNoRenewalsIncludeCredits'
Test plan :
Run : prove t/db_dependent/Circulation.t
Run test plan of Bug 23293
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0a32b7371f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Add some AVs for ITEMTYPECAT and set some of your item types to be in that Search category. I made one called OTHER
2. Go to the OPAC advanced search page, the item types should be correctly displaying under ITEMTYPECAT with the correct description from ITEMTYPECAT.
3. Create a new AV called OTHER in a different category like 'ERM_AGREEMENT_CLOSURE_REASON'. Make the description something different like 'Wrong description'.
4. Now go back to the OPAC advanced search.
5. Notice your OTHER option now reads 'Wrong description'.
6. APPLY PATCH and restart_all
7. Try again, the OPAC descriptions should now be correct.
Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f79aec38b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
Apply patch, go to circ rules, confirm it says "Hold and booking library pickup match" under both "Defaul checkout, hold and return policy" and under "Default holds and bookings policies by item type" at both the all libraries and library-specific levels.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 66074093c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a check for the current user permissions in order to
display the 'Edit' button on the patron search screen.
To test:
1. Have a patron with staff access and only `list_borrowers` permission
(I picked Henry Acevedo, henry - Acevedo123)
2. Login as that user
3. Perform a patron search at http://kohadev-intra.localhost/cgi-bin/koha/members/members-home.pl
=> FAIL: There's an 'Edit' button
4. Click on the 'Edit' button
=> SUCCESS: You are told you don't have enough permissions
5. Apply this patch
6. Repeat 3
=> SUCCESS: The button is not displayed
7. Login with a superlibrarian user
8. Repeat 3
=> SUCCESS: You can see the button
9. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 989924e963)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 35153 moved IntranetmainUserblock to additional contents.
Remove call in C4/Auth.pm
Test plan :
Check additional content "IntranetmainUserblock" is still OK ;)
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c74a67a8ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-dump now generates the dump with utf8mb4
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a41f52530a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 35065 moved to additional contents.
Remove call in opac/sco/help.pl.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49e852e0a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2b69baa3c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When OnSiteCheckoutsForce is set it is possible to on-site checkout an
item to a restricted patron. But the due data that is labelled with
"Automatic due date:" is not being set. As a result, when such a
checkout is performed and you do not set the date manually, the due
date will be set as for normal checkout (even if it is marked as
on-site checkout).
Test plan:
==========
1. Enable OnSiteCheckouts and OnSiteCheckoutsForce; manually restrict
a patron.
2. Go to checkout page for this patron. You will notice:
"On-site checkouts only. Automatic due date:" with an empty input
field for the date. Perform the checkout (pick any existing
barcode).
Note the due date in patron's checkouts. In standard ktd it will be
+5 days from today, as for a regular checkuot (cf. Circulation and
fine rules) and the checkout will be marked as on-site checkout.
3. Apply the patch ; restart_all.
4. Repeat p. 2 (with another barcode or after checking-in). The date
in the date input field should be set to today's date and after
performing the checkout the sue date should also be set to
the current date.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 103f095c2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch removes a few instances of the "bg-*" class from our
templates, and adds some CSS to ensure that we can safely add the
".bg-*-subtle" class to a div with ".page-section."
To test, apply the patch and rebuild the staff interface CSS.
- Go to Administration -> Circulation and fine rules. The information
about rules specificity should have a pale blue background matching
the color found in an "info" style alert.
- Go to Tools -> Import patrons. The "Notes" section should match what
you saw in the previous step.
NOTE: I made a small change to whitespace in the markup of this
section to prevent the database column list from displaying without
line breaks--an issue introduced by the global tidy.
- Go to Authorities and perform a search which will return results.
- Click Actions -> Merge on one of the results. An "info" style alert
should be shown at the top of the page, "Merging with authority..."
- Without completing a merge, go to the Authorities home page. You
should see an identical alert.
- In KTD, bibliographic record 369 can be used to test errors related to
encoding problems:
- Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=369
and confirm that you see a "warning" style alert (a pale yellow
background).
- Edit that record and confirm you see a similar error messages on
that page.
Sponsored-by: Athens County Public Libraries
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 753ce067e6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 71f601dabb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch add a class for the background on the badge element to fix color contrast
To test:
1. Go to a bib record and place multiple holds on it
2. Select multiple holds and click 'Cancel selected (4)'
3. The Alert says 'This action will cancel 4 hold(s).'
4. Note that the contrast on the number of holds is very low
5. Click 'Cancel' apply patch and restart_all
6. Repeat steps 2-3
7. Note that the contrast on the number of holds is good
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 858a53d897)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch reflects some rethinking on my part about how the Bootstrap
color classes are meant to be used, and makes some changes which I hope
will be more consistent with the Bootstrap 5 documentation while keeping
our interface usable.
The main difference is in the use of the classes "text-bg-*" and
"bg-*-subtle." For example the class "bg-info-subtle" will give an
element a subtle colored background. "text-bg-info" will have a more
saturated background color. The "text-" part of the class is a reference
to the fact that elements with that category of classes will have text
color which adapts to provide correct contrast.
This patch also makes a minor adjustment to the color used for "warning"
type elements (e.g. <div class="alert alert-warning">. I've adjusted the
color slightly in order to differentiate it from the "primary"
class color we use for submit buttons.
To test, apply the patch and rebuil the staff interface CSS. Clear your
browser cache if necessary.
Checkouts:
1. Have an item with a non-public note.
2. Check it out, it looks fine while under "Today's issues"
3. Set the issuedate to some time in the past
`update issues set issuedate = '2025-03-04 15:58:46';`
4. The non-public note should appear in legible red.
Return claims:
1. The "Claims" tab on the patron detail and checkout pages already used
the "text-bg-*" classes but the "-success" class didn't work well
with the tab background color so I removed it. I notice there is a bug
in the way the classes change as the tab is activated, but that will
have to be dealt with on another bug.
Bibliographic details:
1. Place at least one hold and at least one article request on a title.
2. The detail view should show "Holds: 1", and "Article requests: 1"
with the numbers in legible Bootstrap badges.
Holds:
1. Perform a catalog search which will return multiple titles.
2. Select multiple titles and click "Place hold."
3. Select a patron to place a hold for.
4. Confirm the holds by clicking "Place hold."
5. The holds should now be shown under the heading "Existing holds,"
with Bootstrap badgets showing the hold count on each.
Patrons requesting modification:
1. Submit an update to a patron record via the OPAC.
2. On the patrons home page in the staff interface there should be a
"Patrons requesting modifications" link at the top, with a count of
pending modifications shown in a Bootstrap badge.
Check-ins:
1. Check in an item from a patron account with multiple other checkouts.
2. In the table of checked-in items the patron's remaining checkout
count should be shown in a Bootstrap badge.
SMTP servers:
1. Go to Administration -> SMTP Servers.
2. Edit at least one server so that debug mode is enabled and it is
marked as a default server.
3. In the view of servers, the debug mode and default status should be
shown in Bootstrap badges.
Plugins:
1. Go to Administration -> Plugins.
2. Upload a plugin if necessary, and check the list of installed plugins
when the plugin is disabled and when it is enabled. In both cases the
status should appear in a Bootstrap badge.
About page:
1. Go to the About page.
2. Under the "Server information" tab, the status of Memcached and
Message broker should be shown with a background color--pale blue for
okay statuses.
Tools home page:
1. If necessary, go to the OPAC and submit at least one comment on a
bibliographic record and tag at least one record.
2. In the staff interface, on the Tools home page, the number of tags
pending approval and the number of comments awaiting moderation
should show in Bootstrap badges.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1) View the patch diff and confirm that the hardcoded value of 'ordering' has been replaced with undef
2) In C4/Acquisition.pm, look at the method description for ModBasketHeader and observe the descritpion for 'create_items'
3) Note that if the value is set to undef as per step 1, the AcqCreateItem syspref takes precedence
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2186bf7fa8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - Enable SotckRotation
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=StockRotation
2 - Browse to "Cataloging -> StockRotation"
3 - 'New rota' - fill out the form and save
4 - Manage->stages
5 - Add many stages, more than 10 at least
6 - Try to move a stage form the bottom to position 3
7 - Note message above list: Saving changes... Error: Bad Request
8 - Apply patch, restart_all
9 - Attempt to move stages, try many combinations
10 - Success!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 85003674ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e744f001ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This new method name better reflects the fact that it now creates - and stores - the PseudonymizedTransaction object
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 54205bd6ba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Run the tests before and after applying this patch:
perl t/db_dependent/Koha/Pseudonymization.t
They should fail before this patch and pass after applying patch.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f23632a352)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
These tests prove the bug:
perl t/db_dependent/Koha/Pseudonymization.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Similar change in intranet counterpart: catalogue/export.
Test plan:
Verify no warning anymore when using ris or isbd when record
contains specific Unicode character(s).
Signed-off-by: Magnus Enger <magnus@libriotech.no>
I could not trigger "Wide character" for RIS in the OPAC, but for
ISBD I can see it removes that warning.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 81359cc8a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Commit https://github.com/Koha-Community/Koha/commit/f42df40 renamed 'Members' to 'Patrons' but didnt adjust h3->h2 as it did with every other entry in this page
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8538c885f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If the main heading is 111 and id contains subfield $n, the content of
this subfield is badly displayed in OPAC: at the beginning of the
heading text (right after "By:"), and then correctly, as the part of
the link.
Test plan:
==========
1. Check if the 111 $n subfield is available in the framework you are
using. If not, activate it (Editor checkbox).
2. Take any bibliographic record and replace the main heading with a
conference heading (111), e.g.:
111 $a Annual Koha Hackfest $n (13 : $c Marseille : $d 2025)
Control in OPAC that the $n subfield is displayed twice (first time
at the beginning)
3. Apply the patch ; restart_all
4. Check the result in OPAC: the main heading should be displayed
correctly now.
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 34870b7d6a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1) Look at the same biblio on both OPAC and Staff:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=76
2) Click on the 'current library' column header for OPAC and 'Home
library' for staff. Notice that on Staff when it's DESC, arrow points
down (as expected), but on OPAC when it's DESC, the arrows points up.
3) Apply patch. Reset CSS:
yarn css:build
4) Do a hard refresh on the OPAC. Repeat test plan. Notice they now
behave the same.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1d6017bbd8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This applies only to the basic editor, but for both bibs and authorities
To test:
1 - Open a bib in the basic editor, see that the control fields show the subfield tag value label and that the value of 00 is slightly cut off in the display
2 - Open an authority in the basic editor and confirm same
3 - apply patch
4 - reload your records and see that the subfield value and label are now hidden for control fields in both bib and authrority editing
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 13b813a4f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Try to translate itemtype for an opac language not part of
intranet languages.
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>
(cherry picked from commit c80e9c015c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Combining opac with pref template is wrong. This pref should
actually be renamed to something like intranetTheme(s) or so.
Replacing the obsolete prog theme in Languages.t by undef. This
achieves the same: getting all themes for that interface.
Test plan:
Add some languages for opac and intranet. Do not enable exactly
the same set.
Enable TranslateNotices.
Verify that you have all OPAC languages on memberentry and
opac-messaging. And all languages on additional contents.
Run t/db_dependent/Languages.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with:
OPAC languages: en, nl-NL, de-DE
Staff languages: en, de-DE, fr-FR
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit baea457996)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The fourth parameter is now removed and was never used.
Also replacing the 'both' interface by passing no interface to make
it consistent with call in additional-contents.
Resolving warn for empty interface or theme on Languages.pm L128.
Test plan:
Run t/db_dependent/Languages.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1f6e409871)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Prefered and chose.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d84f06ebab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bbf0392359)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The REST API can return translated strings to the opac or staff
interface, so it should respect the KohaOpacLanguage cookie and return
translations in the same language than the interface.
Test plan:
1. Do not apply patch yet
2. Log in to koha staff interface
3. Use the browser's devtools to get the value of CGISESSID cookie
4. Make sure you have at least 2 languages installed ('en' + another
one - I'll use 'fr-FR' as an example in this test plan)
5. Find an item and note its itemnumber and itemtype
6. Go translate this itemtype's description (admin » item types » edit
item type » translate). Add a translation for 'en' and another one
for your language.
7. Close your browser tab (do not logout) and restart Koha to flush the
memory cache.
8. Execute the following commands (replace variables by the correct
value):
curl -sSL "$KOHA_URL/api/v1/items/$ITEMNUMBER" \
-H 'x-koha-embed: +strings' \
-H "Cookie: KohaOpacLanguage=en; CGISESSID=$CGISESSID" \
| jq -r '._strings.item_type_id.str'
If you do not have jq, it can be found in most distributions
packages. Or you could inspect the JSON manually at the path
/_strings/item_type_id/str
Restart Koha again, and execute the same command but with your
language set in KohaOpacLanguage cookie:
curl -sSL "$KOHA_URL/api/v1/items/$ITEMNUMBER" \
-H 'x-koha-embed: +strings' \
-H "Cookie: KohaOpacLanguage=fr-FR; CGISESSID=$CGISESSID" \
| jq -r '._strings.item_type_id.str'
Depending on how Koha sort the languages (not sure how it's done),
you should get either the 'en' one or the 'fr-FR' one, but the
important thing is you should get the same translation, no matter
what the value of KohaOpacLanguage is, which is the issue this patch
is trying to fix.
9. Apply the patch and restart Koha
10. Repeat step 8. This time you should get the translation
corresponding to the language set in KohaOpacLanguage cookie
Side note:
* The need to restart Koha before each request is due to a bug (see bug
38454). If already pushed when you're testing this one, you don't have
to restart.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ca5db9ffb7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
[1] This prevents a warn 'Violation of unique constraint in Letter'
from TestBuilder if the notice already exists.
[2] The about warn should no longer say that password changes will
fail but only warn about a missing notification.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8d31c2e067)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 585ea49741)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Playing with the about page, I noticed prior tests in the codebase fail
if the letter doesn't exist.
This patch fixes that.
To test:
1. With a fresh KTD run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Patron.t
=> SUCCESS: Tests pass!
2. Delete the existing notices:
k$ koha-mysql kohadev
> DELETE FROM letter WHERE code="PASSWORD_CHANGE"; \q
3. Repeat 1
=> FAIL: Tests fail! Current tests print a warn (Test::NoWarning)
doesn't like this
4. Apply this patch
5. Repeat 1
=> SUCCESS: Tests now pass. The test creates its own notice.
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93a830b8ca)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ab0fa4fea6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a check in about.pl for when `NotifyPasswordChange` is
enabled but no notices are present on the system.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8e05336a08)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a6b22a27dd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When NotifyPasswordChange is enabled and GetPreparedLetter fails to find
a PASSWORD_CHANGE letter template, the set_password method was returning
early with undef, preventing the password from being changed.
This fixes the issue by:
1. Removing the 'or return;' statement after GetPreparedLetter
2. Wrapping the letter processing in an if block to handle missing templates
3. Ensuring password change continues regardless of notification success
The password change should not fail just because the notification cannot
be sent. The notification is a nice-to-have feature, but the core
functionality (changing the password) should always work.
Test plan:
1. Apply the tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Patron.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Verify that when the letter template exists, notifications are still sent
6. Verify that when NotifyPasswordChange is disabled, password changes work
7. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f748205ad0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cb3a4f094c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When NotifyPasswordChange is enabled and a patron has a valid email address,
but there is no PASSWORD_CHANGE letter template, the set_password method
fails silently and returns undef instead of changing the password.
This adds comprehensive regression tests to demonstrate the bug:
1. Bug condition: Missing PASSWORD_CHANGE letter template causes password
change to fail and method returns undef
2. Control test: Password change works when NotifyPasswordChange is disabled
3. Control test: Password change works when PASSWORD_CHANGE letter exists
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c310ccfc0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6ebff3d47f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When a calendar widget has been initiated as a date range selector (as
it is when creating a new booking), the selected dates are added to the
input field as "0000-00-00 to 0000-00-00". This "to" needs to be
translatable.
To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:
- Update a translation:
> gulp po:update --lang fr-FR
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from
JavaScript e.g. misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from intranet-tmpl/prog/js/calendar.js for
translation, e.g.:
#: koha-tmpl/intranet-tmpl/prog/js/calendar.js:144
msgctxt "As in, from date1 to date2"
msgid "to"
msgstr ""
- Edit the "msgstr" string however you want (it's just for testing)
- Install the updated translation:
> perl translate install fr-FR
- In the staff interface, locate an bibliographic record with items and
change the "Bookable" option from the item details screen.
- Switch to your updated translation in the staff interface.
- Click the "Place booking" button.
- Fill out all the fields in the "Place booking" modal.
- After you select a date range, the "Booking dates" input field should
show your translated text.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 00bb254149)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 120a4f86c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
In Unimarc, the field for music incipit is 036. The test to display the music player is correctly on field 036 but the field displayed was 031 (which is valid for Marc21 but not for Unimac).
To test:
On a Koha Unimarc instance:
1- Set system preference "OPACPlayMusicalInscripts" to "Play" and "OPACShowMusicalInscripts" to "Show"
2- set the system preference OPACXSLTListsDisplay is set on koha-tmpl/opac-tmpl/bootstrap/{languagecode}/xslt/UNIMARCslim2OPACDetail.xsl
3- Update a framework of your choice to display subfield 036$2 $g $n $o $p in OPAC, intranet and editor (make sure the collapse checkbox is not checked)
4- Create a record with the previously modified framework, fill all mandatory fields and add a 036 field with at least subfield $2 $g $n $o $p, make sure you have no 031 field
example of a valid 036 field
036$2 pe
036$g G-2
036$n bB
036$o 3/4
036$p {8C'8C'}/4D4C'4F/2E
5- Go to the OPAC detail page for the record created (with interface in English)
6- check that the music player does not appear
7- apply the patch
8- Reload the OPAC detail page for the record created (sill with interface in English)
9- check that the music player appears and is working
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b364089c70)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 15be16d017)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
In batch item modification, unchecking any column hides the previous column.
This is caused by new HTML in table header :
<span class="dt-column-title"></span><span class="dt-column-order"></span>
This patch fixed by adding ".dt-column-title" to function guess_nb_cols().
Test plan :
1) Go to batch item modification
2) In "Show/hide columns:" click on "Home library" column
=> Check correct column is hidden
3) Go to another batch item modification
=> Check column "Home library" is hidden (from cookie storage)
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7c501cc381)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ee3bf78fd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To Test:
Before applying:
1. Turn on the UseTransportCostMatrix system preference
2. Create holds on a record with multiple items. (I used Lanark in KTD)
3. Set the item location to all be the same (I used MID)
4. Set the holds to pickup at Centerville, Fairfield, and Pleasant Valley
5. Set the transport cost matrix to
Centerville\fairfield 1
Centerville\Midway 1
Fairfield\Centerville 1
Fairfield\Midway 1
Midway\Centerville 1
Midway\Fairfield 1
Midway\Pleasant Valley 4
6. Build the holds queue (either turn on realtime hold queue and then edit the bib to update or run the cron on the command line)
7. Run a report: select * from hold_fill_targets where biblionumber=9 order by borrowernumber;
8. Rebuild the hold queue
9. Run the report again, the results should be the same.
10. Apply the patch
11. Run the hold queue again
12. Observe the results should now be different.
13. Try a few more times and ensure the numbers are changing, create some more items at midway and try again to see more variety in numbers.
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5832521086)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 642802d8cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Adding parentheses since I was not sure about precedence here. The filter
should be applied to the whole expression.
Adjusted double to single quotes in the second change.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This change checks for HTTP(S) URLs and skips the shell when using
system() so that shell metacharacters aren't interpreted.
Test plan:
0. Apply the patch
1. Insert the following into the Babeltheque_url_update system preference:
$(whoami > /tmp/rce.log)
2. koha-shell kohadev
3. perl misc/cronjobs/social_data/update_social_data.pl
4. Note the script says the following:
$(whoami > /tmp/rce.log) is not a HTTP URL. Aborting.
5. Note also that /tmp/rce.log is not created
6. Change Babeltheque_url_update syspref to something like the following:
http://localhost:8080
7. perl misc/cronjobs/social_data/update_social_data.pl
8. Note that the wget succeeds but the bunzip2 fails (as expected) since
we haven't fetched a bzipped file
9. Try to create a payload that passes the HTTP URL test with shell
metacharacters and note that they're not interpetted and instead
just used as part of a URL string.
Signed-off-by: Jake Deery <jake.deery@openfifth.co.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7bb61b3114be14d2d18d03f855385d863f0bac60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes an identified RCE in the update_social_data.pl
social_data, which when executed, allows an attacker to run arbitrary
code on the system's shell.
TO TEST:
a) In the Babeltheque_url_update syspref, wrap any bash in $(), and then
run the update_social_data.pl script.
*) For example, $(whoami >
/tmp/rce.log) will output to a file the username the perl script is
running as.
APPLY PATCH
b) Run the update_social_data.pl script again. The string is now
meta-escaped, and the RCE no longer works.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a26836bac54183c82fd5934e07c3c7306012998a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We should make the inventory 'problem' column translatable.
Test plan (assuming KTD):
1- Update po
misc/translator/translate update LANG
(for example LANG="fr-FR")
2- translate the new strings
vim misc/translator/po/LANG-messages-js.po
edit for example "wrong place" or "missing"
3- install the language
koha-translate --install LANG --dev kohadev
4- use it for the UI and confirm that the CSV generated has 'problem' column translated
a- Using the test language (activate it with sysprefStaffInterfaceLanguages)
b- Go to Cataloging > Inventory
c- Fill some barcode and some filter (for example a filter on callnumber)
d- Select "Export to CSV file"
e- Submit
f- Open the CSV file generated, check that the colomn problem is now translated according to what you have filled in step 2
Signed-off-by: Marion Durand <marion.durand@biblibre.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3e68067e7e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6388bb3bee)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
0 - APPLY PATCH
1 - Place 50 holds on a bib record
https://github.com/kidclamp/handy-koha-script/blob/main/randhold.pl
2 - View the holds page for the record
3 - Sort the holds alphabetically
4 - Change the dropdown priortiy for the alphabetically first hold to 1
5 - All the priorities should now ajust accordingly but they will NOT be resorted on the fly
6 - Play with adjusting some priorities, making sure everything correctly adjusts.
7 - Click 'Update holds' to make sure the priorities adjust right
8 - Make sure you test with the 'del' option and the adjustments still work.
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch modifies the template which is used to display additional
author information if OPACAuthorIdentifiersAndInformation is displayed.
The change prevents an empty list item from appearing.
To test, apply the patch and go to system preferences in the staff
interface.
- Search for OPACAuthorIdentifiersAndInformation and make sure that
"Identifiers (024$2$a)" is checked.
- Have a record with at least 2 persons (100, 700) linked to an
authority record
- One of those authority records should not have an 024 tag
- The other authority record should have two 024 tags:
- 024 $a someidyoumakeup $2orcid
- 024 $a someidyoumakeup $2somethingelse
- Check the detail page in OPAC -> "Author information" tab
- Check the authority detail page in OPAC, under "Author information"
in the right-hand column.
Before the patch, '$2somethingelse' is not "supported" and will create
the empty list element. After the patch there should be no empty list
item.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 43dfb04536)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit df6768d616)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - go to reports home
2 - inspect Reports dictionary
3 - see that it has class rep_dictonary
4 - apply patch, reload page
5 - see that class is now rep_dictionary
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea98862fa9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ae5df2bc75)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds test coverage for the new booking status management
in AddIssue:
Test scenarios covered:
- Patron checking out their own booked item (marks as completed)
- Different patron checking out booked item during actual booking period
(cancels booking)
- Checkout conflicts only during lead period (preserves booking, respects
librarian decision)
- Checkout period encompassing entire booking period (cancels booking)
- No booking present (normal operation)
Tests ensure proper booking lifecycle management and validate that
librarian override scenarios work as intended.
To test:
1. Apply all patches
2. Run: prove t/db_dependent/Circulation.t
3. Verify all booking status handling scenarios pass
The test plans now provide:
- Step-by-step instructions for manual testing
- Multiple scenarios covering different use cases
- Clear expectations for what should happen in each case
- Practical workflow that staff would actually follow
- Edge cases like lead period conflicts and overrides
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a2b541321)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cdb4e0dd30)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This follow-up addresses critical issues in the initial implementation:
1. **Patron Ownership Check**: Only mark bookings as 'completed' when
the patron checking out the item is the same patron who made the booking
2. **Smart Cancellation**: When another patron checks out an item that
conflicts with an existing booking:
- Cancel the booking only if checkout overlaps with actual booking period
- Respect lead/trail periods - don't cancel if conflict is only during
preparation periods (allows librarian override scenarios)
3. **Date Logic**: Proper overlap detection using start_date and end_date
rather than periods extended by lead time
This prevents incorrect booking completion and handles librarian override
scenarios appropriately.
Test plan:
1. Apply previous patch and this follow-up
2. Enable bookings and create a bookable item
Test A - Patron's own booking completion:
3. Create booking for Patron A: start = today, end = +7 days
4. Check out item to Patron A (due date = +5 days)
5. Verify booking status = 'completed'
Test B - Lead period override scenario:
11. Return item, set bookings_lead_period circulation rule = 3 days
12. Create booking for Patron A: start = +5 days, end = +8 days
13. Check out item to Patron B (due date = +4 days) - conflicts with lead period
14. Override the booking conflict warning
15. Verify Patron A's booking status remains 'new' (not cancelled)
16. This respects librarian's decision that item will return in time
Test C - No booking scenario:
17. Return item, ensure no active bookings exist
18. Check out item to any patron
19. Verify checkout works normally without errors
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2f849fd79c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit dcd3bdbf28)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds logic to automatically mark a patron's booking as
'completed' when they check out the item they have booked.
When AddIssue is called, the system now:
- Checks if there's a conflicting booking for the checkout period
- Marks the booking status as 'completed' if found
This ensures booking status accurately reflects when items are
actually checked out to fulfill bookings.
Test plan:
1. Enable bookings system preference
2. Create a bookable item (set bookable = 1 in items table or via item editor)
3. Create a booking for a patron for that item with start date = today,
end date = 7 days from now
4. Go to circulation and check out the item to the same patron who made
the booking
5. Check the booking status in the database or via the bookings interface
6. Verify the booking status has changed from 'new' to 'completed'
7. Confirm the checkout was successful and shows normally in patron's
checkouts list
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a8fd9734c6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit aeb8648326)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test :
- create an acquisition basket
- add at least one record
- close the basket (the "export as CSV" link is present)
- attach the basket to a basket group
- check that the "export as CSV" link, next to "reopen the basket" is
now gone.
- apply patch and reload the page (may need reload plack, cache, etc...)
- "export as CSV" link is now present even though the basket is
closed and it is attached to a basket group.
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Dominique et Stephanie <stephanie.etallaz@univ-cotedazur.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 174f243fd8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fbb0967331)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Currently, advanced bibliographic records editor creates empty
subfields (or even empty fields) when no content is placed after
‡<code> (or, in case of control fields, after <tag>).
Test plan:
==========
1. Enable EnableAdvancedCatalogingEditor (have StripWhitespaceChars
set to "Don't strip" - the default setting).
2. Open a record in the advanced editor, create empty subfield and
empty fields, e.g.:
007
500 _ _ ‡a
246 3 1 ‡aAdditional title :‡b
3. Save the record. Go to bibliographic record Normal view and in
modal "MARC preview" notice that the fields / subfields you entered as
empty exist in the record with no data. This is wrong.
4. Apply the patch ; restart_all.
5. Repeat p. 2 and 3. Note that empty fields/subfields have not been
created.
Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Wojciech Baran <wojciech.baran@ignatianum.edu.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d56b15d29c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3a22c2efb2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Page suggestion/suggestion.pl calls CanUserUseBudget() in a loop,
will must use a uniq Koha::Patron object of the logged in user.
When there are many budgets and funds this takes some time.
Test plan :
Compare performance with and without patch with many budgets and funds
(see test plan of Bug 35921)
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 10c8a373fb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b3704edcac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When no results are found, a warning:
[WARN] Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt line 76.
is generated in [plack-]opac-error.log
Test plan:
==========
1. In OPAC, perform a search for a random string of characters to get no
results.
2. Check plack-opac-error.log. You should see a warning as above.
3. Apply the patch ; restart_all.
4. Repeat the search. Check the log -- there should be no new warning.
Sponsored-by: Ignatianum University in Cracow
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 ee7fa9f3f6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cd788e34ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 60b30bc700)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit da1cb5ae0f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
[WARN] Use of uninitialized value $view in exists at /kohadevbox/koha/Koha/Manual.pm line 346.
Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ca66bf719)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d84d276587)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2aeab5ba46)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 781f7e5f9e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Query parameters break the manual mappings in vue modules.
If a url in a vue module contains query parameters the mapping for the manual fails and redirects to the homepage when 'Help' is clicked
To reproduce navigate to the agreements page in ERM and create at least one. On the list page, use the filters so that you have query parameters in the page URL. Click the 'Help' button - you just get the manual home page
Test plan:
Confirm that the original issue is fixed when this patch is applied.
Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0514af0117)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 251c92ebe2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Same fix as
commit 7bc3b24827
Bug 40344: Fix KohaTable_spec.ts
> Cannot read properties of undefined (reading 'description')
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 15f8acf546)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d8ea7cfe2b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c44171d74f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 2b7d149655)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl
Select a value for Library and/or Category filters
Click "Search"
=> Without this patch the dropdown lists do not have the value selected
=> With this patch applied they have the correct values selected
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0f4f792c6c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 90aef7ae36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
On bug 40127 we moved the build_items_table calls outside of document
ready, but createChild is defined in document.ready (and so defined too
late).
This patches fix the following JS error:
"Uncaught ReferenceError: createChild is not defined"
Signed-off-by: David Nind <david@davidnind.com>
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 60b7c238a8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4caa113d62)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 81e92c5ae0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a0af2fc321)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0749850851)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cea9f8f639)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 35560 includes a FIXME noting that it does not properly maintain the display of hold cancellation reasons introduced in bug 26281.
Test Plan:
1) Place a hold and cancel it with a reason
2) Browse to the patron's hold history, note the FIXME shown instead of
the reason
3) Apply this patch
4) Reload the patch
5) You should now see the cancellation reason instead of FIXME!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1a26837c74)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6a31993e2b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes holds endpoints be allowed to embed strings.
To test:
1. Use your favourite REST tool to hit /api/v1/holds
2. Add the `x-koha-embed: +strings` header.
=> FAIL: The API rejects because it is not equiped with the feature.
3. Apply this patches
4. Run:
$ ktd --shell
k$ yarn api:bundle
k$ koha-plack --restart kohadev
5. Repeat 2
=> SUCCESS: It works!
6. Sign off :-D
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 e90bc50209)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f9db5716c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds the mentioned AV to the returned strings structure.
It also adds tests for the method.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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 0f533c1ceb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e991fc4057)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 08525887ca)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 567902f42d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Ensure that the virtual shelves system preference is enabled
2. Create one or two lists using a patron that has both a first and last name. You don’t have to add items to the list, the list itself is enough.
3. Under the Owner column in the Lists table, search using the patron’s first name. Note that the name is properly filtered.
4. Next, try to search by the last name. It is also properly filtered.
5. Now search using both the first name and the last name together. Note that the results come up empty.
6. Apply the patch.
7. Repeat steps 3–5. Note that the patron shows in the results with just the first name, the last name, and the full name. 7.1. Additionally, try searching with extra spaces (e.g., ' Firstname Surname ' or 'Firstname Surname'). Confirm that results are still correctly shown.
8. Run t/db_dependent/Virtualshelves.t
9. Sign off and have a great day! :D
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9d5d88b0eb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3bcfcfbe0a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds the "Required" label to the patron list name field in
the form for creating a patron list. This makes it consistent with other
forms which has required fields.
To test, apply the patch and go to Tools -> Patron lists -> New patron
list.
The "Name" field should have a red label "Required" after it.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7addabbb12)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 09ff6086c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The mapping connecting the patron restriction types administration page
to the corresponding page in the manual was incorrect. This patch fixes
it so that clicking the help link from that page will take the user
directly to the correct place on the page.
To test, apply the patch and restart services.
- Go to Administration -> Patron restriction types.
- Click the "Help" link.
- You should be taken directly to the Patron restriction types page in
the manual: administration.html#patron-restriction-types
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 467fad871a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9104d5e046)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When no item is available, with AllowHoldPolicyOverride, a triangle appears on
each item to be forced, but if you choose “next item available” without
having any item available, you won't see anything. Additionally, the top
warning message about "No items are available" does not show when
'AllowHoldPolicyOverride' is set to allow and no items are available
(e.g. withdrawn, lost, damanged, depending on settings)
This patch corrects an error in request.pl where no incrementation of
$num_override happens when an item is forced. This causes the warning
triangle to appear on the 'Place hold' button on the bib level. The top
warning message is restored as well.
Finally, this patch changes the display of the fa-warning-triangle icon on the
'Place hold' buttons to increase contrast with the button color, making it
easier to see and increasing accessibility.
Test plan:
1) Set circulations rules for specific category and/or itemtype (for example 1
hold allowed for staff on books). Set AllowHoldPolicyOverride on "Allow".
2) Search for a book biblio with multiple items, and set each item to a
non-circulating status (withdrawn, lost, etc.)
3) Place a hold for a staff category patron for this bib record.
4) Normally you will see triangles on each item on specific section but you can
force it. When you just select the next item available none triangle and
none alert showing.
5) Apply this patch and restart_all.
6) Refresh your browser page.
7) Normally now there is a triangle into 'Place hold' submit button and an
alert message appears on the top of the page. The triangle is also more
visible.
8) Test other hold limits, such as max holds per record, to ensure the
appropriate top alert message appears and the triangle alert appears on
the 'Place hold' button.
Co-authored-by: Thibaud Guillot <thibaud.guillot@biblibre.com>
Sponsored-by: BibLibre
Sponsored-by: Westlake Porter Public Library <https://westlakelibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1900effc9b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9827914216)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The SIP server generates warnings when logging account information
for failed logins:
Use of uninitialized value $args[0] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314
Use of uninitialized value $args[1] in sprintf at /kohadevbox/koha/C4/SIP/Sip.pm line 314
This occurs when $self->{account}->{id} or $self->{account}->{institution}
are undefined during failed authentication attempts.
This patch fixes the issue by:
1. Adding a safer sprintf implementation in siplog that handles undefined values
2. Providing default values for undefined account information in logging calls
To test:
1. Start SIP server
2. Attempt to connect with invalid credentials using sip_cli_emulator.pl:
./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su invaliduser -sp wrongpass -l kohalibrary2 --patron koha -m patron_information
3. Check /var/log/koha/kohadev/sip-output.log
=> FAIL: 'Use of uninitialized value...' warns
4. Apply this patch
5. Repeat 2
=> SUCCESS: No "Use of uninitialized value" warnings appear
=> SUCCESS: Logging shows 'undef/undef' for failed logins instead of empty strings
6. Try a valid login
=> SUCCESS: Still works correctly for valid logins
7. Sign off :-D
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 9cad25967d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4e1cd02932)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - Tail the logs in a terminal:
tail -f /var/log/koha/kohadev/*.log
2 - Browse to Tools->IMport patrons
3 - Note warning when loading the page:
Use of uninitialized value $uploadborrowers in concatenation (.) or string at /kohadevbox/koha/tools/import_borrowers.pl line 105.
4 - Upload a patron file, under: Preserve existing borrowers
"If matching record is already in the borrowers table:" choose "Ignore..."
5 - Import the file
6 - Note an warning:
Use of uninitialized value $update_dateexpiry in string eq at /kohadevbox/koha/tools/import_borrowers.pl line 113.
7 - Apply patch, restart all
8 - Reload the tool
9 - Note no warning
10 - Upload the file again, same settings
11 - Note no warning
12 - Sign off!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 58d14eccd0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8c252eaa73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The table global search didn't combine correctly with the status filters.
Test plan:
1. Have a patron with holds history
2. Go to members/holdshistory.pl?borrowernumber=x where x is the borrowernumber
3. Try to us the DT seacch to filter
=> Filtering is working as expected
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 088927aac1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 1ef30cc10c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change fixes the background jobs so that the list page loads
even when plugins are disabled.
Test plan:
0. Apply the patch
1. Download https://github.com/HKS3/koha-normalize-marc2db/releases/download/v0.91/Koha.Plugin.HKS3.NormalizeMARC2DB-0.91.kpz
2. Upload plugin into KTD
3. Click "Run tool" for plugin
4. Go to http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
5. Note that you see a pretty "Type"
6. Go to /etc/koha/sites/kohadev/koha-conf.xml and turn enable_plugins to 0
7. sudo koha-plack --restart kohadev
8. Go to http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
9. Note it now says "Unknown job type 'plugin_marc2db_normalizeall'
10. Celebrate as this is preferable to a 500 error
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6e3d0b1e48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit eb862bd552)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1) Navigate to ERM agreements and create an agreement
2) In the agreements table, click on the filter for Is Perpetual
3) Only the option for 'Yes' will be shown
4) Apply patch
5) yarn js:build
6) Hard refresh the browser and repeat step 2
7) Filter options for Yes and No should be available
8) Check the filtering works appropriately
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5594945339)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cf1464d290)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - apply patch
2 - make sure registers are enabled in system preferences so the permission shows
3 - find a patron, set permissions
4 - confirm the permission reads "Pefform refunds of point of sale transactions."
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 64702f4320)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3d8a10a53b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the terminology used in the overdue notice (ODUE)
to change 'branch' to 'library'.
Test plan:
1. Check the wording of the ODUE notice under Tools > Patrons and
circulation > Notices and slips.
2. Note that it includes this wording that uses 'branch':
"Please return or renew them at the branch below as soon as possible."
3. Apply the patch.
4. Check that the updated ODUE notice has changed 'branch' to 'library'
by either:
4.1 Resetting everything: reset_all
4.2 Viewing the default notice - click "View default" when viewing
the email notice
The updated text is now: "Please return or renew your overdue items
at the library as soon as possible."
5. Sign off.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bd1bc0a6f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b65e193871)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We are removing a wrong method name at the same time ;)
Test plan:
Read the patch. Just removing a few outdated POD lines.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 64b78fe3c4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 129012ff78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Also corrects the alphabetic ordering for Calyx.
To test:
* Apply patch
* Go to About Koha: you can do so from the more menu or by clicking
on the version number in the bottom right corner
* Open the tab "Koha team"
* Scroll to the bottom of the page and verify that KIT and CLAMS show
up in the correct spot in the list of "Contributing companies and institutions"
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bead469858)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 717eee0fcf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds <span>s with classes around the patron's email and phone
information in the results of the overdues report. This will allow for
greater flexibility in styling or hiding the information.
To test, apply the patch and go to Administration -> Sytem preferences
-> IntranetUserCSS.
- Add this to the preference:
.overdue_email { color: red; }
.overdue_phone { color: blue; }
- Go to Circulation -> Overdues and confirm that you can see the custom
colors in the results.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b70a325dd2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 739c4fa01c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch revises the breadcrumbs in the staff interface lists template
so that the correct link is shown when editing or viewing a public list.
To test, apply the patch and go to Lists in the staff interface.
- Create a public list
- Go to the list of public lists
- Click to view your newly created public list
- The breadcrumb menu should show Lists -> Public lists -> Contents of
[list name]
- The link to public lists should work correctly.
- Perform the same check when editing your public list.
- Check the viewing and editing of a private list to make sure no
breadcrumb errors were introduced.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38a8428a0a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 731119a287)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Have some orders that are late.
2. Go to the late orders page (
http://localhost:8081/cgi-bin/koha/acqui/lateorders.pl )
3. Try to use the export function, nothing happens.
4. APPLY PATCH
5. Try steps 1 and 3 again, this time the export function should work.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
(cherry picked from commit cdf88e0237)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Decoded the barcode in add items to collection.
Test plan:
1. Go to Tools -> Rotating collections
2. Create a rotating collection
3. Chose Actions -> Manage items
4. Paste a barcode and put some spaces around it, for example " 39999000010053 "
5. Click Submit => Shown an error, no item with matching barcode found, though the barcode is printed without all the whitespace
6. Apply patch
7. Repeat steps 1 - 5, barcode should be accepted
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2c730040b1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 80a1810316)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes selection of a library when editing a desk in
Administration. The form should provide all libraries as options, not
just the currently selected one.
To test, apply the patch and go to Administration -> Desks.
- If necessary, create a new desk.
- Edit the desk. The form should load with the correct library prefilled
in the <select>, but should offer all libraries as a choices.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20085be7fb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f94664313d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bootstrap 5 sets the "resize" property on textareas to "vertical." For
our purposes this is a regression in functionality and should be
overridden.
To test, apply the patch and rebuild OPAC and staff interface CSS.
- Log into the OPAC and go to the "Your personal details" page.
- Under "Alternate address" -> "Contact note," check that the textarea
can be freely resized.
- In the staff client, create a new patron and test the same textarea in
that form.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit df3e44b88b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 694ff22961)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch improves the accessibility of the OPAC. It's a trivial patch
to help assistive technologies understand the different tables.
Test plan:
Enable the system preferences: OPACShelfBrowser, OPACPrivacy,
ShowComponentRecords.
1- On the Koha OPAC, Research a record.
2- Inspect the result page HTML and notice that there is a
role='presentation' in the table tag.
3- Choose a record with a Component section and inspect the HTML, there
should be a role='presentation' in the table tag.
4- Open the Browse shelf. Inspect the HTML and notice that there is a
role='presentation' in the table tag of the browse shelf.
5- Log in to a patron account, go to the Your Summary page, and choose
Privacy in the menu.
6- Inspect the HTML of the page and notice that there is a
role='presentation' in the table tag of the 'Immediate deletion'.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bc9dfb4b8e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 428d787526)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - Create a patron in a category that can be a guarantee and do not assign any guarantor
2 - Create a patron in a 'Child' account type and do not assign a guarantor
3 - Enable system preference 'ChildNeedsGuarantor'
4 - View 'Check out' and 'Details' tabs for both patrons, note there is no warning
5 - Apply patch
6 - Repeat 4, note warning on all pages
7 - Add a patron gaurantor on the child - repeat 4 - warning is gone
8 - Add non-patron guarantor information to other patron - repeat 4 - warning is gone
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a catch during circulatoin actions and passes a message back to the caller
For checkouts and renewals we don't have a method for passing messages so we simply catch the exception
and warn - this seems reasonable, as we have now added a warning on the patron display that they are missing
a guarantor
To test:
1 - Create a Child type patron with no guarantor
2 - Create a patron in a non-child category that can_be_guarantee with no guarantor
3 - Check out an item to each patron above
4 - Enable system preference 'ChildNeedsGuarantor' and TrackLastPatronActivityTriggers - select all
5 - In mysql
UPDATE borrowers SET datelastseen = '2025-01-01';
6 - Restart all to clear cache (so update last seen will update)
7 - Attempt to checkout a book to either patron - 500 error
8 - Attempt to returnt he books the patrons have checked out - 500 error
9 - Attempt to renew their items - 500 error
10 - Apply patches, restart all
11 - Repeat checkout, renewal, checkin
12 - On checkout and renewal there should be a warning on the patron page, but actions succeed with no additional problems
13 - On return you get a warning letting you know the action succeeded but there is still a problem to resolve
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Uncaught TypeError: col.data is undefined
This patch removes the ability to
* search by status
* search or sort by "last run"
But fix the JS error that will restore the other features
Test plan:
- Activate the ERMModule via the system preference
- Add at least one data provider
- In the list of data providers, type anything in the general search field on top
=> Confirm that you can use the different features of the table without
JS errors
Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd52dab411)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3396a46c28)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
01:18:38 koha_1 | # Failed test 'no warnings'
01:18:38 koha_1 | # at /usr/share/perl/5.38/Test/Builder.pm line 193.
01:18:38 koha_1 | # There were 6 warning(s)
01:18:38 koha_1 | # Previous test 4 '401 Unauthorized'
01:18:38 koha_1 | # Use of uninitialized value $aMask[1079] in bitwise xor (^) at /usr/share/perl5/GD/Barcode/QRcode.pm line 217.
01:18:38 koha_1 | # at /usr/share/perl5/GD/Barcode/QRcode.pm line 217.
jammy (22.04LTS) (perl): 1.15-7
noble (24.04LTS) (perl): 2.00-1
I guess it's fixed by
85e7911e65
But it is not released yet: version 2 is from September 2023 and commit from March 2024.
Test plan:
Install version 2 of GD::Barcode:
`cpanm GD::Barcode@2.0.0`
Run the tests
Without this patch the "no warnings" test fails
With this patch applied the tests pass
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fd6ceb6b24)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ddf1b9dfe3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
* on the patron page click edit at the top, entered a preferred name, and hit save
* we should see the preferred name being displayed instead of the first name for the user
* go back to the main edit page and change the preferred name to a blank space
* We should revert back to the first name being used
* if we open the edit page back up we should see the first name in the preferred name field
* Edit the preferred name again and click on details
* open up any of the sections other then contact information
* hit the save button on the section without changing anything
* you should still see the preferred name you set being used.
* open up an individual section other then contact method, change a value, then save
* you should still see the preferred name you set being used.
* open up the contact information section and save without changing anything
* the preferred name should be intact
* open up the contact information and change the preferred name, and save.
* you should see the new preferred name reflected.
* Open up the contact information section, change the preferred name field to a blank and save.
* you should see the first name being used now.
* Open up the contact information section, and put any number of spaces in the preferred name with nothing else and then save.
* you should still see the first name being used.
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4356c14d29)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit bdefe52d46)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The patron search modal in the patron card creator -> new batch ->
patron search has two select2 modals, sort1 and sort2. If these are not
anchored to the modal they will be anchored to the body element and
appear behind the modal.
To test, apply the patch and go to Tools -> Patron card creator -> New
-> Card batch.
- Click "Add patron(s)"
- Test the "Sort 1" and "Sort 2" dropdowns. They should work correctly.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20313df192)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4afb657fe8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds an ID to the "Skip bibliographic records with open
acquisition orders" checkbox on the batch record deletion page (Cataloging >
Batch editing > Batch record deletion".
This is required so that when selecting or unselecting the checkbox, the focus
remains on the checkbox.
Test plan:
1. Navigate to Home > Cataloging > Batch record deletion
2. Click 'Skip bibliographic records with open acquisition orders' to toggle
the Record type checkbox (selected by default).
3. Inspect the page (right click the page, select Inspect, and look at the
values in the checheckbox input field):
. before the patch there is no id for the field
. after the patch there is an id="skip_open_orders" for the checkbox field
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 b3666a7233)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4038fcb6e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
After changes to about.pl the checking of the Zebra status has landed
in "sysinfo" section instead of "about". As a result "Zebra status"
always reports "Running" even if Zebra is off.
Test plan:
==========
1. Turn zebra server off (koha-zebra --stop kohadev) and check in
"Server information" (More > About Koha) the "Zebra status" info.
You will see "Running".
2. Apply the patch ; restart_all ; koha-zebra --stop kohadev
3. Check "Zebra status" in "Server information". You should see now:
"Zebra server seems not to be available. Is it started?".
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1835ced4c0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 35267ecfa8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch add support for AuthorLinkSortBy and AuthorLinkSortOrder in
the default UNIMARC XSLT files.
The description of the syspref is also slighly updated to hint users of
custom XSLT file about the need to update their template.
To test:
0. On a UNIMARC database
1. Set AuthorLinkSortBy to 'title' and AuthorLinkSortORder to
'descending'
2. On the intranet and OPAC, search for an author you have multiple
titles from and click on a result
3. Click on a link one a name for an author
4. Note a new search is performed, sorted by field from defaultSortField
preference and not by title descending
5. Apply the patch
6. restart_all
7. Check that the syspref description now include a note about custom
XSLT files
8. Repeat step 2 and 3
9. Note a new search is performed, sorted by title descending
10. Test other values - confirm links are updated in both staff and opac
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 4581e399bb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fa9279644a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch corrects a couple of templates which include a Bootstrap
popover component, updating the data attributes which were missed during
the BS5 upgrade.
The patch also makes a minor change to CSS in order for the popover
heading to not have unwanted margins.
To test, apply the patch and rebuild the staff interface CSS.
- Perform a catalog search in the staff interface.
- Add one or more items to the cart.
- Open the cart and hover your cursor over the "Items" heading. A
popover should be triggered with a message about item sorting.
- Go to Administration -> Circulation and Fine rules.
- Edit a rule to add content to the "Note" field.
- Save the rule and then hover your cursor over the "View note" text.
The note you added should appear in a popover.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb1e00455e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c0f86a7598)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes the column span in the table footer rows of the account
payment page (pay.tt). I've also added a couple of lines of CSS to style
the footer rows.
To test, apply the patch and rebuild the staff interface CSS.
- In the staff client, locate a patron with charges.
- If necessary, go to a patrons "Accounting" tab and use the "Create
manual invoice" page to add one or more charges to the account.
- Under the "Make a payment" tab there should be one or more footer rows
including "Total due." The "Total due" cell should be aligned right,
with a grey background.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 92c6516651)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch addresses CSV formula injection vulnerabilities by ensuring
all Text::CSV instances use formula protection.
Changes made:
* Add formula => 'empty' to all Text::CSV constructors in:
- Koha::Patrons::Import
- Koha::BackgroundJob::ImportKBARTFile
- Koha::ERM::EUsage::CounterFile
The 'empty' formula mode causes potentially dangerous formulas (starting
with =, +, -, @) to be treated as empty strings rather than executed,
preventing CSV injection attacks while maintaining data integrity.
Security impact:
* Prevents execution of malicious formulas in CSV imports
* Protects against data exfiltration via CSV formula injection
* Maintains backward compatibility for legitimate CSV data
To test:
1. Apply the previous patch (author test)
2. Run:
$ ktd --shell
k$ prove xt/author/Text_CSV_Various.t
=> FAIL: Should show 3 files without formula protection
3. Apply this patch
4. Repeat 2
=> SUCCESS: All tests should now pass
5. Try importing CSV with formula content (=cmd|"/c calc",test,data)
=> SUCCESS: Formula content is rejected/emptied, not executed
6. Import normal CSV data
=> SUCCESS: Normal data imports correctly
7. Sign off :-D
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This test ensures all Text::CSV usage in Koha includes proper formula
injection protection to prevent CSV formula injection attacks.
The test scans all Perl modules and verifies that Text::CSV constructors
include the 'formula' parameter set to a safe mode ('empty', 'die',
'croak', 'diag', or numeric 1-5).
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove xt/author/Text_CSV_Various.t
=> FAIL: Test should fail showing files without formula protection:
- Koha/Patrons/Import.pm
- Koha/BackgroundJob/ImportKBARTFile.pm
- Koha/ERM/EUsage/CounterFile.pm
3. Apply the follow-up patch to fix the violations
4. Repeat 2
=> SUCCESS: All tests should pass
5. Sign off :-D
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This patch addresses CSV formula injection vulnerabilities by ensuring
all Text::CSV instances use formula protection.
Changes made:
* Add formula => 'empty' to all Text::CSV constructors in:
- Koha::Patrons::Import
The 'empty' formula mode causes potentially dangerous formulas (starting
with =, +, -, @) to be treated as empty strings rather than executed,
preventing CSV injection attacks while maintaining data integrity.
Security impact:
* Prevents execution of malicious formulas in CSV imports
* Protects against data exfiltration via CSV formula injection
* Maintains backward compatibility for legitimate CSV data
To test:
1. Apply the previous patch (author test)
2. Run:
$ ktd --shell
k$ prove xt/author/Text_CSV_Various.t
=> FAIL: Should show 1 file without formula protection
3. Apply this patch
4. Repeat 2
=> SUCCESS: All tests should now pass
5. Try importing CSV with formula content (=cmd|"/c calc",test,data)
=> SUCCESS: Formula content is rejected/emptied, not executed
6. Import normal CSV data
=> SUCCESS: Normal data imports correctly
7. Sign off :-D
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
This test ensures all Text::CSV usage in Koha includes proper formula
injection protection to prevent CSV formula injection attacks.
The test scans all Perl modules and verifies that Text::CSV constructors
include the 'formula' parameter set to a safe mode ('empty', 'die',
'croak', 'diag', or numeric 1-5).
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove xt/author/Text_CSV_Various.t
=> FAIL: Test should fail showing files without formula protection:
- Koha/Patrons/Import.pm
3. Apply the follow-up patch to fix the violations
4. Repeat 2
=> SUCCESS: All tests should pass
5. Sign off :-D
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
This patch fixes a XSS vulnerability in the
suspend hold modal in the staff interface.
By building our Javascript using Web APIs rather
than with strings and jQuery's html() method,
we're able to securely handle malicious payloads.
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=29
2. Add a hold for "koha" patron
3. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
4. Click "Holds" tab and click "Suspend"
5. Note the modal loads properly
6. Go to http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
7. Click "Holds" tab and click "Suspend"
8. Note the modal loads properly
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 40538: Simplify code
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
See also comment33, point 4.
Test plan:
cp debian/templates/apache-shared-opac-antibot.conf /etc/koha/
Test enabling/disabling by toggling the comment of the SetEnvIf line,
restart apache and remove the KOHA_INIT and CGISESSID cookie.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch adds a fast simple bot challenge via Apache.
To test:
0. Apply the patch
1. sudo cp debian/templates/apache-shared-opac-antibot.conf /etc/koha/.
2. sudo cp debian/templates/apache-shared-opac-plack.conf /etc/koha/.
3. curl http://localhost:8080/cgi-bin/koha/opac-search.pl
4. Note an instant response with a very simple HTML response
5. Open an incognito browser and go to http://localhost:8080/cgi-bin/koha/opac-search.pl
6. Note a very brief loading animation before the OPAC search page appearing
7. Do a search
8. Note no more loading animation appears
9. Close the incognito browser
10. Open an incognito browser and go to http://localhost:8080/cgi-bin/koha/opac-main.pl
11. Do a search via the "Library catalog" search bar
12. Note no loading animation appears
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Cornelius Hertfelder <cornelius.hertfelder@bsz-bw.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
We have tested this in production on at least three live sites for
several weeks, and it has worked as expected. We have not noticed any
negative side effects.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch changes the script to use 'Koha::PseudonymizedTransaction->new_from_statistic' directly
rather than calling 'Koha::Statistic->pseudonymize()' which generates a background job.
Additionally, some of the checks from 'pseudonymnize' and the background job are moved into the search
so we don't fetch any to pseudonymize that should not be.
To test:
1 - Generate some entries in statistics (checkin, checkout, renew, etc)
2 - Enable pseudonymization (see bug 28911 if you need bcrypt settings)
3 - perl misc/maintenance/pseudonymize_statistics.pl -v -c
4 - Statistics pseudonymized
5 - Check the background jobs table, note jobs were generated
6 - Apply patch
7 - perl misc/maintenance/pseudonymize_statistics.pl -v -c
8 - You get same count as before, and are warned of existing pseudonymized transactions
9 - enter 'Y' to continue
10 - Check the pseudonymized_transacations table
11 - Confirm same rows were generated twice
12 - Check the background jobs
13 - Confirm there were no new jobs generated (for pseudonymization)
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>
(cherry picked from commit 342c1d5993)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The koha-mysql didn't work when the instance was set up to use an encrypted
database connection.
Please note: this testplan is for ktd, not for a production environment!
Unfortunately, there are some issues with the database TLS configuration in koha-testing-docker.
This is described comment 14 of bug 36026 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36026#c14)
As a workaround, you can add "mysql_ssl_optional=1" in Koha/Database.pm.
See point (g) in comment 15 of bug 36026 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36026#c15)
Testing Database Connection Encryption:
1. Apply the patch.
2. Configure koha-conf.xml to use a TLS connection
(see comment 10 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36026#c10, follow steps 3a-g + 4 )
3. Run:
koha-mysql <koha_instance>
4. Verify that the MySQL console opens successfully.
5. Check the encryption settings in the MySQL console:
- run:
SHOW VARIABLES LIKE '%ssl%';
- run:
STATUS;
Ensure that the following conditions are met:
- have_openssl and have_ssl are set to "YES".
- The SSL cipher in use is displayed.
Testing MySQL Timezone Configuration:
1. Apply the patch.
2. Configure the timezone in koha-conf.xml, for example:
<timezone>Antarctica/South_Pole</timezone>
3. Run:
koha-mysql <koha_instance>
4. Verify that the MySQL console opens successfully.
5. Check the timezone setting in the MySQL console by running:
SELECT @@session.time_zone;
6. Confirm that the output matches the timezone configured in koha-conf.xml.
Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 42ec5d36c2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We do not need 1 or 0 here btw. We just check for true.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 663830d9ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Set up a user with only catalogue and edit_items permissions
2. Create a Fast Add record with item
a. Go to Cataloging
b. Click on Fast Cataloging
c. Fill in mandatory fields and save the record
d. Fill in mandatory item fields and click Add item
3. Log in as the user you set up in step 1
4. Search for the record you created in step 2
5. Click Edit > Manage items in the menu at the top of the record
==> You do not have permission to access this page!
6. Go back to biblio record page
7. Apply patch and restart_all
8. Click Edit > Manage items again
==> Edit items page loads normally
9. Make a few edits and confirm that they save correctly
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6bfcd23bdb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1. Go to Administration > MARC Bibliographic framework
2. On the right side of the default framework, click on "Actions" >
"MARC Structure"
3. Search for field 780
4. Click on "Actions" > "Edit subfields"
5. Click on the "t" tab
6. Check "Editor" under the "Visibility" section
7. Click on "Save Changes"
8. Repeat steps 1 to 7 for field 785$t
9. Have or create a record with a value for 780 and 785 with the first
indicator at 0 and the other left empty
10. Look at the record on the staff interface and the OPAC
11. Notice that in Normal View, the values entered for 780 and 785 do
not have labels
12. Apply the patch
13. There are now labels in the staff interface and the OPAC
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ba2ec1d202)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1. Go to Administration > MARC Bibliographic framework
2. On the right side of the default framework, click on "Actions" >
"MARC Structure"
3. Search for field 780
4. Click on "Actions" > "Edit subfields"
5. Click on the "t" tab
6. Check "Editor" under the "Visibility" section
7. Click on "Save Changes"
8. Repeat steps 1 to 7 for field 785$t
9. Have or create a record with a value for 780 and 785 with the first
indicator at 0 and the other left empty
10. Go see the record on the OPAC
11. Notice that in Normal View, the value entered for 780 and 785 do not
have labels
12. Apply the patch
13. There are now labels
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a3bfa55919)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Because the template uses the wrong op, add_item rather than cud-additem, to
decide whether to include a hidden input with the itemnumber, if you edit an
item and then add another item you wind up submitting a form that includes the
previous itemnumber when you add a new one. Nothing happens, because the code
for adding an item doesn't look at $input->param('itemnumber'), but since it
doesn't mean anything we shouldn't be submitting it.
Test plan:
1. Without the patch, find any biblio with at least one item attached, and
in the items table click Edit item on one of them
2. Without needing to making any changes, click Save changes
3. In the page that loads, scroll down to the bottom of the Add item form,
right-click the Add item button, and choose Inspect
4. A few lines up, above a '<fieldset class="action">,' there will be an
'<input type="hidden" name="itemnumber" value="633">' with the itemnumber
of the item you previously edited
5. Apply patch
6. Scroll up, click Actions - Edit on any item, then Save changes
7. Again, right-click the Add item button, Inspect, note that there isn't a
itemnumber input with the number of the item you previously edited
Sponsored-by: Chetco Community Public Library
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bcc6c2175a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When creating a new record starting from Normal records view, by using
New > New record warnings in the log will be generated like:
[2025/04/03 12:45:33] [WARN] Use of uninitialized value $frameworkcode
in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 513.
Test plan:
==========
1. In staff interface, open any record in Normal view.
2. From upper menu chose New > New record.
3. Check the plack-intranet-error.log file, you should see fresh
warnings with "Use of uninitialized value $frameworkcode".
4. Apply the patch ; restart_all.
5. Repeat p. 1.-3. No new warnings.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 70e43a0553)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The biblio details page Edit menu has three different elements which all
have id="modifybibilio", two of which also have another id. Neither of those
things is allowed.
Test plan:
1. Without the patch, load the details view for any biblio record and View
source
2. Search for id="modifybiblio"
3. You will get three results, the second and third shown with id in red
4. Apply patch, reload the page, View source and search again
5. You will get one result, without any red
Sponsored-by: Chetco Community Public Library
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8251e854d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change makes it so that you can provide runtime parameters
and use "Run with template".
Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Create a report template. For example:
<table>
<tr><th>Transformed Biblionumber</th></tr>
[% FOREACH row IN data %]
<tr><td>Biblionumber [% row.biblionumber %]</td></tr>
[% END %]
</table>
2. Create a SQL report with a runtime parameter. For example:
SELECT biblionumber
FROM biblio
WHERE biblionumber > <<biblionumber>>
3. Run the report using "Run with template"
4. Specify a biblionumber of 1
5. Click "Run the report"
6. Note that the output is the template output and not regular
SQL output
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4daf0b7982)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Resolve
DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'verification_token' on BorrowerModification
Test plan:
Update details for existing borrower.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7fb30a073e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Test with and without this patch. Verify that you see no warn with Missing
value for primary key column anymore in plack-opac-error.
Enable self registration.
Register a new patron.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c7bdbf937c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Set a overdue trigger for print notice
2. Set up an overdue to be captured by overdue_notices.pl
3. Make sure the patron has an email address
4. Run overdue_notices.pl
5. Run gather_print_notices.pl
6. Now go to the patron's notice page (members/notices.pl?borrowernumber=x)
7. Find the print row for the overdue just generated.
8. See that under the 'Delivery note' it says "To: test@test.com".
9. APPLY PATCH
10. Try again, you should now see no "To:" field when the transport type is print
11. Make sure that when the transport type is anything but print, you do see it.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fdc7a8eb4a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes a minor markup change in order to improve the alignment
of controls for editing a search filter in the staff interface.
To test, apply the patch and make sure the SavedSearchFilters system
preference is enabled.
- In the staff client catalog, perform a search.
- At the top of the search results, click "Save search as filter".
- Fill out the form and save the search filter.
- Go to Administration -> Search filters.
- Click the "Edit search" button for your filter.
- You should be returned to the advanced search page and there should be
an "Editing filter" form at the top. The "Show in OPAC" and "Show in
staff interface" labels and checkboxes should be aligned neatly with
the buttons in the toolbar.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b390be07fd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds an extra variable to internal function CheckValidBorrower to set the
context as 'create' or 'update'
To test:
1 - Enable PatronSelfRegistrationEmailMustBeUnique
2 - Edit a patron in staff interface and set email to 'a@example.org'
3 - Open an incognito window and go to opac
4 - Self register a patron using email a@example.org
5 - You receive an error
6 - Use b@example.org for email
7 - No problem
8 - Sign in as the new patron
9 - Edit your information
10 - Set email to a@example.org
11 - You receive an error
12 - Apply patch, restart all
13 - Edit patron again
14 - No error!
15 - Register another patron on the opac
16 - Confirm still wanred if using a@example.org as the email
Signed-off-by: Allax Guillen <AGuillen@roseville.ca.us>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5cf5811d01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
IFLA no longer provides field-level documentation pages for the UNIMARC
format (as at December 2024). It only provides:
- updates by year as individual PDFs (there may be multiple PDF updates
for a field)
- a single consolidated PDF that is not yet endorsed by IFLA.
This patch updates the default UNIMARC field documentation links
to https://www.ifla.org/g/unimarc-rg/unimarc-updates/
It also:
- makes minor formating changes to improve consistency with the
advanced editor:
. the help link text is now [?], instead of ?
. adds hover text for [?] - "Show help for this tag"
. adds some additional spacing before the indicator fields
. removes the '-' before the tag title
- updates the MarcFieldDocURL system preference description
Test plan:
1. Start up a Koha instance that uses UNIMARC (if using
koha-testing-docker, change KOHA_MARC_FLAVOUR=unimarc in
your .env file).
2. Set the EnableAdvancedCatalogingEditor system preference to "Enable".
3. Search for and edit any bibliographic record using the basic editor.
4. Click on the help text link (?) after any tag.
5. Note that you get an error:
- Firefox: "The page isn’t redirecting properly"
- Chrome-based browsers:
"This page isn’t working
archive.ifla.org redirected you too many times."
6. Switch to the advanced editor (Settings > Switch to advanced editor).
7. Click on a tag and then click the help link ([?]) at the bottom of
the page.
Result: You get the an error for the web page.
8. Switch back to the basic editor (Settings > Switch to basic editor).
9. Apply the patch.
10. Duplicate the tab and refresh the page for the record you
were editing.
11. Click a help link for the basic editor - it now goes to a
valid web page (https://www.ifla.org/g/unimarc-rg/unimarc-updates/).
12. Compare the basic editor page to the previously opened tab
and note these differences:
- the help link text is now [?], instead of ?
- there is now hover text for [?]- "Show help for this tag"
- there is some additional spacing before the indicator fields
- there is no '-' before the tag title
13. Check that the page looks okay if the Settings > Show MARC
tag document, and Show tags options are toggled off.
14. Switch to the advanced editor (Settings > Switch to advanced editor).
If you click on the help link you now go to a valid web page.
15. View the updated description for updated MarcFieldDocURL system
preference and check that it makes sense.
16. Enter a URL for the MarcFieldDocURL system preference, for
example, https://example.com
17. Edit another record (using either the basic or advanced editor) and
click the help link - it should take you to the web page you set for
MarcFieldDocURL.
18. [Optional] Enter a custom URL pattern for the help documentation
using {FIELD} (I don't know of any UNIMARC custom URL patterns).
19. Repeat the steps as appropriate for a MARC21 instance:
19.1 Start up a MARC21 instance (change KOHA_MARC_FLAVOUR=unimarc
on your .env file).
19.2 The help links should take you to the Library of Congress MARC
pages.
19.3 Check that custom URL patterns continue to work, for example,
use the Canadian custom URL pattern
http://www.marc21.ca/MaJ/BIB/B{FIELD}.pdf
20. Sign off!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Mathieu Saby <mathsabypro@gmail.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9cebd54ab1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
getAll should call getAll, not get, or we lose the _per_page=-1
parameter.
Test plan:
Have more than 20 additional fields for agreements
Create and agreement:
=> Notice that with this patch, all the fields are displayed.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Searching tag$subfield in the framework should redirect to the edition
of the tag with the subfield tab selected.
This has been broken when we used the wrapper for tabs on bug 33178.
Test plan:
Edit a framework
http://localhost:8081/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=
Search for 952$c
=> You are redirected to the edition of 952 and the "c" tab is selected
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b1efa3d71d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the cookie consent javascript, when the feature is
enabled, to ensure that the cookie consent bar gets focused when it
displays.
Test plan
1) Enable the CookieConsent preference
2) Open any OPAC page
3) Hit 'tab' and note the display of 'Skip to main content'
4) Confirm that the cookie consent bar is displayed and continued 'tabs'
eventually navigate to it
5) Apply this patch
6) Navigate to any OPAC page
7) Hit 'tab' and note that the 'Cookie consent' bar is focused, your
keyboard navigation starts with the cookie consent buttons
8) Accept the essential cookies
9) Hit tab and note the focus is back to normal and shows the 'Skip to
main content' button on first keyboard navigation.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Amended-by: Jonathan Druart
Run tidy.pl
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5426ae5bfd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds information about whether an entry in the overdue report
is overdue so we can style dates accordingly. We can't assume that each
result is overdue because the report can be changed to include all
checked out items.
To test, apply the patch and go to Circulation.
- Check out to a patron.
- Use the "Specify due date" option to check out some items with due
dates in the past, due dates today, and due dates in the future.
- Go to Circulation -> Overdues.
- You should see the items which have due dates in the past. The date in
the "Due date" column should be red text. The "Checked out on" date
should be regular text.
- In the sidebar, check the "Show any items currently checked out"
checkbox and submit the form.
- You should now see all the items you just checked out. Only the
overdue items should show their due date in red.
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 207cb59241)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
- Go to /api/v1/.html#op-get--acquisitions-baskets-managers
- See 'possibe' misspelling
- Apply patch and revisit
- Spelling is fixed
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8bf9368d75)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
It will be a commented line in the debian template and added also
in the crontab.example file.
As mentioned on BZ, the comment can easily be removed automatically
during Docker builds or startups etc.
Test plan:
Just read the patch. Nothing changes here actually.
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>
(cherry picked from commit 2d93ec69bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Read the patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b816c790c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Currently nothing happens when clicking the "View restrictions" link
in patron messages. Using the bootstrap api to open it resolves the
issue.
To test:
1) Go to a patrons details page, click "Restrictions" and add amanual
restriction.
2) A message with a "View restrictions" link should appear.
3) Clicking this link does not open the "Restrictions" tab as it should.
4) Apply patch
5) Now this "View restrictions" link should open the "Restrictions" tab
Sponsored-by: Gothenburg University Library
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1c3bc68e9c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - save a report
2 - click Preview SQL for that report from the Saved Reports page
3 - see there are two delete buttons
4 - apply patch, reload page
5 - now there is one delete button
6 - confirm that delete button gives a confirmation message and then deletes the report
7 - Install a second language for the intranet
8 - switch to that language and confirm you have just 1 delete button, it is translated, and it works
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>
(cherry picked from commit 47647a687e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This just fixes some typos in the automicupdate README.
There's nothing to test. Just need to review it.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Makes sense as far as I can tell.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 18ec3f5c86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Added decimal input_mode and pattern for "Rental discount (%)" so it functions same way as "Fine amount" or "Overdue fines cap (amount)" rules, allowing user to save decimals only.
1. Go to Circulation and fine rules page and save some gibberish into "Rental discount (%)", see that it allows you to do that.
2. Apply the patch, and try same thing again, this time it should only allow you to save decimal numbers.
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 143220d0c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Simply, remove the !=0 test. Test for true.
Test plan:
Restart SIP.
Ask item info (SIP 17) on a waiting hold. It must have a
hold pickup date.
Check that warn disappears with this patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f63feea8c6)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The "test session driver" unit test assume SessionStorage is set to MySQL and will fail if it is set to anything else. We should mock the values, and test the other supported values.
Test Plan:
1) Set SessionStorage to File
2) prove t/db_dependent/Koha/Session.t
3) Note test failure
4) prove t/db_dependent/Koha/Session.t
5) Tests pass!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b66ccc1258)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1. Place several holds on a biblio record
2. Check in items from that record and confirm some (but not all) of the
holds
3. View the current holds on that record
4. Click on the drop-down to change the priority of a hold
--> Note that the drop-down contains one or more "0" options - one for
each in-transit or waiting hold
5. Apply patch and refresh the page
6. Click on the drop-down again
--> The drop-down now contains the correct options
7. Use the drop-down and the "Update holds" button to change hold
hold priorities a few times
--> Confirm that the priority is updated correctly
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6dee4899d6)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This change adds a system preference OPACDisableSendList which
disables the ability to send lists from the OPAC, and hides the
"Send list" link on the opac-shelves.pl page.
This is useful in situations where you do not want OPAC users to be
able to generate emails to arbitrary addresses with arbitrary comments.
Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Create a public list with at least one record and view it in the OPAC
2. Click "Send list" and note you can fill out boxes for "Email address"
and "Comment"
3. Change syspref OPACDisableSendList to "Don't allow" and click "Send list"
again
4. Note the popup window now says "You do not have permission to send this list."
5. Reload the list web page and notice "Send list" no longer appears on the toolbar
next to "Print list"
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8e9a3d851d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
PTFS Europe is now officially Open Fifth
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Bug 39447: (follow-up) Corrections to existing mappings
I thought it worked through from top to bottom and thus the lower down
mappings would correct the higher up ones.. I was mistaken, thanks
Jonathan for pointing that out
Test with:
1. `git shortlog --summary --numbered --email | grep ptfs-e`
2. `git shortlog --summary --numbered --email | grep openfifth`
Amended-by: Jonathan Druart
Space adjustements
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 38d9b0d110)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
At the current, when OPACAuthorIdentifiersAndInformation is on, ISNI
and Wikidata entries in authority 024 field generate empty bullets.
Test plan:
==========
1. Turn OPACAuthorIdentifiersAndInformation on for Identifiers.
2. Edit an authority record adding 024 field(s) for wikidata / ISNI,
e.g.:
024 7_ $a 0000000120967858 $1 https://isni.org/isni/0000000120967858 $2 isni
024 7_ $a Q859 $1 http://www.wikidata.org/entity/Q859 $2 wikidata
3. Go to a linked bibliograohic record in OPAC and see the 'Author
information' tab. There should be empty bullets under author's
name.
4. Apply the patch ; restart_all
5. Repeat p. 3. The bullets should be followed by a description and
link.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 658d2fe0d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds btn and btn-primary classes
To test:
1 - Place a hold for a patron
2 - View the patron's record in staff interface
3 - CLick the holds tab
4 - Note 'Cancel marked holds' is gray, other buttons are yellow
5 - Apply patch
6 - Reload, button is yellow
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 70cb30ee6e)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch restores the behavior that existed in SIP before Bug 25813 - Enhance patron expiration in SIP display:
Always consider an expired patron as expired, even if NotifyBorrowerDeparture is set to 0 (disabled) or unset.
Test plan:
- Set NotifyBorrowerDeparture to 0
- Set a patron's expiry date to be in the past
- Use misc/sip_cli_emulator.pl to display patron information:
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --patron <cardnumber> -m patron_information
- Check that you have the following message (AF field):
"Greetings from Koha. Your account has expired as of <expired date>"
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47c3527af3)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This change removes an unnecessary second call to opac.css on
the opac-virtual-card.pl page.
Test plan:
1. Set OPACVirtualCard syspref to Allow
2. Add an obvious change to OPACUserCSS syspref ( body {background-color: pink;} )
3. Switch to the OPAC, notice the CSS is in effect
4. Log in and go to 'Your account' then 'My virtual card' from the menu on the left
5. Notice the custom CSS affects the virtual card page too
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>
(cherry picked from commit c217ad2f25)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Also includes changes from bug 38149.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7469403a01)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan (UNIMARC):
1 - Create a list with different publicationdates, chose to sort it by
copyright gate
2 - Go to the list in the OPAC -> it is not correctly sorted
3 - Pick sort order: copyright date -> not correctly sorted
4 - Apply patch
5 - Retry 2&3 and see it works
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e398743e06)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
In the code of the OPAC, the "Lists" dropdown menu is supposed to
display max. 10 lists and display a button "view all" if there are more
than 10 lists.
The button "view all" is always displayed and it is weird when there
are few lists because "Public lists" and "Your lists" do the same.
Test plan:
1 - On an OPAC with less than 10 public lists and 10 private lists,
navigate to /cgi-bin/koha/opac-shelves.pl, click on the dropdown see
there is a view all button for both types of lists
2 - APPLY PATCH
3 - Repeat 1, notice the buttons disappeared
4 - Create lists so there are >10 public and >10 private lists
5 - Repeat 1, notice the buttons reappeared
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 88a292af36)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch adds some variable checks and corrects some others so that
the course reserve detail template doesn't show empty parentheses.
To test, apply the patch and create a course if necessary.
- Add an item to the course.
- After submitting a barcode, check the checkbox next to each option and
select a different value (item type, collection, etc.).
- View the course details and check the columns for the fields you
changed. They should display the correct information:
"Updated field value (Original field value)"
- Add another item but this time don't change any options. The
information should be display as:
"Unchanged (Original field value)"
- There should be no instances where it looks like:
"Field value ()"
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 753659589a)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch splits the CollapseFieldsPatronAddForm system preference
into a list in the template and then uses grep to find exact matches
for each field.
Test plan:
1. Edit CollapseFieldsPatronAddForm system preference and
check the Non-patron guarantor and a few other fields, but
not Guarantor.
2. Go to add a patron that can have a guarantor.
3. Note both guarantor fields are collapsed.
4. Apply patch, reload/
5. Note only expected fields are collapsed.
6. Confirm other fields continue to work as expected.
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>
(cherry picked from commit c6c36aa870)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan:
==========
1. In Administration > MARC bibliographic, from framework menu on the
right, prepare a csv file with framework export.
2. Try to import the fili into Default framework.
3. This should fail, with a redirect to a strange looking page, and
with lots of errors in the logs.
4. Apply the patch ; restart all.
5. Repeat p. 2. You should succeed and you should be able to see the
differences in the framework (if you exported from a different
framework).
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 82707f469e)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch adds a "page-section" wrapping div around reports results
pages where it is missing.
Note: This patch contains indentation changes.
To test, apply the patch and test the following reports, confirming that
the results page looks correct:
- Patrons with the most checkouts
- Acquisitions statistics
- Patrons with no checkouts
- Patrons statistics
- Most-circulated items
- Catalog statistics
- Average loan time
- Circulation statistics
- Lost items
- Catalog by item types
- Holds statistics
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit bf1e45e490)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch makes the `to_api()` method return an proper exception when
the `$self->biblioitem` accessor returns `undef`. This is a bad data
scenario and we could do better in terms of logging the situation.
The new exception will be correctly rendered in the logs by the
`unhandled_exception` Mojolicious helper and no behavior change on the
API.
I wasn't sure to keep the api tests I wrote. I originally added handling
for the specific exception in the controller, but it become obvious it
was not worth: too much code, the `GET /biblios` endpoint would need the
same treatment, etc. And the current `500 Internal server error` is good
enough as a response, and the logs explain the situation correctly.
To test:
1. On a fresh `KTD` pick a biblio (say biblionumber=1)
2. Use your favourite REST tool (Postman?) to access the record with
`Accept: application/json`. i.e.
```
GET kohadev.localhost/api/v1/biblios/1
Accept: application/json
```
=> SUCCESS: All good
3. Delete the related `biblioitems` row:
$ ktd --shell
k$ koha-mysql kohadev
> DELETE FROM biblioitems WHERE biblionumber=1; \q
4. Repeat 2
=> SUCCESS: You get a 500 error
5. Check the logs
=> FAIL: You get a cryptic message about accessing a method on an
undefined object:
```
2025/02/13 13:15:00] [ERROR] GET /api/v1/biblios: unhandled exception (Mojo::Exception)<<Can't call method "to_api" on an undefined value at /usr/share/koha/Koha/Biblio.pm line 1433.>>
```
6. Apply this patch
7. Restart things:
k$ restart_all
8. Repeat 2
=> SUCCESS: You get a 500 error
9. Check the logs
=> SUCCESS: You get a more meaningful exception:
```
[2025/02/13 13:20:00] [ERROR] GET /api/v1/biblios/1: unhandled exception (Koha::Exceptions::RelatedObjectNotFound)<<Exception 'Koha::Exceptions::RelatedObjectNotFound' thrown 'The requested related object does not exist' with accessor => biblioitem, class => Koha::Biblioitem>>
```
10. Run the tests:
k$ prove t/db_dependent/Koha/Biblio.t \
t/db_dependent/api/v1/biblios.t
=> SUCCESS: They pass!
11. Sign off :-D
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 03ae61e9f8)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
There is certainly something better to do as the xsl for the OPACDetail
is calling it only once, but it needs more work.
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>
(cherry picked from commit ccc66e682b)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1/ Turn on POS
2/ Enable Cash registers
3/ Configure some items for sale
4/ Make some POS transactions
5/ Visit pos/register.pl?registerid=x
6/ Notice the problem described
7/ APPLY PATCH and regenerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface )
8/ Look at the table again. The rows should now be correctly highlighted.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3cc9282e7b)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch corrects a syntax error that prevented the string
"Items selected" from being picked up by the translation tool.
To recreate:
1. Go to Item search
2. Click 'Search'
3. Select one or more results
--> In the bar at the top of the results there is a rectangle with "Items selected: N XClear"
4. Install another language (e.g. fr-CA)
4.1. For ktd, do the following commands
ktd --shell
gulp po:update --lang fr-CA
Ctrl+D (exit shell)
ktd --root --shell
koha-translate --install fr-CA --dev kohadev
koha-translate --update fr-CA --dev kohadev
4.2. Go to Administration > System preferences
4.3. Search for StaffInterfaceLanguages
4.4. Check fr-CA
4.5. Click 'Save all I18N/L10N preferences'
5. Redo steps 1-3 in French
--> "Items selected" is not translated
6. Apply patch
7. Update translations
(for ktd)
ktd --shell
gulp po:update --lang fr-CA
8. Open misc/translator/po/fr-CA-staff-prog.po
9. Search for "Items selected"
--> It should be there, with a fuzzy flag
10. Translate the phrase in msgstr and remove the line with the fuzzy flag
11. Apply translations
(for ktd)
ktd --root --shell
koha-translate --update fr-CA --dev kohadev
12. Redo steps 1-3 in French
--> "Items selected" is now translated!
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>
(cherry picked from commit 8ef667a0b4)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch corrects the class of the submit button on the cash register
statistics page. Bug 32091 added the "btn btn-default" class but it
should have been "btn-default."
To test, apply the patch and go to Reports -> Cash register statistics.
The submit button should have the yellow "primary" button color.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Button is now yellow.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ab3e951c9c)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch removes duplicate "type" attributes from two inputs in
ill-batch-modal.inc.
I don't know how to test this, but a visual inspection of the changes
should be enough.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Makes sense
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8d162ec366)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch makes minor markup changes in order for the "Email" menu item
to be styled correctly after the Bootstrap upgrade. The patch also
simplifies the submission of the form by removing unnecessary JS event
handling.
To test, apply the patch and locate a patron record to view.
- Open the "Accounting" tab
- Click "Create manual invoice"
- Put a charge on the patron's account and click "Save and pay"
- Pay the charge
- Click "Transactions"
- In the "Actions" column there should be a "Receipt" menu.
- The "Email" item should be correctly formatted, matching the "Print"
entry.
- Clicking "Email" should result in the page refreshing, with the
message "Receipt sent" at the top.
- If you don't have email set up you can confirm that the message was
queued by creating an SQL report: "SELECT * FROM `message_queue`"
- The report should show the message with the receipt you emailed.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fbec80904f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Confirmed that "Reports" is now treated the same way as every
other "title" in the file.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3b207c44cc)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The FIXME correctly stated that the CheckReserves call and follow-up
only should be executed within the cancel hold scope.
NOTE: Actually, I do not see how to trigger it in current code. Since
checking in a waiting hold triggers the NotIssued error. And the
cancel hold button is not available for holds in queue.
Test plan:
Place a hold on an item.
Checkin at pickup location. Confirm. Hold waiting now?
Try again but checkin at another branch. Transfer triggered?
The hard part (see my note). Try to get at the form where you can
cancel the hold (waiting or first in queue).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 99b7f5635c)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan:
Enable future holds. Put a positive value in ConfirmFutureHolds.
Add a hold for tomorrow and pickup at B. Check item in at A.
Confirm hold.
Without this patch you should see a warn on L186:
[WARN] Use of uninitialized value in string ne at /usr/share/koha/circ/returns.pl line 186.
With this patch, you should not see it anymore.
NOTE: Before bug 34972 no transfer was created for future holds.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2f0659b1b2)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The input id was wrong, so instead "else" was handling the flatpickr data
as plain text, which prefilled junk data and therefore resetting value of
"Hard due date" field to "None defined".
To reproduce:
1. Head over to the smart rules admin page and create/use existing rule
for certain item type/category.
2. Set "hard due date" that rule to a certain date and save.
3. Edit that same rule again, but this time save it without any
changes. Do not click or interact with flatpickr field.
Date for hard due date will get lost and will be set as "None defined".
4. Apply the patch.
5. Repeat steps 2 and 3. Ensure that the data loss is not happening
anymore.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed test plan, works as advertised.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9d63fa8130)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch just reverses the order so we display the list, then update it.
To test:
1 - Enable showLastPatron system preference and set showLastPatronCount to 1
2 - Go to a patron, say Ronnie Ballard
3 - Note you have a link to 'Last patron' - hover or click split dropdown and see it is the patron you are viewing
4 - Search for another patron, Edna Acosta
5 - Note the 'Last patron' links point to Edna, and not Ronnie
6 - Apply patch
7 - Reload Edna, note last patron lists Edna
8 - Search for Ronnie
9 - Confirm previous patron is linked to Edna
10 - Click the link to go to Edna
11 - Confirm last patron now links to Ronnie
12 - Instead of following link, click on another tab for patron
13 - Now the link is updated to current patron, this was behaviour before 21246 as well
14 - Sign off.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 58ec1ed304)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch makes choosing `polling` for the `JobsNotificationMethod`
system preference not be considered problematic or different than
`STOMP`.
To test:
1. In `KTD` make sure you have `STOMP` selected
2. Make sure rabbitmq is running:
$ ktd --shell
k$ sudo -s
$ service rabbitmq-server start
3. Go to the about page, 'Server information'
=> SUCCESS: 'Using RabbitMQ' displayed
4. Stop rabbit
$ service rabbitmq-server stop
5. Repeat 3
=> SUCCESS: Using Rabbit but fallback to polling
6. Go to the 'System information' tab
=> SUCCESS: Error message about the broker not functional
7. Choose 'polling'
8. Repeat 3
=> FAIL: It says 'Using SQL polling' but in bold face <.<
9. Repeat 6
=> FAIL: There's an error about the broker, which we explicitly asked
not to use <.<
10. Apply this patch
11. Repeat 3
=> SUCCESS: Nothing weird, 'Using SQL polling' displayed.
12. Repeat 6
=> SUCCESS: No weird error about the broker.
13. Switch to 'STOMP'
=> SUCCESS: Behavior is the same with/without rabbit running
14. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9cbc606697)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
In ktd 369 will show the "Encoding error" block:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=369
The background color has changed this the bootstrap update and now looks
ugly.
This patch reuse the same color (#f2dede) we had before the upgrade
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6a24b67031)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9a1e7654e5)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Note: there is a minor bug I had to correct, I don't split into two
patches since it is very minor and necessary to test that one.
Patch 1 - (this one) When a user is on serial collection information, the subscription is
not passed to the template, and therefore not passed to serials-toolbar.inc.
This makes sense if collection information is called with a biblionumber
but not if collection information is called with a subscription id.
Consequently, subscription.closed is always false and it is not possible
to reopen a basket.
Patch 2 - User with incorrect permission can close serials, they just
need to access to the page. This is due to serials-toolbar.inc expecting
a variable named "cannotedit", which is provided by
"subscription-details.pl" and not by "serials-collection.pl"
TEST PLAN:
Before applying patches :
1 - log in as a user with only receive_serial permission
2 - Open two pages one on
/serials-collection.pl?subscriptionid=ID_A, another on
/serials-collection.pl?subscriptionid=ID_B
3 - On serial A's collection page, check you can close the serial (wrong
behaviour), note you can close it again but not reopen it
4 - Apply first patch
5 - Check you can reopen the serial (wrong behaviour) keep the page open
6 - On serial B's collection page, close the serial, keep the page open
7 - Apply second patch
8 - On page left open on 3 -, click on close, you are redirected to a
login page.
8 - Go back to serial A's collection page -> there is no close button
anymore
9 - On page left open on 4 -, click on reopen, you are redirected to a
login page
10 - Go back to serial B's collection page -> there is no close button
anymore
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7298dc064f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Patch 1 - (this one) When a user is on serial collection information, the subscription is
not passed to the template, and therefore not passed to serials-toolbar.inc.
This makes sense if collection information is called with a biblionumber
but not if collection information is called with a subscription id.
Consequently, subscription.closed is always false and it is not possible
to reopen a basket.
Patch 2 - User with incorrect permission can close serials, they just
need to access to the page. This is due to serials-toolbar.inc expecting
a variable named "cannotedit", which is provided by
"subscription-details.pl" and not by "serials-collection.pl"
TEST PLAN:
Before applying patches :
1 - log in as a user with only receive_serial permission
2 - Open two pages one on
/serials-collection.pl?subscriptionid=ID_A, another on
/serials-collection.pl?subscriptionid=ID_B
3 - On serial A's collection page, check you can close the serial (wrong
behaviour), note you can close it again but not reopen it
4 - Apply first patch
5 - Check you can reopen the serial (wrong behaviour) keep the page open
6 - On serial B's collection page, close the serial, keep the page open
7 - Apply second patch
8 - On page left open on 3 -, click on close, you are redirected to a
login page.
8 - Go back to serial A's collection page -> there is no close button
anymore
9 - On page left open on 4 -, click on reopen, you are redirected to a
login page
10 - Go back to serial B's collection page -> there is no close button
anymore
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 268d725eab)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test:
1. Do not apply
2. eslint koha-tmpl/intranet-tmpl/prog/js/ajax.js
3. It should fail
4. ESLINT_USE_FLAT_CONFIG='false' eslint koha-tmpl/intranet-tmpl/prog/js/ajax.js
5. It should work
6. Apply patches
BZ38700 will conflict with BZ38149 on yarn.lock
solve conflict with
sudo yarn install --modules-folder /kohadevbox/node_modules
git bz apply --continue
git will only continue for 38700 and don't actually apply this (38167)
So retry
git bz apply 38167
Don't apply the dependecies are they are already there.
This time you're good :)
(the conflict can't be durably solved because 38770 need to be
applied independently or with BZ38149 depending on what other bug
needs to be tested :/ )
7. Restart KTD to have a clean state of dependencies and check that
provisionning still works.
8. ESLINT_USE_FLAT_CONFIG='false' eslint koha-tmpl/intranet-tmpl/prog/js/ajax.js
9. It should fail
10. eslint koha-tmpl/intranet-tmpl/prog/js/ajax.js
11. It should work
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e83a605f25)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
And upgrade eslint-plugin-prettier
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
(cherry picked from commit 3961a3fa55)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Test plan
1. Apply patch
2. Start KTD (to check that stuff is installed automatically)
3. Run this:
ESLINT_USE_FLAT_CONFIG='false' eslint koha-tmpl/intranet-tmpl/prog/js/ajax.js
4. You should see errors from prettier in addition to others
QA notes:
1. Run this:
yarn why eslint; yarn why prettier; yarn why eslint-config-prettier; yarn why eslint-plugin-prettier
2. See that the version are the latest from NPM website
3. See that they are in devDependencies
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
(cherry picked from commit 9a40d4418c)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch fixes and incorrect template variable name, making it
possible to see a library's SMTP server when viewing the details of an
individual library.
Test plan copied from the original bug report:
1. Create an SMTP server in Koha (it doesn't need to be valid)
a. Go to Administration -> Additional parameters -> SMTP servers
b. Click "New STP server"
c. Fill all mandatory fields (it doesn't need to be valid
information)
d. Click "Submit"
2. Add the created SMTP server to a library
a. Go to Administration -> Basic parameters -> Libraries
b. Choose a library and click on Edit (in column "Actions")
c. On the line "SMTP server" select the server created
d. Click "Submit"
3. Check the display
a. Go to Administration -> Basic parameters -> Libraries
b. Check that the name of the SMTP server you just selected is
displayed in the column SMTP server
c. Click on the name of the library you modified
d. Check that the line "SMTP server" shows the correct information.
4. Test with different permissions
a. If the logged-in user has both 'manage_libraries' and
'manage_smtp_servers' permissions the SMTP server name should be
liked to the edit form for that server.
b. If the logged-in user has only 'manage_libraries' permission there
should be no link.
Signed-off-by: Bo Gustavsson <bosse@gustavsson.one>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1a71b5f70e)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This change only shows the "Edit" on the smtp_servers.pl page
for the "Current default configuratio" if the default
configuration can be edited. That is, don't show it when
config comes from the code, and do show it when the config
comes from the database.
Test plan:
0. Apply the patch
1. Go to /cgi-bin/koha/admin/smtp_servers.pl
2. Ensure you delete any SMTP servers you've defined
3. Note that there is no "Edit" button at the bottom of
"Current default configuration"
4. Click "New SMTP server" and create a new default server
5. Go to /cgi-bin/koha/admin/smtp_servers.pl
6. Notice how now there is an "Edit" link at the bottom of
"Current default configuration"
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan, works as advertised.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 322072a4bb)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch prevents the loss of notes in serials when generating next serial
Test plan:
1 Create a subscription, fill the notes field for the serial with Expected status and activate the system preference PreserveSerialNotes
2 Click Generate next
3 Check that the notes from the now Late serial are gone and that the new serial doesn't have notes.
4 Apply patch, restart services
5 Edit the serial with Expected status to fill the notes field.
6 Click Generate next
7 Check that the notes from the now Late serial are kepts and that they have been copied to the new serial.
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>
(cherry picked from commit 117b7eb0eb)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
The translation script explodes without meaningful error when
"incorrect" structure is found (edit)
Found when working on bug 38714, the translation script can break with
an error that does not directly point to the problematic string
[13:00:23] Error: Command failed: misc/translator/xgettext.pl --charset=UTF-8 -F -o /tmp/koha-2rwDEm/Koha-opac-bootstrap.pot -f /tmp/koha-2rwDEm/files
Can't use an undefined value as a HASH reference at misc/translator/xgettext.pl line 131.
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at ChildProcess.emit (node:domain:552:15)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:303:5)
at Process.callbackTrampoline (node:internal/async_hooks:128:17)
[13:00:23] 'po:update' errored after 992 ms
Test plan:
0. Use main and confirm that `gulp po:update --lang LANG` returns
successfully
1. Apply the first patch
=> The error is
Can't use an undefined value as a HASH reference at misc/translator/xgettext.pl line 131, <$INPUT> line 80.
2. Apply this patch
=> The error is now:
Incorrect structure found at ./koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt:230: '<option value="*" ' at misc/translator/xgettext.pl line 124, <$INPUT> line 100.
Which is way more interesting to fix the problem as we know exactly
where the problem comes from
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3a5d8d51ca)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Starting with Koha 24.11.01, we can no longer link authorities with
other authorities (linking a bibliographic record with an authority
still works fine). This affects both MARC21 and UNIMARC instances,
and is valid on the main branch, too.
This patch fixes that.
Test plan:
1) Navigate to Koha's Authorities module and create a new authority
(using the 'Default' authority type). In tab 5, expand field 500
by clicking on its description.
2) Launch the Authority finder form by clicking on the small 'Tag
editor' button on the far right of subfield 500$a.
3) Click the yellow 'Search' button at the bottom of the page.
When the results appear, click on the '+ Choose' button for
one of the authorities (any authority will do).
Notice that nothing happens and the Authority finder stays open,
whereas normally it should close automatically at this point and
transfer you back to the authority editor, copying the info from
the authority you selected into the subfields of field 500.
Press F12 (works in Chrome and Firefox) to launch the Developer
Tools of your browser and notice that in the JavaScript console
the following error message has been registered:
"Uncaught TypeError: e is null"
4) Apply this patch (and restart_all for good measure), then press
CTRL-F5 to reload all JS assets.
5) Repeat step 3) above; this time, when you click on the '+ Choose'
button the authority finder window will close and the contents of
the authority you selected will be copied into the subfields of
field 500.
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>
(cherry picked from commit 48aad541cc)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch adds a conditional to ensure the biblio object has been retrieved
and assumes no cover images otherwise. This is similar to bug 37425 that
fixed the issue for the staff interface.
Test plan:
1. Enable the OPACLocalCoverImages system preference.
2. Search in the OPAC (for example, attic).
3. Find the biblionumber for one of the results and delete it
from the database using SQL:
DELETE FROM biblio WHERE biblionumber=3;
4. Search again.
NOTE: Steps 3 and 4 need to be done very quickly to generate the error.
I had the terminal open with the SQL already loaded, and the browser
also open.
5. Error trace generated:
Can't call method "cover_images" on an undefined value at /kohadevbox/koha/opac/opac-search.pl line 702.
at /kohadevbox/koha/opac/opac-search.pl line 701
6. Reindex, confirm error is gone: koha-rebuild-zebra -d -f -v kohadev
7. Apply the patch.
8. Repeat steps 2 to 4 - I searched for perl and used biblionumber 13.
9. No error generated
10. Reindex and repeat search and confirm no error.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ed3481786f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
prepare_cgi_additional_field_values needs to consider a field value as empty, because a MARC get field will always be submitted empty, and then picked up and handled by set_additional_fields accordingly.
But because we don't want to polute the database with tons of empty additional fields if many empty repeatable fields were submitted in the UI, the check for empty value still happens, but only after the MARC get check has happen, not before.
Signed-off-by: Baptiste <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f9561c59c2)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
updates description "PROC: _PERM_ - causes an item that is in the Processing center to be updated to it's permanent location." to "PROC: _PERM_ - causes an item that is in the Processing center to be updated to its permanent location."
to test:
- go to Administration/System preferences
- check descriptionss for system preferences UpdateItemLocationOnCheckout and UpdateItemLocationOnCheckin
- verify descriptions contain "it's" instead of "its" in the place "PROC: _PERM_ ..."
- apply patch
- verify descriptions have changed to "its"
Signed-off-by: Aude <aude.charillon@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 489d8a47a3)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This change makes Koha use "notice_email_address" instead of "email" for
SendAlerts with a type of "issue". This brings SendAlerts more in line with
the rest of Koha
Test plan:
0. Apply the patch
1. Create a subscription
- Go to http://localhost:8081/cgi-bin/koha/serials/serials-home.pl
- Click "New subscription" and follow the prompts / fill out
required fields
- On the first screen, ensure "Patron notification" says "New serial issue"
(You can edit this after creating the subscription if necessary)
2. Click "subscribers" next to "Patron notification: SERIAL_ALERT"
3. Log into the OPAC, go to the bib record for that subscription, click "Subscriptions",
and click "Subscribe to email notification on new issues" and click "Yes" on the subsequent
screen
4. Edit your patron record and make sure you have an email in "Secondary email" and not "Primary email"
5. Set up a SMTP server for your Koha or some other email delivery mechanism
6. Go to the "Serial collection" for your subscription
e.g. http://localhost:8081/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1
7. Click "Receive"
8. Mark the serial as "Arrived"
9. Click "Save"
10. Note that you receive an email using your Koha user's "Secondary Email" address
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e72ee54eb5)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This patch corrects the data attribute on "More" buttons which were
incorrectly updated during the Bootstrap 5 upgrade. "data-bs-target" is
corrected to "data-target."
Also fixed are instances of a misspelled class, "ligth" -> "light"
To test, apply the patch and go to Administration -> Identity providers.
- Click "New identity provider."
- In the "Advanced configuration" section, test the "More" buttons
underneath the textareas. Clicking them should expand the hidden
help text and hide the button.
- Perform the same test when updating an identity provider.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b138eb0e83)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Change from: [% last_retruned_by | html %]
To: [% last_returned_by | html %]
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e284f9ddb5)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1. Have StoreLastBorrower enabled to store Last Returned By.
2. Create account and leave cardnumber empty.
3. Check out and return item with that account.
4. Go to items detail page.
5. See that Last Returned By and, if return is not anonymized, Last Borrower appears blank (you can inspect the fields and see that borrower information is there but not visible). Previous borrower will similarly be blank if it is from an account with no cardnumber.
6. APPLY PATCH
7. Try the items detail page again. You should see the link for 'Last borrower' and/or 'Previous borrower' now as the borrowernumber.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised, with the tiny followup I am providing.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 90dce0f0f1)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Update the authorized value description for AggregatedFullText in
the ERM_PACKAGE_CONTENT_TYPE category from "Aggregated full" to
"Aggregated full text".
Test plan:
1. Go to Administration > Authorized values.
2. Check the authorized values for the ERM_PACKAGE_CONTENT_TYPE
category.
3. Note that the description for AggregatedFullText is
"Aggregated full".
4. Apply the patch.
5. Update the database: updatedatabase
(Bonus: To check for new installations: reset_all)
6. Refresh the page and note that the description is
now "Aggregated full text".
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>
(cherry picked from commit 3fb75be0fb)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
When editing a bibliographic record in advanced editor, there are
helpers for fixed data coded fields (like 008). Like in the standard
editor, empty value (space) is represented by a hash sign. But unlike
in the standard editor, the hash sign is not converted into a space but
remains as '#' in the saved record. This is obviously wrong.
Test plan:
==========
1. Ensure to have EnableAdvancedCatalogingEditor set to 'enable'.
2. Create of edit a record, choosing for one of one-letter codes
an empty value (represented by '#' in the helper).
3. Save the record, control in 'MARC preview' that you got a hash sign
in the 008 field instead of a space.
4. Apply the patch ; restart all.
5. Open a record in advanced editor, refresh the page to reload the java
script (Shift+Ctrl+R or another appropriate shortcut). Edit the 008
field again choosing for one of one-letter codes an empty value.
6. Save the record, control in 'MARC preview' that there is a space
and not the hash sign.
Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 37a7222de0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If a request has a status_alias and that status_alias does not have a lib_opac defined, it'll show as an empty status on the OPAC.
Staff UI always shows the request's status and adds the status_alias only if that is defined. The same should happen on the OPAC.
To test:
1) Enabled ILLModule
2) Create a new ILL request, visit:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Add '42' on the cardnumber. Pick any library. Click 'Create'.
4) Add a new 'status_alias' entry, visit the authorized values page:
http://localhost:8081/cgi-bin/koha/admin/authorised_values.pl
5) Search for 'ill_'. Pick 'ILL_STATUS_ALIAS'. Click 'Add a new authorized value'.
6) Enter the 'Authorized value' of 'test', and 'Description' of 'test'. Click 'Save'.
7) Visit the previously created ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1
8) Click 'Edit request' from the top toolbar.
9) On the 'Status' dropdown, pick 'test'. Click 'Submit'.
10) Visit the ILL on the OPAC:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
11) Notice the 'status' column is empty. Click the 'View', notice the 'status' entry is empty.
12) Apply patch. Repeat
This patch moves the OPACVirtualCard and OPACVirtualCardBarcode system
preferences from the Suggestions subsection of the OPAC preferences to the
Features subsection.
To test:
1. Apply patch
2. Go to Administration > System preferences > OPAC
3. Search the page (Ctrl + F) for OPACVirtualCard
--> The two preferences (OPACVirtualCard and OPACVirtualCardBarcode)
should be in the Features section
Signed-off-by: Aude Charillon <aude.charillon@openfifth.co.uk>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 68325b37e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
To test:
1. Change system preference 'FailedLoginAttempts' to a small number,
like 2
2. Go to a patron's account and copy their username (while you're there,
change the password and add some fines, too)
3. In the OPAC, try to log in with the username and a wrong password 3
times
4. Go back to the patron's account in the staff interface
5. Note that there is a message : "Patron's account has been locked (due
to 3 failed login attempts)". Note there is a tooltip at the right
6. Click on "Change password", you go to change password page
Note: the follow-up might be unclear to understand:
1 - it moves the button outside the IF patron.login_attempt < 0
2 - Hence it requires the </li> to be moved out so button remains on the
lane
3 - Finally the <li> must be put before the if and changed a bit
Signed-off-by: Imani Thomas <imani.thomas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 20a87564f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When using system preference 'FailedLoginAttempts', a patron's account
is blocked after X many failed login attempts on the OPAC.
This patch adds, like for "Patron's card has expired" message :
* a message "Patron's account has been locked (due to X failed login
attempts)" on the patron details and circulation pages
* a link to change password
Links are only displayed if libarian has permission to edit patrons.
For administrative lock, only a message is displayed :
"Patron's account has been administratively locked"
To test:
1. Change system preference 'FailedLoginAttempts' to a small number,
like 2
2. Go to a patron's account and copy their username (while you're there,
change the password and add some fines, too)
3. In the OPAC, try to log in with the username and a wrong password 3
times
4. Go back to the patron's account in the staff interface
5. Note that there is a message : "Patron's account has been locked (due
to 3 failed login attempts)"
6. Click on "Change password", you go to change password page
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 54bf6c815c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a07368e5ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Add a new hook elasticsearch_to_document in order to allow completing
the 'document' to be sent to Elasticsearch. Usage example: (1) add new
search fields, (2) normalize/sanitize existing fields, (3) use id fields
to retrieve info via web services in other repositories (say VIAF), (4)
download file referenced in a field, and index its content.
To test:
1. Apply the unit tests patch, and run it:
prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t
=> FAIL: Tests fail! The hook is not implemented so the desired
2. Apply this patch, and then repeat 1:
=> SUCCESS: It works!
Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e0b829bd66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 359fa68458)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch removes a once necessary and now confusing warning
from the RESTOAuth2ClientCredentials syspref.
TO TEST:
a) Notice how the RESTOAuth2ClientCredentials syspref references
installing Net::OAuth2::AuthorizationServer, even though this
module is in the cpanfile and koha-perldeps and has been since
22.11
b) APPLY PATCH
c) Run reset_all in k.t.d
d) Notice how the message is now gone
Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7f48902403)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Create a new notice template for a custom patron message
i. Go to Tools > Notices and Slips
ii. Create a new notice and choose Patrons (custom message) module
iii. Add the following text to the email notice:
You have a new notification from [% branches.branchname %]
iv. Fill in other fields and save
2. Find a patron and go to their details page
3. Send the custom notice you just created
i. Click Add message
ii. Under "add a message for", select the email option
iii. Under "Patron notice", select the notice you just created
iv. Click "Save"
4. Open the patron's notices tab and look at the notice that was sent
--> The branch name is left blank
5. Apply patch and refresh the patron page
6. Repeat steps 3-4
--> The branch code is now included in the notice
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6c7ebf28e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the MARC21 default bibliographic framework to include
changes brought by Update 39 to the MARC21 format.
See https://www.loc.gov/marc/bibliographic/bdapndxg.html for the list of
changes.
Changes to field 506
- Added subfield $0 Authority record control number or standard number (R)
- Added subfield $1 Real World Object URI (R)
Changes to field 508
- Added subfield $3 Materials specified (NR)
Changes to field 511
- Added subfield $3 Materials specified (NR)
Changes to field 540
- Added subfield $0 Authority record control number or standard number (R)
- Added subfield $1 Real World Object URI (R)
- Renamed subfield $f to Standardized terminology for use and reproduction rights
To test:
1. Apply patch and reset_all
2. Go to Administration > MARC bibliographic framework > Default
framework
3. Check that the additions/modifications are correct as per the list
above
4. Optionally, run the MARC bibliographic framework test, and make sure
there are no errors
NOTE: This change only applies to NEW installations. For existing
installations, you must make the changes yourself in Administration >
MARC bibliographic framework. This is to avoid overwriting
customizations libraries might have made to their cataloging frameworks.
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0d5c533e6f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes the script provide links to the staff interface instead
of the OPAC. This way, the links can just be picked to access the
problematic records for fixing them.
To test:
1. Run:
$ ktd --shell
k$ perl misc/maintenance/compare_es_to_db.pl
=> FAIL: Generated links point to the OPAC
2. Apply this patch
3. Repeat 1
=> SUCCESS: Generated links are useful as they point to the staff
interface
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cc0aa072dd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test,
1. Create a user with the following permissions: edit_any_item, edit_items, items_batchdel, items_batchmod.
2. When logged in as that user, use the batch item deletion tool to delete a few items.
3. Select “Delete records if no items remain” and “Delete selected items.”
When the job has processed, notice that X item(s) deleted. X record(s) deleted.
4. APPLY PATCH
5. With the same user repeat step 2.
6. This time there should be no option to 'Delete records if no items remain'.
7. Give the same use the Edit catalog (Modify bibliographic/holdings data) (edit_catalogue) permission.
8. Make sure you can successfully delete a record using the 'Delete records if no items remain'.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0f70ec68c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes the behavior of the OPAC's "Clear" link, which was not
updated to work with CSRF protection.
To test:
- If necessary, go to Administration -> System preferences in the staff
interface and set the EnableOpacSearchHistory preference to "Keep."
- Log in to the OPAC.
- If necessary, perform several catalog searches in order to populate
your search history.
- Expand the user menu in the upper right-hand corner and click the
"Clear" link next to "Search history."
- You should be prompted to confirm.
- After confirming your search history should be empty.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fa557624e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
As per JS1 in the coding guidelines, I've moved the inline JS from
the template into a separate file.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit eeb86254da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Now that the form-submit code has been added to the global js-includes
files for both the staff interface and OPAC, it no longer needs to be
included directly in each template file.
To test:
1. Apply patch
2. Clear browser cache
3. git grep "form-submit.js"
--> Confirm that all imports of the form-submit.js asset have been
removed, and the only results are the comment in global.js and
staff-global.js
4. Test OPAC > Account page > Renew a checkout to confirm the link
submission still works as expected in the OPAC
i. Check out an item to a patron
ii. Set a known password for that patron
iii. Log into that patron's account in the OPAC
iv. Click the "Renew" link next to that checkout in the checkouts
table on the patron's OPAC account page
--> Confirm the item is renewed as expected
5. Test some of the following buttons to confirm the link submission
still works as expected in the staff interface:
- Bib record > Holds > Revert transit/waiting status on a hold
- Acquisitions > Basket > Create EDIFACT order
- Acquisitions > Invoices > detail for a specific invoice > Delete
- Acquisitions > Invoices > perform actions on invoices using the
action drop-down
- Acquisitions > Invoices > open/close invoices by selecting the
checkboxes
- Administration > Additional fields > Delete an additional field
- Administration > Background jobs > Cancel a background job
- Edit an item > scroll up > Actions drop-down > Print label
- Cataloging > Label creator > Manage label batches > Edit a batch
> Delete batch
- Cataloging > Label creator > Manage label batches > Delete a batch
- Patron account > holds > delete a hold
- Tools > Patron lists > delete a list from the Actions drop-down
- Reports > Saved reports > Preview SQL on a report > Delete
- Reports > Saved reports > Delete a report from the actions drop-down
- Rotating collections > Delete a collection from the actions drop-down
- Stock rotations > move item to the next stage
- Stock rotations > remove item from a rota
- Stock rotations > Add/remove "In demand"
- More > Lists > edit a specific list > Edit drop-down > Delete
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3478e09d41)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Import the form-submit.js script in the global includes file for the
OPAC, so that all pages have access to it without needing to
import it directly.
This patch also aligns the OPAC copy of form-submit.js to the staff
interface copy, as the OPAC copy is missing 3 lines to support opening
the link in a new tab (added to the staff interface copy in bug 37192).
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 984cf190a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Import the form-submit.js script in the global includes file for the
staff interface, so that all pages have access to it without needing to
import it directly.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9f44cb8a88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the 'Create EDIFACT order' menu dropdown for cases
where multiple EANs are available for the library.
We set the dropdown to a max-height of 75% of the window height and then
we enable y scrolling and hide the x scrollbar.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4564ed5ef1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
->connect does not raise an exception, so we didn't reached the catch
block.
Adjusting the code but I am not really happy with it, but more changes
will derail the original bug
Now we log:
Cannot connect to broker (Access refused for user 'guest') at /kohadevbox/koha/Koha/BackgroundJob.pm line 96.
Cannot connect to the message broker, the jobs will be processed anyway at /kohadevbox/koha/misc/workers/background_jobs_worker.pl line 100.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8dfb19a45a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch suggests to deal with connection issues at
Koha::BackgroundJob->connect level.
It incorrectly returned a Net::Stomp object when the connection failed.
With this patch, if the CONNECT does not return a CONNECTED frame then
Koha::BackgroundJob->connect returns nothing and the caller is not
fooled.
It also fixes the about page, we now have:
"Using SQL polling (Fallback, Error connecting to RabbitMQ)"
instead of
"Using RabbitMQ"
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c407ce021e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change adds error handling for ERROR frames to background_jobs_worker.pl.
A previous patch added it to es_indexer_daemon.pl which is a different
background jobs worker.
To test ERROR handling for background_jobs_worker.pl:
1. Change your RabbitMQ connection details in koha-conf.xml or the hard-coded ones in Koha/BackgroundJob.pm
to include an invalid password. For example, if you don't have a message_broker already defined, use the following:
<message_broker>
<password>bad</password>
</message_broker>
2. sudo koha-worker --restart --quiet kohadev
3. View the errors in the logs:
tail -f /var/log/koha/kohadev/worker-output.log
tail -f /var/log/koha/kohadev/worker-error.log
To test MESSAGE handling for background_jobs_worker.pl:
1. Ensure RabbitMQ connection details are correct
2. Go to Batch item modification and add the following barcodes:
39999000001310
39999000004571
3. Add a z - Public Note of the following and click Save:
THEBACKGROUNDWORKERWORKED
4. Search the catalogue using THEBACKGROUNDWORKERWORKED in the top
catalogue search
5. Note that you get 2 results in your search
6. Look in the logs just to make sure there are no new messages there
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4dc4a232c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change causes es_indexer_daemon.pl to die on ERROR frames instead
of spinning in an infinite loop. It also adds a content-type STOMP frame header
to help consumers know what data type is in the MESSAGE frame body.
To test ERROR handling for es_indexer_daemon.pl:
1. Switch to using Elasticsearch
2. Change your RabbitMQ connection details in koha-conf.xml or the hard-coded ones in Koha/BackgroundJob.pm
to include an invalid password. For example, if you don't have a message_broker already defined, use the following:
<message_broker>
<password>bad</password>
</message_broker>
3. sudo koha-es-indexer --restart kohadev
4. View the errors in the logs:
tail -f /var/log/koha/kohadev/es-indexer-output.log
tail -f /var/log/koha/kohadev/es-indexer-error.log
To test MESSAGE handling for es_indexer_daemon.pl:
1. Switch to using Elasticsearch (and ensure RabbitMQ connection details are correct)
2. Change the title of a bib record to something new and unique
3. Try to search for the bib using the new title
4. Note you can find it
5. Look in the logs just to make sure there are no messages there
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2c1314ead6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 35655 needed to mock the config, but instead introduced new env variables.
Test plan:
prove t/db_dependent/Koha/BackgroundJob.t
should still return green
Bonus 1: no more warning
t/db_dependent/Koha/BackgroundJob.t .. 1/6 Cannot connect to broker Failed to connect: Error connecting to not_localhost:99999: Invalid argument at /usr/share/perl5/Net/Stomp.pm line 27.; giving up at /usr/share/perl5/Net/Stomp.pm line 27.
Bonus 2: tests are passing even if you have 'message_broker' in the
config
To test this, add the following entry to $KOHA_CONf then prove again
<message_broker>
<hostname>localhost</hostname>
<port>61613</port>
<username>guest</username>
<password>guest</password>
<vhost></vhost>
</message_broker>
=> Without this patch the tests fail because the config will overwrite
the env vars.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Warning goes away and prove works even with the message_broker config.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 15a272e1e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Hint now covers the default ports for FTP (21) and
SFTP (22), instead of "will default to 22".
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ef8329bd37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When creating or editing an EDI (EDIFACT vendor record) if the port is left empty it will be set to port 22. This is fine then the service is SFTP, but if FTP is selected the default to 21.
Test plan:
1) Enable EDIFACT
2) Create a new EDI Vendor account with the FTP transport selected. Pleave the ports unpopulated
3) Note the saved record has port 22 set
4) Apply this patch
5) Restart all the things!
6) Repeat stepts 1 and 2
7) The port should now be 21 for new ftp site and 22 for new stp sites!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fb9722a128)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We have a case here where we have checkout_id pointing at issues and
old_issues tables. We need to trick TestBuilder to NOT automagically
build our related checkout.. This patch passes 'undef' to the foreign
key field and then sets it after the fact to the related Old::Checkouts
objects we've already built above.
This patch should prevent the random failures we were seeing before
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d6af10d881)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a trigger into the anonymize function of
Koha::Old::Checkouts such that we pass along the anonymize action to
the renewals record.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4f77ec8387)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a trigger into the anonymize function of
Koha::Old::Checkout such that we pass along the anonymize action to the
renewals record.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e6d0df1156)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds unit tests to ensure renewals properly respect the
patron privacy settings.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d82abae1da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes the indexer poll the DB in configurable batches. Pretty
much like Rabbit does.
The only change is that it will now pass a LIMIT <batch_size> to the
query.
To test:
0. Have KTD started with ES (skip if you have an instance running):
$ ktd --es7 up -d
1. Stop the indexer and rabbit:
$ ktd --shell
k$ sudo koha-es-indexer --stop kohadev
k$ sudo service rabbitmq-server stop
2. On a separate terminal, watch the queue:
k$ watch -n 0.5 'echo "SELECT COUNT(*) FROM background_jobs WHERE status=\"new\"" | koha-mysql kohadev'
=> SUCCESS: It should be empty
3. Add a bunch of things to index (this works with default KTD data):
k$ for i in $(seq 1 438; seq 1 438) ; do echo "INSERT INTO background_jobs (status,queue,data) VALUES ('new','elastic_index','{\"record_server\":\"biblioserver\",\"record_ids\":[$i]}')" | koha-mysql kohadev ; done
4. Start the ES indexer:
k$ sudo koha-es-indexer --start kohadev
5. Look at the queue size
=> FAIL: It shrinks too fast [1]
6. Apply this patch
7. Restart the indexer
k$ perl misc/workers/es_indexer_daemon.pl &
8. Repeat 3
9. Look at the queue size:
=> SUCCESS: It shrinks 'slowly'
10. Sign off :-D
[1] This is a problem in certain scenarios, not in all of them. This is
the best I come up with in order to test the behavior change. Anyone can
set a new size of their taste.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 20b600d450)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Replaced borrowers in the ->request POD by borrower
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ff2fda90d4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f5f5fded2d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.20.2/MARC/File/XML.pm line 399, <__ANONIO__> chunk 1.
Those are 2 warnings coming from MARC::File::XML when called with
invalid XML.
We should not use Test::Warn as they are not expected and that may be
fixed upstream.
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 b696642df7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 0af79e24cc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
From https://css-tricks.com/snippets/css/make-pre-text-wrap/
/* Browser specific (not valid) styles to make preformatted text wrap */
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
... I think it's now safe to remove the backward compatibility versions and simply keep pre-wrap.
Test plan (from bug 921)0:
* place a hold on a title with a very very long title or author
* mark it as "waiting for pickup" by doing a checkin
* go to command line interface, and run
* misc/cronjobs/gather_print_notices.pl /tmp
* misc/cronjobs/printoverdues.sh /tmp
* if your title/author is long enough, it's splitted on 2 lines
with this patch (it is not before this patch)
It will also remove the warnings from t/db_dependent/Patron/Borrower_Discharge.t
WARNING: Ignored `white-space: -moz-pre-wrap` at 6:14, invalid value.
WARNING: Ignored `white-space: -o-pre-wrap` at 7:14, invalid value.
WARNING: Ignored `word-wrap: break-work` at 8:14, invalid value.
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 03cf21fd92)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7f05cfc408)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/api/v1/holds.t .. 1/16 No reserves HOLD_CANCELLATION letter transported by email at /kohadevbox/koha/C4/Letters.pm line 602.
We do not test the notification here, we can simply ignore the letters
code
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 c14e72e782)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 98b97ea075)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Koha/Booking.t .. 1/2 DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '7' for key 'PRIMARY' at /kohadevbox/koha/Koha/Object.pm line 174
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data truncated for column 'status' at row 1 at /kohadevbox/koha/Koha/Object.pm line 174
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 da423a717e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7566ed0d99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/AuthorisedValues.t .. 1/17 DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'tagsubfield' on MarcSubfieldStructure - perhaps you forgot to set its 'is_auto_increment' attrib
ute during add_columns()? Treating 'tagsubfield' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/Object.pm line 174
It is a bit scary but it's only that we forgot to pass a value for
tagsubfield (that is NOT NULL and part of the PK)
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 50b9abfe4f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4091d99c0c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
It seems that they are expected, we simply need to catch them.
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 364b78e653)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 66c969e037)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'filter' on SearchMarcToField - perhaps you forgot to set its 'is_auto_increment' attribute during add_columns()? Treating 'filter' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/SearchField.pm line 42
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 c2df4af991)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c19ce68db1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/Test/Mock/Logger.t .. 1/10 # trace:
# (No trace messages)
# debug:
# "Debug message" at /usr/share/perl/5.36/Test/Builder.pm line 374
# info:
# (No info messages)
# warn:
# (No warn messages)
# error:
# (No error messages)
# fatal:
# (No fatal messages)
t/Test/Mock/Logger.t .. ok
All tests successful.
Files=1, Tests=10, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.40 cusr 0.07 csys = 0.50 CPU)
Result: PASS
This one is a bit tricky: we cannot use Test::Warn to capture the output because Test::Builder->diag does not write directly to STDERR.
It has its own failure_output handle (which defaults to STDERR) but bypasses Perl’s standard layers.
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 9d17ce951d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 03beed51c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Add unit tests for the updated mock module
Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7597d8f0d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a diag method to the Mocks::Logger object. This aids in
debugging logging errors by simply outputting all log lines to screen in
a diag statement.
Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 17b2b4cd6e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/selenium/basic_workflow.t .. 1/22 CP main = 1.93
t/db_dependent/selenium/basic_workflow.t .. 3/22 CP add patron category = 3.56
t/db_dependent/selenium/basic_workflow.t .. 5/22 CP add patron = 4.31
CP add biblio = 0.29
t/db_dependent/selenium/basic_workflow.t .. 11/22 CP add items = 9.81
t/db_dependent/selenium/basic_workflow.t .. 16/22 CP checkout = 5.97
t/db_dependent/selenium/basic_workflow.t .. 20/22 CP checkin = 4.04
t/db_dependent/selenium/basic_workflow.t .. 22/22 CP holds = 5.60
t/db_dependent/selenium/basic_workflow.t .. ok
This has been used in the past for benchmarking Koha.
I suggest to keep the warn but comment it.
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 0e12c572e8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c4f54429a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The tests was wrong, we should make sure the item has been checked in.
We were missing the mock userenv:
Can't use an undefined value as a HASH reference at /kohadevbox/koha/C4/Circulation.pm line 2744. at /kohadevbox/koha/C4/Circulation.pm line 2787
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 fdb9a41af3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit eb4e66dbfb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The test is wrong, the item is not correctly checked in, it should fail.
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 5c743feec7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9f3c5d2019)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Letters.t .. 95/104 Use of uninitialized value in string eq at /kohadevbox/koha/Koha/Patron.pm line 389.
contactname can be NULL in DB.
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 45493d0f06)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 1f2dffb43f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Warnings encountered while roundtripping a MARC record to/from USMARC. Failing over to MARCXML. at t/db_dependent/Koha/SearchEngine/Elasticsearch.t line 854.
=> This one is expected: we have generated a record with large fields
item-level_itypes set but no itemtype set for item (1568) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1100.
item-level_itypes set but no itemtype set for item (1568) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1100.
=> Those 2 ones can be removed by create a biblio and items using
build_sample_biblio and build_sample_item
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 25277e8a4d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 103c48373e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Koha/Patron/Modifications.t .. 1/7 DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'borrowernumber' on BorrowerModification - perhaps you forgot to set its 'is_auto_increme
nt' attribute during add_columns()? Treating 'borrowernumber' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/Object.pm line 174
t/db_dependent/Koha/Patron/Modifications.t .. 5/7 DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'verification_token' on BorrowerModification - perhaps you forgot to set its 'is_auto_inc
rement' attribute during add_columns()? Treating 'verification_token' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/Object.pm line 174
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 f851367cf4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 0bd9f325c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Koha/Installer.t .. 1/4
Use of uninitialized value $db_version in numeric eq (==) at
/kohadevbox/koha/Koha/Installer.pm line 32.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1974dd9c91)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8e93b7c900)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
it's an integer.
t/db_dependent/Koha/Old/Hold.t .. 1/3
Value not allowed for auto_incr biblionumber in Biblio at
/kohadevbox/koha/t/lib/TestBuilder.pm line 431.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd54cd5062)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b3bddd0703)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1 - Create a closed serial
2 - Disable the syspref "RoutingSerials"
3 - Go to cgi-bin/koha/serials/serials-search.pl and search for the
closed serial ; click on the "closed" panel of the result -> on the
actions button, there is no option to reopen
4 - Apply patch
5 - Repeat 3, there is now an option to reopen.
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 573b226997)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 48a06d1513)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1. perldoc Koha/Acquisition/Order/Claims.pm
2. Check that it mentions Koha::Acquisition::Order::Claims
3. perldoc Koha/CoverImages.pm
4. Check that it mentions Koha::CoverImages.pm
4. These files no longer mention 'Koha::Cities'
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 f72a235de0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8e0832fd96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds more module search paths to the zebra-biblios-dom.cfg and zebra-authorities-dom.cfg, so that a larger range of CPU architectures will work with Zebra search unit tests.
This will not change Debian package installs, but it will fix any git-based installs.
TO TEST (you'll need access to an ARM-based CPU, and, preferably, an x86-64 machine):
ON THE ARM-BASED MACHINE:
a) start ktd, then ktd --shell
b) in ktd, run: prove -v t/db_dependent/Search.t
c) notice how the test now fails
APPLY PATCH
d) rerun step b
e) notice how the test now passes
ON THE X86-64-BASED MACHINE:
f) run steps a-e
g) notice how the test passes, both before and after applying the patch
SIGN OFF
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3a6ac8c843)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3cc750d5ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes a couple changes to the tests:
* Remove check for Copyright line. The Copyright line should not be mandatory.
* Remove dependency of GPL-related checks on the copyrigth line
existence. (this highlights several missed checks).
* Skip testing-related templates. Koha ships some templates that are not
excluded correctly.
This 'fix' will highlight existing errors that were skipped until now.
To test:
1. Run:
$ ktd --shell
k$ prove xt/find-license-problems.t
=> FAIL: Tests pass! Some files should make them fail!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests fail!
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a4b25acb5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 48447cc30c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Checkout history does not limit to 50 items, it's a regression from bug
33949.
To limit to 50 items we need to use "rows", not "limit".
Test plan:
Have more than 50 checkouts and confirm that by default the table only
displays 50 entries.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd28d473cd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ef5e67a6ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Biblio.t .. 2/25 Finding auth type GENRE/FORM at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
t/db_dependent/Biblio.t .. 12/25 Finding auth type TOPIC_TERM at t/db_dependent/Biblio.t line 300.
Finding auth type TOPIC_TERM at t/db_dependent/Biblio.t line 300.
Finding auth type TOPIC_TERM at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
t/db_dependent/Biblio.t .. ok
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 afa1cfb63a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ba821f58fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Use of uninitialized value $cn_item in sprintf at /kohadevbox/koha/C4/ClassSplitRoutine/LCC.pm line 53.
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 9b0709fb47)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b8d54707ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Reserves/CancelExpiredReserves.t .. 3/4 No reserves HOLD_CANCELLATION letter transported by email at /kohadevbox/koha/C4/Letters.pm line 602.
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 10b673ee1c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 305d081a4e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Reserves.t .. 10/70 No reserves HOLD_CANCELLATION letter transported by email at /kohadevbox/koha/C4/Letters.pm line 602.
We do not test the notification here, we can simply ignore the letters code.
However we do test it later so we need to limit the scope of mock
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 1ceea0019c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 37341f2994)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Using perl -MCarp::Always:
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$handle_1> line 2.
DBIx::Class::Row::_eq_column_values(Koha::Schema::Result::Borrower=HASH(0x57c409b9ec08), "autorenew_checkouts", "", 1) called at /usr/share/perl5/DBIx/Class/Row.pm line 945
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 3aa81fa654)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit dcc3748bdd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_2> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_3> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_4> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
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 e21d6c04a9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 88ae9b2c1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049.
The context is:
3045 my $current_issues = $biblioitem->totalissues // 0;
3046 if ( defined $value ) {
3047 $totalissues = $value;
3048 } else {
3049 $totalissues = $biblioitem->totalissues + $increase;
3050 }
3051 return 0 if $current_issues == $totalissues; # No need to update if no changes
It feels correct to use $current_issues to suppress the warning
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 5661df2f70)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 686495ae04)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This file should have been removed years ago.
See the history:
commit a5a419616d
Date: Tue Aug 28 01:50:55 2007 +0100
Disable tests
@ t/dummy.t:1 @
+# Dummy test until Test::Harness or similar
+# is used by the other tests to check deps.
+print "1..1\nok 1\n";
Then
commit 7f01995446
Date: Fri Dec 7 17:15:22 2007 -0600
installer (part 3): enabled 'make test'
- # disable tests
- 'test' => {TESTS => 't/dummy.t'},
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 b8de89eaaa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 21ca620e0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If a yellow error message appears when saving the guaranteed patron,
also an extra popup message "Patron is already a guarantor for this
patron" will appear on the screen. It should only appear when you try
to add the same patron as a guarantor that already is a guarantor for
that patron. This happens because js function select_user is triggered
every time when guarantor data is send back to front-end with variable
new_guarantors if error occurs. Already existing guarantors shouldn't
be send back to front-end since their data is not lost. This patch
changes existing guarantors form elements to use classes "guarantor_id"
and "guarantor_relationship" to prevent this.
To test:
1. Find a patron with Patron guarantor or add first a Patron guarantor
(not a Non-patron guarantor) to a juvenile patron and save.
2. Edit again the same patron with guarantor and modify their age
to be greater than the upperage or under the required age of the
patron category.
=> Notice that you will get a yellow message "The following fields
are wrong. Please fix them..."
=> Notice that you will also get a pop up notice that says "Patron is
already a guarantor for this patron".
3. Apply this patch.
4. Repeat step 2.
=> Confirm that yellow message box is displayed but "Patron is..."
pop-up is not
=> Also confirm that guarantors data is not lost.
5. Try to add same patron guarantor as guarantor for guarantee patron
again.
=> Confirm that pop-up is displayed right after attempting to add
guarantor.
6. Try to add new guarantor for patron.
=> New guarantor should be added.
7. Attempt to save the patron.
=> Confirm that both guarantors data is still displayed in form.
8. Fix patrons age and attempt to save.
=> Patron is saved and both guarantors are displayed in their
details.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f2fe453dd4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 073fbd2696)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
> Cannot read properties of undefined (reading 'description')
Not sure since which change this is failing but it has always been
wrong.
The code in patron-search.inc is:
var categories = [% To.json(categories) | $raw %].map(e => {
e['_id'] = e.categorycode.toLowerCase();
e['_str'] = e.description;
return e;
});
var categories_map = categories.reduce((map, e) => {
map[e._id] = e;
return map;
}, {});
It's the keys that are lower cased.
Test plan:
`yarn cypress run \
--config video=false,screenshotOnRunFailure=false \
--spec t/cypress/integration/KohaTable/KohaTable_spec.ts`
should return green
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7bc3b24827)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 16439a30a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
And only those files.
Currently the test is failing with
02:52:31 koha_1 | # Failed test at xt/find-license-problems.t line 65.
02:52:31 koha_1 | # got: '0'
02:52:31 koha_1 | # expected: '1'
02:52:33 koha_1 | # File ./misc/translator/po/LICENSE has wrong copyright: hasgpl=1, hasv3=1, hasorlater=1, haslinktolicense=0, hasfranklinst=0
02:52:33 koha_1 | # Looks like you failed 1 test of 1381.
02:52:33 koha_1 | [00:51:24] xt/find-license-problems.t
Because a LICENSE file has been added to koha-l10n, and now this test fails on it.
27ab9ff4d2
But we should not test files that are not part of the git index.
Test plan:
0. Do not apply this patch
1. Edit xt/find-license-problems.t, add
warn scalar(@files);
2. Run `prove xt/find-license-problems.t`
=> Notice that 4056 files are processed
Note that you need to have a clean git repo. You can run the following
git command BUT BEWARE /*\ it will remove all changes not committed
`git clean -d -f`
3. Apply this patch, prove again
=> Tests are passing, with the same number of tests
xt/find-license-problems.t .. ok
All tests successful.
Files=1, Tests=4056
Note that I think we lost one file, as Test::NoWarnings is adding a
test. But I don't think it is worth the trouble to find out which one is
missing.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 491ffdc7f1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 779c9cb17d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151.
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158.
Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151.
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158.
Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151.
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158.
$issue->renewal_count is undefined in C4::Circulation:3151, but it's NOT
NULL in DB
We need to refetch the row to get the default defined at the DB level
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 53b3d5756e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a067120e70)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Search.pm line 536.
I think this is the correct fix. We generate a random av category that
is used in the data, so $label get undef:
521 $label = $authorised_values{$t};
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d6cbe0a25e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9f6088d48b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152.
C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152.
C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152.
We need to mock the userenv
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3b1bc1bbc5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b010fc5d49)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
02:28:36 koha_1 | WARNING: The key derivation method "opensslv1" is deprecated. Using -pbkdf=>'pbkdf2' would be better.
02:28:36 koha_1 | Pass -nodeprecate=>1 to inhibit this message.
02:28:36 koha_1 | at /kohadevbox/koha/Koha/Patron.pm line 3216.
We should deal with that on a separate bug report. For now we can remove
the warnings from the log/output.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 12e4e92e53)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d0727bab0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We cannot longer filter patrons by first letter, the browser errors
"Uncaught TypeError: v.replace is not a function"
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ea359a10a9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 61f9a253e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4609ffd715)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes the method return an actual array instead of a
comma-separated string. The API spec is adjusted so it also expects an
array in the response.
Tests are adjusted for the new return value.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ yarn api:bundle
k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ffab355be0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6096d986d5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 61d0294e62)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We defined an anonymous function inside an arrow function, and Cypress does not call it.
Test plan:
Set AlwaysShowHoldingsTableFilters to "Do not"
Run t/cypress/integration/KohaTable/Holdings_spec.ts:
yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts
When done, have a look at the value of AlwaysShowHoldingsTableFilters
=> without this patch it has been modified (not restored) and is set to
"Do"
=> With this patch applied the original value is restored at the end of
the tests (actually the end of each test)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b83df697de)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 98ca5b0800)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Those diag statements are not really needed
# Filling a hold when pref enabled should trigger a test
# Filling a hold when pref disabled should not trigger a test
# Updating a hold location when pref disabled should not trigger a test
# Updating a hold location when pref enabled should trigger a test
# Update with no change to pickup location should not trigger a test
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b6c8cee965)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cfe55afa92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If we build an object and pass a primary key (ie. suffixed by _id) we
should not replace it.
Test plan:
The test highlights the problem, it won't affect existing tests.
0. Apply only the first patch (Cypress tests)
1. Run yarn cypress run t/cypress/integration/t/mockData.ts
=> It fails
2. Apply this patch
=> It passes
Signed-off-by: David Nind <david@davidnind.com>
Amended-by: Jonathan Druart
Remove .only
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0aaf193a75)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b1ce0e9f57)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
1. We move from const to var so that we can modify the value of the
variable from the Cypress tests.
2. Also remove win.libraries_map as it seems that our code is no longer
failing if it's missing (we added more checks I guess)
3. Improved selectors for the show/hide filters links
- cy.get(".hide_filters").click();
+ cy.get(`.${table_id}_table_controls .hide_filters`).click();
Test plan:
Both commands should pass
yarn cypress run --spec t/cypress/integration/PatronSearch_spec.ts
yarn cypress run --spec t/cypress/integration/t/mockData.ts
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e1cbc7780a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We alter how the options are added to the patrons_search datatables
search bar, but we didn't update the selenium test to match.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1941a0c87e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Add some initial JSDoc for the enhancments to datatables we introduce
here.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8ca6245a38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When a column contains authorised/coded values, it is not possible to
search on the description. It is confusing for the user as the
description is the value displayed in the table.
We have discussed this already on bug 38130 and decided to fix the
problem by doing a new SQL join. But this can lead to performance
issues, especially for tables like the items table where a lot of coded
values are displayed.
This patch suggests to do a pre-processing step, before the query is
sent, to let the client build the query it needs.
An alternative approach would be to do the same job server-side, and
allow this kind of processing for all the attributes with a object using
columns_to_str. But we will certainly reach performance problems.
This is still not perfect, but it's fixing a regression quite easily,
and will open the door to more fixes for tables using coded values.
This patch revert one we have done on bug 38130, and use this new
mecanism for home library, holding library, item type and collection
code.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c67130078b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When StripWhitespaceChars is enabled and the user by chance enters
some white spaces in the input field, Koha generates empty subfield
(or even entirely empty field).
Test plan:
==========
1. Enable StripWhitespaceChars system preference.
2. Edit an existing record, putting just some spaces into an empty
subfield. Save the record.
3. Go to bibliographic record Normal view and in modal "MARC preview"
notice that the subfield you entered spaces in exists as an empty
subfield. If it was the only subfield in a field, the field exists
with no data at all. This is wrong.
4. Apply the patch ; restart_all.
5. Repeat 2. and 3. You should not see any empty subfield now. If the
empty subbfield was the only subfield in a field, the field should
have been removed from the record.
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 d0ce815600)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f48cb7a0f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This fixes the error 500 generated when using the label
generator if you use the "Bibliographic data precedes
barcode" layout type when printing a barcode range.
Test plan:
1. Set up information for testing:
1.1 Create a new label layout:
1.1.1 Cataloging > Tools > Label creator
1.1.2 New > Label layout
1.1.3 Add these details:
- Layout name: BZ34157
- Choose layout type: Bibliographic data precedes barcode
- Select 'List fieds'
- Data fields: add some text at the end
title, author, isbn, issn, itemtype, barcode,
itemcallnumber, 'Some text'
1.1.3 Save
1.2 Ranges of barcode numbers for testing:
1.2.1 Where the numbers are not used in KTD, and are LOWER than
the highest barcode number (39999000019193):
500000 to 500100
1.2.3 Where the numbers are not used in KTD, and are HIGHER than
the highest barcode number (39999000019193):
39999000020000 to 39999000020100
1.2.2 Where the numbers are used in KTD:
3999900000001 to 3999900001001
2. Print a barcode range using the ranges in 1.2:
2.1 Cataloging > Tools > Label creator > Print barcode range
2.2 Enter the barcode ranges
2.3 Select a layout to be applied: BZ34157
2.4 Export
2.5 Click "Download as PDF"
2.6 Results for all barcode ranges:
==> You get a page with "An error has occured! Error 500...".
3. Repeat step 2, but select the DEFAULT layout for 2.3:
==> Results for all barcode ranges: PDFs with barcode labels
successfully generated
4. Apply the patches and restart everything (restart_all)
5. Repeat steps 2 and 3.
6. Results for all barcode ranges and the BZ34157 and DEFAULT layouts:
==> PDFs with barcode labels successfully generated
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: David Nind <david@davidnind.com>
Bug 34157: (Follow up) Removed the debugging data
Signed-off-by: David Nind <david@davidnind.com>
Bug 34157: (follow-up) Tidiness fix
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a51460e2c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d212c89d81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The diff doesn't contain intentional HTML formatting, and pre tags do
not prevent un-escaped HTML from being interpreted, so we should not
use the raw filter here
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c702e2ea4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 37a4ec3c0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change removes the incorrect instruction from about.pl:
"Run the following SQL to fix the database" and fixes the HTML
formatting so that the line "-- Convert schema '' to '':;" is
displayed correctly at the start of the line.
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/about.pl?tab=database
2. Note that "Run the following SQL to fix the database" no
longer appears and "--Convert schema '' to '':;" starts
at the beginning of the line instead of with leading whitespaces.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6699bdb142)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6f11fcb48d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
0. APPLY PATCH
1. Transfer an item from Library A to Library B
2. Place and item-level hold on the item
3. Set library to Library B
4. Go to Circulation > Transfers to receive
5. In the 'On hold for' column you should now see the patron card number.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 295fd3bf89)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9fcc9a30f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - have or create a user with the permissions batch_extend_due_dates edit_quotes but no other Tools
2 - log into koha as that user, go to Tools module, confirm both Batch Extend Due Dates and Quote Editor are available from the Tools module home page
3 - Click into either available tool, confirm the sidebar menu contains the category Additional Tools and a link to Quote Editor, but nothing else
4 - add the edit_notices permission to your user
5 - reload your page from step 3, confirm the sidebar menu now also contains the Patrons & Circulation category with both Notices & Slips and Batch Extend Due Dates.
6 - apply patch, restart services, reload page, confirm nothing has changed
7 - remove the edit_notices permission from your user
8 - reload your page from step 3, confirm the sidebar menu now contains the Patrons & Circulation category with only Batch Extend Due Dates.
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e98fab0502)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 94a50dd6e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Add EAN account information to EDIFACT order confirmation message
when the BasketConfirmations system preference is enabled.
To test:
1. Set EDIFACT system preference to Enable
2. Set BasketConfirmations system preference to Enable
3. Create at least 2 EANs, one with a description and one without a
description
i. Go to Acquisitions > Library EANs
ii. Click "New EAN" and fill in the fields
4. Create an EDI account
i. Go to Acquisitions > EDI accounts
ii. Click "New account"
iii. Click Submit (for testing purposes you don't need to fill in
the fields)
5. Find or create a basket for the same vendor that's on the EDI account
6. Add an order to the basket from any source
7. In the menu bar at the top of the basket screen, click "Create
EDIFACT order" and select an EAN
--> Note that the confirmation page doesn't tell you which EAN was
selected
8. Click "No, don't close"
9. Apply patch and restart_all
10. Repeat step 7
--> The confirmation page should now display both the basket and the
selected EAN
11. Click "Cancel"
--> Confirm that the basket is still open
12. Repeat step 7
13. Click "Yes, generate order and close basket"
--> Confirm the basket is closed
14. Click "EDIFACT messages" in the sidebar menu
--> Confirm that you see a message with type ORDERS for that basket
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c9e5029b3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ea49cfb38b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
In Administration > MARC bibliographic frameworks > "MARC structure":
Do not show "Edit framework" button in tools bar since one can not edit
the default framework description.
Currently it leads to new framework creation.
Test plan :
1) Go to Administration > MARC bibliographic frameworks
2) On default framework row, click Actions > MARC structure
3) Check you dont see in tool bar "Edit framework" button
4) Go to Administration > MARC bibliographic frameworks
5) On a framework row (not default one), click Actions > MARC structure
6) Check you see in tool bar "Edit framework" button
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 c3eccceae5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 5f8958d220)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
In Administration > MARC bibliographic frameworks the "Edit framework" button in tools bar always edits default framework
Test plan :
1) Go to Administration > MARC bibliographic frameworks
2) On any framework except default one click on actions then "MARC structure"
3) In tools bar click on "Edit framework"
4) Check you are editing the correct framework
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>
(cherry picked from commit e8dcf3e898)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
**Problem:**
When using SIP checkout messages with the "no block" flag, the specified due date
was being ignored. Instead of honoring the provided due date, the system would:
1. Use the due date as the transaction timestamp (incorrect behavior)
2. Calculate a new due date based on circulation rules
3. Return an empty due date field (AH) in the SIP response
This affected SIP2 integrations where external systems needed to specify exact
due dates for checkouts, particularly for offline circulation scenarios.
**Root Cause:**
The `ProcessOfflineIssue` function in C4::Circulation was only returning a
success/failure message, but the SIP checkout transaction needed access to the
resulting checkout object to properly set the due date. The SIP Transaction::Checkout
module was calling `ProcessOfflineIssue` but couldn't retrieve the checkout details
to populate the transaction's due date field.
**Solution:**
1. Modified `ProcessOfflineIssue` to return both the status message AND the checkout
object: `return ( "Success.", $checkout );`
2. Updated `ProcessOfflineOperation` to handle the new return format by capturing
only the message: `( $report ) = ProcessOfflineIssue( $operation );`
3. Modified SIP Transaction::Checkout to capture both return values and use the
checkout object to set the proper due date via `duedatefromissue`
4. Fixed the timestamp parameter to use `dt_from_string` instead of the due date
**Test Plan:**
1. **Unit Tests:**
- Run `prove t/db_dependent/Circulation/OfflineCirculation.t` to verify
ProcessOfflineIssue returns checkout object and respects due_date parameter
- Run `prove t/db_dependent/SIP/Transaction.t` to verify SIP checkout honors
no_block_due_date parameter
2. **Manual SIP Testing:**
- Connect to SIP server via telnet on port 6001
- Send checkout message with no block flag and specific due date:
`111YN20250115 18000120241201 180001AP|AO|AC|AD|AB<barcode>|AA<cardnumber>|`
- Verify response contains correct due date in AH field
- Verify checkout record in database has the specified due date
3. **Regression Testing:**
- Verify normal SIP checkouts (without no block) still work correctly
- Verify offline circulation operations continue to function
- Verify ProcessOfflineOperation still processes queued operations correctly
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4d069e5006)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d1f3ba0767)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Problem: Clicking Save doesn't fill control fields automatically in both the authority and bibliographic MARC editors.
Regression introduced when class `framework_plugin` was added: `AreMandatoriesNotOk()` rewrites the element `class` attribute with a hard‑coded string, dropping existing classes. Because the plugins that populate 000/003/005/008 rely on `framework_plugin`, the inputs are skipped and the fields remain empty.
This patch stops clobbering the attribute and instead appends the visual 'notFilled' class via `elt.classList.add()`. The one-line fix is applied in both `authorities.tt` and `addbiblio.tt`.
Test plan:
Authority editor
1. Authorities → New authority → choose framework (e.g. Topical term).
2. Leave all fields blank, click Save.
Before patch: 000, 003, 008 remain blank; required tags turn yellow.
3. Apply patch, hard‑refresh, repeat steps 1–2.
After patch: control fields auto‑populate as in 24.11.
Bibliographic editor
1. Cataloguing → New record (Not in Advanced MARC editor).
2. Click Save without entering data.
Before patch: control fields stay blank; record cannot be saved.
3. Apply patch, hard‑refresh, repeat.
After patch: record is blocked, but 000/005/008 auto‑populate.
Both editors behave like 24.11; mandatory highlighting still works.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4c4023c41c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3fd87e0ddd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch modifies two reports in order to correct sorting on title
columns.
To test, apply the patch and got to reports -> Lost items.
- Run the report with parameters that will return multiple results.
- Test sorting the title column. The articles 'a', 'an', and 'the'
should be ignored.
- Perform the same test with the "Orders by fund" report.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b94f53291c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit bd43f8df50)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds some additional logic to the template which controls the
appearance of the footer in the OPAC. Some additional checks are
required to make sure an empty footer doesn't display in some
circumstances.
To test, apply the patch and install at least one additional translation
besides English.
Check any OPAC page when various combinations of system preferences are
enabled:
- opaclanguagesdisplay
- OPACLanguages
- OpacLangSelectorMode
- OPACReportProblem
- CookieConsent
- OpacKohaUurl
In particular, confirm that there is not an empty footer when
opaclanguagesdisplay is enabled but there is only one translation
enabled.
Sponsored-by: Athens County Public Libraries
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 78b8a2e6f1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7aca5cfa90)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Auth_with_shibboleth.t .. 1/5 GetPreparedLetter called at t/db_dependent/Auth_with_shibboleth.t line 73.
EnqueueLetter called at t/db_dependent/Auth_with_shibboleth.t line 80.
SendQueuedMessages called with message_id: 42 at t/db_dependent/Auth_with_shibboleth.t line 90.
Not sure what exactly is going on here, but warnings_are is not supposed
to show the warnings in the output. I think it's because of the logger
mock. A workaround is to use a variable we increment then compare to see
if we reach the sub.
Test plan:
% prove t/db_dependent/Auth_with_shibboleth.t
should return green without warnings
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f8fd672602)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6d12848ba3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Wide character in print at /usr/share/perl/5.36/Test2/Formatter/TAP.pm line 156.
Test plan:
Confirm that
% prove t/db_dependent/selenium/regressions.t
still passes and does not generate warnings
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f44a5ef5a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fc9647c5ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The regexp for the value builder 'hbyymmincr' doesn't allow for numerics in the branchcode,
so the nextnum found is always 0 and multiple Add always generate the same barcode.
This simply allow for numerics within the regex.
Test
- It's a bit complicated. You need
- all your branchcodes to be numerics (01,02,71...)
- all barcodes to already be a bunch of numbers
- Modify the syspref 'autobarcode' to hbyymmincr, the home branch + date one.
- Find an item in the pro-search,
- New -> New Item
- Click on the 'p' to have the value builder create the next barcode.
- Without the patch, the query won't have found anything, so it'll suggest xxxxxx0001
- Click Add. It reprensent the form to enter another one.
- Click on the 'p' edit box, it'll offer you again xxxxxx0001
With the patch, it'll offer valid ones everytime.
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>
(cherry picked from commit db067d48ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Prior to the Bootstrap 5 update, the feature of editing subfield codes in the
basic editor was kept subtle by putting the code in an <input>, but removing
the border around the input, so it required either knowing the feature exists
or accidentally clicking on or around the single letter code and seeing it
turn into an editable input.
This patch removes the border again, because when people accidentally see the
feature, they are sometimes not pleased to see it.
Test plan:
1. Without the patch, open the cataloging basic editor and switch to the "1"
tab with the 100 fields.
2. Note that the codes for the subfields are clearly in editable inputs.
3. Apply patch, reload the editor page.
4. Note that now the codes look like just plain text, until you actually
click on or very near the letter, when they become visible as inputs
by having the focus border.
Sponsored-by: Chetco Community Public Library
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cfb5d05ed9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When using the OPAC and you are not logged in, there are warnings
in the logs:
[WARN] Use of uninitialized value $branch_limit in concatenation (.) or string
It comes from C4::Koha::GetAuthorisedValues() :
my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
my $cache_key = "AuthorisedValues-$category-$opac-$branch_limit";
C4::Context->userenv->{"branch"} can be undef
The patch fixes using C4::Context::mybranch().
Test plan:
1. Set the OpacAdvancedSearchTypes system preference to something
other than "itemtypes", for example "loc".
2. Go to OPAC without logging in, and perform a search.
3. Check the /var/log/koha/kohadev/plack-opac-error.log and note
the warnings in the log:
[WARN] Use of uninitialized value $branch_limit in concatenation (.) or ...
(Alternative, tail the logs: tail -f /var/log/koha/kohadev/*.log
4. Apply the patch.
5. Repeat step 2 and check that there are no longer any warnings.
6. Sign off.
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 d60deb348c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8854037fbd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The previous commit introduced a bug where the control number subfield 'w'
was being added to the MARC field even when undefined, causing test failures.
This patch adds a condition to only push the control number subfield when
the value is actually defined, matching the pattern used for other subfields
in the method.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32860c2778)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ad7a9355a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the only use of prepare_host_field to use the well
tested Koha::Biblio->generate_marc_host_field method instead and then
removes the aforementioned prepare_host_field method from C4::Biblio.
Test plan
1) Ensure the "enhanced workflow" for creating analytics still functions
as expected.
Sponsored-by: Open Fifth <https://openfifth.co.uk>
Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3e627d7a77)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a5949e7575)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the use of a hash to store and then pass subfields to
the MARC::Field new method to an array with key/value pairs using fat comma's.
This allows us to maintain the integrity check that we're passing string
as the first arguament in each pair whilst also allowing us to ensure
fields are passed in the order they are found.
Sponsored-by: Open Fifth <https://openfifth.co.uk>
Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3d9778b2cd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ac2ca31d87)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dc11fbdc5b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 61b3019600)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates a few templates so that div.container is replaced
with div.container-fluid. div.container gives us a fixed maximum width
that isn't consistent the rest of Koha.
To test, apply the patch and go to the staff interface.
- Perform a catalog search which will return multiple results.
- In the search results, check multiple results and click "Add to cart."
- Click the cart icon in the top menu to trigger the cart popup.
- The contents of the cart popup should fill the whole width of the
window.
- The other instances of this are less noticeable because of how the
pages work. These changes are more about consistency:
- The OPAC place hold page
- The club enrollment process (both in the OPAC and the staff
interface)
- As long as these interactions work correctly all is good.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c074c694e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3e0f04851f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. APPLY PATCH, restart_all
2. Make some holds for patrons in both the staff client and the OPAC. ( For OPAC turn on OpacHoldNotes )
3. Make sure you add some notes to each of these holds.
4. Go to the patron account and click on the 'Holds history' tab.
5. Make sure the hold note is there and looks correct.
6. Ensure you can hide the coluimn properly via Table settings.
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 81859ce662)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit aed4eb5974)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch changes the "Copy sesttings" button on the patron permissions
page to return it to its previous text "Copy permissions." This is
consistent with related controls on the page.
To test, apply the patch and locate a patron in the staff interface.
From their checkout or detail page choose More -> Set permissions from
the toolbar.
In the toolbar of permissions-related controls you should see a button
labeled "Copy permissions."
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f6b630601)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fe3f83e492)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When viewing the action logs for a system preference change, there is an
option to view a comparison between different log lines for the same
system preference. However, if a system preference value contains HTML
markup (e.g. in IntranetUserJS), the diff text is only escaped on
sections where a change is marked, so unchanged lines containing HTML
markup result in the HTML being rendered.
Escape the string values for unchanged sections as well, to ensure that
HTML markup in the diff text will not be rendered.
To test:
1. Edit IntranetUserJS and add some code that contains HTML markup.
For example:
$("body").append('<a id="helloworld" class="btn btn-default">Say hi</a>');
2. Save the preference
3. Make another change to IntranetUserJS that does not affect the line
you just added, and save again to ensure there are at least 2 action
log lines for comparison
4. Go to Tools > Log viewer
5. Select System Preferences module and Submit
6. Find the log entries for the above two revisions to IntranetUserJS
7. Check the Compare checkboxes on those entries, and click View
comparison
--> Note that the HTML button is rendered in the comparison
8. Apply patch
9. Clear browser cache and refresh the page
10. Repeat step 7
--> The button is not rendered and the code is displayed as written
11. Make a change to the line you added in step 1 (for example, replace
"Say hi" with "Say hello")
12. Refresh the page
13. Check the checkboxes for the newest 2 log entries and click View
comparison to view the diff for that last change
--> Confirm the change is shown correctly - the button is not rendered
and nothing has been double-escaped
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 78dbb72ce9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 25c36c5884)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test that input values don't change when send to the
sub restore_form_values.
To test prove t/Form_MessagingPreferences.t
Sponsored-by: Koha-Suomi Oy
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 2c4a89801e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a57bd07127)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We don't need to check if $op is add_form after
error, since this value always changes.
Sponsored-by: Koha-Suomi Oy
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 c4052b981f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7fc5b0b0f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Just a small beginning..
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 6cc683b518)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3b031ce510)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If error occurs while creating a new patron messaging
preferences are either lost or reseted as default
fro patron category. This patch adds new method
restore_form_values to restore already added messaging
preferences.
To test:
1. Enable syspref EnhancedMessagingPreferences.
2. Create a new patron but cause an error to prevent it from
saving (e.g. add wrong age).
3. Add messaging preferences for patron (if there are default
preferences, add also new ones or remove defaults).
4. Attempt to save.
=> Note that messaging preferences were lost and you need to
readd them.
5. Apply this patch.
6. Repeat steps from 2 to 4.
=> Note that messaging preferences which you added are kept
even if error occurs.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
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 8ed31509ae)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8d496f1bed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lets check DBIx's columns_info.
Test plan:
Try to blank an integer column and a string column. Verify results.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c0a1731715)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7ed54da4f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Set not-for-loan, withdrawn, and damaged statuses on some items
2. Try to edit only those items with the Batch item modification tool
3. Check the checkboxes to clear the withdrawn, not-for-loan, and
damaged statuses
4. Click Save
5. View the background job report
--> Note that it says the items could not be modified
6. Look at the items
--> The statuses have not been cleared
7. Apply patch and restart_all
8. Repeat steps 2-5
--> The background job report says the modifications were successful
9. View the items
--> The statuses have been cleared
Signed-off-by: David Flater <flaterdavid@gmail.com>
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 341c93ee58)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 2e206204c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes a trivial typo. The text appears in two more places
with the right form on the same template.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 77fdb32e8f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 377602a36d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch corrects the dropdown menu markup in the "Records found in
the reservoir" section of the cataloging search results page. It was not
upgraded to Bootstrap 5 markup.
To test, apply the patch and go to Cataloging.
- Click "New from Z39.50/SRU"
- Perform a search which will return multiple results.
- Close the popup window and perform the same search in the "Cataloging
search" header form.
- Scroll down to the "Records found in the reservoir" section.
- Click the "Actions" menu on one of the results. The menu should look
correct.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f2dfbc226)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e377e09840)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates the JavaScript which runs on the list of saved SQL
reports, adding a check for report subgroups to the display of the
report subgroups dropdown. The patch also hides the subgroups dropdown
if there is no saved tab, in which case the tabsInit function doesn't
run.
To test you should have multiple reports organized in multiple groups
and subgroups. See the test plan on Bug 39534.
- Go to Reports -> Saved SQL reports.
- If the page loads with the "All" tab active, there should be no
subgroups dropdown.
- If the page loads under a different tab, the subgroups dropdown should
only show if that group has subgroups.
- Switch between the various report group tabs to confirm that the
subgroups dropdown is shown or hidden correctly based on the existence
of subgroups.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1e57f5c8d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d7bf63a327)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
this patch adds some useful features to allow the build-git-snapshot tool to build production packages
the patch adds the following options:
--urgency, -u
the urgency string for the resulting package. Default is '$urgency'.
--incr, -i
set debian revision (default = '-1')
--(no)autochangelog
whether or not to update the debian/changelog file.
Default is to update it.
note: this patch does not change any of the existing behaviour of the tool
test plan to come...
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3e7c839714)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 14662a012e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch modernizes the Scrubber.t unit test with comprehensive
coverage following Koha best practices:
- Uses subtest structure for logical grouping
- Tests all scrubber types (default, comment, note)
- Includes security testing for XSS prevention
- Covers edge cases and error handling
- Tests new list elements added in previous commits
Also fixes C4::Scrubber to handle undef parameters cleanly by
treating them as 'default' type instead of generating warnings.
Test plan:
1. Run prove t/Scrubber.t
2. Verify all tests pass without warnings
3. Confirm comprehensive coverage of module functionality
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 21f3340442)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 1ab7ccde18)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Adds support for HTML description list elements (dl, dt, dd) to the
'note' profile in the HTML scrubber configuration. This allows
librarians to use description lists in note fields for better
structured content presentation.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9ef8f098d8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 421968355e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch add the unordered list, ordered list and list item html tags
to the list of allowed tags in C4::Scrubber.
Test plan:
1) Add a course reserve and include the following in the public note
field:
<ul>
<li>First item</li>
<li>Second item</li>
</ul>
2) View the course details page and note "First item Second item" all
appears on the same line (the ul and li tags have been stripped)
3) View the course reserves page and note the same issue in the public
notes field of the table display
4) Apply this patch
5) Repeat 2 and 3 and note you now have a bullet pointed list displayed
in both places
6) The display of the note on the details page may look mis-aligned..
that will be dealt with on it's own bug
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 ddad4e81a2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fb2899f311)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When a hold's pickup location is changed we should rebuild the holds queue.
To test:
1 - Enable RealTimeHoldsQueue
2 - Enable LocalHoldsPriority where pickup library matches home library
3 - Place two biblio level holds on a bib with one item for two different patrons for delivery to a different library then the home library
4 - Check the queue - firstpatron should have priority
5 - Change the pickup location for the second hold to be picked up at the home library
6 - Check the queue, unchanged
7 - Change the pickup location back
8 - Apply patch, restart all
9 - Change the pickup location to the items home library again
10 - Check the queue
11 - Second patron has now been given priority
Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3664281d37)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 87043c9f53)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
Read patch.
Run t/db_dependent/Koha/Quotes.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0ed2b7cfa8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 816b4537e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. APPLY PATCH
2. Enable OPACVirtualCard
3. Login to the OPAC and visit the account page.
4. Click on 'My virtual card'
5. Notice that the cardnumber and expiratrion date are now listed.
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4636d813be)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ec04bbbb62)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 8f90ac9d4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 3042fa93d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
For creating this patch I looked at all parameters defined in the
handler mapping, removed duplicated ones and tracked down which ones
really were parameters in `GetOptions`. This included tracking down
variables that were later assigned other values and things like that.
The mapping is used to display the right parameter name if missing a
mandatory one.
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 46cc88acc3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ec396bfdd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 31143 created a script in cronjob and then moved it to maintenance. However, it is still referred as in cronjob in help strings. This patch updates the hint.
No test needed I guess. Only changing a string
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 34886a9b5b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 5ffdf17098)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This fixes the OPAC browse search feature (OpacBrowseSearch
system preference, Elasticsearch only). Expanding and
collapsing the search results was not working.
Test plan:
1. Start up KTD using Elasticsearch; ktd --es7 up
2. Enable the OpacBrowseSearch system preference.
3. In the OPAC, click 'Browse search' (one of the
options under the search box).
4. Search for 'a', for the search type use Author, then
click Search.
5. Click on one of the search results - note that it doesn't
expand to show the titles for the author.
6. Apply the patch.
7. Refresh the page and repeat steps 3 to 5. Note that the
author section now expands andd collapses when clicked,
and that the titles for the author are now shown.
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 448b9cd17e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f222847062)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
"build_items_table is not defined"
We should not try to build the items table if there are no items.
Test plan:
Go to the bibliographic detail page of a biblio without items
You should not see errors in the browser's console
Go to the bibliographic detail page of a biblio with items
You should not see errors in the browser's console
The table should be displayed and the different features should work as
before
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 561535503c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ce72073ff5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
So it's not delayed and we catch have the error in the Cypress test.
Otherwise the error appear too late (in the after each) and the test
does not fail
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 2d1c6b8666)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7c33240af2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We need to use an exact search when using the id of an option.
Test plan:
0. If not using default KTD data, create an item type with the following settings:
Item type: BK
Description: Books
leave all other values on their defaults
1. Create a new item type with the following settings:
Item type: BKA
Description: Other type of book
leave all other values on their defaults
2. Add or edit items on a bib record so that the record has at least one item of type "Books" and at least one item of type "Another type of book"
3. Go to Normal View for that bib record
4. Click "Show filters" above the item holdings table
5. In the Item type column, filter by "Books"
Only "Books" items show in the table
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>
(cherry picked from commit ec2fbc0d81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The self-checkout logout process, with SelfCheckReceiptPrompt enabled,
asks the user if they want to print a receipt. Because of an error in
time calculation the system always believed the process had timed out
and wouldn't print the receipt.
Before we implemented a modal dialog to ask for confirmation upon
self-checkout logout, it was necessary to have a timeout function built
into the process. See Bug 11498.
The modal no longer blocks the page timeout function, so this time
calculation is obsolete and can be removed.
To test, apply the patch and go to the self-checkout module.
- Make sure the SelfCheckReceiptPrompt system preference is enabled.
- Log in as a user for doing self-checkout.
- Click the "Finish" button.
- You should see a dialog, "Would you like to print a receipt?"
- Clicking "Print receipt..." should open a new window with your
receipt and log you out of the self-checkout system.
- Clicking "End session" should end your session without triggering a
popup.
- Set the SelfCheckTimeout system preference to something very low, like
10 seconds.
- Perform the same test as above, but after triggering the dialog wait
10 seconds for the timeout to trigger.
- The page should reload automatically and log you out.
- Disable the SelfCheckReceiptPrompt system preference.
- Perform the same tests to confirm that clicking the "Finish" button
logs you out immediately without offering to print a slip.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6f147f4116)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit cf2d0dd69a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch corrects a regression in the style of the floating toolbar on
the basic MARC editor page. There should be comfortable padding around
the "Save" button while keeping the toolbar's full width matching the
tab panels.
To test, apply the patch and clear your browser cache if necessary.
- Go to Cataloging -> New record.
- The toolbar with the "Save" button should look correct.
- The container with the tab buttons right below that should be the same
width as the tab panel.
- Scroll down and confirm that everything looks good when the toolbar is
floating.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0e43eed8c0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 16727da95c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If a librarian cannot moderate comments and a bib has comments, the
error "Something went wrong when loading the table." will pop up during
the page load.
Test Plan:
1) Add a comment to a record
2) Log in to the staff interface with a librarian that cannot moderate
comments
3) Browse to the "Normal" view for that record
4) Note the error message
5) Apply this patch
6) Reload the page
7) No error!
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher <cbrannon@cdalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ca1af51349)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 67d20ed350)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Unless I misunderstood the purpose of the ChildNeedsGuarantor system preference, I think the description is misleading.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Applied the patch, reloaded the syspref page for ChildNeedsGuarantor,
verified the new description looks OK.
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ee57c56eeb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c8f1779c20)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test Plan
1. Staff member A creates a public list.
2. Staff member A transfers this public list to another staff member (staff member b) without list permissions.
3. Staff Member B now has the ability to edit this public list and add/remove items from this list.
4. Apply the patch
5. Repeat steps 1 and 2. An error message should now appear stating that the “Transfer not allowed: You or the selected user do not have the required permissions.”
6. Provide the correct permissions to Staff Member B. Initiate the transfer again. The transfer should be successful.
7. Test these steps in the OPAC as well.
8. Prove t/db_dependent/Virtualshelves.t
9. Sign off and have a wonderful day! :D
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 45c7020220)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7ed45d8d15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The reference to this bug report may be helpful to understand
later why we did so.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 01526ef545)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4efb86aec8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Currently, when removing 040 $f from authority record with 008/11 =
'z' (MARC 21), merge function removes the content of $2 subfield in
linked 6XX fields, leaving the 6XX $2 subfield empty. This is not
correct. We should not have empty subfields in a MARC record.
Instead, the old content of the $2 subfield should be retained (if
auth 008/11 is still = 'z').
Test plan:
==========
1. Have an authority record with 008/11 = 'z' and 040 $f = 'whatever'.
2. Link the record to a bibliographic 6XX.
3. Edit the authority record, removing 040 $f.
4. Go to bibliographic record and in modal "MARC preview" from Normal
view notice that 6XX $2 exists but is empty. This is wrong.
5. Apply the patch ; restart all.
6. Repeat p. 1.-4. Note that the content of 6XX $2 has not been
removed.
Sponsored-by: Ignatianum University in Cracow
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 bd43ebdc5e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit ba31b8cc35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit d0dc3ffd71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Following the original test plan you notice, `THIS IS A TEST` is printed
twice:
* In the logs.
* In STDERR for the SIP server.
The latter is redundant, and also problematic for
`xt/author/pod_coverage.t` which fails the `no warnings` tests because
of that.
To test:
1. Run:
$ ktd --shell
k$ prove xt/author/pod_coverage.t
=> FAIL: Scary errors, lots of them
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Follow the original bug test plan
=> SUCCESS: There's `THIS IS A TEST` in the logs, which was the author's
goal in the first place.
5. Sign off :-D
6. Visit bug 40144 :-P
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9a4fd4facb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 036d940d54)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 7c06904612)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit ce008cf965)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit f72d9f2962)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 1210d6aafa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 79f69e7e4c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 5a6ad66117)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 86fd02bd1a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit c3a9ef0989)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit fd6552957e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 21ffc157f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 2af2c4f6f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit ca2ff9b46b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit ef3ee7d69c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 3284f58e95)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
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>
(cherry picked from commit eb9da8a8d6)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
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>
(cherry picked from commit d99a9e28b6)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
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>
(cherry picked from commit 4862281a98)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
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>
(cherry picked from commit 5eb5d33f2f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Make it consider the possibility of a patron not existing.
This ensures that placing a request with partners does not error and works as expected even if the ILL request's borrowernumber is undef
To test:
1) Run the test file before and after applying this patch:
prove t/db_dependent/Koha/ILL/Requests.t
To test (ILL request is kept after borrower is deleted):
1) Apply all patches except this one
2) Enable ILLModule and create an ILL request.
3) Add a type, valid cardnumber and library.
4) Delete the associated borrower.
5) Confirm the ILL request is still listed and shown as expected
Continue test, confirm follow-up bug is fixed:
6) Click 'Place request with partners'
7) You get a ERR_TOO_MANY_REDIRECTS error
8) Apply this patch and restart plack. Repeat.
9) Confirm the place request with partners libraries page is shown correctly
Sponsored-by: UKHSA - UK Health Security Agency
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e95ec209c1)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Only show this attribute if defined
Sponsored-by: UKHSA - UK Health Security Agency
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a01360a487)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Only show this action button if the ILL request has a borrowernumber
Sponsored-by: UKHSA - UK Health Security Agency
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c9817ddc1e)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
To test:
1. Navigate to circ/circulation.pl?borrowernumber=X
2. See the console error `document.referrer.split(...)[1] is undefined`
3. Go to circ home circ/circulation-home.pl and search for a patron
4. See the console error when you select a patron or are taken directly to them
5. APPLY PATCH
5. JS error should be gone in both instances
squash
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit db44d917ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
In "Holds to pull" page, patron column should use patron-title.inc like in other pages (like waiting holds).
This allows to use surname first to allow better sorting/finding.
Test plan :
1) Place an hold on some record
2) Go to Circulation > Holds to pull
3) Check you see in column "First patron" : surname then firstname
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9292b076ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - Remove age limits from a Child and Adult category in Administration->Patron categories. Ensure Child category can be guarantor and Adult cannot
2 - The above step is to avoid any age checks and form resubmission which removes the guarantor fields
3 - Find/create a child patron
4 - Add a guarantee from the Adult category to the child
5 - Check the DB:
SELECT * FROM borrower_relationships WHERE guarantee_id={borrowernumber of child};
6 - Note the id colum
7 - Edit the child patron to Adult category
8 - Repeat 5
9 - Note the relationship still exists and the id is incremented
10 - Oof!
11 - APPLY PATCH, restart_all
12 - Try again steps 3 - 8
13 - The relationship should not be re-added
14 - Try with more than 1 guarantor on the record, confirming all are deleted
15 - Try adding some guarantor to patron types that should be able to, they relationship should work.
16 - Try changing some patrons to categories that do allow guarantors, making sure the relationship does stay.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4f170fb94d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch ignores limits when updating a wrong transfer to ensure we can return a book
home when checked in at the wrong branch
To test:
1 - Enable UseBranchTransferLimits based on 'Collection code'
2 - Disable transfers for FIC from:
CPL -> FFL
CPL -> IPT
FFL -> CPL
FFL -> IPT
IPT -> CPL
IPT -> FFL
3 - Set library to IPT
4 - Checkin an FFL item
5 - It generates a transfer home
6 - Set library to CPL
7 - Check the item in
8 - 500 error, and in logs:
==> /var/log/koha/kohadev/plack-error.log <==
Exception 'Koha::Exceptions::Item::Transfer::Limit' thrown 'Transfer not allowed'
9 - Apply patch, restart all
10 - Check item in again
11 - Success! Transfer updated
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b16582b963)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jenkins is not failing when git command fails.
We edited the config and it broke the git repo:
13:32:35 koha_1 | error: unable to normalize alternate object path: /srv/jenkins/workspace/Koha_Source/.git/objects
13:32:35 koha_1 | fatal: not a tree object
13:32:35 koha_1 | [12:29:31] xt/check_makefile.t
So tests were not running correctly
Maybe it will be a problem for people running the tests without being
inside a git repo, but for now we need to ensure the community CI does
what we think it does.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0075ca7356)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Due to changes made by the commit 0472b56a67, when editing an
existing bibliographic record a default value is inserted while it
should not, according to ApplyFrameworkDefaults systempreference.
Test plan:
==========
1. Verify that ApplyFrameworkDefaults systempreference is set to
‘when cataloguing new records only’.
2. Take any existing bibliographic record, e.g. sn:1. Open it in
standard editor and identify a non used (empty) subfield, e.g. 024 $a.
Note the framework (Books, Booklets, Workbooks). Close the editor
(Cancel).
3. Modify the framework in question (Books, Booklets, Workbooks) by
setting a default value for the chosen subfield (e.g. 024 $a).
4. Open the record in the editor again. Note that the 024 $a subfield
has now an inserted default value while it should not, according to
the ApplyFrameworkDefaults setting. Do not save the record, chose
Cancel.
5. Apply the patch ; restart_all.
6. Repeat p. 4 -- there should be no default value inserted in the
existing record now.
Sponsored-by: Pontificia Università di San Tommaso d'Aquino (Angelicum)
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cfe3421891)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a check of mandatory item fields when adding several items
Test plan:
1 We need mandatory subfields for items in the ACQ framework and an open basket configured to create items on order or a closed basket configured to create items on receiving an order
2 In both cases, in the form to create items check that there are mandatory fields.
3 Click the Add multiple items button, write a number and then add.
4 Check that the items have been added.
5 Apply patch, restart services
6 Repeat step 3 Now it doesn't add the items and shows an alert regarding the empty mandatory fields
Signed-off-by: Laurence <laurence.rault@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1bb962bba7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch uncomments some code which was incorrectly left commented
after debugging.
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>
(cherry picked from commit 545ff24dd0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This fixes checkout fields being made available to the public API.
Note: This depends on the fix at Bug 39313, so make sure you apply that
first.
To test:
1. Enabled OpacTrustedCheckout system preference
2. Search for an item and get the barcode
3. Go to the OPAC
4. Click the Self-checkout button at the top
5. Enter the barcode and submit
6. Notice that the due date does not show in the modal, even though the
due date was correctly set
7. Apply the patch and restart services
8. Go to the staff interface and check in your barcode
9. Repeat steps 3-5
10. Confirm the due date does show correctly in the modal
11. Confirm tests pass t/db_dependent/Koha/Checkout.t
Sponsored-by: Reserve Bank of New Zealand
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 53c58f7cef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
rather than a barcode.
Will be tested within previous test plan.
Sponsored-by: Reserve Bank of New Zealand
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>
(cherry picked from commit 00395f2520)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes a regression introduced by Bug 38505.
To test:
1. Enabled OpacTrustedCheckout system preference
2. Search for an item and get the barcode
3. Go to the OPAC
4. Click the Self-checkout button at the top
5. Enter the barcode and submit
6. Notice you are given an error UNKNOWN_BARCODE and the item is not checked out
7. Apply the patch and restart services
8. Repeat steps 4-6 and confirm you are able to successfully check out the item
9. Test submitting the modal with no barcode entered - confirm you are shown an appropriate error
10. Test with a fake barcode that does not exist - confirm you are shown an appropriate error
11. Run tests to confirm no regressions
prove t/db_dependent/Circulation*
prove t/db_dependent/DecreaseLoanHighHolds.t
prove t/db_dependent/rollingloans.t
prove t/db_dependent/api/v1/checkouts.t
prove t/db_dependent/Patron/Borrower_PrevCheckout.t
prove t/db_dependent/Koha/ILL/Requests.t
Sponsored-by: Reserve Bank of New Zealand
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised, including the tests.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2b770e5e77)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change checks that the string width is larger than 0 before
attempting to perform line wrapping on the line.
Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Follow instructions at end of this message[1]
2. Note that the infinite loop does not happen and that a blank
card is created
3. Export the batch using the test layout and template that come
with koha-testing-docker
4. Note that the patron card is correctly created
[1]
To reproduce:
0. Change Koha test user's firstnameto "Firstname" and surname to "Lastname"
1. Create a template:
Units: PostScript Points
Page height: 60pt
Page width: 60pt
Card height: 60pt
Card with: 60pt
Top page margin: 10pt
Left page margin: 10pt
Number of columns: 1
Number of rows: 1
Gap between columns: 10pt
Gap between rows: 10pt
2. Create a layout:
Units: US inches
Field 1:
Text: Library Name
Font: Times-Roman
Font size: 12 pt
Text alignment: Left
Lower left X coordinate: 100in
Lower left Y coordinate: 100in
Field 2:
Text: <firstname> <surname>
Font: Times-Roman
Font size: 10pt
Text alignment: Left
Lower left X coordinate: 5in
Lower left Y coordinate: 5in
3. Create a batch for borrowernumber 51 (if using "koha" test user in ktd)
4. Export using the above template and layout
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>
(cherry picked from commit e223b17d68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
CSRF protection is only working if Koha is running under Plack.
The about page is not showing any errors if plack is not running.
Test plan:
0. Do not apply this patch
1. Go to the about page
=> Notice the "PSGI" entry in the "Server information" tab
2. Disable plack
koha-plack --disable kohadev && restart_all
3. Go to the about page
=> Notice that the "PSGI" entry is not displayed, and nothing indicates
that plack is not running
4. Apply this patch
=> "PSGI" now shows "Koha is running in CGI mode. This is a security issue! Use koha-plack --help"
Better wording idea welcome.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0e4ffd3ae6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes a number of issues with article request deletion in the
OPAC:
- Cancel button should work when initially hidden by DataTables'
responsive behavior.
- Table row hiding upon deletion should work when DataTables'
responsive behavior has created a secondary row to display the hidden
columns.
- Tab and table caption article count should correctly update when a
request is canceled.
To test, apply the patch and enable ArticleRequests if necessary. If
enabling ArticleRequests for the first time you may need to update your
circulation rules to allow article requests on some patrons or item
types.
- Log in to the OPAC and place several article requests.
- Go to your user summary page and open the article requests tab.
- Narrow your browser window until at least the last column is hidden by
DataTables.
- Click the "+" button to show the hidden details, which should include
the cancel button.
- Click the cancel button. After confirming the deletion the original
row should be hidden along with the row shown by DataTables.
- The article request count in the article requests tab should now be
updated to reflect the new number of requests.
- The same should be true of the article requests table heading.
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 168d282e94)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When we attempt to add child as guarantor the error message shown is 'A guarantor cannot be a guarantee.' it doesn't make sense
To recreate:
1. Go to Patrons
2. Click 'New patron' > 'Kid'
3. Fill out surname and cardnumber
4. Under Patron guarantor, click Add guarantor
5. Search for category = Kid and choose one of the patrons
6. Choose the relationship
7. Click 'Save'
--> Error A guarantor cannot be a guarantee.
8. Apply the patch
9. repeat previous steps
10. After clicking Save
--> the error message shown is «Child patron cannot be a guarantor.»
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2f9b826a55)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This changes the datatype of customer ID, requestor ID, and API key
from limited varchar to text to accustom for longer values.
To test:
* Apply the patch
* Run updatedatabase (a sandbox will do this automatically)
* Activate the ERM module in the system preferences (ERMModule)
* Go to E-ressource management > Data providers > New data provider
* Make sure you can enter values longer than 265 in the fields named
above and that they are stored correctly.
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c1356f4667)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This fixes an internal server error when renewing an expired
child patron without a guarantor, when the ChildNeedsGuarantor
is set to "must have".
Test plan:
1. Create or edit a child patron:
- Don't add a guarantor.
- Set the "Expiry date" to a date in the past.
2. Set the ChildNeedsGuarantor system preference to "must have".
3. Refresh or view the patron's check out or details page, and
select the "Renew" link under the attention heading -
this generates an internal server error message.
4. Apply patch.
5. Repeat step 3, you will now get a standard error message
"This patron could not be renewed: they need a guarantor."
6. Add a guarantor for the patron.
7. Repeat step 3, and click "Renew" - the patron is now renewed.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b65eb561e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit d5707a9ee6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This slightly improves the current situation, where on background_jobs.pl
each plugin job would be displayed as "Unknown job type 'plugin_...'".
After this patch, we display the implementing package name
(sourced from plugins' background_tasks()), which is slightly more
human-friendly and significantly less error-looking.
Test plan:
1. In KTD, install a plugin implementing background jobs (e.g. the KitchenSink)
2. On http://localhost:8081/cgi-bin/koha/plugins/plugins-home.pl,
enable the plugin and run a tool/report from it
3. Observe ugly job types column on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
4. Apply the patch
5. Observe the improved job types on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c2eb2625b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit b48f5c432d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 3826b4794e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 1c62677aa0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 56f329e843)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit b801888856)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit d4fb56be5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit 54ee4ded1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Set these sysprefs:
- FinesMode: Calculate and Charge
- WhenLostForgiveFine: Forgive
- WhenLostChargeReplacementFee: Charge
In circ rules:
- Have a rule that charges fines
- Set Refund lost item replacement fee to "Refund lost item charge and charge new overdue fine"
1 - Have/create item with replacement price
2 - Check item out to patron 1, due date in past
3 - Run fines.pl
4 - confirm fines on patron 1
5 - mark item lost
6 - confirm replacement cost generated and fine forgiven on patron 1
7 - check item in
8 - confirm replacement cost forgiven and new fine generated on patron 1
9 - check item out to patron 2, due date in future
10 - check item in
11 - mark item lost (no replacement fee generated because item is not checked out)
12 - in database, update date_due for checkout to patron 2, set to a date in the past
13 - check item in
14 - confirm patron 2 now has a fine
15 - Apply patches, restart all
16 - Repeat test plan with another item and confirm no fine is added for patron 2
Note: At step 12 we're pushing the date_due of the old issue into the past to make date_due<curdate(). In production, this comes up when there are days between steps 10 and 13.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 67c95addeb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9c81bdf529)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds th del=1 param to the batchMod link in the breadcrumbs to ensure we return to batch item
deletion and not modification
To test:
1 - Browse to Cataloging->Batch item deletion
2 - Click the 'Batch item deletion' link in the breadcrumbs
3 - You are now at 'Batch item modification'
4 - Apply patch
5 - Repeat, you stay on the correct page
6 - Complete a batch item deletion and confirm the breadcrum is correct at each stage.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fd2c0709bb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 056ce915ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Due to a bad rebase we ended up changing subtest names in commit 1b4bb57092
This patch restores them and has no effect on the tests themselves.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9fcf329dcf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 35aa5bd0bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
select count(*) from itemtypes;
run the tests
exectute the select query again
=> No itemtypes should have been created
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 89c42eda9f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 2b7d31a613)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch modifies the template for adding to a basket from a new
(empty) record in order to make the "Add user" patron search results
correct. The patron search results table headers must be defined in the
template before they are used.
To test, apply the patch and go to Acquisitions.
- Search for a vendor.
- Add or create a basket for that vendor.
- Click "Add to basket" and select "From a new (empty) record."
- In the "New order" form, under the "Patrons" heading, click "Add user"
- Search for patrons to add.
- In the patron search results, each column should have a heading: Card,
Name, Category, Library.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b4171a1522)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 5321f7fdd5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch corrects a few spelling mistakes and missing grammer and adds
a little more detail to the '--date', '--email' and '--frombranch'
options.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f6fd9f2e90)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b54a6574f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch alters the query for checking previous checkouts to use
IN instead of a list of OR for itemnumbers.
To test:
1 - On the command line:
export DBIC_TRACE=1
2 - perl -e 'use Koha::Patrons;my $patron = Koha::Patrons->find(5);my $item = Koha::Items->find(54);warn $item->itemnumber;$patron->do_check_for_previous_checkout( $item->unblessed );'
3 - Note the query
4 - Apply patch
5 - Repeat 2
6 - Note the shorter query
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 64ec35b2a5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8b044defb5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This change turns off ABSOLUTE and EVAL_PERL for user-entered templates,
as these options can allow for arbitrary code execution and information
disclosure.
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Create a Notice for Reports with a report like:
[% IF ( x == 1 ) %]
One
[% ELSE %]
Two
[% END %]
3. Run a report using this template
4. The report should show "Two"
5. Turn on CHECKOUT emails for a test patron
6. Perform a checkout
7. Look at the CHECKOUT email and note that the email body
is correctly generated
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Would be good to have this fixed as the default.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
The test plan should include PERL blocks or absolute paths! Tested those
instead. Testing x==1 seems irrelevant.
I tried:[% PERL %]print 1;[% END %] and [% INCLUDE /app/Dockerfile_1 %]
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch rewrites the self-checkin timer code to be defined in a
Javascript class which is then instantiated in once in sci-main.pl
depending on certain conditions (ie a barcode has been entered, or
an item has been checked in by barcode).
To test:
1 - Set SelfCheckinTimeout to a small value like 5
2 - Go to the self checkin:
http://localhost:8080/cgi-bin/koha/sci/sci-main.pl
3 - Sign in as the SCI user
4 - Watch the page, it should refresh every 5 seconds
5 - Confirm that moving the mouse/typing prevents the reset
6 - Check in an item
7 - Wait and confirm reload of main page happens when idle
8 - Confirm mouse/typing prevents refresh
9 - Sign off!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Bug 36586: Add sc-timer to sco
This patch implements the timer form the last patch on the sco
To test:
1 - Set SelfCheckTimout to 5 or something low for testing
2 - Go to the self checkout module
3 - Either sign in or confirm you have AutoSelfCheck user setup
4 - Observe the page reloads every 5 seocnds (or as you set above)
5 - Sign in as a patron
6 - Confirm on idle you are logged out to home page
7 - Sign off!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Bug 36586: Fix tidy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ff403dcfb3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If using ES, the script will collect the newly created records and biblionumbers in atwo arrays (@search_engine_record, @search_engine_record_ids) and pass that to the indexer when $commitnum records are read. The arrays are cleaned afterwards.
BUT: The records and biblionumbers were always stored, even if we're not using Elasticsearch. And as the cleaning of those arrays only happens if we are in fact using ES, all the data is added but never cleaned.
This patch fixes this by only storing record and biblionumber if we have an $indexer (i.e. if we're using Elasticsearch).
I have no idea though how/if the records are indexed when using Zebra.
After applying this patch and importing a large enough file without using Elasticsearch, the RAM usage also stays more or less constant.
@Jan, please verify!
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 132593c8a8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
So, I reviewed the code, which has a bunch of issues:
* there's a call to `next RECORD`, but no `RECORD` loop label.
* $record_number is incremented twice
* and the calls to txn_begin is moved from the outside the loop into each record, starting one transaction per record. Not sure how mysql handles this, but postgres would not like it.
This patch fixes those issues:
After I fixed the first two issues, I ran the patched script on a file containing 75 authorities (from GND), and not one was added to the DB, presuambly because nested transactions don't work in mysql?
So I also moved the BEGIN transaction outside of the main loop and started a new one after each commit, and added a final commit after to loop.
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 01d36c5e8b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Include checking for invalid marc data in main loop to avoid
loading all marc data into memory at once.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ba0979a4c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Place multiple holds, good to have at least 4, for pickup at a location, I used Nick's handy script
2. Perl misc/cronjobs/holds/build_holds_queue.pl
3. Check in at least 4 items for pickup at one location so they'll be wating
4. Update the expiration date on those holds using ktd --dbshell
update reserves set expirationdate = DATE('2024-01-01') where branchcode='CPL';
5. On Circulation > Holds waiting past their expiration date tab use the cancel button that is in the actions column to cancel a hold
The page loads on the Holds waiting tab, although in the url you see /circ/waitingreserves.pl?tab=holdsover
6. APPLY PATCH
7. Try 1 - 5 again, this time after step 5 you should be redirected.
8. Try cancelling holds with a transfer, ensuring you get redirected correctly.
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9c746e675c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
0 - Apply other patches - reindex your catalog
perl misc/search_tools/rebuild_elasticsearch.pl -v -d
1 - Set the prefs AutoLinkBiblios and CatalogModuleRelink to Do
2 - Create three GEOGR_NAME authorities:
151$aDismal Swamp
151$aDismal Swamp$gSouth
151$aPit of Despair
3 - In a new bib record, add 651 fields
651$aPit of Despair
651$aDismal Swamp
651$aDismal Swamp$gSouth
4 - Click Link authorities automatically
5 - 'Pit of despair' links correct - other records both link to 'Dismal swamp'
6 - Apply this patch, restart_all
7 - Click Link authorities automatically
8 - Dismal Swamp and Dismal Swamp South are correctly linked
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e93057f4fc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds the subfield g to the hardcoded list of controlled fields
so that it is no longer ignored
To test:
1 - Edit a GEOGR_NAME authority to add a g subfield to field 151
2 - Search for this authority in Authorities
3 - Don't see g
4 - Apply patch, restart all
5 - Search again, you see g!
6 - Edit a record and link to the authority
7 - g is copied over!
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 38d552f4cb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We change the conditions for filling holds to require that either:
- the hold is title level
- the hold is on the exact item
To test:
1 - Place a hold for patron A on item #1 of a record
2 - Place a hold for patron B on item #2 of a record
3 - Issue item #2 to patron A - their hold on item #1 is filled incorrectly, check the item in
4 - Apply patch, restart all
5 - Place hold for patron A on item #1
6 - Issue item #2 to patron A - their hold on item #1 is not filled, check the item in
7 - Cancel that hold
8 - Place a title level hold for the record for patron A
9 - Check item #1 in at a different branch and confirm transfer
9 - Issue item #2 to patron A
10 - The hold is filled as title level, even though item #1 was selected for the hold, check the item in
11 - Place an item level hold for item #2 for patron A
12 - Issue item #2 to patron A, hold is filled
Signed-off-by: Stephanie Petruso <spetruso@aacpl.net>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1df229719c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the bibliographic detail page in the OPAC so that if
there are multiple subscriptions attached to one record, each table of
issues under the subscriptions tab adheres to the settings defined in
Table Settings.
To test you should have at least two subscriptions attached to one
record, and at least one issue of each subscription.
- Apply the patch and view the record in the OPAC.
- Under the "Subscriptions" tab there should be separate tables for each
subscription, each of them a sortable DataTable.
- In the staff interface, go to Administration -> Table settings -> OPAC
-> subscriptionst
- Select some columns to be hidden by default.
- Return to the OPAC and confirm that each subscription table now
reflects the change you made in table settings.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ff71f51b65)
To test:
1. Have a MRC file with price populated in the 020$c
2. Have nothing the MarcFieldsToOrder or MarcItemFieldsToOrder sys prefs
3. Create a new basket and import from a new file
4. The price is not imported.
5. APPLY PATCH and restart_all
6. Try again, this time the price should be populated correctly.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit da3d4b72dd)
This patch fixes the serial collection table to sort in descending order on the date published column.
To test:
1. Create a subscription if you don't already have one.
2. Go to the Serial Collection tab using the left navigation.
3. Click the Generate Next button a bunch of times to generate some serial issues. Note that the issues are displaying in the table in ascending order, with the oldest date published at the top.
4. Apply the patch and refresh the page
5. Confirm the issues are now displaying in the table in descending order, with the newest date published at the top.
6. Click the Generate Next button again and confirm the issue is inserted at the top of the table.
Sponsored-by: Pymble Ladies' College
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d49e7392bc)
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6db083163d)
This patch adds deleted_biblio to the patron holds api and adjsuts the display to
shwo the data for deleted items
To test:
- place a hold
- cancel the hold
- look in patron hold history, see the title
- delete the biblio
- reload patron hold history
- you see a line with no title or author
- apply patch, yarn build, restart_all
- reload patron hold history
- success, you see deleted title info
- enable OPACHoldsHistory preference
- sign in to OPAC as patron
- confirm holds history shows deleted title info
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8a628fd131)
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>
(cherry picked from commit df00647882)
When ILS-DI is disabled we still expect to return the correct service name/section in the
xml, but just indicate that it is disabled.
We should skip the check for authorized IPs in this case, as the IP only matters when service is enabled
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3f649cfed7)
To test:
- place a hold
- cancel the hold
- look in patron hold history, see the title
- delete the biblio
- reload patron hold history, error
[2025/04/23 11:43:28] [WARN] OpenAPI >>> GET api/v1/patrons/5/holds [{"message":"Expected integer - got null.","path":"\/body\/3\/biblio_id"},{"message":"Expected integer - got null.","path":"\/body\/4\/biblio_id"}]
- apply patch, yarn build, restart_all
- reload patron hold history
- success
- enable OPACHoldsHistory preference
- sign in to OPAC as patron
- confirm holds history can be loaded
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 926b8c9c68)
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0fff879e40)
This follow-up changes the "selected" class to "select_hold_status" to
avoid possible future collisions with other CSS. IDs are added to the
checkbox containers because I can already tell that some libraries will
want to hide the "Processing" checkbox which is only relevant to some
setups.
The patch also makes a couple corrections to "alerts" to update them
with BS5 classes.
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 963424d7c7)
Also a terminology change: I think "Past holds" reads better than
"Historical holds."
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 86b4fcf656)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 605ca6176e)
This patch uses the new REST API endpoint to retrieve the old holds.
We can now have 2 tables, one for the current holds and one for the old
ones.
Test plan:
Have several holds with several statuses.
Notice that you see the holds in the respective tables. Test the usual sorting
filtering DT feature and confirm that everything works as expected.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d581f067d6)
This patch does two things:
* Fixes a backport issue with 38461, making `mock_table_settings` have
the right function signature, and accept (and use) the
`table_settings_var` parameter.
* Makes the scope for the `items_table_settings` variable be the window
object, so it is accessible to Cypress for manipulation/mocking. This
is done by changing `let` for `var` [1]
To test:
1. Run:
$ ktd --shell
k$ run_cypress --spec t/cypress/integration/KohaTable_spec.ts
=> FAIL: Tests fail!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D
[1] If you are curious about it, change it back to `let` and run the
tests.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Enable Holds history system preference and set the OPACShowHoldQueueDetails to "Show holds and their priority level".
2. Make an item level hold on a record.
3. Make a record level hold on a different record.
4. Login to the OPAC as that patron
5. On the detail page for the item level hold, it works
6. On the detail page for the record level hold, dataTable error
7. APPLY PATCH
8. Try each of the OPAC detail pages again, they should both work.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2a6da59f48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Cataloging > Inventory
2. Run the tool without uploaded barcodes
3. Table loads and you see all the DataTable controls ( Table settings, etc )
4. Run the tool while uploading at least 1 barcode
5. No DataTable controls
6. APPLY PATCH
7. Try steps 1 -4 again, making sure everything now works.
Signed-off-by: Sam <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 74838888c0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch restores the ability to export late serial claims to CSV
Test plan:
1) Create a new subscription, setting the vendor id as 1
2) Set the subscription start date as yesterday's date, the other
details aren't relevant so set whatever you want
3) Click into claims
4) If you get a warning saying no claims notice is defined then click
the link to define one (on the dropdown for the 'New notice' button
you want 'Claim serial issue. The content of the notice isn't
relevant here so input anything). Then head back to the claims page.
If no warning shows, proceed to the next step
5) Choose My Vendor and hit OK
6) You should see a table of claims with the first issue for your new
serial
7) Click the checkbox next to the row
8) Click the 'Download selected claims' button at the bottom
9) The CSV will download
10) Click into it - it will have the header but the rows will be blank
11) Apply patch
12) Hard refresh the page
13) Click the download button again
14) Check the new file, the rows will be filled out correctly with data
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>
(cherry picked from commit a3d16177c2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Find or create an item with a hold on it.
2. Go to Circulation > Transfers
3. Transfer the item from step 1.
4. No modal appears to warn that the item has a hold.
5. APPLY PATCH
6. Try step 3 again, this time the modal should appear correctly.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 097153f279)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects a typo in the Elasticsearch mappings template:
Identifierr -> Identifier
To test, apply the patch and go to Administration -> Search engine
configuration. In the "Type" column, check the dropdown menus. There
should be an item "Identifier."
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Turn on bookings for an item or item type
2. Find an item and book it.
3. Check the same item out.
4. Go to Circulation > Bookings to collect and run the report
5. The table never loads
6. APPLY PATCH
7. Try again, the bookings to collect report should load!
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9b8e2ea5e6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. In k-t-d try loading both member/moremember.pl and circ/circulation.pl for a patron with many guarantors.
2. Note the load times.
3. APPLY PATCH
4. Load times should now be reduced pretty significantly.
5. prove -v /kohadevbox/koha/t/db_dependent/Koha/Patron.t
6. No behavior should change.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8bd72af1ff)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch correct the call to filter the record
To test:
1 - Enable OAI
2 - Set OAI-PMH:ConfFile to '/var/lib/koha/kohadev/OAI.yaml'
3 - Edit/create the file above to have content:
format:
marcxml:
metadataPrefix: marcxml
metadataNamespace: http://www.loc.gov/MARC21/slimhttp://www.loc.gov/standards/marcxml/schema/MARC21slim
schema: http://www.loc.gov/MARC21/slimhttp://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
include_items: 1
expanded_avs: 1
4 - save and restart_all
5 - View some records:
http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
6 - Note the items show coded values
7 - Apply the regressions tests patch
8 - Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/OAI/Server/Repository.t
=> FAIL: Tests fail!
9 - Apply this patch
10 - Restart all
11 - Refresh and confirm items now have descriptions
12 - Repeat 8
=> SUCCESS: Tests pass!
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Amended the test plan to include the added regression
tests run
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6130a072d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2e07046708)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Because the CSS rule for turning odd-numbered rows grey is highly-specific
(tbody tr:nth-child(2n+1):not(.dtrg-group, .active, .ok) td:not(.bg-danger,
.bg-warning, .bg-info, .bg-success, .bg-primary)), it overrides the
.highlighted-row, .highlighted-row td rule that some tables use to turn the
background of a currently-selected row yellow, so highlighted-row needs to be
added to the lists of not().
Test plan:
1. Without the patch, Cataloging - New from Z39.50/SRU, perform a search like
Author smith which will return at least two results.
2. On an even-numbered row with a white background, click MARC and note that
the row is given a yellow background (either by increasing the size of the
popup to peer around the preview, or by closing the preview, since the
highlight persists).
3. On an odd-numbered row with a grey background, click MARC and note that
the row isn't given a yellow background
4. Administration - Circulation and fine rules, if you don't already have at
least two rules add one by just changing the Patron category in the edit
row and Save
5. On a row with a white background, click Edit and note that the background
for that row is yellow
6. On a row with a grey background, click Edit and note that the background
remains grey, not yellow
7. Apply patch, in ktd --shell yarn build (or in a sandbox Actions - Build
CSS and JS), clear browser cache or shift+Reload the page
8. Repeat steps 1-6, but this time note that you get the same yellow
highlighted background for both odd and even rows.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
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>
(cherry picked from commit b346ed1e79)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Place a booking on an item.
2. Click on edit to open the Edit booking modal.
3. The item type will be de-selected, and the booking dates calendar will be locked until the item type is re-selected.
4. APPLY PATCH
5. Try steps 1 - 3 again, this time the proper item type should be selected and the date field will not be locked.
6. Try creating a new booking, making sure everything still works as excepted.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3aa13d8a29)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch changes the permissions to edit_items for item creation and modification via the API.
Test plan:
1) Apply the patch
2) prove t/db_dependent/api/v1/biblios.t
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ae069f57ec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds the borrowernumber as a parameter to the overwrite_calc_fine
plugin hook. E.g., the borrower is needed for calculating graduated fines.
Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 936b5650c5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9b972d9b3e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch avoids the introduction of a `foreach` loop and a `return`
call inside of it, by using grep on the array assignment, and then just
returning the first element on it, if any.
No behavior change is expected.
The code becomes easier to read and spot what is doing.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9345f6d784)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This new hook allows to overwrite the koha standard calculation of fines.
This can be useful if your library has a fine policy with graduated fines
per overdue letter.
To test:
1) Apply patch.
2) Run prove -v t/db_dependent/Circulation/CalcFine.t
3) Run prove -v t/db_dependent/Koha/Plugins/Overdues.t
4) Sign off.
Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fa329e4a09)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Uncaught SyntaxError: missing ) after argument list
There are way more to fix in this controller...
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This lists the new syntax for allowing all IPs in the preference
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch forces a check of authorized IPs against the Koha system preference, if nothing is present, no access is allowed
To test:
1 - Enable ILS-DI, leave ILS-DI:AuthorizedIPs blank
2 - In another window:
http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item
3 - You get a response
4 - Apply patch and restart all
5 - Reload ilsdi page, 'Not authorized'
6 - Copy the IP listed as refused and paste into ILS-DI:AuthorizedIPs
7 - Reload the page, you get a response again
8 - Change ILS-DI:AuthorizedIPs to:
0:0:0:0/0
9 - You still have access
10 - Paste your specific IP again, and add a second made up IP (comma separated)
11 - Reload and confirm you still have access
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It looks like this was a type/copy paste error, template fixed
To test:
1 - Find a patron, ensure preferred_name is populated
2 - Duplicate
3 - Note preferred_name is carried over
4 - Apply patch
5 - Cancel and duplicate again
6 - Preferred name is blank!
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 796bfddf87)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch swaps biblio for biblioitem attributes in the return value.
The effect is that attributes from the `biblio` table overwrite those
named the same (`timestamp` being the target).
To test:
1. Apply the regression tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: The biblioitems.timestamp is returned!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Things go smooth now
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f69aab3735)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 419d708666)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Cataloging > Stage MARC record for import
2. Upload a MARC file
3. Change some of the following settings:
-Action if matching record found:
-Action if no match is found:
-How to process items/Item processing:
4. Stage for import and View batch
5. None of this settings have been retained.
6. APPLY PATCH
7. Try these steps again, now the settings should be remembered
8. Turn on the 'MarcOrderingAutomation' system preference.
9. Administration > MARC order accounts
10. Create a new account
11. Change the "Record matching settings" and submit
12. Make sure every selection is remembered when you edit the account.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6881b674e6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a new option switch `--fix` (or `-f`) to make the script
try to fix the problems it found.
Bonus: `--help` option switch added.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ perl -MKoha::SearchEngine -MKoha::SearchEngine::Indexer -e 'my $i = Koha::SearchEngine::Indexer->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); $i->delete_index([1]);'
=> SUCCESS: Bibliographic record #deleted from ES index
3. Run:
k$ koha-mysql kohadev
> DELETE FROM biblio WHERE biblionumber=2 OR biblionumber=3;
=> SUCCESS: Bibliographic records 2 and 3 deleted directly from the
database, no reindex triggered by Koha.
4. Run:
k$ perl misc/maintenance/compare_es_to_db.pl
=> SUCCESS: The results from (2) and (3) are explained. [1]
5. Run:
k$ perl misc/maintenance/compare_es_to_db.pl --fix
=> SUCCESS: It says it is gonna fix things
6. Repeat 4
=> SUCCESS: The problems we generated are no longer reported! They've
been fixed!
7. Sign off :-D
[1] Note KTD ships some broken records on purpose so devs need to deal
with a not-perfect DB everyday, and catch misses in the code.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3669cb0eed)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Amended-by: Jonathan Druart
Add +x
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 58f6d7d73d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Koha::REST::V1::Auth checks the request URL path and do various things
depending on how it looks.
For instance, it allows everyone to access paths starting with
"/api/v1/oauth/"
But because of how Koha::REST::V1 was written, when using mojolicious
applications Koha::App::Intranet and Koha::App::Opac, paths had to add a
path prefix ("/api"), which means the final path as seen by
Koha::REST::V1::Auth looked like this: "/api/api/v1/oauth".
I said "had to", but actually there is another way that does not require
this path manipulation and that's what this patch does:
Koha::REST::V1 now accepts a configuration parameter that allows to
change the base path for API routes, which allows
Koha::App::Plugin::RESTV1 (used by Koha::App::Intranet and
Koha::App::Opac) to generate the right routes.
This configuration parameter defaults to "/api/v1", so when outside of
Koha::App::Intranet and Koha::App::Opac (when using
debian/templates/plack.psgi for instance), the behavior is unchanged.
Test plan:
1. Do not apply the patch yet
2. Run `bin/intranet daemon -l http://*:8080`
3. Run `curl -i -d{} http://127.0.0.1:8080/api/v1/oauth/token`
It should return a 403 error, with an error message "Authentication
failure".
4. Stop `bin/intranet daemon -l http://*:8080` by hitting Ctrl-C on the
terminal you started it
5. Apply the patch
6. Run `bin/intranet daemon -l http://*:8080` again
7. Run `curl -i -d{} http://127.0.0.1:8080/api/v1/oauth/token`
This time it should return a 400 error with an error message saying
the "grant_type" property is missing.
This error is normal as we did not send any data in the POST request
body, and seeing this means Koha allowed us to use that route because
it recognized '/api/v1/oauth/' at the start of the URL path
8. You can do the same test with `bin/opac`
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. See Bugzilla for notes from testing.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 751391cc5c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If the cronjob is configured to run every month we don't need to add
another test on the delay in the script itself.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c26a989c64)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a check for batch_checkouts_allowed to SCO.
If not using batch checkout, only the most recent chekout should be
rendered as an alert, instead of all the new issues for the session.
This makes the input box consitently render in the same position.
To replicate:
1. Login as self_checkout to localhost:8080/cgi-bin/koha/sco/sco-main.pl
2. Login as a patron to make self checkouts
3. Check many items out and notice an additional alert is rendered
for each checkout, eventually pushing the barcode input off screen.
To test:
1. Apply patch and restart_alll
2. Login as a patron to make self checkouts
3. Check many items out
4. Notice only the most recent checkout is rendered as an info alert
5. Confirm the Checkouts table below still loads all checkouts
6. In Admin set BatchCheckouts to 'Allow'
7. Set SCOBatchCheckoutsValidCategories to 'Select all'
8. Login to sco as a patron and enter a newline delimited list of barcodes
9. Confirm that an alert is rendered for each checkout in the batch
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit db120bb6e5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Testing plan:
1. set CronjobLog to "Log"
2. Run the three cron jobs
`perl misc/link_bibs_to_authorities.pl; perl misc/cronjobs/merge_authorities.pl -b; perl misc/migration_tools/remove_unused_authorities.pl --confirm`
3. Visit the log viewer /cgi-bin/koha/tools/viewlog.pl, select the "Cron jobs" module, & note it's empty
4. apply the patch
5. Repeat steps 2 & 3 but note the cron logs aren't empty
squash
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>
(cherry picked from commit 97c2437bb3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the `POST /patrons/:patron_id/account/credits` endpoint
return a valid `Location` header. Tests are added.
Bonus: the debits counterpart already returned the header, but pointed
to a non-existent endpoint (now added by bug 38931) and it gets tests
added.
To test:
1. Apply the regression tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> FAIL: The behavior is not implemented for credits.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4d6aef19cc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fcced47c2b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ff0919ec19)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a5f3859c5c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The wiki now uses `REST*` for the rule names instead of `SWAGGER*` some
tests have their descriptions correct, but most don't.
This is a follow-up to an editorial decision made on the Wiki (probably
at a dev meeting too, I don't remember).
QA tests will probably not pass, but I refrain from tidying it because
there's a major tidy on its way to main.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d597123789)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the POST endpoints missing the Location header return
it.
Some endpoints I skipped:
* /patrons/account/credits (doesn't have a GET route to point to)
* /patrons/account/debits (doesn't have a GET route to point to)
To test:
1. Apply the regression tests
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/authorities.t \
t/db_dependent/api/v1/biblios.t \
t/db_dependent/api/v1/clubs_holds.t \
t/db_dependent/api/v1/holds.t \
t/db_dependent/api/v1/ill_batchstatuses.t \
t/db_dependent/api/v1/import_batch_profiles.t \
t/db_dependent/api/v1/transfer_limits.t
=> FAIL: Tests fail! The endpoints don't return the header!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit eab06ab69b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit de1b28d2f6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
There is some JS on the staff interface search history page which uses a
jQuery selector that doesn't seem to work after the DataTables upgrade.
This patch fixes it.
To test, apply the patch and enable EnableSearchHistory if necessary.
- In the staff interface, perform a few catalog searches if necessary.
- Choose "Search history" from the user menu in the upper right.
- In the table of searches, check the checkbox next to one or more
search history entries.
- The delete button at the top of the table should become enabled.
- Clicking the delete button should work correctly to delete your
selected searches.
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>
(cherry picked from commit b6709f2984)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We never use another value than the default one.
We can simply remove this property.
Test plan:
Rebuild the dist files using `yarn js:build` and confirm that the
buttons in the toolbar of the ERM and Preservation modules still appears
and are styled like before.
Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a575d38770)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The trashcan icon to cancel a hold from the list of holds on a bib record has
a leftover href attribute from before the bug 34478 CSRF protection changes.
It has an 'op=cancel' which does nothing since there's only a cud-cancel op,
so it just falls through to the view case and redisplays the page if you open
it in a new tab, and doesn't get used at all if you click the trashcan, when
JavaScript builds up a form that you can POST.
Test plan:
1. Place a hold on any item.
2. On the list of holds, right-click the Cancel hold trashcan icon, and
select Open in new tab
3. In the new tab, note that the URL in the browser address bar shows all
sorts of things about op=cancel and borrowernumber and biblionumber and
reserveid, but nothing changed, your hold wasn't deleted
4. Close that pointless tab, and apply patch
5. Reload the page with the list of holds, and again right-click the
Cancel hold trashcan and select Open in new tab
6. In the new tab, note that the URL just has the biblionumber and a #, no
other extraneous things
7. In the original tab, left-click the trashcan, confirm cancellation in the
popup, and make sure that cancelling still does work.
Sponsored-by: Chetco Community Public Library
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>
(cherry picked from commit 22c5a1ea6f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This is not the correct way to hide a column, we should use the DT's column
visibility plugin.
Test plan:
Have some checkouts for a patron, go to the checkout history page
Without this patch notice the "shift" => the table does not take the
whole available width.
Apply this patch, restart_all, remove localStorage entries
=> The table is now displayed properly
You can also play with on-site checkouts.
Before:
https://snipboard.io/uTWYit.jpghttps://snipboard.io/qxZE35.jpg
After:
https://snipboard.io/2L0F3Q.jpg
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>
(cherry picked from commit 5a6f89f3f0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
I found the same code in preferences.tt, actually we don't need to trim
if the list is properly generated (ie. without extra spaces)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3a644175f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Site: .../cgi-bin/koha/admin/usage_statistics.pl
If you try to select a country, you get an error:
==
The value of your system preference 'UsageStatsCountry' is not valid (Germany). Please select a valid one.
==
It doesn't matter which country you chose, no country is valid.
Test plan:
==========
1. Select a country for UsageStatsCountry system preference.
2. Go to http://<your addr>:8081/cgi-bin/koha/admin/usage_statistics.pl
3. Confirm the issue.
4. Apply the patch ; restart_all.
5. Repeat p. 2.
6. Confirm that the issue has been solved.
Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3d844e774d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 804394e530)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This trivial patch replicates the mappings in Koha::Biblioitem.
To test:
1. Pick a sample record ID
2. Fetch is using the API with your favourite tool:
GET /api/v1/biblios/<the ID>
Accept: application/json
3. Save the output for later
4. Delete the record
5. Fetch the deleted biblio using the API:
GET /api/v1/deleted/biblios/<the ID>
Accept: application/json
6. Compare the results
=> FAIL: Attributes like `volumedate` are not mapped!
7. Apply this patch
8. Repeat 5
=> SUCCESS: Attributes are mapped!
9. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Leo Stoyanov <leo.stoyanov@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 980890517f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes the <div> surrounding batch patron modification
results with the style "overflow:auto". Also removed is the DataTable
option "scrollX". This eliminates the horizontal scrolling for the table
itself, and causes the whole page to scroll horizontally instead. This
is consistent with other pages in Koha.
This fix lets us avoid bugs which are associated with the overflow
scrolling and our DataTables implementation. (see Bug 37730).
To test, apply the patch and go to Tools -> Batch patron modification
- Submit a batch of patrons for modification.
- On the screen showing the patrons which will be modified, the page
will probably have a horizontal scrollbar already. If not, resize your
browser to confirm that the whole page scrolls, not just the table.
- Confirm that the table header "sticks" to the top of the screen when
you scroll down, and that the header continues to be aligned correctly
when you scroll horizontally.
Sponsored-by: Athens County Public Libraries
Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 39cd514642)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
.badge-pill is from a previous version of Bootstrap. .rounded-pill is
the current version, but I think it looks better without.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0c1a2f54b6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Make some checkout to a patron so they have a circulation history,
with some items checked in and some still on loan.
2. Look at the patron's "Circulation history" table. There are four
possible background colors for each row: #ffffff, #f3f4f4, #F9FAE0,
and #FFFFCC.
3. Apply the patch, update the CSS (yarn build), and restart everything
(restart_all).
4. Repeat steps 1-2, if needed. An orange/gold badge will appear under
the "Return date" column of the table for items that have been
checked out, and there will no longer be alternating, pale yellow rows.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. I agree that it looks better now than before, and
that it is easier to tell the checked out items from the returned items.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9c76bda202)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We don't have proper exceptions in the `C4::Biblio::AddBiblio` method,
but we at least know `$biblio_id` will be `undef` in the even of an
error processing the call.
This patch makes the controller handle this situation so (at least) it
is obvious that something bad happened.
To test:
1. Apply the regression tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests fail! The endpoint returns 200 even on error!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! The endpoint returns a 400 with a reasonable
message!
5. Sign off :-D
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a98760a994)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 384b869ccd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the code call `FindDuplicate` only if
`x-confirm-not-duplicate` is not passed. This makes sense, as having it
passed makes it override any duplicate found.
This patch doesn't change any end user behavior, just makes the code
more efficient.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass, no behavior change
4. Sign off :-D
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d6a4637ff6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Duplicate barcodes are generated when placing an Order in Acquisitions when AcqCreateItem = "placing an order" and Autobarcode is turned on.
The problem is that you can accidentally attach 3 items to an order, but only 1 will be saved to the database. When you go to receive your order, you can only receive 1 item as the other two were never made, since the barcode wasn't unique.
In 3.8.0, a software error comes up which prevent any item creation, I believe, but master (3.9.x) doesn't throw any warnings or errors.
Yes.. This tries and solve a bug from 3.8.0 /o/
Test plan:
1 - set syspref "autoBarcode" to generated in the form <branchcode> yymm001
2 - set the barcode field to "barcode.pl" in marc structure
3 - create a new basket
4 - add one item to this basket
5 - click on the barcode field -> it should have a barcode
6 - click on add item and click on the new barcode fiels, it should have
the same value
APPLY PATCH:
7 - click on the barcode field -> it should have a barcode
8 - click on add item and click on the new barcode fields, it should have
an higher barcode.
Note : The barcode is incremented each time the barcode with an empty
value is clicked on. Therefore, if the
librarian removes the value from barcode and click again, they could get
another barcode. I do not know if it is an issue.
Note: This patch is not splitted in two parts anymore
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan, works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b7ed38413a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1: Add 4 items, 2 with homebranch = Library A and 2 with homebranch = Library B
2: Logged into Library A, check out 1 Library A item and 1 Library B item, both with due dates in the past enough for the longoverdue cron
3: Set yourself to Library B, check out 1 Library A item and 1 Library B item, both with due dates in the past enough for the longoverdue cron
4: Run longoverdue cron with --verbose, without --confirm, and without --Library. see that it would act on all 4 items
5: Set CircControl to "the library the item is from"
6: Set HomeOrHoldingBranch to "the item's home library"
7: Run longoverdue cron with --verbose and --library="A" (where A is the code for your Library A), wihout --confirm
8: See the cron wants to act on the items with homebranch = A
9: Set HomeOrHoldingBranch to "the item's holding library"
10: Run longoverdue cron with --verbose and --library="A" (where A is the code for your Library A), wihout --confirm
11: See the cron is still trying to act on the two items with homebranch = A
12: Apply patch, restart all
13: Run longoverdue cron with --verbose and --library="A" (where A is the code for your Library A), wihout --confirm
14: See the cron is now trying to act on the two items with holdingbranch = A
15: Set HomeOrHoldingBranch to "the item's home library"
16: Run longoverdue cron with --verbose and --library="A" (where A is the code for your Library A), wihout --confirm
17: See the cron wants to act on the items with homebranch = A
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 562dd9e2c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 511ba0e4d8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7fdf2983a9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 78c4bc89b1)
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: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ea6a4db1b6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This tries to fix multiple translation issues in the ERM module.
This includes:
* Making strings translatable
* Using double quotes instead of single around strings according to
coding guidelines
* Fixing some translations where the variable was marked for translation,
but not the strings themselves: ...>{{ $__(item.tab_name) }}</a
To test:
* Apply patch
* Run yarn build
* Make sure you have a clean work space in git
* Run gulp po:update lang de-DE (or another language)
* Verify the strings from the patch set now appear in the po files
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Amended-by: Jonathan Druart
- {{ $__("Uploaded on:") }}
+ {{ $__("Uploaded on") }}:
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit beb8770bc9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the table settings template to add style to
informational messages.
To test, apply the patch and go to Administration -> Table settings.
- Go to Catalog -> detail -> holdings_table. Above the table's settings
you should see a message, "Please not that if a field..." It should
have the standard Bootstrap "info" style.
- Go to Cataloging -> additem. You should see a similarly styled
message, "Changes made below..."
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 020f709d64)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 665f9a50ad)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
19:05:50 koha_1 | "error": "Basic authentication disabled"
We don't need to pass the auth in this request, we are authenticated
already.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 51aa5ab6b0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It might not exist!
This code is not trivial and should ideally be moved to somewhere it
could be reused easily. But good enough for now to fix the failing tests.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bb2e88a1e3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b2ec4e6dd4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
There are known bugs with Cypress trying to play with the clipboard, and
I don't manage to make the tests pass consistently (also tried realClick
from cypress-real-events)
Here I am suggesting to not click on the button, but simply retrieve the
url (which needs a bit of work in the existing code).
We don't test the "Copied!" tooltip and the behaviour of the button, but
at least the tests pass!
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 12e0d722c4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
All this is weird.
I found this and implemented it:
https://stackoverflow.com/questions/69425289/javascript-prompt-cause-document-is-not-focused
It was still not enough to reduce the failures.
The wait and adding the focus to the window seems ok.
If I remove one of those 3 hacks, I still get failures...
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit aab60455b5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 79bc770baa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7e9ce66bed)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3d6210552c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f5a7c307da)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a55281fbca)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9544cbf977)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6438b1e0e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b00b99f31d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 55c3840588)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We redefine it and so the query/mysql plugin is not available
It fixes csrf.ts
14:36:17 koha_1 | The task 'query' was not handled in the setupNodeEvents method. The following tasks are registered: buildSampleObject, buildSampleObjects
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a5eb0ba010)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6a9870fd1c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
No need to list all the objects, just retrieve the spec depending on the
"object" var we pass.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9f5f4aa1d6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ddd22c7887)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3bc9bd8b62)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 34f6663374)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3f880c5978)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7b3426928f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bad59ca734)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1. Install deps
sudo yarn install --modules-folder /kohadevbox/node_modules
2. Run tests
cypress run --config video=false --spec t/cypress/integration/t/mockData.ts
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3a3294966a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes a typo in the description of the
EmailAddressForPatronRegistrations system preference.
To test:
1. Apply patch
2. Go to Administration > System preferences
3. Search for EmailAddressForPatronRegistrations
4. Read the description (2nd line) and make sure the spelling is correct
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3fc855f568)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
updates "Field suppresion" to "Field suppression"
to test:
- go to Administration/Authority types/Default framework/Tag 090
- verify description for subfield t is Field suppresion, FSP (RLIN)
- apply patch
- reset database or reset_all
- verify description has changed to Field suppression,FSP (RLIN)
Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ede69d5c5f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This fixes some database update messages to improve their
consistency with the database update guidelines
https://wiki.koha-community.org/wiki/Database_updates
Test plan:
1. Apply the patch.
2. Review the differences to make sure the messages make
sense and are consistent with the database update
guidelines:
2.1 Review the diff attached to the bug
or
2.2 Run: git show
3. Sign off D:
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Leo Stoyanov <leo.stoyanov@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bdcbcc0a33)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes it so that the noItemTypeImages system preference is
the one that controls the display of item type images in the staff
interface advanced search page. It was previously erroneously managed by
the OpacNoItemTypeImages system preference.
To test:
1. Add images to item types, if there aren't any already (KTD has them by default)
1.1. Go to Administration > Item types
1.2. Click 'Edit' next to one of the item types
1.3. Choose an icon
1.4. Click 'Save changes'
2. Disable OpacNoItemTypeImages
3. Enable noItemTypeImages (already enabled in KTD)
4. Go to the advanced search page
--> The item types don't have any images next to them
5. Apply patch and refresh the page
--> The item type images should be displayed
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 55632527fc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
test plan:
1. check run order of scripts in the cron
2. apply patch
3. koha-run-backups is now at the beginning of the cron
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>
(cherry picked from commit 814e1326b7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This should have been removed by bug 22056
Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 90774b33a7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/ILL/Requests.t
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 642f21a6f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan, before applying patches:
1) Enable ILLModule system preferece.
2) Create a book ILL request:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) After creating a Book ILL request, go to its detail page and click on the newly created linked biblio
4) On the biblio detail, click 'NEW' -> 'New item', add type and home library + current library (dont enter a barcode)
5) Repeat 2) -> Click confirm request and continue.
6) Click "Check out" -> If theres a problem with the patron (expired or max checkouts hit) it'll say "A problem with patron occurred". Fix that adn click c"check out" again.
7) Notice the message "An unknown error occurred while trying to checkout the item"
8) Apply patches. Repeat. Notice the message you now get is 'The bibliographic record's item contains an unknown (or empty) barcode.'.
This patch also adds a link to the respective biblio for Staff members'
convenience.
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ecd0604a8d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Cosmetic changes only.
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 90304e7632)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Before applying this patch, apply the CanBookBeIssued preparation: tests patch and run that,
Verify it fails, apply this patch. Run that same tests file again.
----- About this change -----
CanBookBeIssued wants to find one item given a barcode.
If a falsy (undef, empty) barcode is supplied, UNKNOWN_BARCODE should be returned.
Ensure this change does not introduce any regressions:
prove t/db_dependent/Circulation*
prove t/db_dependent/DecreaseLoanHighHolds.t
prove t/db_dependent/rollingloans.t
prove t/db_dependent/api/v1/checkouts.t
prove t/db_dependent/Patron/Borrower_PrevCheckout.t
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 89b7f160a7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Circulation.t
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 45626c75c4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This particular script has POD at the end rather than inline POD. This
patch simply moves the POD addition for this patchset into the bottom
section.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 25fd262192)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The linked biblio_id of a generated test ILL request needs to be created by build_sample_biblio->AddBiblio.
Or else the related biblio is created by just 'build' and is not indexed + its related metadata is missing.
To test:
1) Apply the [DONT PUSH] patch and enable ILLModule
2) Run the script for ILL requests:
misc/devel/create_test_data.pl -n 5 -s Illrequest -d backend=Standard
3) Visit the ILLModule:
http://<intra_url>/cgi-bin/koha/ill/ill-requests.pl
4) Notice it loads 5 test ILL requests correctly
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c42cfecd43)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test Plan:
1) Apply this patch
2) Run: misc/devel/create_test_data.pl -n 99 -s Borrower -d surname=Hall -d zipcode=111111
3) Search patrons' for the name "Hall"
4) Note there are 99 Hall's in your results!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Bug 37448: Make use of build_sample_biblio and build_sample_item
The script is brilliant, but for biblios and items we should make use of build_sample_biblio and build_sample_item or this data does not get indexed + linked tables rows get missed
To test, before this patch, run:
1) misc/devel/create_test_data.pl -n 5 -s Biblio -d title=Test
Notice the 'Test' biblio is created on the database, but doesnt show on searches, and accessing it directly through URL throws a 500 error (because metadata does not exist for the biblio)
2) Apply this patch. Repeat the step above. Notice it now shows on searches and visiting the biblio directly shows no errors
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 37448: (QA follow-up) Tidy script
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 576621a6df)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually
The test plan in bug 38819 fails without this patch (page explodes with duplicate ID error).
It's the same cause as the one being fixed here in bug 38751 so I'm submitting this here.
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>
(cherry picked from commit 92fd65840a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Make use of newly updated ILL::Request->extended_attributes method instead of
creating the query manually
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>
(cherry picked from commit 6526e00374)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/ILL/Request.t
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>
(cherry picked from commit 2a6bc075f6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9e894ee790)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
A few notes:
- I grabbed this list by looking for things in misc/ that had cronlogaction
- I didn't touch scripts that aren't in the cronjobs directory, except
fix_invalid_dates where I follow import_patrons and only log if confirmed
since they aren't crons, I figure this seems reasonable
- purge_suggestions I moved the logggin up and changed the addition of
effective days to a verbose message - this seems more consistent
To test:
1 - Enable CronjobLog
2 - On command line:
perl misc/cronjobs/cleanup_database.pl --old_reservers 550
3 - Error on command line
4 - In staff client, go to Tools->Log viewer, check 'Cronjobs' and submit
5 - No entries
6 - Apply patch
7 - Repeat and see run is logged with wrong parameter
8 - Fix parameter and confirm
9 - Spot check other files until you are satisfied
10 - Sign it off!
Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ed04d5b0fa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. FinesMode on
2. CircConfirmItemParts on
3. have an item with a materials specified note (952$3)
4. Check in item with 'forgive overdue charge' selected, no materials note, box stays checked.
5. Check in item with 'forgive overdue charge' selected, with a material note, Materials note checkin deselects the box.
6. APPLY PATCH
7. Try steps 4-5 again, the correct value should be retained in the 'forgive overdue charge' checkbox.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5a3380a751)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch simply intercepts a call to sort by callnumber and changes it to cn_sort
To test:
1 - Add three items:
barcode TEST1 callnumnber D1015.B4 1965
barcode TEST2 callnumnber D102.D3 1930
barcode TEST3 callnumnber D101.2.A8 1951
2 - Go to item search
3 - barcode is 'TEST%'
4 - Sort the results by callnumber
5 - order is TEST3,TEST1,TEST2 (or reversed depending on sort direction)
6 - Apply patch, restart_all
7 - sort again
8 - order is TEST3,TEST2,TEST1 (or reversed depending on sort direction)
Signed-off-by: Gretchen Maxeiner <maxeinerGL@gcc.edu>
Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit eecb123bd5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We add an `ORDER BY` clause to the SQL statement to ensure we
consistently order accross databases by the iso code.
This fixes the failing test on MariaDB as it's default sort order
appears to differ from MySQL for this.
This also ensure we are consistently ordering which will lead to more
consistent and clear results for end users.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7da684a507)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This drops the bracketed translation in the tests in
language_description where the bracketed language name matches the
preceeding one.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6e59b40f55)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We can use a plain AND in the WHERE clause here rather than requireing a
HAVING.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 24379efb10)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
My profiling with NYTProf has found that the call to C4::Languages::getLanguages is unreasonably slow, taking over 100 ms (and that's just on a single call of it apparently!!!). Indeed, the way it's coded, it'd run over 540 SQL queries for no good reason, slowing the already slow catalog search page loading further down.
This patch is gonna replace the inefficient and complicated function logic with proper SQL statement that joins the relevant functions. It also fixes the bug where user's native language would be displayed with native language in the parenthesis as well, such as "Polski (Polski)" instead of just "Polski".
The whole query is pretty fast and it gets cached by MySQL server, meaning its runtime is measured in microseconds instead of hundreds of miliseconds, making it easily a 1000x+ improvement.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 26a6e476f1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds proper coverage of getLanguages() to the existing test
file.
It should pass prior to applying the rest of the patchset of this bug
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 08bd56d1f7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Have a patron with a middle name
2. Do a patron search that brings them up, no middle name appears
3. APPLY PATCH
4. Try again, middle name should appear in patron searches.
QA follow-up: made the same fix inline for other_name
Signed-off-by: Bibliothèque Ifao <bibliotheque@ifao.egnet.net>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3888d1ee7a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8c0d196ff6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 27ea32e74b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Several wrong things in the previous attempt:
* as_list returns an array
* as_list returns objects, ->{library_id} does not exist
* as_list does not returns api object, you need to call ->branchcode to
get the id
* $pickup_locations defined for both situations was confusing
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 44b29d114f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04c095c473)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch addresses an issue where pagination filters are set incorrectly for the pickup locations endpoint. Only the final page is returned rather than the expected full list of results
Test plan:
1) In KTD, set the syspref RESTdefaultPageSize to 5
2) Set AllowHoldPolicyOverride to Allow
3) Create a hold on an item for a patron
4) Navigate to the patron's page and click on the holds tab
5) Click the dropdown in pickup locations
6) There will be two results, repeated three times
7) Apply patch and restart_all
8) Repeat step 5, there should now be a full list of 12 libraries
Co-authored-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 37f85baed4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Create a SQL report.
2. Go to /cgi-bin/koha/reports/guided_reports.pl?id=1&op=show.
3. Inspect element the page, go to the head, and find the title; it should have no report name or id.
4. Apply patch.
5. Redo steps 1-3 to see the fix.
Signed-off-by: Imani Thomas <imani.thomas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c500a8ac8c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Sponsored-by: PTFS Europe <https://ptfs-europe.com>
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>
(cherry picked from commit 210e0cb18b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We re-arrange the logic of process_invoice a little here to ensure we
skip order lines in invoices that do not have corresponding bib records.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit af19a0f553)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7fb78e4a5d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds the Log4perl configurations required to match the
existing prior use of Log4perl in EDI code.
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>
(cherry picked from commit 0f3511eaec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the EDI code to use the Koha::Logger wrapper in
preference to the bare Log::Log4perl module.
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>
(cherry picked from commit 7f6c186831)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It seems that "Edit" was not picked by the translator script because there was a TT tag
on the same line.
See comment 0 for a test plan.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8c3a42aa02)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Account level syspref overrides in SIP will "leak" between SIP requests.
Basically an account level system preference override will may be set by a given request, but those overrides will never be cleared for the life of that SIP process thus "contaminating" that process until it reaches end of life".
This is because the code
# Clear overrides from previous message handling first
foreach my $key ( keys %ENV ) {
delete $ENV{$key} if index($key, 'OVERRIDE_SYSPREF_') > 0;
}
is checking if the env key contains the substring OVERRIDE_SYSPREF_ at an index greater than 0. The problem is that for all overrides the subtring *starts at 0* since it's always the first part of the string. If the substring is not part of the string index will return -1. TLDR we have an "off by one" error. We need to check that the return value is zero instead of any positive value.
1) Set your SIP server params so that only one SIP process should run,
<server-params
min_servers='1'
min_spare_servers='0'
max_spare_servers='0'
max_servers='0'
custom_tcp_keepalive='0'
custom_tcp_keepalive_time='7200'
custom_tcp_keepalive_intvl='75'
/>
2) Set noissuescharge to $5
3) Create two SIP accounts
4) Set an account level override for noissuescharge to $500
5) Create a patron that owes $10 in fines
6) Run a patron information request on the "normal" SIP account for the
patron, the patron flags should show the patron being not able to
check out items
7) Run a patron information request of the "overridden" SIp account for
the patron, the patron flags should show the patron being allowed to
check out items
8) Run a second patron information request on the "normal" SIP account
for the patron, the patron flags should show the patron being able to
check out even though they should not be able to check out
9) Apply this patch
10) Restart all the things!
11) Repeast steps 6-8
12) The flags should be correct!
Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit de83983b98)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
On a table using DataTables and the REST API wrapper with the column
filters, if one input is used to filter the table the query will be made
twice: when the user stopped typing and when the input will lose the
focus.
Test plan:
Search for patron
Open the dev console, "Network" tab
In the "Card" column filter enter "0000"
Notice that the table is filtered and that a request has been made
Click outside of the "Card" input
=> Without this patch another request (the same) is made and the table
updated
=> With this patch applied no request is made when the input loses the
focus.
Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e32533ef22)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cd04d58522)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e2c0403440)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Fallback to overlay rules with wildcard filter if no match
found for exact filter match.
To test:
1. Administration => record overlay rules
2. Add this:
Module Filter Tag Preset Added Appended Removed Deleted
Source Z39.50 245 Protect Skip Skip Skip Skip
Source * 300 Protect Skip Skip Skip Skip
Source Batch record modification 245 Protect Skip Skip Skip Skip
3. Add MARC modification templates:
Update existing or add new field 245$a with value CATSCATSCATSCATS
Update existing or add new field 300$a with value CATSCATSCATSCATS
4. Find a record that has those fields (likely any record would)
5. Use batch record modification on the record
6. 300$a should have been catified (expected, that's the bug)
7. 245$a is preserved
8. Change the value of the 300$a to something else.
Temporarly disable MARCOverlayRules to be able to do so. And reenable
it.
9. Apply the patch, restart services
10. Use batch record modification on the record
11. 300$a should be preserved, cat protection should have worked
12. Run tests: prove t/db_dependent/Biblio/MarcOverlayRules.t
13. Celebrate! :D
Sponsored-by: Gothenburg University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidied inline (tcohen)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cb2d98fc5b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidied inline (tcohen)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3168da6e39)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Sponsored-by: Gothenburg University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 03d6f83546)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Preparation: Create additional fields for table 'subscription', visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=subscription
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c
Test plan, apply both patches:
1) Add a new serial subscription, visit:
/cgi-bin/koha/serials/subscription-add.pl
2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box.
3) Notice the message 'This message should only show if a select input is present' only shows for select inputs, i.e. it's only closing the element when it needs to
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 885f33bdd6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When sending a notice of a hold ready for pickup (not digest) we use the library where the hold is at.
We should also use this when setting the reply to.
To test:
1 - Set the email/replyto for a patron's library to be:
patron@example.com
2 - Set the email/replyto for another branch to be:
holdbranch@example.com
3 - Place a hold for the patron for pickup at the other branch
4 - Check in and set hold waiting
5 - SELECT * FROM message_queue
6 - Note the message is from the hold branch, but has a null replyto
This means we will use patron branch when sending
7 - Apply patch
8 - Revert hold waiting status
9 - Checkin and confirm hold again
10 -Check message queue
11 - Hold now has reply address of branch
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 723ed39c2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(In reply to Brendan Lawlor from bug 38632 comment #7)
> During testing I noticed small related bug in current main. On the
> bibliographic record details page if you click to configure columns and you
> add or remove a column it automatically shows the column filters too, but it
> does not toggle the filter link to 'Hide filters` so you have to click twice
> to hide them.
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 11500e7352)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
to test:
1 - Have a bib with multiple items
2 - view those items on the Items tab (moredetail.pl), confirm various parts of the page are not classed and are therefore hard to target with CSS, etc
3 - apply patch
4 - reload page, observe there are classes on things but the display and data have not changed
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1938c510dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 891b10311b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d0cbb308f7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To Test
1. Create the patron category from the staff page for ex: Kid and give age required and age Upperage limit
age required 5 yrs and upperage limit 17.
2. Allow category in PatronSelfRegistrationDefaultCategory for online registration from opac.
3. Go to /cgi-bin/koha/opac-memberentry.pl page.
4. Fill the form and give choose date of birth 10/10/1974 and click OK. Now you can able to save the page.
5. Apply the patch.
6. Again go to cgi-bin/koha/opac-memberentry.pl page.
7. Fill the form and give choose date of birth 10/10/1974 and click OK. It will give the error message.
Patron's age is incorrect for their category. Ages allowed are 5-17.
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 579389ed32)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
See comment 0
The sentence in English: "2 of 3 renewals remaining" is translated as "2 uzatma hakkınızdan 3 tane kaldı" in Turkish.
This is wrong. Right Turkish translation must be like this : "3 uzatma hakkınızdan 2 tane kaldı"
We cannot use %s/%s as the order will be preserved, we need to use named
placeholders.
Test plan:
Apply this patch
% gulp po:update --lang LANG
Go to misc/translator/po
% git grep 'renewals remaining'
Translate the occurrences, remove fuzzy
sudo koha-translate --update LANG --dev kohadev
restart_all
Enable LANG for both staff and OPAC
Have a look at the checkouts table and notice that the strings have
been correctly translated
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 674ff624b3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the field for the created by filter from
ui.item.borrowernumber to ui.item.patron_id
To test:
1. Add a vendor and a basket
2. Stage a file and add an order to the basket
3. Add another basket and add an order using From existing orders (copy)
4. On the Duplicate existing orders page search for Basket created by: 'koha'
5. No results appear :(
6. Apply patch and repeat steps 3 and 4
6. Confirm the search returns the basket you created earlier
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 50c5d167bb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Have written a patch to allow Publisher/Distributor number to be searched using the standard identifier search index.
Testing plan:
1. Start up KTD with Elasticsearch: ktd --es8 up
2. Apply the patch and restart everything (restart_all).
3. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)
4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev
5. Alternative to steps 3 and 4: reset_all
6. Update the visibility for 028a in the default framework so that it is visible in the Editor.
7. Add a new record using the default framework and put a term in 028a.
8. Using the advanced search "Standard number" Field, search for the term you put in step 7.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ee69f07c29)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d8cbdfa2df)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Some dates in invoices.tt are being formatted to the system DateFormat
when they are not being displayed, which causes processing errors when
the code expects ISO format. Dates should be formatted for local format
only when they are being displayed.
To test:
1. Go to Acquisitions and create some invoices
i. Search for a vendor (can submit a blank search box)
ii. Click on vendor name
iii. Click "Receive shipments" button
iv. In the "Receive a new shipment" section, enter any value in the
"Vendor invoice" field and click "Next"
v. Click the "My Vendor" breadcrumb and repeat iii-iv a few times
2. Go to Acquisitions > Invoices
3. Search for some invoices (can submit with all blank filters)
4. Select the checkboxes by two or more invoices
5. Click "Merge selected invoices"
6. Click "Merge" without editing the input data at all
--> Internal server error! "The given date <date> does not match the
date format (iso)"
7. Apply patch
8. Repeat steps 2-6
--> The invoices are merged successfully!
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 80a5022129)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 907118e9b0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes koha-upgrade-schema so that it returns an exit
code of 0 whether or not a DB change is needed. This is important
so that koha-common.postinst proceeds correctly even when there
is no DB change needed (e.g. for 24.11.03-2)
Test plan:
0. Apply the patch
1. cp debian/scripts/koha-upgrade-schema /usr/sbin/koha-upgrade-schema
2. dpkg-reconfigure koha-common
3. Note the process completes correctly
4. koha-upgrade-schema kohadev
5. Note following text appears very quickly:
Upgrading database schema for kohadev
No database change required
6. koha-mysql kohadev
update systempreferences set value = '24.1102000' where variable = 'Version';
7. Clear memcached
8. koha-upgrade-schema kohadev
9. Note that it applies the 24.11.03 database upgrade
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3c1a4a2ffb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 707d3b3563)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Use say_success instead of say when outputting a line that the
system preference was added successfully
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 606cd8d63e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. APPLY PATCH, updatedatabase, restart_all
2. Search for the 'AlwaysShowHoldingsTableFilters' system preference. It should be set to 'Don't'.
3. Without changing the system preference, go to a record detail page.
4. The filters should not show by default.
5. Make sure that toggling the Hide filters/Show filters button still work as expected.
6. Set 'AlwaysShowHoldingsTableFilters' to 'Do'.
7. Now the filters should show by default when you load the table.
8. Make sure that toggling the Hide filters/Show filters button still work as expected.
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04f398890e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Yet another visibility bug fix for this specific table.
When the filters are displayed the table is destroyed and recreated.
We should not save the visibility changes made by DT and consider them
changes made by the user.
A temporary variable is used to store the user settings duringt this
action, then we restore them once it's done.
Test plan:
Go to the detail page of bibliographic record with items
Click on "show filters"
=> Only columns displayed should still be displayed
Retry but show/hide some columns before you display the filters
=> Only columns displayed should still be displayed
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0fefe2bed5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the cataloging merge screen to restore side-by-side
comparison.
Both columns had ids added by the patch for formatting purposes.
To test:
1. Go to cataloging module
2. Do a search (in sandboxes/ktd 1 works)
3. Select 2 or more records to merge
4. Click the "merge selected" button
5. Observe there are 2 columns on top of each other instead of side by
side
6. Apply the patch
7. Restart all & rebuild css
8. Repeat steps 1-4
9. Observe the columns are side by side again.
10. Sign-off
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jason Vasche <jvasche@roundrocktexas.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4156022d8a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1: Have an item that is checked out, overdue, and showing an accruing fine
2: On the patron account, check both Make A Payment and Transactions tabs, confirm that the fine shows Due Date, Checkout Date, and Checked Out From values
3: Check your item in
4: Reload the patron account, confirm that the fine no longer shows checkout data on either Make A Payment or Transactions
5: Apply patch
6: Reload pages, confirm Make A Payment and Transactions tabs now show values in Due Date, Checkin Date, Checkout Date, and Checked Out From
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 41a368f35e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When ignoring a waiting hold, we don't need to take any further action, we
shoudlsimply close the modal
This patch adds JS to prevent form submission
To test:
1 - place a hold
2 - check in an item that can fill the hold
3 - in the hold found modal, click Ignore
4 - the modal dismisses and nothing changes on the hold (this is the desired behavior)
5 - check in the item again, click Confirm Hold, confirm your hold is now Waiting
6 - check in the item again, confirm the modal says "Item is already waiting"
7 - click Ignore, confirm modal reloads
8 - click Ignore, confirm modal reloads
9 - click Ignore, confirm modal reloads
10 - Apply patch
11 - check in the item again, click Confirm Hold, confirm your hold is now Waiting
12 - check in the item again, confirm the modal says "Item is already waiting"
13 - click Ignore, nothign happens! Orange you glad I didn't say banana?
Signed-off-by: Amanda Campbell <acampbell@hmcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 177d648ded)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Find an item that is bookable, I turned on Bookable at the item type level for BK. I am using biblionumber=28 in k-t-d with 3 items
2. Book item with barcode ( 39999000001297 ). I did March 7 - April 1
3. Book item with barcode ( 39999000001259 ). I did March 7 - April 1
4. Now checkout 39999000001297 to the patron is was booked to. When asked about early collection say yes.
5. Now item with barcode ( 39999000001273 ) is not checked out or booked. It should be bookable
6. Try to book it, it is not available till April 2, though it should be available right now.
7. APPLY PATCH
8. Try the bookings again.
9. You should correctly not be able to book 39999000001297 or 39999000001259.
10. You should be able to book 39999000001273.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 37c8c6606a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds the same logging as other cronjobs have
To test:
1 - Enable system preference CronjobLog
2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01
3 - Check the logs - no entries
4 - Apply patch
5 - Repeat 2
6 - Check the logs, two entries - one for the start and one for the end
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested on top of bug 39236. Works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit de9c1a8ff2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
From bug 22435 - we need to use 'CREATE' as the account_offset type
From bug 31095 - we need to 'use Koha::Patrons;'
To test:
1 - Add a fine to a patron account
2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01
3 - Cronjob dies
4 - Apply patch
5 - Rerun
6 - Job succeeds!
7 - Confirm patron's fine is written off
8 - Sign off
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 93e2a0953d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Because 'Cancel selected' on the table of existing holds uses
$("#cancel_modal_form #inputs").empty; rather than empty();, it fails to
clear out whatever things are in there before it puts in the things it wants.
That leaves things in a confused state, and makes it fail to actually cancel
holds.
Test plan:
1. Without the patch, add a hold to any bib record
2. Select the checkbox for the hold you placed, then click 'Cancel selected'
and confirm that you want to cancel
3. Note that there's no message box about a background job having been
enqueued, and no matter how long you wait, the hold doesn't go away
4. Apply patch, repeat step 2, note that there's now a message box, and
when the background job finishes, that the hold has been deleted.
Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3bd4a9fad6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Bug introduced in FreeForm prior to adding it to core in this commit:
369dffb159 (diff-662970ddc6f6828afd23e6823399a4a32807c4a6c487a0aff86c9d116f60797dR806)
It should've been Koha::Illrequestattribute into Koha::ILL::Request::Attribute not Koha::ILL::Request::Attributes
To test, k-t-d:
1) Enable ILLModule syspref
2) Edit the only patron in k-t-d with the 'Interlibrary loan' category:
<staff_url>/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=16
3) Add a valid e-mail address to 'Primary email:'
4) Create a new ILL request:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
5) Add any type, any valid patron cardnumber, any library. Click 'Create'.
6) Click 'Place request with partners'
7) Pick the only available partner library 'FRL-Walker'
8) Click 'Send email'.
9) Notice you get an error. Apply patch & restart plack. Repeat.
10) Confirm the there's no error and message was queue as expected:
$ select * from message_queue;
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>
(cherry picked from commit 0d59a3db8d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes broken tab switching on the staff interface lists page.
It was broken by the upgrade to Bootstrap 5.
To test, apply the patch and go to the Lists page in the staff
interface.
- If necessary, create multiple public and private lists.
- Confirm that switching between the "Your lists" tab and the "Public
lists" tab works correctly.
- Try using URL parameters to load each tab:
http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 3054868fc4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This simply copies the fetch of budgets from the acqui/histsearch.pl script.
We should in the future make this a template or other method to avoid code duplication,
but we should fix the functionality first.
To test:
1 - Go to Acqusitions
2 - See the dropdown "Fund: All funds" in the order search section
3 - Click it
4 - Feel disappointed
5 - Apply patch and restart all
6 - Reload and click the dropdown
7 - Options! Feel warm and fuzzy
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c5f598d874)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Make or find some patron categoies that are not adult category type.
2. On patron pages notice that the Change password and duplicate
buttons are missing from the toolbar.
3. APPLY PATCH
4. Try again, this time the pChange password and duplicate buttons
should appear.
5. Make sure the 'Add guarantee' buttons still work.
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>
(cherry picked from commit 9580e06e67)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9bed52a868)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 006485a036)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3407dc28a3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This trivial patch addresses a missing order-by on
the edifact messages datatable since moving to API
based fetching
TO TEST:
a) Read in a load of EDIFact messages in k.t.d
b) Notice on the EDIFact messages table the order
is seemingly arbitrary
c) APPLY PATCH
d) Notice the sorting is now by transfer date,
descending
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 09d3fd9b95)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Set up sysprefs:
- Set any non-empty value for ClaimReturnedLostValue
- Set AutoClaimReturnStatusOnCheckout to "found in library"
- Set AutoClaimReturnStatusOnCheckin to "returned by patron"
2. Check out an item to a patron
3. On the patron's account page, click the "Claim Return" button next to
that checkout
4. Check the item in. Note the message that the claim was auto-resolved.
5. Return to the patron's account page and open the Claims Returned tab
--> Note that the claim is resolved and hidden
6. Click the "Show all 1 claims" link to view the hidden claim. Make a
note of the resolution code and timestamp.
7. Check the item out again
--> Note the message saying that the claim was resolved, even though it
was already resolved previously
8. View the return claim again
--> Note that the timestamp and resolution code have changed
9. Apply patch and restart_all
10. Repeat steps 2-8 with a new item
--> Note you do not get a claim resolved message on checkout this time
--> Note that the timestamp and resolution code remain the same before
and after the checkout
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b6325dfce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Remove the bs-data-dismiss attribute from the "cancel transfer" button
on the Wrong Transfer modal. The "cancel transfer" button's JS works by
adding a hidden input and then submitting the form - we don't want
Bootstrap to dismiss the modal before the embedded form has been
submitted.
Note: This bug seems to be browser-dependent. So far it has been
reproduced with Firefox, but not Chrome/Chromium or Microsoft Edge
To test:
1. Log into the staff client using Firefox
2. Set up system preferences:
TransfersBlockCirc - Don't block
AutomaticConfirmTransfer - Do
3. Find or create an item that belongs to a branch other than the
logged-in branch
4. Check in the item to trigger a Return to Home transfer
5. Click OK on the modal to confirm the transfer
6. Check in the item again to trigger a Wrong Transfer modal
7. Click the "Cancel transfer" button on the modal
8. Navigate to the bib for that item and check the item status
--> The transfer wasn't cancelled - the item is still in transit
9. Apply patch and refresh the page
10. Repeat steps 6-8
--> Item shows as available - the transfer was cancelled successfully
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cdf12b9bda)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit be1646fb80)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Also fixes the confirmation message for deleting.
To test:
1. Go to Acquisitions and create some invoices
i. Search for a vendor (can submit a blank search box)
ii. Click on vendor name
iii. Click "Receive shipments" button
iv. In the "Receive a new shipment" section, enter any value in the
"Vendor invoice" field and click "Next"
v. Click the "My Vendor" breadcrumb and repeat iii-iv a few times
2. Go to Acquisitions > Invoices
3. Specify search filters for shipment to/from dates (that include the
invoices you entered) and search for invoices
4. Try opening, closing, and deleting individual invoices using the
Action menu
--> Internal server error! "The given date <date> does not match the
date format (iso)".
--> Also, note that there is no confirmation dialog when deleting
5. Apply patch
6. Repeat steps 2-4
--> Confirm that invoices can be opened and closed using the drop-down
menu with no issue
--> Confirm that both open and closed invoices can be deleted with no
issue, and that a confirmation message displays before deleting
Note for QA: search for $KohaDates within invoices.tt, and confirm that
the $KohaDates filter is now only used for display, never for Internal
data storage/flow
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47f35a4017)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change makes $sessionID consistently return using the session
ID and not sometimes the session object.
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. curl -v 'http://localhost:8081/cgi-bin/koha/svc/authentication' --cookie-jar /tmp/test.cookies
3. Note the Csrf-Token header value
4. Replace the <CSRF-TOKEN>, <USERID>, and <PASSWORD> tokens in the next step
using the appropriate values (eg the CSRF-TOKEN is from the previous step)
5. curl -v -H "Content-Type: application/x-www-form-urlencoded" \
-H "Csrf-Token: <CSRF-TOKEN>" -XPOST \
'http://localhost:8081/cgi-bin/koha/svc/authentication' \
-d "login_userid=<USERID>&login_password=<PASSWORD>" \
--cookie /tmp/test.cookies --cookie-jar /tmp/test.cookies
6. curl -XGET -v 'http://localhost:8081/cgi-bin/koha/svc/bib/29' \
--cookie /tmp/test.cookies > rec.marcxml
7. curl -v 'http://localhost:8081/cgi-bin/koha/svc/authentication' \
--cookie /tmp/test.cookies --cookie-jar /tmp/test.cookies
8. Note the Csrf-Token header value
9. curl -H "Content-Type: text/xml" -H "Csrf-Token: <CSRF-TOKEN>" \
-XPOST -v 'http://localhost:8081/cgi-bin/koha/svc/bib/29' \
--cookie /tmp/test.cookies --data @rec.marcxml
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04dbbcc2f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch restores Any as a budget filter option on the suggestions homepage, but does not allow one to select Any when saving a suggestion
To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
5 - confirm you cannot select Any when creating a new suggestion
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Bug 38986: Restore Any option to suggestions homepage filter
"Any" should show all suggestions, any fund value and null fund values. One should not be able to create a suggeestion set to "Any"
"None" should show only suggestions with no fund value selected. A new suggestion should default to "None"
To Test:
1: have two suggestions, one with a fund selected and one without
2: go to suggestions homepage, confirm the filter does not have an "Any" option
3: apply patch, reload page
4: confirm the fund filter on suggestion homepage now has both Any and None and they behave as described above
5: confirm the fund filter defaults to Any as you change the branch filter
6: create a new suggestion, confirm its fund defaults to None and cannot be set to Any
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit da6996c08e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Prevent JS error if ExtendedPatronAttributes is off
"Uncaught TypeError: options.extended_attribute_types is undefined"
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Makes the Cypress tests pass.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 16f528e4b4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tests pass, with the followup patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 60332e7552)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes the search clause for
extended_attributes when there is no patron
attribute types which are searchable by default.
The clause was incorrectly added because the array
extended_attribute_types was rendered as [""]
This seems to be an issue with get_columns from DBIX Class and how that is cast when forcing an array
in the template. It returns an empty string for nothing, a scalar for a single value, and an array for multiple
values.
This patch now checks if the variable is set and has content, and wraps as an array if so. In the case of two attributes,
we do double the array, but this was true before as we always cast the return as an array.
Test plan:
* Make sure that no borrower attribute type is set to "searched by default"
in Koha administration -> Patron attribute types.
* Enable the network monitring in the developer tools in your web browser
(Ctrl + Shift + E in firefox or Ctrl + Shift + I and select the "Network"
tab).
* Go to the patrons view members-home.pl (click patrons in top menu bar).
* Search for a string that will match multiple borrowers (to not be automatically
redirected)
* Examine the ajax-request and make sure that "extended_attributes.code" is NOT
part of the query.
* Also, in koha-testing-docker with selenium enabled,
run 'perl t/db_dependent/selenium/patrons_search.t'
* Now set one patro attribute to searchable and searched by default and add a value for a patron, confirm search works
* Set a second patron attribute to searchable and searched by default and confirm searching works
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Did not run the selenium tests, as they have
been obsoleted.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 208a7cc3a4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f97533c7a0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When creating items from the form we need to use the MARC record we build from the HTML->XML->MARC
This patch simply uses the variable we create and ensures we pass the itemnumbers back
To test:
1 - prove -v t/db_dependent/Koha/MarcOrders.t
2 - Still failing
3 - Apply this patch
4 - Success!
Phew! We did it.
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3f6d482410)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When getting items from the form on addorderiso2709.pl we are getting actual budget id's,
we only deal with codes when fetching the values from the MARC.
The code here assigns an id into a variable called code - this patch clarifies that and
ensures that we fallback to using the id if one has been passed from the interface form
To test:
0 - Apply first two patches
1 - prove -v t/db_dependent/Koha/MarcOrders.t
2 - It fails
3 - Apply this patch
4 - It fails?
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fd609d9bb3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When using MarcFieldsToOrder and not MarcItemFieldsToOrder it is expected that all of the item
information will come from the second tab 'Item information' on addorderiso2709.pl
Currently we are not and blank items are beign created
To test:
1 - Apply unit tests
2 - prove -v t/db_dependent/Koha/MarcOrder.t
3 - It fails
4 - Set MarcItemFields to Order:
price: 949$p
quantity: 947$c
budget_code: 947$f
5 - Ensure MarcItemFieldsToOrder is blank
6 - Find a basket in acquisitions
7 - Add to basket from a file
8 - Fill item information, set 'Matching' at top of form to 'Do not look for matchign records' and save
9 - Orders are added
10 - Click on a title
11 - Items do not load and an error is generated, this is because items don't have any values
12 - Check the DB:
SELECT * FROM items WHERE homebranch IS NULL\G
13 - Note items from order are listed
14 - Apply the rest of the patches
15 - Repeat 6-10
16 - This time the items load successfully
NOTE: This patch alone doesn't address all errors, but subsequent will, keeping separate to address
each issue individually, but test plan can be executed as a whole against all
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5034c27628)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a68623009b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Run prove t/db_dependent/api/v1/erm_sushi_services.t - FAIL
2) Apply patch
3) Repeat step 1 - PASS
4) Inspect patch diff and note that last_audit has been added to the API definition
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d67151107)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adjust the selector for quick add and updates the change event for the city
dropdown to affect quickadd fields as well
To test:
1 - Administration->Cities and towns
2 - Define several cities
3 - http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronQuickAddFields
4 - Select city,state, zipcode and some other fields
5 - Patrons->Quick add new patron
6 - Note city field/dropdown does not show
7 - Apply patch
8 - Reload
9 - City dropdown shows!
10 - State and zip are updated when city is selected!
11 - Celebrate!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b007966f44)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Find or create an item belonging to a branch other than the logged-in
branch
2. Check in the item and click OK in the "transfer to home" modal
3. Check the item in again
--> The Wrong Transfer modal should appear, but it doesn't!
4. Apply patch
5. Cancel the transfer or find a different item
6. Check in the item and click OK in the "transfer to home" modal
7. Check the item in again
--> The Wrong Transfer modal should appear
8. Click OK
9. Open the bib record for that item in a new tab
--> The item should have a status of "In transit"
10. Change the system preference TransfersBlockCirc to don't block
11. Check the item in again
--> The Wrong Transfer modal should still appear
12. Confirm that you can click outside the modal to dismiss it without
choosing an option
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 46e025d08c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes span.tdlabel from several templates. The markup is
obsolete now that we use the DataTables responsive feature.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
- Log in to the OPAC as a user with checkouts, suggestions, and tags.
- Check these pages to confirm that the tables on each one have the
correct responsive behavior at varying browser widths:
- OPAC home -> Most popular
- Your account
- Your account -> Checkout history
- Your account -> Suggestions
- Your account -> Tags
* The recalls history page is fixed in Bug 37158
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2627cfbe1d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Apply patch
2. Tools -> Patron lists
3. Create a new patron list
4. Click on the name of your new list
5. Notice the breadcrumbs are changed to "Add patron to 'LIST NAME'"
6. Return to Patron lists
7. In your patron list select Actions -> Add patrons
8. Notice the breadcrumbs are the same
Signed-off-by: Fiona Borthwick <fiona.borthwick@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3c6ea779e7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the markup of pagination links in the authority
search popup so that they have Bootstrap styling consistent with other
pages (e.g. catalog search results).
The pagination markup has also been moved to a BLOCK so that it can be
reused instead of duplicated on the page.
To test, apply the patch and go to Cataloging -> New record (using the
basic MARC editor).
- Switch to tab 1 and click the tag editor link next to tag 100 subfield
a.
- Perform a search in the popup window which will return multiple pages
of results (an empty search will work with default testing data).
- Confirm that the pagination links are styled like catalog search
results.
- Confirm that the search links work correctly and that the correct
number is highlighted as you page through results.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a762f61faa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Most of the places where a "script_name" variable used it is not
strictly necessary. Because it is also used inconsistently, I think it's
better to simply remove the use of the variable where it isn't strictly
necessary.
This patch removes creation of the template variable from several
scripts and updates the corresponding template with the URL itself.
To test, apply the patch and restart services. Test the following pages,
including the various permutations where they are present, e.g. New,
Edit, Delete.
- Administration -> Cities and towns -> Search via the header search
form
- Administratoin -> Currencies and exchange rates -> Search via the
header search form
- Administration -> Desks
- Administration -> Budgets
- Administration -> Authority types
- Administration -> Authority types -> MARC structure -> Subfields
- Administration -> Classification configuration
- Administration -> MARC bibliographic framework
- Administration -> MARC bibliographic framework -> MARC structure ->
Subfields
- Administration -> Record matching rules
- Administration -> OAI repositories
- Administration -> Patron attribute types
- Administration -> System preferences -> Local use
- Administration -> Z39.50/SRU servers
- Acquisitions -> Vendor -> Contracts
- Acquisitions -> Vendor -> Basket -> Export as CSV
- Acquisitions -> Vendor -> Basket -> Edit basket
- Acquisitions -> Vendor -> Basket groups
- Tools -> Import patrons
- Tools -> Notices and slips
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8a433d4f20)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch converts strings using
* *subscription(s)*
* *item(s)*
into different strings for the singular and plural forms. This helps
translating and is also more accurate for the end user.
To test:
1. Have a record with 2 items and 2 subscriptions
2. hover on the _Edit > Delete record_ dropdown item
=> FAIL: Mixed form string about items
3. Delete one item at a time, repeating 2
=> FAIL: Mixed form string at each step
4. Once items are deleted, repeat 2
=> FAIL: Mixed form string about subscriptions
5. Delete one subscription at a time, repeating 2
=> FAIL: Mixed form string at each step
6. Apply this patch
7. Repeat 1-5
=> SUCCESS: Different message in singular and plural forms
=> SUCCESS: The message is correct
8. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 03392b660e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Attach patch first, and then start up KTD or sandbox to see the
behavior for a new installation
2. Go to Administration > System Preferences and search for
DefaultPatronSearchFields
3. Click to edit
--> Confirm preferred_name is checked in the modal that displays
4. Edit a patron to give them a preferred name that is different from
their first name
5. Search for the patron by the newly set preferred_name
--> Confirm the patron correctly autocompletes and appears in the search
results
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit deccd6eb7e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. In OPAC, add a record to your cart
2. Go to your cart
3. Click Download -> BibTeX
4. Observe downloaded file in your favorite text editor
5. Observe Koha::Hash(xxx) within file contents
6. Apply patch
7. Repeat steps 3 and 4
8. Observe Koha::Hash has been replaced with biblionumber
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f66379c075)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a couple of instances of the empty cell required by
DataTables to enable responsive behavior. The mismatch between table
headers and table cells causes DataTables to fail.
To test you must log in to the OPAC as a user with charges and credit.
- Apply the patch and go to Patrons in the staff interface.
- Find and view a patron record. Click "Accounting" in the sidebar menu.
- Use the "Create manual invoice" and "Create manual credit" tabs to
create at least one charge and a credit which is greater than the
charges.
- Log in to the OPAC as that user and go to their Charges tab.
- The charges table shoud look correct, with DataTables sorting
indicators on the table headers to indicate that DataTables is
working.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b49cac544f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To reproduce:
- Delete a bibliographic, noting the biblionumber (let's call it X)
- Run this in the database:
UPDATE deletedbiblioitems SET biblionumber = X;
- Go to About Koha > System information
- Notice the warning compares two tables that are not equivalent:
"The following IDs exist in both tables biblio and deletedbiblioitems"
To test:
- Apply the patch
- Reload the System information
- The warning should now read:
"The following IDs exist in both tables biblioitems and deletedbiblioitems"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 44e15f5b99)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes the markup of the sidebar form on the tags
review page and removes an incorrect "btn-sm" class from the
submit button.
To test, apply the patch and go to Tools -> Tags.
In the sidebar form, confirm that the submit button has the same yellow
"primary" style as other submit buttons, and that it fills the width of
the sidebar.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f6c4663d85)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes instances where the pre-Bootstrap-5 class "pull-right"
was missed during the upgrade. Most cases were on dropdown menus, and
in all of these cases the class can be removed because Bootstrap 5 menus
have better responsive behavior.
Other changes: Added "dropdown-item" classes to some menu items which
lacked it; Added some custom style for the "Filter" form in the patron
permissions toolbar.
To test, apply the patch and rebuild the staff interface CSS. Test that
the following menus look correct and work correctly:
- Catalog -> Bibliographic details page -> Holdings table: The "Edit"
secondary menu shown for each item (requires that the LocalCoverImages
system preference be enabled.
- Administration -> Z39.50 servers: The "Actions" menu for each server
in the list of servers.
- Circulation -> Article requests: The "Actions" menu for each title and
under each tab (New, Pending, and Processing).
- Tools -> Patron lists: "Actions" menu.
- Administration -> Plugins: "Actions" menu (requires that you have at
least one plugin installed).
- Reports -> Saved SQL reports: The secondary menu on each saved
report's "Run" button .
- Cataloging -> Rotating collections: "Actions" menu.
- Serials -> Subscription search results: In the "Open" tab, the
secondary menu on the "Serial receive" button on each subscription. In
the "Closed" tab, the "Actions" menu.
- Acquistions -> Suggestions: The secondary menu on each title's
"Edit" button.
- Tools -> HTML customizations: The secondary menu on the "New
entry" button; The secondary menu on each entry's
"Edit" button; Edit entry -> The secondary menu on the "Save" button.
- Cataloging -> Stock rotation: The "Manage" menu on each rota.
A non-menu change:
- Patrons -> Patron details -> More -> Set permissions: CSS has been
added to correctly align the "Filter" menu.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b6c04435c5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4fb4b7527e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
- Apply the patch and enable the CurbsidePickup system preference if
necessary.
- Properly testing requires testing data. You can run this command to
REPLACE your curbside pickup data with sample data:
bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh)
- Go to Circulation -> Curbside pickups.
- Confirm that the tabs look correct. The first tab should be active
by default.
- Confirm that the right content is displayed when you click each tab.
- Under the "Schedule pickup" tab, search for a patron.
- After you submit the search the page should reload and the "Schedule
pickup" tab should be open.
- Go on each tab and try each button to verify you're staying on the
same tab.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ffb344c580)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The tabs on Circulation -> Curbside pickups look broken because they
were not updated to use the tab WRAPPER markup. This patch revises the
template so that the tabs look correct and makes additional changes to
ensure that the correct tab is preselected.
To test:
- Apply the patch and enable the CurbsidePickup system preference if
necessary.
- Properly testing requires testing data. You can run this command to
REPLACE your curbside pickup data with sample data:
bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh)
- Go to Circulation -> Curbside pickups.
- Confirm that the tabs look correct. The first tab should be active
by default.
- Confirm that the right content is displayed when you click each tab.
- Under the "Schedule pickup" tab, search for a patron.
- After you submit the search the page should reload and the "Schedule
pickup" tab should be open.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1311b8c01c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Fix last columns of tables to be printed in `bold`. This affects
various functions of Koha e.g. Notices and Slips, Pages etc.
1. Go to `Home / Tools / Additional content / Pages`
2. Select `Add new entry using text editor`
3. Add the following html
```html
<table>
<tbody>
<tr>
<td>col 11</td>
<td>col 12</td>
</tr>
<tr>
<td>col 21</td>
<td>col 22</td>
</tr>
</tbody>
</table>
```
4. Save
5. Use the `Staff`-URL from `Additional content: Pages`
to open the page in a new tab
6. Select `File / Print`
(or fire up the dev console via F12 and apply the Print-css)
7. The entries `col 12` and `col 22` appear in bold face.
8. Apply the patch
9. Reload the page
10. The entries `col 12` and `col 22` appear in normal font.
Sponsored-by: Deutsches Elektronen-Synchrotron DESY, Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ec0ced1652)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Find or create an item belonging to a library other than the
logged-in library
2. Check the item in and print slip
--> The transfer slip says "Transfer to" but the library name is blank
3. Apply patch and restart_all
4. Cancel the transfer or find a different item
5. Check the item in and print slip
--> The library name now appears on the slip
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4ee3accfb3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds configuration options to the Point of sale "Transactions
to date" and "Older transactions" tables so that they don't appear to be
sortable. Both have an option that makes their sorting fixed.
To test, apply the patch and go to Point of Sale.
- Enable 'EnablePointOfSale' and 'UseCashRegisters' system preferences.
- Add a least one cash register (Administration -> Cash registers).
- Add a least one debit type (Administration -> Debit types). Check "Can
be sold."
- Go to the Point of Sale page.
- Under "Items for purchase" click "Add" next to an item.
- Under "Collect payment," fill out the form, including the cash
register selection, and submit.
- Click "Transaction history for..." in the sidebar menu. (You may have
to click "Cash summary for..." and then the name of the register you
used in your transaction.
- Check that the "Transactions to date" and "Older transactions"
tables do not have sorting indicators in the table headers.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit eaeb05b5e1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This fixes the labels used for the type options when configuring
Elasticsearch search fields so that they use:
- sentence case
- the full name, instead of abbreviations (to make it clearer
for translators)
Test plan:
1. Go to Administration > Catalog > Search engine
configuration (Elasticsearch).
2. In the search fields tab, select the type column dropdown list
for any field. Note the labels used for these options:
- <empty entry> (the default option)
- Std. Number
- Call Number
3. Apply the patch.
4. Refresh the page.
5. Repeat step 2 and note that the option labels are now:
- Default (instead of being blank)
- Identfier (instead of Std. Number)
- Call number (instead of Call Number)
6. Sign off D:
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f549427e3d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The logic of the title tag construction should not result in a caret
preceding the first element on the Additional fields main page.
To test, apply the patch and go to Administration -> Additional fields.
There should be no caret appearing at the start of the page title
information:
Additional fields > Administration > Koha
Other pages (listing additional fields, adding additional fields, etc)
should have the correct title, e.g.
New field > Table 'aqbasket' > Additional fields > Administration > Koha
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ca170081b8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adjusts the markup and CSS of the self checkout login screen
so that form layout is consistent and readable. I have adjusted the
template conditional so that it re-uses more form elements like
<legend>.
To test, apply the patch and enable WebBasedSelfCheck if necessary.
- Set the SelfCheckoutByLogin system preference to 'cardnumber'
- Go to the self-checkout page (/cgi-bin/koha/sco/sco-main.pl)
- The login form should be labeled "Log in to your account" followed
by the label, form field, and submit button arranged vertically.
- Set the SelfCheckoutByLogin preference to "username and password"
- Reload the self-checkout page. The form should look the same with the
addition of the password field.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4d67788ad1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The remote branch for bug 13618 started out when OPAC authority search did its
own pagination in a template block, then bug 2735 replaced that with
pagination_bar, the template var passed from the script, then at some point
before bug 13618 landed the second time, a rebase error put the template block
back in. And since it's not at all obvious it is dead code unless you look for
where "pagination" rather than "pagination_bar" is used, we've kept updating
it, and bug 36032 thought the way it used >> instead of > for next ought to be
fixed while one that was actually used was fixed.
Time to get rid of it, before we 'fix' it again.
Test plan:
1. Without the patch, in the OPAC go to Authority Search and do a search that
will return pages of results, like the letter a
2. Note that the button for the next page uses ">" rather than the "Next >>"
in the block this patch removes
3. Apply patch, click the browser Back button, refresh page
4. Verify that when you search for something that returns more than one
page of results, the page navigation hasn't changed from what it was
before the patch, telling you that what the patch removes was unused
Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8c9fd0f5d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This corrects the display of the "Log not enabled" message for the
authentication module in the log viewer.
If either AuthFailureLog or AuthSuccessLog system preferences are
set to "Don't log":
- the "Log not enabled" warning icon is now shown
- clicking the triangle icon now links to the two system
preferences
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 86e8835da0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Typo in system preference 'AuthScuccessLog' -> 'AuthSuccessLog'.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2f5c51383a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Typo in system preference 'minPasswordPreference' -> 'minPasswordLength'
in opac/opac-password-recovery.pl
There is no 'minPasswordPreference' system preference in database.
Bug 23816 added the capability to override minPasswordLength.
Test plan:
==========
1. Check 'minPasswordPreference' appearances:
git grep -i 'minPasswordPreference' **/*
--> Note: only one in opac-password-recovery.pl; no one in sysprefs.sql
2. Apply the patch.
3. Repeat p. 1. Note there is not 'minPasswordPreference' at all.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b8db36d2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Create a list in the staff interface
2. Go to lists
3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up
4. Create another list
5. Go to lists and view the list detail
6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up
7. Apply patch
8. Try step 1 through 3 again
9. "Delete" button in "actions" column has the same confirmation dialog, and delete function works
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0a5591bdaa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Reorder logic slightly for each to only create the counter_file after the mock_userenv has taken place
prove t/db_dependent/api/v1/erm_custom_reports.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1e7c49ab98)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/ERM/EUsage/CounterFile.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidy (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a297c42394)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The ud_provider->{report_type} is only defined on ->harvest_sushi, meaning it'll never be defined here.
We don't need this anyway. The filename should be the filename of the file being manually uploaded. We only need this concat logic for COUNTER files being generated by Koha following a SUSHI harvest, and that works.
This also gets rid of a warning when running the tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0231911c98)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidy (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c3e8b9b851)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Improve messages clarity.
Show success message if no schema diff was found from audit.
Code refactor to ensure the title+message shown in UI is the same as the one shown in CLI and are all translatable.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7834d25fb4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 42c1e109af)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the module as suggested by David to handle just the
diff code and leaves the display logic up to the templates and script.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: JesseM <jesse@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 534fba2691)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: JesseM <jesse@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6940167048)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan #1 ensure same script functionality (same as bug 34064):
0. Apply patch
1. vi ./installer/data/mysql/kohastructure.sql
2. Comment out some columns, change NULL status, or whatever you like
3. perl misc/maintenance/audit_database.pl \
--filename /kohadevbox/koha/installer/data/mysql/kohastructure.sql
4. Note that the output includes SQL commands to change the database
to match the new kohastructure.sql
5a. Try using koha-foreach and note that the database name appears above
the database comparison
5b. koha-foreach "perl misc/maintenance/audit_database.pl \
--filename /kohadevbox/koha/installer/data/mysql/kohastructure.sql"
Test plan #2:
1. After doing test plan #1, access the new 'database audit' tab, visit:
<staff_url>/cgi-bin/koha/about.pl?tab=database
2. Ensure the output is the same as test plan #1
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: JesseM <jesse@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 09bb85409d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2350a2ada8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9b7dcb46ea)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3fe252f6a8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d2a6915010)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 125d8ec1cf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Try editing some items with a empty value in the flatpickr.
2. Make sure the empty date fields get a date set to today when you click on the empty field.
3. Try a datetime field, making sure the datetime is correctly set.
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0d5bd311d4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b2f317a767)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d32218fb68)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f049a13ef8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. APPLY PATCH, restart_all
2. Pick a framework, I choose BKS in k-t-d
3. Make sure that a few date and datetime fields are exposed in the editor.
4. On additem.tt a date picker should be instantiated on the date or datetime fields.
5. Make sure the date pickers work on each field.
6. If it is a datetime field you should have the option to add hours and minutes. ( datelastseen )
7. Edit the framework and remove the dateaccessioned.pl plugin from any of these date fields.
8. Even without the dateaccessioned.pl plugin a date picker should be present on the field.
9. Add the dateaccessioned.pl plugin to a non date/datetime field.
10. Make sure the dateaccessioned.pl plugin works properly on the non date/datetime field.
11. Mark one of the date/datetime fields as mandatory, make sure it still acts as mandatory.
12. Hide date/datetime from the editor, make sure it hides properly.
+----------------------+-------------+
| COLUMN_NAME | COLUMN_TYPE |
+----------------------+-------------+
| dateaccessioned | date |
| replacementpricedate | date |
| datelastborrowed | date |
| datelastseen | datetime |
| onloan | date |
+----------------------+-------------+
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit aa4ee79f6e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
$ prove t/db_dependent/api/v1/erm_counter_logs.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 15803e4f29)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
A search turned up more of these in other files. Fixed as well.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3b86455e02)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We don't need those 2 lines
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d6af90d76)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
k-t-d, from /kohadevbox/koha, run:
yarn run cypress run --spec "./t/cypress/integration/ERM/DataProviders_spec.ts"
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7faa42505f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
For consistency, and to avoid 'null koha' for a file imported by
the koha user (no first name).
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f70a5ffc67)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7b75586ead)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit da475321a5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob
Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 062e04c9c3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
C4::Heading::preferred_authorities seems to be not used for ages (maybe
never used?)
Test plan:
$ git grep preferred_authorities
--> should return nothing
Sponsored-by: Ignatianum University in Cracow
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>
(cherry picked from commit 7c70b09dfc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f42df40680)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
(cherry picked from commit 2b0286889d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
(cherry picked from commit 4012f805b6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Before applying patches, visit the additional fields admin page:
<staff_url>/cgi-bin/koha/admin/additional-fields.pl
2) Notice the tables are not grouped by module, and not alphabetically sorted
3) Apply patches. Refresh
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>
(cherry picked from commit 6a0c475bc5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Trivial leftover house-keeping from bug 35581.
Test plan:
$ prove t/db_dependent/Koha/ILL/*
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>
(cherry picked from commit b26b7d740f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This resolves exceptions like:
Invalid table name accountlines at /usr/share/koha/C4/Reports/Guided.pm line 216.
Test plan:
Go to reports/dictionary.pl
Try to add a new definition for Serials.
Without this patch, you would crash (status 500).
Run t/Koha/Database/Columns.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The code went back to step 3 but the error message is not there.
It is easier to go back to the start: no need to fetch columns.
And this is now an exception; it will only come up when trying
malicious things.
Also turned foreach and unless forbidden around. No need to go
into the loop when we found a forbidden field.
Test plan:
See first patch. You should see the message now.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch prevents forbidden columns from being selected using the reports dictionary.
To test:
1. Go to Reports -> View dictionary
2. Choose 'new dictionary'
3. After providing a name and description, select the 'patrons' table
4. Select the 'password' column and go Next
5. Notice it is possible to see a list of all the password hashes in the 'choose' selection box when asked to specify a value
6. Apply patch and restart services
7. Repeat steps 1-3
8. Notice the 'password' column and other forbidden columns are not available to be selected
9. Open the Inspector / developer tools in your browser and find the code for the columns selection
10. Change the value of one of the options in the code to "borrowers.password". So it may end up looking like this:
<option value="borrowers.password">Card number</option>
11. Choose that option from the dropdown and click Next.
12. Confirm you are redirected back to this page and warned about the column being used.
13. Ensure tests pass t/db_dependent/Reports/Guided.t
Sponsored-by: Reserve Bank of New Zealand
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
reports/dictionary.tt and reports/guided_reports_start.tt display a list
of the columns available using optgroup to group the columns per table.
The template code is quite ugly because of the perl structure choose in
C4::Reports::Guided->get_columns
This patch removes $cgi and the 'first' variable that were not used.
Now we have an usual structure with the table names as keys and column
info in an arrayref.
Test plan:
Create a report and a new dictionary definition.
At step 3 you should see the list of the columns.
Note that they are now identical. The list when you create a dictionary
now show the description of the columns.
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>
(cherry picked from commit 10a41979e6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When displaying the "Public note" for Course Reserves, we scrub the HTML
using the "note" scrubber type.
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/course_reserves/course-reserves.pl
2. Click "New course"
3. Fill in required fields
4. In staff note and public note add the following:
<script>alert('boo!')</script><p>Hello!</p>
5. Click Save
6. Click "Add reserves"
7. Add "39999000001310" to Item barcode
8. Click "Submit"
9. Fill in all required fields
10. Add the following for Staff note and Public note:
<script>alert('boo2!')</script><p>Item!</p>
11. Click "Save"
12. Go back to your course reserve
13. Note the HTML is scrubbed on "Public note"
14. Go to http://localhost:8081/cgi-bin/koha/course_reserves/course-reserves.pl
15. Note the HTML is scrubbed on "Public note"
16. Go to http://localhost:8080/cgi-bin/koha/opac-course-reserves.pl
17. Note the HTML is scrubbed on "Notes"
18. Click on your course reserves
19. Note the HTML is scrubbed on "Notes"
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 707d3b3563)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Use say_success instead of say when outputting a line that the
system preference was added successfully
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 606cd8d63e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. APPLY PATCH, updatedatabase, restart_all
2. Search for the 'AlwaysShowHoldingsTableFilters' system preference. It should be set to 'Don't'.
3. Without changing the system preference, go to a record detail page.
4. The filters should not show by default.
5. Make sure that toggling the Hide filters/Show filters button still work as expected.
6. Set 'AlwaysShowHoldingsTableFilters' to 'Do'.
7. Now the filters should show by default when you load the table.
8. Make sure that toggling the Hide filters/Show filters button still work as expected.
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04f398890e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Yet another visibility bug fix for this specific table.
When the filters are displayed the table is destroyed and recreated.
We should not save the visibility changes made by DT and consider them
changes made by the user.
A temporary variable is used to store the user settings duringt this
action, then we restore them once it's done.
Test plan:
Go to the detail page of bibliographic record with items
Click on "show filters"
=> Only columns displayed should still be displayed
Retry but show/hide some columns before you display the filters
=> Only columns displayed should still be displayed
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0fefe2bed5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the cataloging merge screen to restore side-by-side
comparison.
Both columns had ids added by the patch for formatting purposes.
To test:
1. Go to cataloging module
2. Do a search (in sandboxes/ktd 1 works)
3. Select 2 or more records to merge
4. Click the "merge selected" button
5. Observe there are 2 columns on top of each other instead of side by
side
6. Apply the patch
7. Restart all & rebuild css
8. Repeat steps 1-4
9. Observe the columns are side by side again.
10. Sign-off
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jason Vasche <jvasche@roundrocktexas.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4156022d8a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1: Have an item that is checked out, overdue, and showing an accruing fine
2: On the patron account, check both Make A Payment and Transactions tabs, confirm that the fine shows Due Date, Checkout Date, and Checked Out From values
3: Check your item in
4: Reload the patron account, confirm that the fine no longer shows checkout data on either Make A Payment or Transactions
5: Apply patch
6: Reload pages, confirm Make A Payment and Transactions tabs now show values in Due Date, Checkin Date, Checkout Date, and Checked Out From
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 41a368f35e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When ignoring a waiting hold, we don't need to take any further action, we
shoudlsimply close the modal
This patch adds JS to prevent form submission
To test:
1 - place a hold
2 - check in an item that can fill the hold
3 - in the hold found modal, click Ignore
4 - the modal dismisses and nothing changes on the hold (this is the desired behavior)
5 - check in the item again, click Confirm Hold, confirm your hold is now Waiting
6 - check in the item again, confirm the modal says "Item is already waiting"
7 - click Ignore, confirm modal reloads
8 - click Ignore, confirm modal reloads
9 - click Ignore, confirm modal reloads
10 - Apply patch
11 - check in the item again, click Confirm Hold, confirm your hold is now Waiting
12 - check in the item again, confirm the modal says "Item is already waiting"
13 - click Ignore, nothign happens! Orange you glad I didn't say banana?
Signed-off-by: Amanda Campbell <acampbell@hmcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 177d648ded)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Find an item that is bookable, I turned on Bookable at the item type level for BK. I am using biblionumber=28 in k-t-d with 3 items
2. Book item with barcode ( 39999000001297 ). I did March 7 - April 1
3. Book item with barcode ( 39999000001259 ). I did March 7 - April 1
4. Now checkout 39999000001297 to the patron is was booked to. When asked about early collection say yes.
5. Now item with barcode ( 39999000001273 ) is not checked out or booked. It should be bookable
6. Try to book it, it is not available till April 2, though it should be available right now.
7. APPLY PATCH
8. Try the bookings again.
9. You should correctly not be able to book 39999000001297 or 39999000001259.
10. You should be able to book 39999000001273.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 37c8c6606a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds the same logging as other cronjobs have
To test:
1 - Enable system preference CronjobLog
2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01
3 - Check the logs - no entries
4 - Apply patch
5 - Repeat 2
6 - Check the logs, two entries - one for the start and one for the end
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested on top of bug 39236. Works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit de9c1a8ff2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
From bug 22435 - we need to use 'CREATE' as the account_offset type
From bug 31095 - we need to 'use Koha::Patrons;'
To test:
1 - Add a fine to a patron account
2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01
3 - Cronjob dies
4 - Apply patch
5 - Rerun
6 - Job succeeds!
7 - Confirm patron's fine is written off
8 - Sign off
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 93e2a0953d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Because 'Cancel selected' on the table of existing holds uses
$("#cancel_modal_form #inputs").empty; rather than empty();, it fails to
clear out whatever things are in there before it puts in the things it wants.
That leaves things in a confused state, and makes it fail to actually cancel
holds.
Test plan:
1. Without the patch, add a hold to any bib record
2. Select the checkbox for the hold you placed, then click 'Cancel selected'
and confirm that you want to cancel
3. Note that there's no message box about a background job having been
enqueued, and no matter how long you wait, the hold doesn't go away
4. Apply patch, repeat step 2, note that there's now a message box, and
when the background job finishes, that the hold has been deleted.
Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3bd4a9fad6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Bug introduced in FreeForm prior to adding it to core in this commit:
369dffb159 (diff-662970ddc6f6828afd23e6823399a4a32807c4a6c487a0aff86c9d116f60797dR806)
It should've been Koha::Illrequestattribute into Koha::ILL::Request::Attribute not Koha::ILL::Request::Attributes
To test, k-t-d:
1) Enable ILLModule syspref
2) Edit the only patron in k-t-d with the 'Interlibrary loan' category:
<staff_url>/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=16
3) Add a valid e-mail address to 'Primary email:'
4) Create a new ILL request:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
5) Add any type, any valid patron cardnumber, any library. Click 'Create'.
6) Click 'Place request with partners'
7) Pick the only available partner library 'FRL-Walker'
8) Click 'Send email'.
9) Notice you get an error. Apply patch & restart plack. Repeat.
10) Confirm the there's no error and message was queue as expected:
$ select * from message_queue;
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>
(cherry picked from commit 0d59a3db8d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes broken tab switching on the staff interface lists page.
It was broken by the upgrade to Bootstrap 5.
To test, apply the patch and go to the Lists page in the staff
interface.
- If necessary, create multiple public and private lists.
- Confirm that switching between the "Your lists" tab and the "Public
lists" tab works correctly.
- Try using URL parameters to load each tab:
http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 3054868fc4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This simply copies the fetch of budgets from the acqui/histsearch.pl script.
We should in the future make this a template or other method to avoid code duplication,
but we should fix the functionality first.
To test:
1 - Go to Acqusitions
2 - See the dropdown "Fund: All funds" in the order search section
3 - Click it
4 - Feel disappointed
5 - Apply patch and restart all
6 - Reload and click the dropdown
7 - Options! Feel warm and fuzzy
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c5f598d874)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Make or find some patron categoies that are not adult category type.
2. On patron pages notice that the Change password and duplicate
buttons are missing from the toolbar.
3. APPLY PATCH
4. Try again, this time the pChange password and duplicate buttons
should appear.
5. Make sure the 'Add guarantee' buttons still work.
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>
(cherry picked from commit 9580e06e67)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9bed52a868)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 006485a036)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3407dc28a3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This trivial patch addresses a missing order-by on
the edifact messages datatable since moving to API
based fetching
TO TEST:
a) Read in a load of EDIFact messages in k.t.d
b) Notice on the EDIFact messages table the order
is seemingly arbitrary
c) APPLY PATCH
d) Notice the sorting is now by transfer date,
descending
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 09d3fd9b95)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Set up sysprefs:
- Set any non-empty value for ClaimReturnedLostValue
- Set AutoClaimReturnStatusOnCheckout to "found in library"
- Set AutoClaimReturnStatusOnCheckin to "returned by patron"
2. Check out an item to a patron
3. On the patron's account page, click the "Claim Return" button next to
that checkout
4. Check the item in. Note the message that the claim was auto-resolved.
5. Return to the patron's account page and open the Claims Returned tab
--> Note that the claim is resolved and hidden
6. Click the "Show all 1 claims" link to view the hidden claim. Make a
note of the resolution code and timestamp.
7. Check the item out again
--> Note the message saying that the claim was resolved, even though it
was already resolved previously
8. View the return claim again
--> Note that the timestamp and resolution code have changed
9. Apply patch and restart_all
10. Repeat steps 2-8 with a new item
--> Note you do not get a claim resolved message on checkout this time
--> Note that the timestamp and resolution code remain the same before
and after the checkout
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b6325dfce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Remove the bs-data-dismiss attribute from the "cancel transfer" button
on the Wrong Transfer modal. The "cancel transfer" button's JS works by
adding a hidden input and then submitting the form - we don't want
Bootstrap to dismiss the modal before the embedded form has been
submitted.
Note: This bug seems to be browser-dependent. So far it has been
reproduced with Firefox, but not Chrome/Chromium or Microsoft Edge
To test:
1. Log into the staff client using Firefox
2. Set up system preferences:
TransfersBlockCirc - Don't block
AutomaticConfirmTransfer - Do
3. Find or create an item that belongs to a branch other than the
logged-in branch
4. Check in the item to trigger a Return to Home transfer
5. Click OK on the modal to confirm the transfer
6. Check in the item again to trigger a Wrong Transfer modal
7. Click the "Cancel transfer" button on the modal
8. Navigate to the bib for that item and check the item status
--> The transfer wasn't cancelled - the item is still in transit
9. Apply patch and refresh the page
10. Repeat steps 6-8
--> Item shows as available - the transfer was cancelled successfully
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cdf12b9bda)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit be1646fb80)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Also fixes the confirmation message for deleting.
To test:
1. Go to Acquisitions and create some invoices
i. Search for a vendor (can submit a blank search box)
ii. Click on vendor name
iii. Click "Receive shipments" button
iv. In the "Receive a new shipment" section, enter any value in the
"Vendor invoice" field and click "Next"
v. Click the "My Vendor" breadcrumb and repeat iii-iv a few times
2. Go to Acquisitions > Invoices
3. Specify search filters for shipment to/from dates (that include the
invoices you entered) and search for invoices
4. Try opening, closing, and deleting individual invoices using the
Action menu
--> Internal server error! "The given date <date> does not match the
date format (iso)".
--> Also, note that there is no confirmation dialog when deleting
5. Apply patch
6. Repeat steps 2-4
--> Confirm that invoices can be opened and closed using the drop-down
menu with no issue
--> Confirm that both open and closed invoices can be deleted with no
issue, and that a confirmation message displays before deleting
Note for QA: search for $KohaDates within invoices.tt, and confirm that
the $KohaDates filter is now only used for display, never for Internal
data storage/flow
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47f35a4017)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change makes $sessionID consistently return using the session
ID and not sometimes the session object.
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. curl -v 'http://localhost:8081/cgi-bin/koha/svc/authentication' --cookie-jar /tmp/test.cookies
3. Note the Csrf-Token header value
4. Replace the <CSRF-TOKEN>, <USERID>, and <PASSWORD> tokens in the next step
using the appropriate values (eg the CSRF-TOKEN is from the previous step)
5. curl -v -H "Content-Type: application/x-www-form-urlencoded" \
-H "Csrf-Token: <CSRF-TOKEN>" -XPOST \
'http://localhost:8081/cgi-bin/koha/svc/authentication' \
-d "login_userid=<USERID>&login_password=<PASSWORD>" \
--cookie /tmp/test.cookies --cookie-jar /tmp/test.cookies
6. curl -XGET -v 'http://localhost:8081/cgi-bin/koha/svc/bib/29' \
--cookie /tmp/test.cookies > rec.marcxml
7. curl -v 'http://localhost:8081/cgi-bin/koha/svc/authentication' \
--cookie /tmp/test.cookies --cookie-jar /tmp/test.cookies
8. Note the Csrf-Token header value
9. curl -H "Content-Type: text/xml" -H "Csrf-Token: <CSRF-TOKEN>" \
-XPOST -v 'http://localhost:8081/cgi-bin/koha/svc/bib/29' \
--cookie /tmp/test.cookies --data @rec.marcxml
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04dbbcc2f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch restores Any as a budget filter option on the suggestions homepage, but does not allow one to select Any when saving a suggestion
To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
5 - confirm you cannot select Any when creating a new suggestion
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Bug 38986: Restore Any option to suggestions homepage filter
"Any" should show all suggestions, any fund value and null fund values. One should not be able to create a suggeestion set to "Any"
"None" should show only suggestions with no fund value selected. A new suggestion should default to "None"
To Test:
1: have two suggestions, one with a fund selected and one without
2: go to suggestions homepage, confirm the filter does not have an "Any" option
3: apply patch, reload page
4: confirm the fund filter on suggestion homepage now has both Any and None and they behave as described above
5: confirm the fund filter defaults to Any as you change the branch filter
6: create a new suggestion, confirm its fund defaults to None and cannot be set to Any
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit da6996c08e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Prevent JS error if ExtendedPatronAttributes is off
"Uncaught TypeError: options.extended_attribute_types is undefined"
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Makes the Cypress tests pass.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 16f528e4b4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tests pass, with the followup patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 60332e7552)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes the search clause for
extended_attributes when there is no patron
attribute types which are searchable by default.
The clause was incorrectly added because the array
extended_attribute_types was rendered as [""]
This seems to be an issue with get_columns from DBIX Class and how that is cast when forcing an array
in the template. It returns an empty string for nothing, a scalar for a single value, and an array for multiple
values.
This patch now checks if the variable is set and has content, and wraps as an array if so. In the case of two attributes,
we do double the array, but this was true before as we always cast the return as an array.
Test plan:
* Make sure that no borrower attribute type is set to "searched by default"
in Koha administration -> Patron attribute types.
* Enable the network monitring in the developer tools in your web browser
(Ctrl + Shift + E in firefox or Ctrl + Shift + I and select the "Network"
tab).
* Go to the patrons view members-home.pl (click patrons in top menu bar).
* Search for a string that will match multiple borrowers (to not be automatically
redirected)
* Examine the ajax-request and make sure that "extended_attributes.code" is NOT
part of the query.
* Also, in koha-testing-docker with selenium enabled,
run 'perl t/db_dependent/selenium/patrons_search.t'
* Now set one patro attribute to searchable and searched by default and add a value for a patron, confirm search works
* Set a second patron attribute to searchable and searched by default and confirm searching works
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Did not run the selenium tests, as they have
been obsoleted.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 208a7cc3a4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f97533c7a0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When creating items from the form we need to use the MARC record we build from the HTML->XML->MARC
This patch simply uses the variable we create and ensures we pass the itemnumbers back
To test:
1 - prove -v t/db_dependent/Koha/MarcOrders.t
2 - Still failing
3 - Apply this patch
4 - Success!
Phew! We did it.
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3f6d482410)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When getting items from the form on addorderiso2709.pl we are getting actual budget id's,
we only deal with codes when fetching the values from the MARC.
The code here assigns an id into a variable called code - this patch clarifies that and
ensures that we fallback to using the id if one has been passed from the interface form
To test:
0 - Apply first two patches
1 - prove -v t/db_dependent/Koha/MarcOrders.t
2 - It fails
3 - Apply this patch
4 - It fails?
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fd609d9bb3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When using MarcFieldsToOrder and not MarcItemFieldsToOrder it is expected that all of the item
information will come from the second tab 'Item information' on addorderiso2709.pl
Currently we are not and blank items are beign created
To test:
1 - Apply unit tests
2 - prove -v t/db_dependent/Koha/MarcOrder.t
3 - It fails
4 - Set MarcItemFields to Order:
price: 949$p
quantity: 947$c
budget_code: 947$f
5 - Ensure MarcItemFieldsToOrder is blank
6 - Find a basket in acquisitions
7 - Add to basket from a file
8 - Fill item information, set 'Matching' at top of form to 'Do not look for matchign records' and save
9 - Orders are added
10 - Click on a title
11 - Items do not load and an error is generated, this is because items don't have any values
12 - Check the DB:
SELECT * FROM items WHERE homebranch IS NULL\G
13 - Note items from order are listed
14 - Apply the rest of the patches
15 - Repeat 6-10
16 - This time the items load successfully
NOTE: This patch alone doesn't address all errors, but subsequent will, keeping separate to address
each issue individually, but test plan can be executed as a whole against all
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5034c27628)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a68623009b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Run prove t/db_dependent/api/v1/erm_sushi_services.t - FAIL
2) Apply patch
3) Repeat step 1 - PASS
4) Inspect patch diff and note that last_audit has been added to the API definition
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d67151107)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adjust the selector for quick add and updates the change event for the city
dropdown to affect quickadd fields as well
To test:
1 - Administration->Cities and towns
2 - Define several cities
3 - http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronQuickAddFields
4 - Select city,state, zipcode and some other fields
5 - Patrons->Quick add new patron
6 - Note city field/dropdown does not show
7 - Apply patch
8 - Reload
9 - City dropdown shows!
10 - State and zip are updated when city is selected!
11 - Celebrate!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b007966f44)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Find or create an item belonging to a branch other than the logged-in
branch
2. Check in the item and click OK in the "transfer to home" modal
3. Check the item in again
--> The Wrong Transfer modal should appear, but it doesn't!
4. Apply patch
5. Cancel the transfer or find a different item
6. Check in the item and click OK in the "transfer to home" modal
7. Check the item in again
--> The Wrong Transfer modal should appear
8. Click OK
9. Open the bib record for that item in a new tab
--> The item should have a status of "In transit"
10. Change the system preference TransfersBlockCirc to don't block
11. Check the item in again
--> The Wrong Transfer modal should still appear
12. Confirm that you can click outside the modal to dismiss it without
choosing an option
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 46e025d08c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes span.tdlabel from several templates. The markup is
obsolete now that we use the DataTables responsive feature.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
- Log in to the OPAC as a user with checkouts, suggestions, and tags.
- Check these pages to confirm that the tables on each one have the
correct responsive behavior at varying browser widths:
- OPAC home -> Most popular
- Your account
- Your account -> Checkout history
- Your account -> Suggestions
- Your account -> Tags
* The recalls history page is fixed in Bug 37158
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2627cfbe1d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Apply patch
2. Tools -> Patron lists
3. Create a new patron list
4. Click on the name of your new list
5. Notice the breadcrumbs are changed to "Add patron to 'LIST NAME'"
6. Return to Patron lists
7. In your patron list select Actions -> Add patrons
8. Notice the breadcrumbs are the same
Signed-off-by: Fiona Borthwick <fiona.borthwick@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3c6ea779e7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the markup of pagination links in the authority
search popup so that they have Bootstrap styling consistent with other
pages (e.g. catalog search results).
The pagination markup has also been moved to a BLOCK so that it can be
reused instead of duplicated on the page.
To test, apply the patch and go to Cataloging -> New record (using the
basic MARC editor).
- Switch to tab 1 and click the tag editor link next to tag 100 subfield
a.
- Perform a search in the popup window which will return multiple pages
of results (an empty search will work with default testing data).
- Confirm that the pagination links are styled like catalog search
results.
- Confirm that the search links work correctly and that the correct
number is highlighted as you page through results.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a762f61faa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Most of the places where a "script_name" variable used it is not
strictly necessary. Because it is also used inconsistently, I think it's
better to simply remove the use of the variable where it isn't strictly
necessary.
This patch removes creation of the template variable from several
scripts and updates the corresponding template with the URL itself.
To test, apply the patch and restart services. Test the following pages,
including the various permutations where they are present, e.g. New,
Edit, Delete.
- Administration -> Cities and towns -> Search via the header search
form
- Administratoin -> Currencies and exchange rates -> Search via the
header search form
- Administration -> Desks
- Administration -> Budgets
- Administration -> Authority types
- Administration -> Authority types -> MARC structure -> Subfields
- Administration -> Classification configuration
- Administration -> MARC bibliographic framework
- Administration -> MARC bibliographic framework -> MARC structure ->
Subfields
- Administration -> Record matching rules
- Administration -> OAI repositories
- Administration -> Patron attribute types
- Administration -> System preferences -> Local use
- Administration -> Z39.50/SRU servers
- Acquisitions -> Vendor -> Contracts
- Acquisitions -> Vendor -> Basket -> Export as CSV
- Acquisitions -> Vendor -> Basket -> Edit basket
- Acquisitions -> Vendor -> Basket groups
- Tools -> Import patrons
- Tools -> Notices and slips
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8a433d4f20)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch converts strings using
* *subscription(s)*
* *item(s)*
into different strings for the singular and plural forms. This helps
translating and is also more accurate for the end user.
To test:
1. Have a record with 2 items and 2 subscriptions
2. hover on the _Edit > Delete record_ dropdown item
=> FAIL: Mixed form string about items
3. Delete one item at a time, repeating 2
=> FAIL: Mixed form string at each step
4. Once items are deleted, repeat 2
=> FAIL: Mixed form string about subscriptions
5. Delete one subscription at a time, repeating 2
=> FAIL: Mixed form string at each step
6. Apply this patch
7. Repeat 1-5
=> SUCCESS: Different message in singular and plural forms
=> SUCCESS: The message is correct
8. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 03392b660e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Attach patch first, and then start up KTD or sandbox to see the
behavior for a new installation
2. Go to Administration > System Preferences and search for
DefaultPatronSearchFields
3. Click to edit
--> Confirm preferred_name is checked in the modal that displays
4. Edit a patron to give them a preferred name that is different from
their first name
5. Search for the patron by the newly set preferred_name
--> Confirm the patron correctly autocompletes and appears in the search
results
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit deccd6eb7e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. In OPAC, add a record to your cart
2. Go to your cart
3. Click Download -> BibTeX
4. Observe downloaded file in your favorite text editor
5. Observe Koha::Hash(xxx) within file contents
6. Apply patch
7. Repeat steps 3 and 4
8. Observe Koha::Hash has been replaced with biblionumber
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f66379c075)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a couple of instances of the empty cell required by
DataTables to enable responsive behavior. The mismatch between table
headers and table cells causes DataTables to fail.
To test you must log in to the OPAC as a user with charges and credit.
- Apply the patch and go to Patrons in the staff interface.
- Find and view a patron record. Click "Accounting" in the sidebar menu.
- Use the "Create manual invoice" and "Create manual credit" tabs to
create at least one charge and a credit which is greater than the
charges.
- Log in to the OPAC as that user and go to their Charges tab.
- The charges table shoud look correct, with DataTables sorting
indicators on the table headers to indicate that DataTables is
working.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b49cac544f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To reproduce:
- Delete a bibliographic, noting the biblionumber (let's call it X)
- Run this in the database:
UPDATE deletedbiblioitems SET biblionumber = X;
- Go to About Koha > System information
- Notice the warning compares two tables that are not equivalent:
"The following IDs exist in both tables biblio and deletedbiblioitems"
To test:
- Apply the patch
- Reload the System information
- The warning should now read:
"The following IDs exist in both tables biblioitems and deletedbiblioitems"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 44e15f5b99)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes the markup of the sidebar form on the tags
review page and removes an incorrect "btn-sm" class from the
submit button.
To test, apply the patch and go to Tools -> Tags.
In the sidebar form, confirm that the submit button has the same yellow
"primary" style as other submit buttons, and that it fills the width of
the sidebar.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f6c4663d85)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes instances where the pre-Bootstrap-5 class "pull-right"
was missed during the upgrade. Most cases were on dropdown menus, and
in all of these cases the class can be removed because Bootstrap 5 menus
have better responsive behavior.
Other changes: Added "dropdown-item" classes to some menu items which
lacked it; Added some custom style for the "Filter" form in the patron
permissions toolbar.
To test, apply the patch and rebuild the staff interface CSS. Test that
the following menus look correct and work correctly:
- Catalog -> Bibliographic details page -> Holdings table: The "Edit"
secondary menu shown for each item (requires that the LocalCoverImages
system preference be enabled.
- Administration -> Z39.50 servers: The "Actions" menu for each server
in the list of servers.
- Circulation -> Article requests: The "Actions" menu for each title and
under each tab (New, Pending, and Processing).
- Tools -> Patron lists: "Actions" menu.
- Administration -> Plugins: "Actions" menu (requires that you have at
least one plugin installed).
- Reports -> Saved SQL reports: The secondary menu on each saved
report's "Run" button .
- Cataloging -> Rotating collections: "Actions" menu.
- Serials -> Subscription search results: In the "Open" tab, the
secondary menu on the "Serial receive" button on each subscription. In
the "Closed" tab, the "Actions" menu.
- Acquistions -> Suggestions: The secondary menu on each title's
"Edit" button.
- Tools -> HTML customizations: The secondary menu on the "New
entry" button; The secondary menu on each entry's
"Edit" button; Edit entry -> The secondary menu on the "Save" button.
- Cataloging -> Stock rotation: The "Manage" menu on each rota.
A non-menu change:
- Patrons -> Patron details -> More -> Set permissions: CSS has been
added to correctly align the "Filter" menu.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b6c04435c5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4fb4b7527e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
- Apply the patch and enable the CurbsidePickup system preference if
necessary.
- Properly testing requires testing data. You can run this command to
REPLACE your curbside pickup data with sample data:
bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh)
- Go to Circulation -> Curbside pickups.
- Confirm that the tabs look correct. The first tab should be active
by default.
- Confirm that the right content is displayed when you click each tab.
- Under the "Schedule pickup" tab, search for a patron.
- After you submit the search the page should reload and the "Schedule
pickup" tab should be open.
- Go on each tab and try each button to verify you're staying on the
same tab.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ffb344c580)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The tabs on Circulation -> Curbside pickups look broken because they
were not updated to use the tab WRAPPER markup. This patch revises the
template so that the tabs look correct and makes additional changes to
ensure that the correct tab is preselected.
To test:
- Apply the patch and enable the CurbsidePickup system preference if
necessary.
- Properly testing requires testing data. You can run this command to
REPLACE your curbside pickup data with sample data:
bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh)
- Go to Circulation -> Curbside pickups.
- Confirm that the tabs look correct. The first tab should be active
by default.
- Confirm that the right content is displayed when you click each tab.
- Under the "Schedule pickup" tab, search for a patron.
- After you submit the search the page should reload and the "Schedule
pickup" tab should be open.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1311b8c01c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Fix last columns of tables to be printed in `bold`. This affects
various functions of Koha e.g. Notices and Slips, Pages etc.
1. Go to `Home / Tools / Additional content / Pages`
2. Select `Add new entry using text editor`
3. Add the following html
```html
<table>
<tbody>
<tr>
<td>col 11</td>
<td>col 12</td>
</tr>
<tr>
<td>col 21</td>
<td>col 22</td>
</tr>
</tbody>
</table>
```
4. Save
5. Use the `Staff`-URL from `Additional content: Pages`
to open the page in a new tab
6. Select `File / Print`
(or fire up the dev console via F12 and apply the Print-css)
7. The entries `col 12` and `col 22` appear in bold face.
8. Apply the patch
9. Reload the page
10. The entries `col 12` and `col 22` appear in normal font.
Sponsored-by: Deutsches Elektronen-Synchrotron DESY, Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ec0ced1652)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Find or create an item belonging to a library other than the
logged-in library
2. Check the item in and print slip
--> The transfer slip says "Transfer to" but the library name is blank
3. Apply patch and restart_all
4. Cancel the transfer or find a different item
5. Check the item in and print slip
--> The library name now appears on the slip
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4ee3accfb3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds configuration options to the Point of sale "Transactions
to date" and "Older transactions" tables so that they don't appear to be
sortable. Both have an option that makes their sorting fixed.
To test, apply the patch and go to Point of Sale.
- Enable 'EnablePointOfSale' and 'UseCashRegisters' system preferences.
- Add a least one cash register (Administration -> Cash registers).
- Add a least one debit type (Administration -> Debit types). Check "Can
be sold."
- Go to the Point of Sale page.
- Under "Items for purchase" click "Add" next to an item.
- Under "Collect payment," fill out the form, including the cash
register selection, and submit.
- Click "Transaction history for..." in the sidebar menu. (You may have
to click "Cash summary for..." and then the name of the register you
used in your transaction.
- Check that the "Transactions to date" and "Older transactions"
tables do not have sorting indicators in the table headers.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit eaeb05b5e1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This fixes the labels used for the type options when configuring
Elasticsearch search fields so that they use:
- sentence case
- the full name, instead of abbreviations (to make it clearer
for translators)
Test plan:
1. Go to Administration > Catalog > Search engine
configuration (Elasticsearch).
2. In the search fields tab, select the type column dropdown list
for any field. Note the labels used for these options:
- <empty entry> (the default option)
- Std. Number
- Call Number
3. Apply the patch.
4. Refresh the page.
5. Repeat step 2 and note that the option labels are now:
- Default (instead of being blank)
- Identfier (instead of Std. Number)
- Call number (instead of Call Number)
6. Sign off D:
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f549427e3d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The logic of the title tag construction should not result in a caret
preceding the first element on the Additional fields main page.
To test, apply the patch and go to Administration -> Additional fields.
There should be no caret appearing at the start of the page title
information:
Additional fields > Administration > Koha
Other pages (listing additional fields, adding additional fields, etc)
should have the correct title, e.g.
New field > Table 'aqbasket' > Additional fields > Administration > Koha
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ca170081b8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adjusts the markup and CSS of the self checkout login screen
so that form layout is consistent and readable. I have adjusted the
template conditional so that it re-uses more form elements like
<legend>.
To test, apply the patch and enable WebBasedSelfCheck if necessary.
- Set the SelfCheckoutByLogin system preference to 'cardnumber'
- Go to the self-checkout page (/cgi-bin/koha/sco/sco-main.pl)
- The login form should be labeled "Log in to your account" followed
by the label, form field, and submit button arranged vertically.
- Set the SelfCheckoutByLogin preference to "username and password"
- Reload the self-checkout page. The form should look the same with the
addition of the password field.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4d67788ad1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The remote branch for bug 13618 started out when OPAC authority search did its
own pagination in a template block, then bug 2735 replaced that with
pagination_bar, the template var passed from the script, then at some point
before bug 13618 landed the second time, a rebase error put the template block
back in. And since it's not at all obvious it is dead code unless you look for
where "pagination" rather than "pagination_bar" is used, we've kept updating
it, and bug 36032 thought the way it used >> instead of > for next ought to be
fixed while one that was actually used was fixed.
Time to get rid of it, before we 'fix' it again.
Test plan:
1. Without the patch, in the OPAC go to Authority Search and do a search that
will return pages of results, like the letter a
2. Note that the button for the next page uses ">" rather than the "Next >>"
in the block this patch removes
3. Apply patch, click the browser Back button, refresh page
4. Verify that when you search for something that returns more than one
page of results, the page navigation hasn't changed from what it was
before the patch, telling you that what the patch removes was unused
Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8c9fd0f5d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This corrects the display of the "Log not enabled" message for the
authentication module in the log viewer.
If either AuthFailureLog or AuthSuccessLog system preferences are
set to "Don't log":
- the "Log not enabled" warning icon is now shown
- clicking the triangle icon now links to the two system
preferences
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 86e8835da0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Typo in system preference 'AuthScuccessLog' -> 'AuthSuccessLog'.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2f5c51383a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Typo in system preference 'minPasswordPreference' -> 'minPasswordLength'
in opac/opac-password-recovery.pl
There is no 'minPasswordPreference' system preference in database.
Bug 23816 added the capability to override minPasswordLength.
Test plan:
==========
1. Check 'minPasswordPreference' appearances:
git grep -i 'minPasswordPreference' **/*
--> Note: only one in opac-password-recovery.pl; no one in sysprefs.sql
2. Apply the patch.
3. Repeat p. 1. Note there is not 'minPasswordPreference' at all.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b8db36d2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Create a list in the staff interface
2. Go to lists
3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up
4. Create another list
5. Go to lists and view the list detail
6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up
7. Apply patch
8. Try step 1 through 3 again
9. "Delete" button in "actions" column has the same confirmation dialog, and delete function works
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0a5591bdaa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Reorder logic slightly for each to only create the counter_file after the mock_userenv has taken place
prove t/db_dependent/api/v1/erm_custom_reports.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1e7c49ab98)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/ERM/EUsage/CounterFile.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidy (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a297c42394)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The ud_provider->{report_type} is only defined on ->harvest_sushi, meaning it'll never be defined here.
We don't need this anyway. The filename should be the filename of the file being manually uploaded. We only need this concat logic for COUNTER files being generated by Koha following a SUSHI harvest, and that works.
This also gets rid of a warning when running the tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0231911c98)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidy (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c3e8b9b851)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Improve messages clarity.
Show success message if no schema diff was found from audit.
Code refactor to ensure the title+message shown in UI is the same as the one shown in CLI and are all translatable.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7834d25fb4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 42c1e109af)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the module as suggested by David to handle just the
diff code and leaves the display logic up to the templates and script.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: JesseM <jesse@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 534fba2691)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: JesseM <jesse@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6940167048)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan #1 ensure same script functionality (same as bug 34064):
0. Apply patch
1. vi ./installer/data/mysql/kohastructure.sql
2. Comment out some columns, change NULL status, or whatever you like
3. perl misc/maintenance/audit_database.pl \
--filename /kohadevbox/koha/installer/data/mysql/kohastructure.sql
4. Note that the output includes SQL commands to change the database
to match the new kohastructure.sql
5a. Try using koha-foreach and note that the database name appears above
the database comparison
5b. koha-foreach "perl misc/maintenance/audit_database.pl \
--filename /kohadevbox/koha/installer/data/mysql/kohastructure.sql"
Test plan #2:
1. After doing test plan #1, access the new 'database audit' tab, visit:
<staff_url>/cgi-bin/koha/about.pl?tab=database
2. Ensure the output is the same as test plan #1
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: JesseM <jesse@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 09bb85409d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2350a2ada8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9b7dcb46ea)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3fe252f6a8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d2a6915010)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 125d8ec1cf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Try editing some items with a empty value in the flatpickr.
2. Make sure the empty date fields get a date set to today when you click on the empty field.
3. Try a datetime field, making sure the datetime is correctly set.
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0d5bd311d4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b2f317a767)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d32218fb68)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f049a13ef8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. APPLY PATCH, restart_all
2. Pick a framework, I choose BKS in k-t-d
3. Make sure that a few date and datetime fields are exposed in the editor.
4. On additem.tt a date picker should be instantiated on the date or datetime fields.
5. Make sure the date pickers work on each field.
6. If it is a datetime field you should have the option to add hours and minutes. ( datelastseen )
7. Edit the framework and remove the dateaccessioned.pl plugin from any of these date fields.
8. Even without the dateaccessioned.pl plugin a date picker should be present on the field.
9. Add the dateaccessioned.pl plugin to a non date/datetime field.
10. Make sure the dateaccessioned.pl plugin works properly on the non date/datetime field.
11. Mark one of the date/datetime fields as mandatory, make sure it still acts as mandatory.
12. Hide date/datetime from the editor, make sure it hides properly.
+----------------------+-------------+
| COLUMN_NAME | COLUMN_TYPE |
+----------------------+-------------+
| dateaccessioned | date |
| replacementpricedate | date |
| datelastborrowed | date |
| datelastseen | datetime |
| onloan | date |
+----------------------+-------------+
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit aa4ee79f6e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
$ prove t/db_dependent/api/v1/erm_counter_logs.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 15803e4f29)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
A search turned up more of these in other files. Fixed as well.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3b86455e02)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We don't need those 2 lines
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d6af90d76)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
k-t-d, from /kohadevbox/koha, run:
yarn run cypress run --spec "./t/cypress/integration/ERM/DataProviders_spec.ts"
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7faa42505f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
For consistency, and to avoid 'null koha' for a file imported by
the koha user (no first name).
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f70a5ffc67)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7b75586ead)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit da475321a5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob
Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 062e04c9c3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
C4::Heading::preferred_authorities seems to be not used for ages (maybe
never used?)
Test plan:
$ git grep preferred_authorities
--> should return nothing
Sponsored-by: Ignatianum University in Cracow
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>
(cherry picked from commit 7c70b09dfc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f42df40680)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
(cherry picked from commit 2b0286889d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
(cherry picked from commit 4012f805b6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Before applying patches, visit the additional fields admin page:
<staff_url>/cgi-bin/koha/admin/additional-fields.pl
2) Notice the tables are not grouped by module, and not alphabetically sorted
3) Apply patches. Refresh
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>
(cherry picked from commit 6a0c475bc5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Trivial leftover house-keeping from bug 35581.
Test plan:
$ prove t/db_dependent/Koha/ILL/*
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>
(cherry picked from commit b26b7d740f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Resolve (when running ArticleRequests.t):
Exception 'Koha::Exceptions::Account::IsNotDebit' thrown 'Account line 326 is not a debit'
This occurs after switching from ArticleRequest->new to TestBuilder.
TestBuilder creates an account line that has a credit_type_code and
a debit_type_code. (This could be fixed further somewhere else.)
For now, just setting debit_id to NULL.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
C4::Context->multivalue_preference is not used so far and split on |
However the values of "multiple" sysprefs are separated by... comma!
Let support both here.
This patch also removes silly JS code in the template.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Add article request with format via OPAC.
Run t/db_dependent/Koha/ArticleRequest.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tests in t/db_dependent/Koha/ArticleRequest.t pass. I can add an
article request with a type. If I allow PHOTOCOPY but change the
HTML in the OPAC form so SCAN is submitted I get a nice (but
somewhat generic) error.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change improves the validation of the report ID passed by the user.
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Create a SQL report
3. Go to /cgi-bin/koha/tools/scheduler.pl
4. Add in a Time, Date, and Email
5. Choose your report from the list
6. Click "Save"
7. Note that your report is saved
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds CSRF protection to patron list deletions.
Also changed: The "Delete selected lists" button is now in a floating
toolbar.
To test, apply the patch and go to Tools -> Patron lists.
- If necessary, create a few patron lists.
- Test the two methods for list deletion available on the page:
- Check one or more checkboxes and then click the "Delete selected
lists" at the top of the page.
- Click the "Actions" button for an individual list and choose "Delete
list."
- Open the checkout page for a patron.
- Under the "Patron lists" tab, add the patron to a list.
- Click the "Actions" button for an that list and choose "Delete
list."
- When you are taken to the patron lists page the list should have
been deleted.
- Perform the same test on the patron details page.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change replaces single quotes with double quotes to prevent XSS
for particular operations on the circ returns page.
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/circ/returns.pl?print_slip=1&reserve_id=1
2. Note that a pring slip is generated
(you may need to allow popups)
3. To test the XSS is patched, try the proof-of-concept from the
bug report
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change adds a Template::Toolkit filter which is invoked
via " | scrub_html type => 'note' ".
Test plan:
0. Apply the patch
1. prove t/Koha/Plugins/HtmlScrubber.t
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
acqui/booksellers.tt and admin/currency.tt use | $HtmlTags without first
filtering the string they wrap.
Test plan:
1. Without the patch, load the URL in comment 1, note the alert()
2. Apply patch, load the URL in comment 1, no alert()
Sponsored-by: Chetco Community Public Library
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan, works as advertised.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the following scripts use the new method for checking
suppression:
* opac/opac-ISBDdetail.pl
* opac/opac-MARCdetail.pl
* opac/opac-detail.pl
In the `opac-detail.pl` case, it is a simple change by removing MARC
data traversal in favor of the new method. The code checking
suppression gets moved up so we don't process or make any other
calculations if the record is suppressed.
The other two scripts where completely missing the check and thus
leaking suppressed records.
To test:
1. Pick two records, one marked as suppressed, and the other not
suppressed.
2. Try acessing them in the OPAC detail page.
=> SUCCESS: Suppressed records are suppressed, and not suppressed ones
are not.
3. Try the same records on the ISBD and MARC view
=> FAIL: They are not suppressed!
4. Apply this patch
5. Repeat 2
=> SUCCESS: Suppression is still respected
6. Repeat 3
=> SUCCESS: Suppression is respected on the ISBD and MARC views
7. Sign off :-D
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Remember to activate OPAC suppression with
OpacSuppression.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a convenient method at the Koha::Biblio level, as a
wrapper for the extrator added on this bug. Following the established
pattern we adopted a while back.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass! All use cases covered!
3. Sign off :-D
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds an extractor method for the historically hardcoded field
942$n. This way we have a single place in which we code the extraction
and sanitization of its value.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t
=> SUCCESS: Tests pass! All use cases are covered!
3. Sign off :-D
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Combining three regexes into one. Typo replcing.
Adding a test with pipe in pwd.
Test plan:
Run t/SIP/Sip.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Koha's SIP2 server does a lot of logging, including all incoming
requests, in full. This means that passwords are logged, both for
the user the SIP2 client uses for logging into Koha, as well as
for the end users who provide a password to e.g. check something
out. This patch replaces passwords with three asterisks in
log strings, before they are written to the log.
To test, in ktd:
- Run the new tests:
$ prove t/db_dependent/SIP/Sip.t
- Tail the SIP2 logs:
$ sudo tail -f /var/log/koha/kohadev/sip*.log
- Telnet into the SIP2 server:
$ telnet localhost 6001
- Try logging in by pasting this into the telnet session:
"9300CNterm1|COmypassword|CPCPL|"
- Verify that "mypassword" is replaced by "***" in the logs
- Try different values for the password, including the correct password
which is "term1" in ktd
- Try other SIP2 messages that include password fields (AC, AD, CO)
Update 2024-12-03: Fix issues pointed out by QA.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
For use_rfc3986() to work, we need at least Template::Toolkit 2.27.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change invokes Template::Filters->use_rfc3986 in the C4::Template
module.
Test plan:
0. Apply the patch
1. Note that "uri" and "url" filters now escape single quotes
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
...and allow-guarantor functionality. Replaced by $c->auth->public($patron_id)
and/or $c->auth->public_guarantor($patron_id), where $patron_id is the patron's
id that owns the requested resource.
Old method, was applicable to both privileged and public routes:
api/v1/swagger/paths/route.yaml
x-koha-authorization:
allow-owner: true
allow-guarantor: true
New method, use public routes with no x-koha-authorization:
GET /public/route/{patron_id}
Koha/REST/V1/Controller#public_action:
sub public_action {
my $c = shift->openapi->valid_input or return;
my $patron_id = $c->param( 'patron_id' );
try {
# Throws an exception that will render a response of 401 if not
# authenticated and 403 if trying to access another user's resources
$c->auth->public($patron_id); #or $c->auth->public_guarantor($patron_id)
...
# other code
...
}
catch {
$c->unhandled_exception($_);
}
}
Another example of retrieving $patron_id when patron_id is not a request
parameter:
GET /public/another/object/{another_object_id}
my $patron_id = Another::Object->find($another_object_id)->borrowernumber;
try {
# 403 if $another_object_id does not belong to API user
$c->auth->public($patron_id);
...
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. prove t/db_dependent/api/v1/article_requests.t
2. Apply patch
3. prove t/db_dependent/api/v1/article_requests.t
Observe success in both cases.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. prove t/db_dependent/api/v1/checkouts.t
2. Apply patch
3. prove t/db_dependent/api/v1/checkouts.t
Observe success in both cases.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. prove t/db_dependent/api/v1/patrons.t
2. Apply patch
3. prove t/db_dependent/api/v1/patrons.t
Observe success in both cases.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. prove t/db_dependent/api/v1/checkouts.t
2. Apply patch
3. prove t/db_dependent/api/v1/checkouts.t
Observe success in both cases.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. prove t/db_dependent/api/v1/patrons_password.t
2. Apply patch
3. prove t/db_dependent/api/v1/patrons_password.t
Observe success in both cases.
https://bugs.koha-community.org/show_bug.cgi?id=28907
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. prove t/db_dependent/Koha/REST/Plugin/Auth/PublicRoutes.t
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. perl -c Koha/REST/Plugin/Exceptions.pm
2. perl -c Koha/Exceptions/REST.pm
More tests coming in following patches.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
The new test fails without this patch, and passes
when it is applied.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added a shebang line.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1) Create multiple patron clubs
2) Find a bib
3) Click Holds, then Clubs
4) Without entering any text, press the search button
5) Note that the list of clubs is not shown.
6) Apply patch and restart_all
7) Press the search button again, the entire list of clubs should be shown.
8) Ensure original search functionality still works
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 375b3e6cbf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Rather than add a style to a whole table row I think we should use BS5's
badge classes to style debug mode and default configuration information.
To test you should have at least one SMTP server set as default and at
least one with debug mode turned on.
Go to Administration -> SMTP servers and view the table of SMTP servers.
Any server with debug mode turned on should show "On" styled as a yellow
badge with black text. A server set as default should show "Default"
styled as a green badge with white text.
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8145d526e9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes some structural and style changes to the SMTP servers
page to show information in a way that doesn't imply that the user has
to take action on it.
I also added an "Edit" link to the "current default configuration"
information section so that users wouldn't have to search through the
list of servers to find the right edit link..
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
- Go to Administration -> SMTP servers.
- If necessary, add multiple SMTP servers:
- One in debug mode
- One which isn't in debug mode
- One which is the default
- Confirm that the list of SMTP servers looks good and that it's still
easy to tell which servers are in debug mode and which is the default.
- Confirm that the new "Edit" link in that area works correctly.
- Confirm that the display of the current default configuration looks
good.
- Test how this information looks when editing an existing server.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6babf9371e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This follow-up patch adds a bool type to modborrowers, so that the
options can be translated within the template files.
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>
(cherry picked from commit 59563159be)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds protected status as a batch borrower modification
option, if the user performing the modification is a superlibrarian.
TO TEST:
a) login as a superlibrarian
b) attempt to batch modify these k.t.d user barcodes:
1) 23529000035676
2) 23529001000463
3) 23529000050113
c) notice that there is no protected option
d) APPLY PATCH
e) repeat step b
f) notice that protected is now an option
g) set all borrowers to protected (yes)
1) notice that the status has changed, in each individual user
record
h) set all borrowers to unprotected (no)
1) notice that the status has changed, in each individual user
record
i) set the proctedted status back to yes, but also set some other
random options (e.g. city to Cork)
1) notice that the city and protected status are both updated
j) use the disabled checkbox next to protected
1) notice that this always sets the protected status to zero
k) SIGN OFF
Signed-off-by: Catrina <catrina@bywatersolutions.com>
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>
(cherry picked from commit ea156c99b8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch changes the HTML customization location group 'Staff' to
'Staff interface' to make it less ambiguous for translation.
To test:
1. Go to Tools > HTML cutomizations > New entry
2. Look at the possible locations
--> Note that there are two groups, OPAC and Staff
3. Apply patch
4. Refresh the page and open the drop-down again
--> The groupings are now called OPAC and Staff interface
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 480bb45281)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f50978c256)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4696d31441)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes some markup corrections to acqui/invoice.tt so that it
passes an HTML validity check.
- Moves incorrectly placed </td>
- Change <span> to <div> and remove invalid </br>
- Correct instances of "<th class="replacementprice"/>" (th cannot be
self-closed)
- Add id attribute to inputs to correspond to existing labels
- Change "all_fund_dropdown" markup so that it validates but still works
with the active/inactive fund display.
To test, apply the patch and go to Acquisitions -> Invoices. Perform an
invoice search which will return results. In the results click the
invoice number to view the invoice.
- Test the "show inactive" checkbox corresponding to the "Shipping fund"
dropdown. Checking and unchecking it should work correctly to show and
hide inactive funds.
- Run the page source through https://validator.w3.org and confirm that
there are no errors coming from this template.
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 79109af571)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It became apparent to me that we weren't following best practice for
working up headings levels on this page whilst reviewing this bug.
This patch updates the 'Reports dictionary' section heading to match the
other similar headings on the page from h5 to h2.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 24f86c28cd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1 - inspect the page, see lack of distinct classes on separate sets of links
2 - apply patch
3 - reload page, confirm it looks and acts the same
4 - inspect page, confirm classes for each set of links
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>
(cherry picked from commit 731a64d82a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Install at least 2 ILL backends, i.e.:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.1
2) Enable ILLModule. Create a regular 'Standard' ILL request:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Pick a type, add '42' (default koha admin user on k-t-d) to cardnumber and pick a library. Click 'Create'.
4) Look at the top toolbar buttons. Click the 'Switch provider' button. You should see 'ReprintsDesk' and 'PluginBackend', but the styling is wrong.
5) Apply patch. Repeat.
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>
(cherry picked from commit 6adf023988)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Go to your koha-conf.xml and turn plugins off: <enable_plugins>0</enable_plugins>
2. Go to Administration -> Plugins
3. The text is not correctly offset. ( Bootstrap class is col-sm-offset-3 and should be offset-sm-3 in Bootstrap 5 )
4. APPLY PATCH
5. Try again, the offset should look right.
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>
(cherry picked from commit 19d028ce77)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the template to allow cover images from plugins in the OPAC list page. It adds a data-isbn and data-title attribute to the cover images element and also moves the element below the setting of the title so that we can pass that directly.
It also adds the script call to allow the plugin method to work on the page
Test plan:
1) View the patch diff and note that the data attributes have been added correctly
2) View the patch diff and note that the <a> tag has been moved below the setting of the img_title template variable
3) View the patch diff and note that the CoverImagePlugins variable has been set correctly (compare to the intranet file detail.tt for reference if needed)
4) Confirm that no changes have been made to any elements beyond adding the data attributes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 54e393d770)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds "[% USE Koha %]" to templates which lack it. Without
this, the "Last patron" menu item doesn't work and will cause a JS error
on many pages. The patch also removes some USE entries which were
duplicates.
To test, apply the patch and test all 176 different pages to confirm
they all work correctly. I mean, maybe. Or maybe sample a few to confirm
they work?
- Go to Administration -> System preferences and enable "showLastPatron"
- If the preference was not enabled, you probably need to go to
Circulation and open a patron account for checkout so that there is a
"last patron" to show.
- Test a sampling of pages affected by this patch:
- Acquisitions -> Acquisitions home page
- Administration -> Cities and towns
- Catalog -> Item search
- Cataloging -> Label creator
- Patrons -> Patron account -> Set permissions
- Reports -> Items lost
- Serials -> Serials home page
- Tools -> Calendar
- Pages which had duplicate lines (not necessarily "USE Koha"):
- Acquisitions -> Vendor -> Receive shipments
- Administration -> Manage jobs
- Administration -> Record overlay rules
- Catalog -> Search results
- Catalog -> Bibliographic detail page -> Items
- Circulation -> Holds queue
- Patrons -> Patron detail page -> Accounting -> Transactions tab
- Serials -> Subscription details -> Create/edit routing list
- OPAC -> Search results -> Request article
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 210b93abac)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes markup and CSS for sidebar form which contain a submit
button and a clear button. The submit button is supposed to be wider
than the clear button for visual emphasis.
To test, apply the patch and rebuild the staff interface CSS.
- Go to Patrons and confirm that the sidebar filter form looks correct.
If necessary, resize your browser window to confirm that the "Search"
button expands as the page gets wider. Confirm that the clear button
works as expected.
- Perform the same tests on these pages:
- Acquisitions -> Vendor -> Receive shipments
- ILL requests
- Guided reports -> Saved reports
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit f41bc1160e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In addition to checking the referrer for the URL domain and path
we should also check the query string of the referrer to make sure
it was from a circulation fast add.
It should include frameworkcode=FA&circborrowernumber
To test:
1. From anywhere on the additem.pl page where you are adding or editing an item
2. Click on Checkout in the menu bar and enter a patron's barcode
3. When circulation.pl loads it triggers a blank issue slip to be printed
4. Apply patch and repeat steps 1-3, no slip is triggered to print
5. Go to Circulation Checkout for a patron and enter a non existing barcode like 1337
6. Click '+ Add record using fast cataloging'
7. Fill in required fields and click 'Add item'
8. Confirm the item is auto checked out
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>
(cherry picked from commit 431109830c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
js-date-format.inc already include those 2 JS files. If had them in
curbside pickups template because it was the first using dayjs.
Now it's included in js_includes.inc.
Test plan:
Configure curbside pickup for your library and go to circ/curbside_pickups.pl
Last tab, search for a patron
Without this patch you get a JS error:
Uncaught TypeError: m.tz is not a function
With this patch applied the patron autocomplete is fixed
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>
(cherry picked from commit decb8780ac)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This is in opac/opac-search.pl a call on system preference
OPACLocalCoverImagesPriority. This preference does not exists elsewhere
and dates back to Koha 3.8 from Bug 1633
This patch removes the call and fixes folding of if.
Check this returns empty : git grep OPACLocalCoverImagesPriority
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bf82831913)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes the markup of the sidebar form on the bookings to
collect page, and adds the correct "btn btn-primary" class to the submit
button.
NOTE: This patch contains indentation changes, so please ignore
whitespace when viewing the diff.
To test, apply the patch and go to Circulation -> Bookings to collect.
In the sidebar form, confirm that the submit button has the same yellow
"primary" style as other submit buttons, and that it fills the width of
the sidebar.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6219271cd0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
`git grep browserid_include.js` does not return any results, this file
does not seem to be used anywhere
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8557a5aef1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
On the OPAC search results page we're including the Chocolat image
viewer CSS after our global CSS file. This means that rules which
are intended to override the default Chocolat CSS aren't working. The
fix is to move the line which includes the Chocolat CSS.
To test, apply the patch and enable the LocalCoverImages and
OPACLocalCoverImages system preferences.
- If necessary, add a local cover image to a bibliographic record.
- Go to the OPAC and perform a search which will return multiple
record including the record with the cover image.
- Click the cover image to trigger the image viewer.
- The image viewer should not appear to be "behind" the search results
toolbar.
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 9edea9b7a3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Turn on UseRecalls
2. Set circ rules to allow for recalls ( Recalls allowed(total) and Recalls allowed(count))
3. Check something out to a patron, choose a record with multiple items on it
4. With another patron recall the item from the OPAC
5. Choose "Recall next available item"
6. Now go back to the item table and see that all items on the bib say something like: "Recalled by koha (42) on 11/21/2024"
7. APPLY PATCH
8. Do steps 3 - 6 again and now the items should correctly show as available.
9. Place a recall again but choose 'Recall a specific item'.
10. Look at the table again, it should accuretly show the recall in the status column. "recalled by koha (42) on 11/21/2024"
11. Turn off UseRecalls, make sure the table still loads properly.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 52dd7302d2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates staff interface CSS in order to improve visibility
and contrast in Bootstrap alerts and text with background classes.
Some of these changes are made via our custom _variables.scss file which
sets overrides of default Bootstrap classes. I was not able to figure
out a good way to customize the .text-bg-* classes via that method so
I've inserted those changes into staff-global.scss.
The patch also removes our custom .note class because it can be replaced
with .alert.alert-info.
To test, apply the patch and rebuild the staff interface CSS.
- Clear your browser cache if necessary.
- View places where the updated classes can be found:
- For example: Administration -> Authorized values. Click a
category which has no saved values, e.g. Asort1. There should be two
"info" classed alerts: One showing "NOTE: If you changed an
authorized value..." and one showing "There are no authorized
values..."
- Other examples of pages which are updated to use "alert alert-info"
instead of the "note" class:
- Patron search where the search is limited by permissions, e.g.
Acquisitions -> Vendor -> Basket -> Add user.
- Administration -> Search engine configuration: "Warning: Any changes
to the configuration will only take effect..."
- See also pages where a count of something uses the text-bg-info class:
- Bibliographic detail page when the record has holds
- Patron module home page when there are pending modifications
- Tools home page when there are tags or comments pending approval
- A patron checkout screen when the Claims tab is present (
BundleLostValue or ClaimReturnedLostValue prefs are set).
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit bffacd5509)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
I think the original intent was to simplify the mobile view and avoid
offering a menu that was a very small target, but those issues should be
addressed, if necessary, without compromising accessibility. This patch
removes the CSS rule which hides the breadcrumb menu when the screen is
less than 767 pixels wide.
To test, apply the patch and rebuild the OPAC CSS.
- Clear your browser cache if necessary.
- View any page in the OPAC which has a breadcrumbs menu.
- Resize your browser window until it is very narrow to confirm that the
breadcrumb menu stays visible.
Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit ce6609ff80)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When an item is checked in that should automatically return to its home
branch, AddReturn generates the appropriate transfer. In some cases, the
Print Slip button generates a second transfer, which now causes an
exception to be thrown.
In returns.pl, the op cud-dotransfer is used when a transfer was not
initiated previously and the librarian has confirmed they want to
initiate and send a transfer. The op cud-transfer is used when a
transfer has already been generated and the page needs to send or
cancel the transfer.
This patch updates the op from the modal to ensure that the correct of
the two options is generated according to whether a transfer was already
initiated or not.
To test:
1. Find or create an item that belongs to a branch other than the
logged-in branch
2. In a new tab, check in the item - this should trigger a Return to
Home transfer (keep the bib record tab open for later)
3. Click "Print Slip"
--> Internal server error - 'Active item transfer already exists'
4. Apply patch and restart_all
5. Check in item again and cancel the transfer
6. Check in item again to generate new transfer
7. Click "Print Slip"
--> Checkin page loads correctly
--> Refresh bib record and confirm item shows as in-transit
8. Enable syspref ShowAllCheckins
9. Repeat steps 5-7
--> Ensure item displays correctly in checkins table
--> Refresh bib record and confirm item still shows as in-transit
10. Repeat steps 5-7, except this time click "Yes" instead of "Print
Slip"
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
10. Set syspref TransfersBlockCirc to Don't Block, and set
AutomaticConfirmTransfer to Enable
11. Check in the item again and cancel the transfer
12. Check in the item to generate new transfer
13. Click away from the modal without selecting a response
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
14. Check out the item to a customer
15. Check the item in and click "Yes"
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
16. Repeat steps 14-15, clicking "Print Slip" instead of "Yes"
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
17. Repeat steps 14-15, clicking away from the modal without selecting a
response
--> Ensure item displays correctly in the checkins table
--> Refresh bib record and confirm item shows as in-transit
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b94b6546d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 18c3e26db4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. SuspendHoldsOpac to 'allow'
2. Make some holds for a patron
3. Log in as that patron and go to 'Summary'
4. Click the 'Holds' tab
5. No suspend column
6. APPLY PATCH, restart_all
7. Try again, the column should show.
8. Turn off SuspendHoldsOpac, the column should be hidden.
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>
(cherry picked from commit 81446a7ce7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
After the upgrade to Bootstrap 5, modals need either the block or
noblock class in order to be shown. The class was missing from the modal
that appears when an item is checked in after it is already waiting for
a hold.
To test:
1. Place a hold on an item for pickup at the logged-in branch
2. Check in the item and confirm the hold
3. Check in the item again
--> There is no notification that the item is already assigned to a
waiting hold, just a "Not checked out" message
4. Apply patch
5. Navigate away from the page (we can't simply refresh the page because
we don't want to resubmit the request just yet)
6. Check in the item again
--> A modal appears notifying of the waiting hold
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 747a60f33a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 24b50df7fb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Enable Syndetics.
2. Do a search that should turn up Syndetics. ( In k-t-d a search of 'ee' works for me. Turning up biblionumber 55 )
3. Visit the record detail page and notice the Syndetics cover loads.
4. APPLY PATCH
5. Try again, this time the Syndetics covers should load.
6. Since these are now in an include make sure Syndetics covers load on opac results, opac detail, staff results, and staff detail.
7. Try with Syndetics and other cover image services enabled.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 59d48106e9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1de253eb50)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
MARC records with over 99999 bytes are invalid by spec, and when you use
UTF-8 encoded characters in your MARC records, there is the potential
to generate fatal errors in MARC::File::USMARC when it runs
"marc_to_utf8" from "MARC::File::Encode" during its "decode" operation.
That is, if you MARC::File::USMARC->encode a MARC record
with over 99999 bytes (including a number of UTF-8 bytes), there
is the potential when you run MARC::File:USMARC->decode on that same
data that you'll generate a fatal exception.
The main patch in bug 38913 wraps the function doing the decode,
so that a bad record doesn't crash processing.
Without the patch, this unit test will fail. With the patch, this
unit test will pass.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9d41abc1e7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
After Bug 38416 Elasticsearch indexing explodes with oversized
records, especially with UTF encoded data.
In Koha::SearchEngine::Elasticsearch::marc_records_to_documents a
following snippet has been introduced:
my $usmarc_record = $record->as_usmarc();
my $decoded_usmarc_record = MARC::Record->new_from_usmarc($usmarc_record);
But if $record is oversized (> 99999 bytes), it is OK for MARC::Record
object, but not for $record->as_usmarc. The produced ISO 2709 string
is not correct and hence cannot be properly converted back to
MARC::Record object by new_from_usmarc.
The result in this case can be like:
UTF-8 "\x85" does not map to Unicode at /usr/share/perl5/MARC/File/Encode.pm line 35.
Since it is done without any eval / try, the whole reindex procedure
(for instance rebuild_elasticsearch.pl) is being randomly interrupted
with no explanation.
Test plan:
==========
Hard to reproduce. But the explanation together with discussion in Bug
38416 (from 2024-12-15) explains and justifies the need of this added
eval.
1. Have a standard KTD installation with Elasticsearch.
2. Use the provided test record - add it to Koha with
./misc/migration_tools/bulkmarcimport.pl -b -file test.xml -m=MARCXML
(have patience).
During load process you should see a message like:
UTF-8 "\xC4" does not map to Unicode at /usr/share/perl5/MARC/File/Encode.pm line 35.
3. The record should get biblionumber 439. Check in librarian interface with
http://<your_addreess>:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=439
that the record has been imported.
However, you should not be able to make a search for this record.
4. Try to reindex with:
./misc/search_tools/rebuild_elasticsearch.pl -b -bn 439
You should get a message like:
UTF-8 "\xC4" does not map to Unicode at /usr/share/perl5/MARC/File/Encode.pm line 35.
Again, no search results.
5. Apply the patch ; restart_all.
6. Repeat reindex with:
./misc/search_tools/rebuild_elasticsearch.pl -b -bn 439
There should be no warning now and you should be able to find the record.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan. Works as advertised.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c7127fabf4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the `_process_mappings()` method split the index values
in the event of them being bigger than the allowed 32766 bytes size.
To test:
1. Have KTD running with ES:
$ ktd --proxy --es7 up -d
2. Perform a search
3. Pick the first result for edition
4. Find a cool Wiki page with lots of paragraphs
5. Copy all of the paragraphs and put them on a 500$a field for the record.
6. Repeat 2
=> FAIL: The record is not found
7. Reindex manually:
$ ktd --shell
k$ perl misc/search_tools/rebuild_elasticsearch.pl --biblios --where "biblionumber=3" -v -v
=> FAIL: You get something like:
```
[22229] Committing final records...
One or more ElasticSearch errors occurred when indexing documents at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Indexer.pm line 148.
[22229] There were errors during indexing
Record #3 Document contains at least one immense term in field="note.raw" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: '[10, 109, 117, 115, 116, 97, 102, 97, 32, 102, 117, 101, 32, 101, 108, 32, 115, 101, 103, 117, 110, 100, 111, 32, 104, 105, 106, 111, 32, 100]...', original message: bytes can be at most 32766 in length; got 32771 (illegal_argument_exception) : max_bytes_length_exceeded_exception (bytes can be at most 32766 in length; got 32771)
[22229] Total 1 records indexed
```
8. Apply this patch
9. Repeat 7
=> SUCCESS: No error!
10. Repeat 2
=> SUCCESS: The record is indexed and can be found!
11. Sign off :-D
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6998f5b7e1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 41bc498298)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Column "Actions" was not translatable in itemsearch.tt. This
patch makes column translatable. This also fixes typo in this
columns id.
Test plan:
1. Change language as something else than english.
2. Navigate to "Item search" page and search for items.
=> Note that column "Actions" still reads "Actions"
3. Apply this patch.
4. Make new item search.
=> Column should now have correct 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>
(cherry picked from commit 2e9fd263f7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes a wrong condition check in `usermenu.inc` for
determining if the tab should be active.
It currently checks for `ermview`, probably a copy and paste error.
This patch adds a new `curbside_pickups_view` parameter that is passed
instead.
Note: I tidied the code block I changed, inline to avoid extra commits.
To test:
1. Enable the `CurbsidePickup` system preference
2. Log into the OPAC
=> SUCCESS: There's a 'Curbside pickups' tab
3. Click on the tab
=> SUCCESS: The 'Curbside pickups' section gets displayed
=> FAIL: The tab remains inactive
4. Apply this patch
5. Restart plack:
$ ktd --shell
k$ koha-plack --restart kohadev
6. Repeat 3
=> SUCCESS: The 'Curbside pickups' section gets displayed
=> SUCCESS: The tab is rendered as active
7. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 414f085781)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
data-referer is the url for the current search page, to redirect
back after performing the operation. Since it is a url, variables within
this link all need to use the uri filter, not html or KohaDates.
Also specify scalar context when splitting the input parameter to
prevent param in list context warnings.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0f01f2b31d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the reopen selected invoices link button to use
the form-submit.js method from bug 36246. The link needs to have a single
data-invoiceid parameter, so the js on invoices.tt creates a comma
separated list from the checkboxes.
The list of invoiceid is split into an array in invoice.pl
To test:
1. Add some invoices for a vendor using the 'receive shipments' button
2. Go to Acquisitions->Invoices
3. Select multiple invoices using the checkboxes
4. Click the 'Close selected invoices' button
5. Confirm it works
6. Go to the Closed invoices tab
7. Select multiple invoices using the checkboxes
8. Click the 'Reopen selected invoices' button
9. Confirm it works
6. Confirm reopening individual invoices from the Actions button still works
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8b038c880c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the closed selected invoices link button to use
the form-submit.js method from bug 36246. The link needs to have a single
data-invoiceid parameter, so the js on invoices.tt creates a comma
separated list from the checkboxes.
The list of invoiceid is split into an array in invoice.pl
To test:
1. Add some invoices for a vendor using the 'receive shipments' button
2. Go to Acquisitions->Invoices
3. Select multiple invoices using the checkbox
4. Click the 'Close selected invoices' button
5. Confirm it works
6. Confirm closing individual invoices from the Actions button still works
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e15d90563f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Because the mapping was defined in the wrong direction, it is not
possible to filter results in `GET /deleted/biblios` neither on the
`deleted_on` attribute, or even the fallback to DB fields when mappings
don't exist, on `timestamp`.
To test:
1. Apply the regression tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/deleted_biblios.t
=> FAIL: A 200 returns a 500 instead
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass, behavior is correct
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d59ec0baa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 51e42cde54)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the js-patron-format include to show text if the library can't be fetched due to lack of permissions.
To test:
Before applying the patch
1. Create 2 library groups
2. Give both groups the "Limit patron visibility to libraries within this group for members." attribute
3. Assign 1 library to each group.
4. Turn on ILL in the system preferences
5. Create an ILL for a patron in group 1.
6. Create a staff member for the library in group 2 with only the following permissions:
catalogue
ill
list_borrowers
7. Log in as the new staff member.
8. Observe the table never loads.
9. Apply the patch.
10. Refresh the page as the new staff member.
11. Observe the table loads and the patron says "A patron from another library"
12. Log back in as the superlibrarian and confirm you can still see the patron information.
13. Sign off
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6a839ff666)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Have multiple staff you have permissions to be a purchase suggestion
manager.
2. Make some suggestions.
3. Edit a suggestion, go down to 'Select manager'.
4. Select a new manager, notice the new one name is not populated.
5. Save the record, the manager is not changed to the new one.
6. APPLY PATCH
7. Try again steps 3-6, but this time the manager field should populate
and the new manager should be saved when you save the suggestion.
8. Go through the test plan on Bug 38183.
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>
(cherry picked from commit 2a17ad69ea)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes translatable the default patron restriction
types that come installed with Koha.
To test:
1) Search for "Manual restriction" in the translation files
`git grep "Manual restriction" misc/translator/po/fr-CA-installer.po`
--> No results
2) Apply patch
3) Update translations
`gulp po:update --lang fr-CA`
4) Repeat step 1
--> Manual restrictions (as well as the other restriction types
i.e. Overdues, Suspension, Discharge, and Notice failure
suspension) is in the .po file
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>
(cherry picked from commit d350979d6b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch simply generates a new user agent when reauthenticating when the CSRF token
for the session has expired.
To test:
1 - Edit Koha/Token.pm, line 275
from: { MaxAge => $params->{MaxAge} // ( CSRF_EXPIRY_HOURS * 3600 ) },
to: { MaxAge => $params->{MaxAge} // ( CSRF_EXPIRY_HOURS ) },
2 - This will make your CSRF tokens expire after 8 seconds
3 - vim /etc/koha/sites/kohadev/connexion.cnf
4 - Set content:
host:
port: 8888
koha:http://localhost:8081
log:/var/log/koha/kohadev/connexion.log
match:ISBN
user:kohauser
password:kohapass
overlay_action:replace
nomatch_action:create_new
item_action:always_add
import_mode:direct
framework:BKS
overlay_framework:
debug:1
5 - Save the sample file from this bug into your kohaclone (or copy and paste into a file your koha test site can reach)
6 - On the command line:
perl misc/bin/connexion_import_daemon.pl -c /etc/koha/sites/kohadev/connexion.cnf
7 - In another terminal:
cat bug_33418.test | nc -v localhost 8888
8 - Successful request
9 - Wait 10 seconds (more than 8 anyways)
10 - Repeat 7
11 - Unsuccessful request - Invalid CSRF token
12 - Ctrl+C to stop the connexion daemon
13 - Apply patch
14 - repeat 6
15 - repeat 7, success
16 - Wait more than 8 seconds
17 - repeat 7, success!
18 - repeat again until you are satisfied
19 - Sign off!
WNC amended and tidied
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>
(cherry picked from commit e758492d99)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
See commit e76c5c0145
Bug 36640: Restore previous order sequence behaviour
Test plan:
Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=1
Click on the header to modify the order, click again, then again.
It should always be asc or desc, and you should see the corresponding
arrows.
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>
(cherry picked from commit 9fe1563fa0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1 - place, capture, and revert a hold
2 - view action logs for your hold via SQL so you can see the diff column
3 - confirm reversion of waiting hold generates a MODIFY line in logs with no diff
4 - apply patch, restart_all
5 - capture and revert your hold again
6 - confirm logs include diff showing change to found and priority
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d86c662451)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Run empty patron search
2. Assuming there are enough results, when scrolling down the #searchheader with "select all" button would get hidden. But no, it's sticky so it follows you and stays visible. This is expected.
3. The table header (thead) with filters for each column is not sticky. This is a regression.
(It was sticky in 23.11, but not anymore in 24.05 and main)
4. APPLY PATCH and regenerate CSS.
5. The thead should again be sticky.
6. Test in at least Chrome and Firefox.
Notes:
-Setting top to 40px, which covers the height of the #searchheader
-To avoid border styles not working with the sticky element I am unsetting border-collapse.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 481f8ce3db)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch re-arranges the button markup slightly to properly style the
disabled 'Create EDI Order' button when there are no EAN's defined for
the library. It also moves the tooltip to the container btn-group
element to ensure the tooltip works even though the button itself is
disabled.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1c864c5df7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 186824d9a6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cc6479735c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2ce02805b3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The vendor name was missing from the breadcrumbs, this patch adds it back in
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 55d7ec38e7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In the previous patch we replace the only link to the edi_ean selection
page with a select list embedded in the page. As such, we no longer
need this page at all.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0146359332)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The edi_ean page is a slim page with a single select input for selecting
the appropriate library and ean. This patch replaces the link to that
page with a simple select in the menu on the original page instead.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7454a1d380)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Have multiple patron categories that are set to 'Can be guarantee'.
2. Go to a patron record and click '+ Add guarantee'
3. Look at how the patron category is set.
4. It defaults to the first one alphabetically, by code.
5. APPLY PATCH
6. Try steps 1 -2 again, this time you should get a dropdown to pick which category of guarantee you want.
7. Add some patron categories that can be gaurantees with library limitations. Make sure they only show for the correct libraries.
8. Set only patron category to be a gaurantee. The dropdown should now be a button.
Signed-off-by: Laura ONeil <laura@bywatersolutions.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 264887a87f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
this patch removes unneeded package dependencies
to test:
- apply patch
- build and install koha-common package, note success
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Not tested, I trust Mason to the right thing.
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>
(cherry picked from commit d5ba5c2879)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The purpose of no block checkouts in SIP is to indicate that the SIP machine has made an offline ( "store and forward" ) transaction.
The patron already has the item. As such, the item must be checked out to the patron or the library risks losing the item do to lack of tracking.
As such, no block checkouts should not be blocked under any circumstances.
The sub C4::SIP::ILS::Transaction::Checkout::do_checkout already honors this, but it is wrapped by
C4::SIP::ILS::checkout which has additional checks that do not.
Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/SIP/Transaction.t will fail
3) Apply the second patch
4) prove t/db_dependent/SIP/Transaction.t will pass!
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>
(cherry picked from commit 4d40fd7ab9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
(cherry picked from commit 87cc6a9cc8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When OPAC login is disabled (system preference opacuserlogin),
the modal login should not exist in HTML.
Note the access to opac-user.pl shows a message and not auth form.
You may look at commit with : git diff --ignore-space-change
Test plan :
1.1) Set system preference opacuserlogin to "Allow"
1.2) Go to OPAC main page
1.3) Check you see in source : div id="loginModal"
1.4) Click on "Log in to your account"
1.5) Check you see the modal login
2.1) Set system preference opacuserlogin to "Don't allow"
2.2) Go to OPAC main page
2.3) Check you do not see in source : div id="loginModal"
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a045ac1e96)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
_("This %s is picked").format(foo)
_("This %s is NOT picked".format(bar))
Both constructs are valid, but our translation script does not pick the
second one.
I found very few occurrences (using `git grep '.".format('`) that are
displayed on the UI. I don't have the time right now to deep dive into
the translation script to fix this problem, easier to adjust the
occurrences.
How to prevent that in the future however? We could raise a warning from
the QA script.
Test plan:
Do not apply this patch
Generate the strings (`gulp po:update --lang LANG`)
cd misc/translator/po && git commit -a -m"wip"
Apply this patch, regenerate the strings
cd misc/translator/po && git diff
Notice the changes, you should see new translations added to the .po
files.
Ideally translate them, install the templates and confirm that the new
strings are translated on the UI.
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>
(cherry picked from commit be6ebd4b9a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When we go to installer/install.pl and there is nothing to do we get a "Try again" button and never manage to finish the update.
https://snipboard.io/TplscJ.jpg
Test plan:
Go to installer/install.pl
Login
Click next
=> Without this patch you are stuck with a "Try again" button
=> With this patch applied you get a success screen
"Everything went okay. Update done."
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 75d9a38805)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch moves the logic up one level into the confirmModal function
to prevent future regressions
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>
(cherry picked from commit 1fc336d6bd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Templates that use confirmModal to show a pretty confirm() need to
remove the modal in their callback function, or they are at risk of
having the first callback called for subsequent calls that think they
will get their own callback called. opac-user.tt is already fixed,
opac-shelves.tt is currently affected, and opace-suggestions.tt,
opac-tags.tt, and sco/sco-main.tt are at risk of being affected if
anyone adds another confirmModal caller.
Test plan:
1. Without the patch, open the OPAC, log in, search for something that
will return several results
2. Select all - Add to list - New list
3. Lists - {your list name}
4. Click the checkboxes for the first two items
5. Instead of clicking Remove from list, accidentally click Delete list
6. In the confirmation popup, realize it was a mistake and click No, do
not delete
7. Click Remove from list
8. Poof, your whole list is gone
9. Apply patch
10. Repeat steps 1-7, but instead of the whole list being deleted, see
that only the selected two items were removed
11. Now intentionally click Delete list and click Yes, delete, you'll
see that it is deleted rather than getting a message about nothing
being removed like you would have gotten without the patch if you
started by removing an item
12. On any bib detail page, click Add tag(s) and add one
13. Your account - Tags, check the checkbox for the tag, Remove selected
tags, Yes, delete tag and verify that it was deleted
14. Purchase suggestions - New purchase suggestion, fill in a title and
submit your suggestion, click the checkbox for your suggestion,
Delete selected, Yes, delete suggestion and verify it was deleted
15. In the staff interface, find and copy the barcode for any item that can
be checked out, then go to /cgi-bin/koha/sco/sco-main.pl with the
OPAC hostname and port, not the staff, and log in
16. Paste the barcode in the input, click Submit, then click Finish, and
in the confirmation popup click Print recept and end session, and
verify that it tries to print
Sponsored-by: Chetco Community Public Library
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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>
(cherry picked from commit 6b470caa92)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
HTML customizations and news will not display without a publication
date, so we should make it required. This patch adds client-side
validation of the field to check that it's filled.
To test, apply the patch and go to Tools -> News (or HTML
customizations, or Pages).
- Click "New entry"
- Try to submit this new entry without entering a publication date.
- You should be prevented from submitting the form.
- Fill in the publication date and confirm that the form submits
correctly.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1b1e96a17c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects the OPAC search results template so that cover
images will be added on more than just the first page of results.
To test, apply the patch and enable a cover image system preference e.g.
OPACAmazonCoverImages. Perform a search in the OPAC which will return
multiple pages of results. Page through several pages of results to
confirm that cover images appear on each page.
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 57a068ca6f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
801 should not be mandatory except in data exchange context (IFLA Manual)
In UNIMARC several subfields are mandatory only if the field is used.
This possibility is not available in MAR21, and Koha is currently not
able to manage this information in a useful way : it blocks the
validation of a record if the mandatory subfield is void, regardless
of the mandatory status of the field.
In consequence those subfields must be declared non mandatory in default framework.
Test plan:
1/ Open a UNIMARC Koha without patch. Try to create a record with
minimal information : 200$a and 100$a. A lot a alerts are displayed,
preventing Koha to add the record
2/ Apply the patch
3/ Run reset_all or restart KTD (to remake a fresh koha from scratch)
4/ Try to create a record with minimal information : 200$a and a 100$a.
There should only be 2 alerts, regarding 099$t and 942$c field.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 30a1c4bb45)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch reverses the bootstrap 5 find and replace for the 'message'
class.
In this file the message class didn't refer to the bootstrap themeing
but rather is used for applying `page-break-after: always` to these
elements.
Test plan
1) Line up some print notices
2) Run gather_print_notices.pl with html file output
3) Open the output file
4) Print the page to invoke the page break css
5) Note that with the patch each notice is on it's own page, without the
patch all the notices run one after the other on the same page.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5089f6672a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Create an item give it a barcode like 'abc123';
2. Try creating a 2nd item with a barcode: 'ABC123', you get an error 'Error saving item: Barcode must be unique.'
3. Checkin the item 'ABC123', the 'abc123' item successfully checks in.
4. The case doesn't seem to matter elsewhere in Koha ( check-in, checkout, searching, batch tools )
5. Try the inventory tool and use 'ABC123'. The barcode is not found.
6. APPLY PATCH, restart_all
7. Try the inventory tool again with both 'abc123' and 'ABC123', they should now both work.
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>
(cherry picked from commit 70ea004f02)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change adds some double quotes where quotes were missing,
and replaces single quotes with double quotes, which prevents XSS.
Test plan:
0. Apply the patch
1. Create a subscription
2. Using the ID from the subscription, go to this page:
http://localhost:8081/cgi-bin/koha/serials/subscription-detail.pl?
print_routing_list_issue=1&subscriptionid=<SUBSCRIPTIONID>
3. Note that you're able to generate a print slip
(You may need to allow popups)
4. To check the security vulnerability is fixed, try the proof-of-concepts
attached to the bug report
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change adds double quotes to some template strings where
quotes are missing all together or single quotes are used incorrectly.
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
2. Click on "Gairm"
3. Use the search result navigation box to go to the next result
On the left of the page. Just bellow the breadcrumb and
left of the record title.
4. Note that everything loads correctly
5. To test that the security hole has been fixed, try some of the
proof-of-concept attacks provided for biblionumber and searchid
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change prevents CSV Formula injection on DataTables exports
by escaping formula with a single quote prefix as per OWASP recommendations.
Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/members/memberentry.pl
?op=edit_form&destination=circ&borrowernumber=51
2. Add the following in a "Circulation note"
=SUM(1+1)
3. Go to http://localhost:8081/cgi-bin/koha/members/member.pl
?quicksearch=1&circsearch=1&searchmember=koha
4. Click "Export" and choose "Excel" and "CSV"
5. Open those downloaded files in Excel
6. Note that the =SUM(1+1) function is prefixed with a single quote,
and is not automatically executed
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. The problematic "cell" is exported as "'=SUM(1+1)".
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Run t/db_dependent/Letters.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit b2f3f8b6ea4ae63d762dc51274a2b2c4065acdf0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Try things like [% borrower.dateexpiry.strftime('%d-%m-%y') %] in
a notice. Also test datetime fields like borrower.lastseen.
Add locale support with strftime('%d %B', 'nl_NL') etc.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9a2042c3e9cb975273e6c17e111b4baeb5278006)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1a4820322e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the sample_date, as used in koha-testing-docker, with
the new preferred_name field.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a5e3b45019)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the sample_date, as used in koha-testing-docker, with
the new preferred_name field.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a5e3b45019)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes code intended to include the hc-sticky js library.
hc-sticky is not longer included in Koha.
To test, apply the patch and make sure the TagsEnabled system preference
is turned on.
Log in to the OPAC and go to the tags page. Everything should work
correctly. There should be no errors in the developer console.
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>
(cherry picked from commit 4cb222217f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Dates were incorrectly handled during the first days of the month because of
the use of non-zero-padded days values.
(t/db_dependent/Koha/OAIHarvester.t failed)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 73fbdbb1f8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If one has multiple databases in use adding columns
bookings.creation_date and bookings.modification_date is added
just to first updated database and skipped in other updates.
This happens because we check if these columns already exist
in database from information_schema. We should instead make
this check with method column_exists.
To test:
1. Apply this patch.
3. Drop columns bookings.creation_date and bookings.modification_date:
ALTER TABLE bookings DROP COLUMN creation_date;
ALTER TABLE bookings DROP COLUMN modification_date;
2. Revert your database back to version 24.0600028:
UPDATE systempreferences SET value = "24.0600014" WHERE variable = "version";
3. Run updatedatabase.pl.
=> Check that columns were added.
If you happen to have two databases:
1. Check if you have columns in your bookings table:
SELECT DISTINCT TABLE_SCHEMA, TABLE_NAME FROM
INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN
('creation_date', 'modification_date');
=> Note that columns exist only in one of the databases.
2. Make sure you're using database missing columns
from booking table.
3. Apply this patch.
4. Revert back to version 24.0600028.
5. Run updatedatabase.pl
=> Check that columns were now added to database.
Sponsored-by: Koha-Suomi Oy
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>
(cherry picked from commit a84195d7da)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Problem highlighted by bug 38436. There is a JS error on some views
with tables at the OPAC.
Uncaught TypeError: table_settings.columns is undefined
Test plan:
Go to the 3 views modified by this patch and confirm that the JS error
in the console is gone when this patch is applied.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4733ca89a6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This is no longer used, and should not.
Test plan:
git grep TablesSettings.GetColumns
should not return any results
git grep GetColumns
should not return results related to this method
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 827126e316)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We are passing the columns settings, but KohaTable is expecting the
table settings.
Test plan:
Hide some columns for the course reserves table at the OPAC
Define a course, add 1+ items
Go to the OPAC, "Course reserves"
Notice that with this patch the columns are correctly hidden by default.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 41c718382c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
rowGroup plugin is now part of the datatables.min.js bundle. We no
longer need to include its css and js files, and they no longer exist
anyway!
[2024/11/27 08:52:37] [WARN] File not found : lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css at /kohadevbox/koha/Koha/Template/Plugin/Asset.pm line 107
[2024/11/27 08:52:37] [WARN] File not found : lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js at /kohadevbox/koha/Koha/Template/Plugin/Asset.pm line 84.
Test plan:
Confirm that the checkouts are grouped "today" and "previous" on the
checkout page.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b82e00416)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the JavaScript on the patrons requesting modification
page in order to make it work following the upgrade to Bootstrap 5. The
automatic panel expansion is broken.
To test, apply the patch and enable, if necessary, the OPACPatronDetails
system preference.
- Log in to the OPAC and submit changes to your personal details.
- Do this again as a different user so that there is more than one
pending request.
- From the staff interface home page, follow the link for "Patrons
requesting modifications"
- Upon loading, the "Update patron records" page should automatically
expand the first panel.
- Locate the patron record for the second of the patrons you requested
updates for.
- From that patron's detail page, follow the "Review pending
modifications" link.
- The panel containing that patron's information should expand by
default.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a42686d891)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 855638123e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 73c7acd33f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
to test:
1- try to save an agreement with 81+ characters in License Info
2- it does not save
3- apply patch, updatedatabase
4- repeat 1, it works!
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2512392b2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
So that we can open in a separate bug using right click.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d53784de3a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Download the file attached to this bug and save it as a .txt file
2) In the ERM module, create a local package
3) Go to the local titles page and click Import from KBART file
4) Select your package and the saved file and click import
5) The import will fail with just a console error
6) Apply patch and run a restart_all and a yarn js:build
7) Repeat step 4, it should now display an error saying the file must be either TSV or CSV
8) Convert the file to either of those two formats and repeat step 4
9) The file should now import successfully, with a message saying that there is an additional column "bestppn" that will not be imported
Signed-off-by: msaby <mathsabypro@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 68be4dd747)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test from the OPAC:
1 - create a list with more than 10 items
2 - print the list -> there is a pagination and that only 10 items
are printed
3 - Apply patch
4 - print the list again -> every items are being printed
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied: added a few spaces.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8d0e7ff906)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7c6c3e8f9c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The cause was erroneous check `[% IF bundlesEnabled %]` before the parent bundle information is requested+shown. The `bundlesEnabled` variable checks if the current biblio ITSELF is of collection type, so should only be used for whether to show the button to add new items to the bundle items, NOT for querying whether current item is part of a bundle, as the items that make up the bundle aren't of collection type themselves.
The second fixed problem was that `bundle_host` didn't contain `.biblio` subitem (which'd contain the actual host biblio title) as the JavaScript code assumed, and it wasn't possible to request it with the API either.
Test plan: please follow the reproduction instructions from bug and ensure that the described issue is gone.
If you run into an error 400 on the detail page, you need to refresh API definitions, in kts shell you'drun:
redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json
koha-plack --restart kohadev
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7df4eda9ec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The database columns for liblibrarian and libopac in marc_tag_structure and
marc_subfield_structure are 255 characters, but the HTML maxlength in
/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt and
/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt
limit tags to 100 characters and subfields to 80 characters.
Test plan:
1. Apply patch, restart_all
2. Administration - MARC bibliographic framework - for Default, Actions -
MARC Structure
3. For the 000 tag, Actions - Edit tag
4. In both the "Description in staff interface" and "Description in OPAC"
paste the 255 character string
1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 12
and click Save changes
5. Verify that the display shows all 255 characters, then Actions - Edit tag
and verify that the two inputs reloaded with all 255 characters, and that
you cannot type a 256th character, then click Cancel
6. For the 000 tag, Actions - Edit subfields
7. Paste the same string in both the staff interface and OPAC inputs, Save
changes, verify that all 255 characters show, click Edit subfields, verify
that all 255 characters reloaded in the inputs, verify that you cannot
type a 256th character
Sponsored-by: Chetco Community Public Library
Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a9044f4b34)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7c6c3e8f9c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a needed index to the column.
To test:
1. On a fresh KTD, run:
$ ktd --shell
k$ koha-mysql kohadev
> SHOW CREATE TABLE oauth_access_tokens;
=> FAIL: There's no 'KEY' entry for the `expires` column
2. Apply this patch
3. Run:
k$ updatedatabase
=> SUCCESS: A message tells the index was added
4. Repeat 1
=> SUCCESS: The index was actually added to the DB
5. Run:
k$ reset_all
6. Repeat 1
=> SUCCESS: The index is created at install time too!
7. Run:
k$ updatedatabase
=> SUCCESS: Nothing explodes, no message about index being created
8. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2e63ece6ae)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Adding new id "relationship" led to unexpected behaviour
in relationship handling. If one edits patron with
non-patron guarantor and added patron guarantor, non-patron
guarantors relatioship field was set as empty value which is
first option on select field. This patch removes code which
sets relationship select field to use first value of option
automatically when patron guarantor is added.
Also thi patch add missing id to mandatory relatioship field.
To test:
1. Add or edit patron.
2. Add non-patron guarantor for patron and select some value
as their relationship.
3. Then add a patron guarantor.
=> Note that non-patron guarantors relationship is empty.
4. Apply this patch.
5. Repeat steps 1 to 3.
=> Relationship shouldn't change.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit efaa21c80d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In members.js line 112 variable guarantor_relationship is selected
with id "relationship". However id "relationship" is used in
auth-finder-search.inc, not in memberentrygen.tt.
One way to see what kind of effect incorrect selector has (and how I
originally stumbled into this), is to add into "IntranetUserJS" a line
which changes non-patron guarantors relationship default selected value
as other than empty. Script has to change "relationship" instead of
"new_guarantor_relationship" because selector input for patron
guarantors relationship actually uses default selected value from
non-patron guarantors relationship.
This patch changes two things. Firstly it adds id "relationship" to
memberentrygen.tt so that member.js can fetch correct value
to variable guarantor_relatioship. Secondly it changes id "relationship"
in auth-finder-search.tt as "special_relationship" to avoid confusion.
To test memberentrygen.tt:
1. Make sure you have some value(s) in syspref "borrowerRelationship"
e.g. "guarantor".
2. Add following line to "IntranetUseJS": $('.relationship
option:eq(1)').attr('selected', 'selected');
3. Add guarantee patron and note that non-patron guarantors relationship
is now "guarantor".
4. Add patron guarantor and note that relationship value is empty.
5. Apply this patch and refresh page.
6. Repeat step 4.
=> Note that now relationship value is "guarantor".
To test auth-finder-search.inc:
1. Add authority e.g. Chronological Term
2. Modify field 551$a, click "Tag editor" icon from right
3. Searc pop-up is opened.
=> Make sure that field "Special relationship" is highlighted when
you hover mouse over label.
=> Make sure that after performing a search, search value in
"Special relationship" field persists.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a605c070c7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Adding new id "relationship" led to unexpected behaviour
in relationship handling. If one edits patron with
non-patron guarantor and added patron guarantor, non-patron
guarantors relatioship field was set as empty value which is
first option on select field. This patch removes code which
sets relationship select field to use first value of option
automatically when patron guarantor is added.
Also thi patch add missing id to mandatory relatioship field.
To test:
1. Add or edit patron.
2. Add non-patron guarantor for patron and select some value
as their relationship.
3. Then add a patron guarantor.
=> Note that non-patron guarantors relationship is empty.
4. Apply this patch.
5. Repeat steps 1 to 3.
=> Relationship shouldn't change.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit efaa21c80d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In members.js line 112 variable guarantor_relationship is selected
with id "relationship". However id "relationship" is used in
auth-finder-search.inc, not in memberentrygen.tt.
One way to see what kind of effect incorrect selector has (and how I
originally stumbled into this), is to add into "IntranetUserJS" a line
which changes non-patron guarantors relationship default selected value
as other than empty. Script has to change "relationship" instead of
"new_guarantor_relationship" because selector input for patron
guarantors relationship actually uses default selected value from
non-patron guarantors relationship.
This patch changes two things. Firstly it adds id "relationship" to
memberentrygen.tt so that member.js can fetch correct value
to variable guarantor_relatioship. Secondly it changes id "relationship"
in auth-finder-search.tt as "special_relationship" to avoid confusion.
To test memberentrygen.tt:
1. Make sure you have some value(s) in syspref "borrowerRelationship"
e.g. "guarantor".
2. Add following line to "IntranetUseJS": $('.relationship
option:eq(1)').attr('selected', 'selected');
3. Add guarantee patron and note that non-patron guarantors relationship
is now "guarantor".
4. Add patron guarantor and note that relationship value is empty.
5. Apply this patch and refresh page.
6. Repeat step 4.
=> Note that now relationship value is "guarantor".
To test auth-finder-search.inc:
1. Add authority e.g. Chronological Term
2. Modify field 551$a, click "Tag editor" icon from right
3. Searc pop-up is opened.
=> Make sure that field "Special relationship" is highlighted when
you hover mouse over label.
=> Make sure that after performing a search, search value in
"Special relationship" field persists.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a605c070c7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2024-12-06 10:31:55 +00:00
1133 changed files with 46937 additions and 11309 deletions
gh pr close ${{ env.PR }} --comment "(Automated Close) Please do not file pull requests here, this repo is merely a clone of https://git.koha-community.org/Koha-community/Koha and we use Bugzilla at https://bugs.koha-community.org to submit patches to its codebase.\n\nSee https://wiki.koha-community.org/wiki/Submitting_A_Patch for more information. Note that you can use [`koha-testing-docker`](https://gitlab.com/koha-community/koha-testing-docker) to easily set-up a full development environment, which includes the `git bz` command to easily push your patches with a single command, instead of manually fiddling with patch files!\n\nIf you have any more questions or need help, do not hesitate to ask in our Mattermost chat: https://chat.koha-community.org. Thank you."
Northeast Kansas Library System <sponsor> Northeast Kansas Library System [http://www.nekls.org] <sponsor>
South East Kansas Library System <sponsor> South East Kansas Library System [http://www.sekls.org] <sponsor>
South Taranaki District Council <sponsor> South Taranaki District Council, NZ <sponsor>
South East Kansas Library System <sponsor> Southeast Kansas Library - SEKLS <sponsor>
South East Kansas Library System <sponsor> Southeast Kansas Library System <sponsor>
Round Rock Public Library <sponsor> Sponsored by: Round Rock Public Library <sponsor>
Round Rock Public Library <sponsor> Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/] <sponsor>
National Library of Finland <sponsor> The National Library of Finland <sponsor>
Université Jean Moulin Lyon 3 <sponsor> Université de Lyon 3 <sponsor>
Vermont Organization of Koha Automated Libraries <sponsor> VOKAL <sponsor>
Vermont Organization of Koha Automated Libraries <sponsor> Vermont Organization of Koha Automated Libraries [http://gmlc.org/index.php/vokal] <sponsor>
Virginia Tech <sponsor> Virginia Tech [https://lib.vt.edu/] <sponsor>
Waitaki Distict Council <sponsor> Waitaki Distict Council, NZ <sponsor>
Northeast Kansas Library System <sponsor> Northeast Kansas Library System [http://www.nekls.org] <sponsor>
South East Kansas Library System <sponsor> South East Kansas Library System [http://www.sekls.org] <sponsor>
South Taranaki District Council <sponsor> South Taranaki District Council, NZ <sponsor>
South East Kansas Library System <sponsor> Southeast Kansas Library - SEKLS <sponsor>
South East Kansas Library System <sponsor> Southeast Kansas Library System <sponsor>
Round Rock Public Library <sponsor> Sponsored by: Round Rock Public Library <sponsor>
Round Rock Public Library <sponsor> Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/] <sponsor>
National Library of Finland <sponsor> The National Library of Finland <sponsor>
Université Jean Moulin Lyon 3 <sponsor> Université de Lyon 3 <sponsor>
Vermont Organization of Koha Automated Libraries <sponsor> VOKAL <sponsor>
Vermont Organization of Koha Automated Libraries <sponsor> Vermont Organization of Koha Automated Libraries [http://gmlc.org/index.php/vokal] <sponsor>
Virginia Tech <sponsor> Virginia Tech [https://lib.vt.edu/] <sponsor>
Waitaki Distict Council <sponsor> Waitaki Distict Council, NZ <sponsor>
my$sth2=$dbh->prepare("SELECT * FROM language_descriptions LEFT JOIN language_rfc4646_to_iso639 on language_rfc4646_to_iso639.rfc4646_subtag = language_descriptions.subtag WHERE type='language' AND subtag =? AND language_descriptions.lang = ?");
die("Filename '$self->{filename}' does not exist\n");
}
my$sql_schema=$self->_get_kohastructure();
my$db_schema=$self->_get_db();
if($sql_schema&&$db_schema){
my$diff=SQL::Translator::Diff->new(
{
output_db=>'MySQL',
source_schema=>$db_schema,
target_schema=>$sql_schema,
}
)->compute_differences->produce_diff_sql;
my$diff_found=1;
my$message=__(
"These commands are only suggestions. They are not a replacement for the database update scripts run during installations and updates.\nReview the database, the atomic update files and the table definitions in kohastructure.sql before running any of the commands below:"
);
my$title=__("Warning!");
if($diff=~ /No differences found/){
$diff_found=0;
$message=__("The installed database schema is correct.");