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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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.
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
- 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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
The custom/authorized-value status branch concatenated row.status
directly into a class="..." attribute string. escape_str() only
escapes &, <, > (not quotes), so a status code containing a double
quote could still break out of the attribute.
Build the status <span> via DOM APIs instead, the same way the
reason field was fixed: fixed statuses get a hardcoded class, and
the free-form status code goes into a data-status attribute via
dataset, which the DOM escapes safely regardless of content.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
escape_str all the things
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This patch moves a couple of "onclick" event attributes from the
authority merge template, moving the event handling to the JS block.
This patch also fixes the behavior that I assume the click handlers are
meant to have, changing the framework selection. A mismatch of IDs in
the code meant that clicking the radio buttons didn't do anything.
To test, apply the patch and go to Authorities.
- Perform a search for authority records which will return multiple
results, including records with different heading types (e.g. Personal
Name, Topical Term, etc.)
- In the "Actions" menu for one of the search results, click "Merge"
- Do the same with another result which has a different heading type.
- On the "Merging records" page you should see a frameowrk dropdown.
- When you click the radio buttons next to your two records to merge the
framework selection should change to match your selection.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Amended-by: Jonathan Druart
Tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 71559d0909)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This patch corrects the logic used to determine whether to show the "New
match check" link. I mistakenly changed it to check for the matchpoints
variable instead of the matchchecks variable.
To test, apply the patch and go to Administration -> Record matching
rules.
- Click "New record matching rule" in the toolbar.
- Scroll down to the "Required match checks" section.
- You should see a "New match check" link alongside a "Remove this match
check" link.
- Go back to the record matching rules main page.
- If necessary, create a rule which doesn't have any match checks.
- In the "Required match checks" section of the edit form you should see
a "New match check" link, previously hidden by Bug 388714.
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d27639707f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Syspref "hidepatronname" currently hides guarantors
name on memberentry.pl. This is inconsistent since name isn't hidden e.g. on moremember.pl and staff
can already see patrons other personal information
during edit.
To test:
1) Disable syspref "hidepatronname"
2) Edit guarantee patrons information
=> Field "Guarantor" only shows guarantors cardnumber (or
is empty if guarantor has no cardnumber)
3) Apply patch
=> Guarantors name is now displayed (as a hyperlink)
Also confirm hidepatronname still works as expected
on other pages (holds table, items detail page etc.).
Sponsored-by: Koha-Suomi Oy
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 4e6e7bd914)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Include all displayed fields in the DataTables-searchable data for the
Suggestion column of the suggestions table
To test:
1. Go to Acquisitions > suggestions
2. Create a new suggestion for your logged-in library. Be sure fill out
all of the following fields:
Title
Author
Copyright date
ISBN or ISSN
Publisher
Publication place
Collection title
Document type
Notes
3. Save the suggestion. Confirm that you see the new suggestion in the
purchase suggestions table.
4. Using the "search" field above the table, search for a word in the
title
--> Confirm that the purchase suggestion from step 2 is still shown
5. Clear the "search" field and search for the author's first or last
name
--> Confirm that the suggestion from step 2 is still shown
6. Use the "search" field to search for each of the other pieces of
information filled out in step 2
--> Confirm that the suggestion is still shown for each search
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 bf7522b67c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
The test was feeding update_sql object field names instead of the parameter names it actually expects.
This let savedsql get cleared during the update.
The test was updated to pass the expected inputs so it still checks cache_expiry without creating the warning in the delete log path.
Test plan:
1. Confirm the issue by enabling the ReportsLog preference in Koha UI andin ktd shell running prove t/db_dependent/Reports/Guided.t
2. Apply the patch.
3. Run the tests again with prove t/db_dependent/Reports/Guided.t
4. The tests should pass.
5. Disable the preference and run again.
6. Tests should pass.
7. Sign off if steps above check out.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d09c65d047)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
When using strict_sql_modes, the Hold ratios page causes an Incorrect
GROUP BY error and returns an Error 500.
This patch removes uncessary columns from the database query and adds
the biblio columns to the GROUP BY statement, so they can be selected.
Since it's already grouped by biblionumber, it should not cause any
additional rows to be created.
Test plan:
1. Make sure that strict_sql_modes is enabled in the koha-conf.xml
file.
2. Place at least one hold on a book.
3. Go to Circulation and select Hold ratios.
4. Observe that you get an Error 500.
5. Apply patch.
6. Repeat step 3.
7. Observe that you can view the page.
8. If the table is empty, change the ratio to 1.
9. Sign off.
Sponsored-by: Lund University Library
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 ea4600476e)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Test plan (for --cards arguments) :
1. Initial Setup:
a) Go to Tools > Patron card creator > New > Card batch
b) Create two different batches (Batch 1 and Batch 2) using the 'Add by borrowernumber(s):' option.
If using **KTD** you can use the following borrowernumbers for both batches:
15
29
47
else you will need to create your own patrons and enter their borrowernumber.
c) In your terminal, set the timestamps manually:
--OPTION A (KTD users):
ktd --shell
koha-mysql kohadev
--OPTION B:
Access your database
Then:
UPDATE creator_batches SET timestamp = DATE_SUB(NOW(), INTERVAL 30 DAY) WHERE batch_id = '1';
UPDATE creator_batches SET timestamp = DATE_SUB(NOW(), INTERVAL 5 DAY) WHERE batch_id = '2';
Note: your batch_id may differ.
2. Before Applying the Patch:
a) Run the following cleanup script:
./misc/cronjobs/cleanup_database.pl --cards 15 --confirm --verbose
b) Error in console output
c) Nothing is deleted even though one batch was older than 15 days
SELECT * FROM creator_batches;
3. Apply The Patch
4. After Applying The Patch:
a) Redo step 1 (Initial Setup).
b) Run again the following cleanup script:
./misc/cronjobs/cleanup_database.pl --cards 15 --confirm --verbose
c) Check that the console output says: "Purging ... more than 15 days ago"
d) Batch 1 is deleted, but Batch 2 (5 days old) is STILL PRESENT. Success!
SELECT * FROM creator_batches;
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c2ef0e6b4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Test plan :
1. Initial Setup:
a) Go to Cataloging > Label creator > New > Label batch
b) Create two different batches (Batch 1 and Batch 2) using the 'Add by barcodes or itemnumbers' option.
If using **KTD** you can use those barcodes for the two batches:
39999000010114
39999000010138
39999000010152
else you will need to create your own records with items and enter their barcodes.
c) In your terminal (in a ktd --shell), set the timestamps manually:
--OPTION A (KTD users):
ktd --shell
koha-mysql kohadev
--OPTION B:
Access your database
Then:
UPDATE creator_batches SET timestamp = DATE_SUB(NOW(), INTERVAL 30 DAY) WHERE batch_id = '1';
UPDATE creator_batches SET timestamp = DATE_SUB(NOW(), INTERVAL 5 DAY) WHERE batch_id = '2';
Note: your batch_id may differ.
2. Before Applying the Patch:
a) Run the following cleanup script:
./misc/cronjobs/cleanup_database.pl --labels 15 --confirm --verbose
b) Check that the console output says: "Purging ... more than 1 days ago"
c) Check database and notice that it is now empty, even though one set was less than 15 days old.
SELECT * FROM creator_batches;
3. Apply The Patch
4. After Applying The Patch:
a) Redo step 1 (Initial Setup).
b) Run again the following cleanup script:
./misc/cronjobs/cleanup_database.pl --labels 15 --confirm --verbose
c) Check that the console output says: "Purging ... more than 15 days ago"
d) Batch 1 is deleted, but Batch 2 (5 days old) is STILL PRESENT. Success!
SELECT * FROM creator_batches;
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9e05ca0e19)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
1) Enabled ILLModule
2) Create a new ILL request, set a title, '42' for cardnumber and any library:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) (k-t-d required, cost is not editable in UI, but backends may set it) Run the following query:
koha-mysql kohadev
update illrequests set cost = 1;
4) Notice cost shows, now run the same but set to 0:
update illrequests set cost = 1;
5) Notice it doesn't show.
6) Apply patch. Refresh. Notice is shows '0' now.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 041fa90a0d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
- 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>
- 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>
Check that $charge is defined before comparing, to avoid "argument isn't
numeric" error if no charge is defined.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 699ba06eb7)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
In method Koha::Hold->cancel in the section where we charge a cancel
fee there is a if statement "if $charge" after calling sub add_debit.
This allows value "0.00" to be passed to the add_debit and it then
gets caught in statement "unless ( $amount > 0 )" which calls exception
AmountNotPositive. This happens at least when syspref
ExpireReservesMaxPickUpDelayCharge or circulation rule "Expired hold charge"
has value 0.00 and cronscript cancel_expired_holds.pl is run. This patch
fixes the if statement in Koha::Hold->cancel.
To test:
1. Enable syspref ExpireReservesMaxPickUpDelay.
2. Set syspref ReservesMaxPickUpDelay value as 1.
3. Set syspref ExpireReservesMaxPickUpDelayCharge value as 0.00.
4. Make sure you have a waiting hold which has expiration date further
in the past than ReservesMaxPickUpDelay value in your database. If not,
create one.
5. Run cronscript cancel_expired_holds.pl.
=> Exception 'Koha::Exceptions::Account::AmountNotPositive' thrown
'Debit amount passed is not positive' is raised.
6. Set syspref ExpireReservesMaxPickUpDelayCharge value as 0 and run
cronscript again.
=> No exception is raised.
7. Apply this patch and restart services if needed.
8. Create a new waiting hold with expiration date in the past.
9. Run cronscript again.
=> No exception is raised.
=> Confirm that no cancel fee was added for patron.
Also prove t/db_dependent/Koha/Holds.t.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Bernard Scaife <bernard.scaife@openfifth.co.uk>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit b33a7c1df4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This patch moves a couple of "onclick" event attributes from the
bibliographic record merge template, moving the event handling to the JS
block.
This patch also makes a minor change to make sure that the
framework code dropdown preselects the framework of the first of
the records to merge. This brings it in line with the authority
merge template.
To test, apply the patch and perform a catalog search which will return
multiple results including results with different frameworks. In the
standard test data a search for "green" will return two results with two
different frameworks.
- Check the checkbox for at least two records in your search results.
- Click "Edit -> Merge records" in the toolbar at the top of the
results.
- On the "Merging records" page you should see a frameowrk dropdown. It
should have preselected the framework corresponding to the first of
the records you selected.
- When you click the radio buttons next to your records to merge the
framework selection should change to match your selection..
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 01a1696058)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This patch removes an "onload" event attribute from the label batch edit
template. An "onload" event attribute on the body tag can be easily
moved to the $(document).ready block.
To test, apply the patch and go to Cataloging -> Label creator -> Label
batches -> New label batch. As soon as the page loads the "Add by
barcodes" textarea should get focus.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b8832e7d7e)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This patch removes an "onmousedown" event attribute from the include
file used by item types and authorized values administration in icon
selection. The event handling is copied to each page's JS block.
To test, apply the patch and go to Administraion -> Item types.
In the "Choose an icon" section, click the "Remote image" tab. Click
the text input field. The corresponding radio button should be
checked.
Perform the same check on Administration -> Authorized values.
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3160983a6d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
We must use t::lib::Dates::compare to compare dates in test.
Test plan:
Confirm that `prove t/db_dependent/Koha/Hold.t` still returns green
after this patch
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4da822b6a1)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
To test:
0. APPLY PATCH, restart_all
1. Create an accountline and make note of the accountline.date
2. On that accoutnline edit the note.
3. Confirm that the accountline.date does NOT update.
Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1c50f6b774)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This adds to the unit tests in t/db_dependent/Koha/Patrons/Import.t. It confirms that repeating the same patron import (with extended patron attributes) will not generate duplicated borrowersLog entries.
Test plan:
1. prove t/db_dependent/Koha/Patrons/Import.t
Sponsored-by: Auckland University of Technology
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 e027ed2dca)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Since bug 26744 was upstreamed when you use the Import patron tool or the import_patrons.pl script from the commandline and pass a preserve-extended-attributes parameter the borrowerlogs inaccurately have an entry added where the attribute 'before' value is empty.
Test plan:
1. Create a patron attribute type named 'INSTID': Koha administration > Patrons and circulation > Patron attribute types > New patron attribute type.
2. Download the patron started CSV from: Tools > Import patrons > click the 'Download a Starter CSV file with all the columns.' link
3. Save values in the: cardnumber, surname, firstname, branchcode, categorycode, auth_method, lang, and patron_attributes columns
4. Make sure your value in the patron_attributes column is INSTID:1234
5. Import this csv file:
cd misc
./import_patrons.pl --file <filename>.csv --matchpoint cardnumber --default branchcode=CPL --overwrite --preserve-extended-attributes --verbose --verbose --confirm
6. Navigate to the patron account in your browser
7. Click 'Modification log' and observe how many entries there are
8. Repeat step 5
9. Notice there is a new entry in your Modification log with an info column value of: { "attribute.INSTID" : { "after" : "1234", "before" : "" } }
10. Repeat step 5 and notice another new entry in the Modification log with an empty "before" value
11. Apply patch
12. Repeat step 5 and notice no new entry in the Modification log
13. Edit your csv and change the patron_attributes value to: INSTID:5678
14. Repeat step 5 and notice the new modification log entry with an info column value of: { "attribute.INSTID" : { "after" : "5678", "before" : "1234" } }
15. Add another new patron attribute type to your Koha named 'home'
16. edit your csv and change the patron_attributes value to: INSTID:5678,home:town
17. Repeat step 5
18. Notice a new Modification log entry with the value of: { "attribute.home" : { "after" : "town", "before" : "" } }
Sponsored-by: Auckland University of Technology
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 2608f48952)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This fixes the behavior on changed system preferences in HTML input text fields. Preferences which are changed back to the original value can be saved now without reloading the system pref page.
This will only affect input fields with type=text as they have the property defaultValue which is checked to highlight a field as 'modified'.
Testplan:
a) take a syspref with an HTML text input field f.e. AccessControlAllowOrigin
b) write '*' into the iput field. Notice that the preference is marked 'modified'. Click 'save'
c) now got to the text field again and delete that '*'. Notice the preference does not get marked as modified and can theefore not be saved.
d) apply patch and reload page
e) repeat b) and c) and notice that the preference gets marked 'modified' on both cases.
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 581c9b39bb)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
To recreate:
1. Log in to the OPAC
2. Create at least 1 list
3. Go to the "Your lists" page (opac-userlists)
4. Inspect the table header for the Edit/Delete column
5. Confirm the header contains no text
Test the patch:
1. Apply the patch
2. Repeat steps 1-3
3. Inspect the table header for the Edit/Delete column
4. Confirm the header now contains accessible text
5. Confirm Edit and Delete actions still function as expected
6. Run an accessibility checker and confirm the issue is resolved
7. Sign off and have a wonderful day! :D
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 88676495e0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Now that the item loop only processes item fields from the filtered
$items resultset, several checks and patterns become unnecessary.
Changes:
- Remove dead checks: tag < 10 and tab != 10 guards
- Resolve $tagslib->{$item_tag} once instead of per-subfield
- Destructure ($code, $value) instead of indexed $subf[$i][0/1]
- Replace per-subfield grep over date kohafields with a hash lookup
- Remove redundant second $tagslib lookup for $kohafield
- Collapse repeatable if/else into a ternary
No functional changes.
Test plan:
1. Apply patch
2. Run the same test plan as the previous patch
=> SUCCESS: Behavior is identical
3. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 573550aec7)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
The OPAC MARC detail view (opac-MARCdetail.pl) uses $record->fields()
to build the items table. This pulls item fields from the embedded MARC
record, bypassing the OPACHiddenItems filtering done by
filter_by_visible_in_opac.
This patch replaces the $record->fields() call with the already-filtered
$items resultset, converting each Koha::Item back to a MARC::Field via
as_marc_field.
Test plan:
1. Apply patch, do not restart plack yet
2. Setup:
$ ktd --shell
k$ koha-mysql kohadev <<< "UPDATE systempreferences SET value = 'damaged: [1]' WHERE variable = 'OpacHiddenItems';"
k$ koha-mysql kohadev <<< "UPDATE items SET damaged = 1 WHERE biblionumber = 416 LIMIT 1;"
k$ flush_memcached
3. Point your browser to the OPAC MARC detail view:
http://kohadev.localhost/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=416
=> FAIL: The damaged item is displayed in the items table
4. Restart plack:
k$ restart_all
5. Refresh the page
=> SUCCESS: The damaged item is no longer displayed
6. Undo the test data:
k$ koha-mysql kohadev <<< "UPDATE items SET damaged = 0 WHERE biblionumber = 416;"
k$ koha-mysql kohadev <<< "UPDATE systempreferences SET value = '' WHERE variable = 'OpacHiddenItems';"
k$ flush_memcached
7. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 3f7c9f0f6c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Adds a dedicated subtest covering the specific scenario: daily loans have a
due time of 23:59, so a return earlier in the day on a holiday would
previously cause days_between to exit its loop before processing the end
date, silently skipping the holiday subtraction.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a0dcee152)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
The existing 'days: 289 hours, 2 holidays' test asserted 8-1=7 but its own
description named 2 holidays. The expected value matched the buggy behaviour
(loop exiting before the holiday end date) rather than the correct result.
Update to 8-2=6 to reflect the fix.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6ca7c1118b)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
In Koha::Calendar::days_between, the holiday-subtraction loop uses a comparison
that includes time. If the end_dt is a holiday and its time is earlier than
the start_dt time (common in renewals), the loop terminates before processing
the end_dt, leading to an extra fine day.
This patch truncates both dates to the beginning of the day after cloning
and setting the time zone, ensuring the loop correctly processes all
calendar days between the two dates.
Test Plan:
1. Set 'finesCalendar' syspref to 'noFinesWhenClosed'.
2. Set 'CalculateFinesOnReturn' syspref to 'Yes'.
3. Set 'finesMode' syspref to 'Production'.
4. Define a special holiday for today in the library calendar.
5. Identify an overdue item for a patron. Manually set its 'date_due' in the
database to several days ago with a time of 23:59:00.
6. Renew the item today at any time BEFORE 23:59:00 (e.g., 10:00 AM).
7. Observe that an extra day of fine is charged because today (the holiday)
was not subtracted.
8. Apply this patch.
9. Repeat the test and observe that the holiday is now correctly subtracted.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9c38d74c98)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
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>
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>
Correct "opac" with "OPAC" in the pref file
Test plan:
git grep opac **/*.pref
and confirm that there is no relevant occurrences in the output (i.e.
no strings displayed on the UI)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b860c04197)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
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>
If import_batch_profiles is slow to respond, it'll trigger select.change() in stage-marc-import.tt and change the format to ISO2709 before the form is submitted, causing the error.
cypress run --spec t/cypress/integration/Tools/ManageMarcImport_spec.ts
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
So we protect other calls
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
waitForJobFinished previously had no handling for failed jobs or
non-200 responses — if the job API returned anything unexpected,
the recursive cy.wait() would silently stall waiting for a 2nd
poll that never came, producing a confusing timeout. Adds an
explicit "failed" status check and updates the intercept
to reproduce the exact CI failure (Apache returning 503 during
reset_all).
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 74cf164d32)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Apply tests patch only, run:
yarn cypress run --spec t/cypress/integration/Tools/ManageMarcImport_spec.ts
Confirm it fails with the same error as Jenkins:
Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 2nd request to the route: `jobPoll`. No request ever occurred.
Apply fix patch. Run again.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 125416a92d)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Adds a generate next button to the serials receive page (serials-edit.pl) that works similar to the button on the serials collection page.
To test:
1. Go to Staff Client > Serials
2. Find an existing subscription or create a new one
3. Go to the Serials collection page for your serial e.g. /cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1
4. Click on the "Generate next" button and notice that the table adds
another row
5. Click on the "Receive" button at the top of the page
6. Notice that the page also shows the issues like the rows in the
previous page
7. Apply patch
8. Repeat steps 1-5
9. Notice that the page also has a "Generate next" button at the top
10. Check that the button generates a new issue row on the page
Sponsored-by: Pymble Ladies' College
Signed-off-by: esther <esther@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
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 7b1a348ac9)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
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>
This patch rephrases the description of the
FilterSearchResultsByLoggedInBranch system preference to make it
clear it filters items by the library where the user is currently
logged in at. It also changes "branch" to "library" in the
system preference description.
To test:
1. Apply patch
2. Go to Administration > System preferences
3. Search for FilterSearchResultsByLoggedInBranch
4. Read the description, make sure it makes sense, and that the
grammar and spelling are correct
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 5fbe31b52b)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
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>
There is a TT condition that has not been moved to JS.
Test plan:
Create a suggestion, archive it
List suggestions and tick "include archived"
Notice that with this patch applied you are able to unarchive the
suggestion
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 69c8a91cd9)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Before this patch we were setting a variable and nebver unsetting it
Now we can add the conditional directly to the row, so don't need a variable
To test:
1. Go to Acquisitions
2. Click 'Search' in the vendor search
3. Click 'Add to basket' next to 'My basket'
4. Click 'From a new (empty) record'
5. Fill out the form
- Title: enter a title
- Koha item type: choose an item type
5.1. Click 'Add item'
- Fund: choose a fund
- Uncertain price: check
6. Click 'Save'
7. Go back to Acquisitions
8. Click 'Search' in the vendor search
9. Click 'New' > 'Basket'
10. Enter a basket name
11. Click 'Save'
12. Go back to Acquistions
13. Click 'Search' in the vendor search
--> Notice the empty basket is also in bold red, even if it doesn't have uncertain prices
14. Click 'Add to basket'
--> Notice everything is in bold and some in red
15. Apply patch, reload
16. Only affected basket is in red
Signed-off-by: Samuel <sam.sowanick@corvallisoregon.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7b1d11da74)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
The patron info in the patron / circ-menu sidebar is not constrained to
it's parent's width. I found this with a very long email address, where
the ul grew to match the email address length, and the patron image
container also grew. Both overflowed the sidebar.
Test plan:
1. find or make a patron with a very long email address (more tha 50
characters).
2. open the patron details page for that patron. Observe the patron
image and patron details overflows the patron sidebar (the email
address will be hidden under the contact information panel.
3. Apply patch and rebuild css files. It may be necessary to clear the
browser cache.
4. open the patron details page for that patron again. Observe the
patron image and details does not overflow the patron sidebar.
Signed-off-by: George <george@nekls.org>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
In Bug 36466 db_revs/251200019.pl was introduced to update wrong date values (0000-00-00) with NULL.
This can fail on MySQL as it is running with sql_mode NO_ZERO_DATE activated which does not allow to select or update date fields with values='0000-00-00'.
This patch changes the update queries in db_revs/251200019.pl to use Installer::sanitize_zero_date on both columns.
Test plan:
As the test shall be done using MysQL and Mariadb start 2 ktds:
MySQL) DB_IMAGE=mysql:8.0 ktd --proxy --name mysql8 up -d
MariaDB) ktd --proxy --name maria up -d
a) checkout a version prior 36466: git checkout v24.11.14-1
b) reset_all
c) Connect to staff interface (mysql8-intra.localhost and maria-intra.localhost)
d) Go to Serials and create a new subscription
e) run the following to enter database client in each ktd shell: koha-mysql kohadev
f-mysql) run the following commands to be allowed to change planneddate and publisheddate to '0000-00-00':
SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
update serial set planneddate = '0000-00-00', publisheddate = '0000-00-00';
f-maria)
update serial set planneddate = '0000-00-00', publisheddate = '0000-00-00';
g) verify via: select * from serial;
h) checkout main via: git checkout main
i-mysql) run updatedatabase
Upgrade to 25.12.00.019 [09:35:55]: Bug 36466 - Fix the incorrect 0000-00-00 date in planneddate and publisheddate field
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do Incorrect date error in db-revs when using MySQL
In 36466 db_revs/251200019.pl
for column 'planneddate' at row 1 at /kohadevbox/koha/C4/Installer.pm line 818
i-maria) do not run updatedatabase yet
j) apply patch
k-mysql) run updatedatabase
Upgrade to 25.12.00.019 [09:37:02]: Bug 36466 - Fix the incorrect 0000-00-00 date in planneddate and publisheddate field
Incorrect date planneddate and publisheddate fixed
...
-> is successful now
k-maria) run updatedatabase
l) verify via: select * from serial;
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Test plan, before applying patch:
1) Visit additional contents for HTML customizations:
<staff_url>/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations
2) Click the left side 'Display location' filter. No options show under OPAC or Staff interface
3) Apply patch, restart plack, refresh. All options should now show (and working filter as expected) under OPAC and Staff interface
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Reports may consume too much resources of the db. To avoid that a new config param
'report_sql_max_statement_time_seconds' was created, which sets the maximum time a report statement may
take to execute in seconds. If it takes longer it will be aborted.
reflowed the code, so that is is executed after is_sql_valid, and put
the code in a subroutine
Test plan:
0. if you run this test in ktd you should check if you are running
mysql or mariadb, and then be able to switch database
1. create a new report by going to
More > Reports > New SQL Report
(/cgi-bin/koha/reports/guided_reports.pl?op=add_form_sql)
enter the following SQL (which only purpose is to run long)
select ExtractValue(bm1.metadata,'//controlfield[@tag="001"]')
from biblio_metadata bm1
join biblio_metadata bm2 on
ExtractValue(bm1.metadata,'//controlfield[@tag="001"]') =
ExtractValue(bm2.metadata,'//datafield[@tag="773"]/subfield[@code="w"]')
give the Report a name eg "extract_long"
2. run the report
3. report should be executed and return several 1000 lines on ktd
4. apply patch
5. add a the parameter to koha-conf.xml to the <config> </config> part
<report_sql_max_statement_time_seconds>0.001</report_sql_max_statement_time_seconds>
OR use the following statemtn
sed -i '/<biblioserver>/a <report_sql_max_statement_time_seconds>0.001<\/report_sql_max_statement_time_seconds>' /etc/koha/sites/kohadev/koha-conf.xml
6. restart koha
koha-plack --restart kohadev
7. go back to the report page and rerun report which now should lead to an error
The following error was encountered:
The database returned the following error:
Query execution was interrupted, maximum statement execution time exceeded
Please check the log for further details.
8. in koha-conf.xml set
<report_sql_max_statement_time_seconds>20</report_sql_max_statement_time_seconds>
9. restart koha
10. rerun query, which now should execute as before
11. stop ktd, and restart with the "other" database
DB_IMAGE=mysql:8.0 ktd up
DB_IMAGE=mariadb:10.5 ktd up
12. repeat from step 1 (omit applying the patch)
13. Sign off
14. Thx
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
This change moves the wrapper so that the web page display correctly
Test plan:
0. Apply the patch
1. Enable the SelfCheckInModule system preference
2. Go to http://localhost:8080/cgi-bin/koha/sci/sci-main.pl
3. Note that there isn't a lot of whitespace between
the word "koha" and "Self check-in"
4. Celebrate
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Now that we can explicitly list reports with any one of the permissions we need
to adjust some displays to ensure we can get to the list view.
Additionally I change 'Use saved' to 'View saved' since we may not be able to run.
I also fix the action buttons to show 'View' instead of 'Run' if user cannot execute.
I adjust reports home to check if the user can use report plugins before showing that link as well
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
0. Apply the patch and restart_all
1. Using a user with only "create_reports", "execute_reports", or "delete_reports",
try to perform operations not covered by that permission.
That is, if you have "create_reports", try to run, export, and delete reports.
If you have "execute_reports", try to create, modify, and delete reports
If you have "delete_reports", try to create, modify, and run reports
2. Note that a user with each of these permissions can list and view SQL.
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>
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: Lucas Gass <lucas@bywatersolutions.com>
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>
As Jan Kissig correctly mentioned on the BZ report, the various
summary info on charged items etc. are included.
This is done via the summary_info sub.
Note that the TODOs about
BZ FID_HOLD_ITEMS_LMT
CA FID_OVERDUE_ITEMS_LMT
CB FID_CHARGED_ITEMS_LMT
are still valid. This is not included yet.
Test plan.
Since we are just removing comments, read the code.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
We can add a toolbar of buttons to
A) batch enable all cells
B) batch populate empty cells with a value
C) batch disable empty cells
Test plan:
1) Apply this patch
2) Visit the TCM editor
3) Try out the 3 new buttons, verify they behave correctly
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>
This patch additionally fetches the reply to address for advance notices
To test:
1 - Have some issues that will be due soon for a patron(s)
Checkout with the due date set to tomorrow
2 - Verify the patron(s) have an email defined, verify the issuing branch has a reply to set
3 - Verify the patron(s) have messaging preference set to receive Advance notices by email 1 day in advance
4 - perl misc/cronjobs/advance_notices.pl -v -c
5 - Check the message queue
SELECT * FROM message_queue WHERE borrowernumber={##}
6 - Note no rpely to is set
7 - Apply patch
8 - perl misc/cronjobs/advance_notices.pl -v -c
9 - Check the message queue
10 - Confirm newer message has the reply to populated
11 - Ensure the issued item has a different homebranch with a reply to address se
12 - perl misc/cronjobs/advance_notices.pl -v -c --frombranch item-homebranch
13 - Confirm message has correct reply to
14 - Set patron to want digest in messaging preferences
15 - Generate notices
16 - Confirm digets has the right reply to
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tidied inline
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
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>
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>
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>
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>
We have different implemented solution to select a tab on opac-user:
* a "tab" variable (from bug 37972), it's never used
* several variables passed from the controller to the template, depending on the tab to select (it works and is used)
* use of anchors (it does not work and is used)
We should fix and standardize it.
I've linked to several reports that seem to conflict with each others.
This patch suggests to have a "tab" variable
Test plan:
Confirm that the different links to tab to opac-user are not using a
query parameter to pass the tab to select, e.g. from the opac-main page.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
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>
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>
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>
I think this happens because we select an option that didn't exist in
the dropdown, and "Sorry, there is no matching options" from select2 is
covering the discount input that is right under "Tax rates"
09:45:36 <testcase name="Vendor CRUD operations should add a vendor" time="0.000" classname="should add a vendor">
09:45:36 <failure message="Timed out retrying after 10000ms: `cy.type()` failed because this element:
09:45:36
09:45:36 `<input data-v-2a08b27a="" id="discount" inputmode="numeric" placeholder="Discount (%)" size="6">`
09:45:36
09:45:36 is being covered by another element:
09:45:36
09:45:36 `<li class="vs__no-options">Sorry, ...</li>`
09:45:36
09:45:36 Fix this problem, or use {force: true} to disable error checking.
09:45:36
09:45:36 https://on.cypress.io/element-cannot-be-interacted-with" type="CypressError"><![CDATA[CypressError: Timed out retrying after 10000ms: `cy.type()` failed because this element:
09:45:36
09:45:36 `<input data-v-2a08b27a="" id="discount" inputmode="numeric" placeholder="Discount (%)" size="6">`
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This patch fixes automatic tab selection on MARC subfield edit pages for
both authority and bibliographic records. The patch also removes some
unused markup and JS associated with old ways of handling tabs.
To test, apply the patch and go to Administration -> Authority types.
- Click the "Actions" button for one of the authority types and select
"MARC structure"
- Pick a tag which has multiple subfields, e.g. 020 and click Actions ->
Subfields.
- Click one of the subfield links (not the first one). On the subfield
edit page the corresponding tab should be selected when the page
loads.
- Go back and click the "Edit" button and confirm that this also
selects the correct tab.
- Go to Administration -> MARC bibliographic framework -> MARC
structure -> View subfields and perform the same tests.
Sponsored-by: Athens County Public Libraries
Signed-off-by: John Doe <you@example.com>
Signed-off-by: Nic Olsson <olsson.nic@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
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>
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>
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>
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>
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>
- 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>
- 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>
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>
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>
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>
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>
This patch fixes the patron header search, so that you can do
patron searches from the header, but empty patron searches
are prevented and show a tooltip.
Test plan:
0. DO NOT APPLY THE PATCH YET
1. Log into the staff interface and try to search for anything
in the "Search patrons" header search
2. Note that nothing happens at all no matter how much you click
3. Apply the patch
4. Refresh the browser page
5. Try to search for anything in the "Seearch patrons" header search
6. Note that it performs the search
7. Empty out the input box and hit Enter or the search button
8. Note that a tooltip appears saying "Please enter a card number or name"
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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: Lucas Gass <lucas@bywatersolutions.com>
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: Lucas Gass <lucas@bywatersolutions.com>
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: Lucas Gass <lucas@bywatersolutions.com>
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>
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>
(cherry picked from commit 2091ef0fea)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
(cherry picked from commit ccfbb35de5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
(cherry picked from commit aa84e99db8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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: Lucas Gass <lucas@bywatersolutions.com>
This patch builds the patron search description more carefully
to avoid XSS
Test plan:
0. Apply the patch
1. Log into Koha and click on "Patrons"
2. Change the "Category" and "Library" to any option but "Any"
and click "Search"
3. Type "test" into the data table "Search:" box
4. Note some text should appear on the screen similar to this content
and format:
Patrons found for: Anywhere: test
Library=Centerville, Category=Board
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
* Add Cypress tests to cover the 404 redirect if the pref is disabled
* Add "invoices" as possible embed option for
/acquisitions/vendors/:vendor_id
Seems relevant as the api def for invoice if expecting for it
api/v1/swagger/definitions/invoice.yaml
* Tell insertObject how to generate an invoice and return it.
Unfortunately we don't have a direct route for that, hence the embed
on /vendors/:vendor_id
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: Lucas Gass <lucas@bywatersolutions.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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
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>
'request' is unblessed in this context. get_type doesnt exist/work.
Test plan:
1) Enable ILLModule and ILLOpacUnauthenticatedRequest
2) Logout, place an OPAC unauthenticated ILL request, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?backend=Standard&op=add_form
3) Input all mandatory fields. Click 'Create'.
4) Notice 'Request type' shows as 'N/A'. This will always be the case regardless of type you pick.
5) Apply patch. Repeat. Notice 'Request type' now shows as expected.
Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
1) Install the following dummy backend plugin:
https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9
2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority
3) Logout, create a new Unauthenticated ILL request on the OPAC, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard
4) Fill in the mandatory top fields (first name, last name, email address and library)
5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic.
6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123'
7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally.
This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form.
8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority).
9) Input the correct captcha this time
10) Confirm the created request landed in the PluginBackend backend.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This is needed or else the OPAC still throws the 'malformed query string' mentioned on the original test plan.
This is because the fix from bug 40865 was only applied to intra datatables.js not the OPAC datatables.
I don't know why this fixes it for the OPAC, but it does.
Joubu, thoughts?
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
1) Install the unpaywall plugin:
https://github.com/openfifth/koha-plugin-ill-avail-unpaywall/releases/tag/1.0.2
2) Configure an email address on the plugin configuration (I believe any email address should work):
<staff_url>/cgi-bin/koha/plugins/run.pl?class=Koha%3A%3APlugin%3A%3ACom%3A%3APTFSEurope%3A%3AAvailabilityUnpaywall&method=configure
3) Enable ILLModule and ILLCheckAvailability sys prefs
4) Create a new ILL request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
5) Pick type: journal article and enter the DOI: 10.1002/bjs.1800621024
6) Enter a cardnumber e.g. '42' for koha user and any library.
7) Notice the availability screen never renders, a console error is logged on the browser.
8) Apply patch. Refresh. Repeat.
This appears to have stopped working after bug 26553. Using git bisect, after bug 26553 (cc09868152), this started returning a 'bad request: malformed query string' because query params were being sent to the plugin API route (which doesn't consider them). Bug 40865 then fixed the bad request error, but resulted in the console error we see now, which is fixed by this patch.
ajax.dataSrc appears to now be returning an additional level of 'data' due to datatables upgrade (?), this patch changes the dataSrc override to be more in line with the example doc at https://datatables.net/reference/option/ajax.dataSrc
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>
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>
This change removes the "catalogue/getitem-ajax.pl"
which appears to be an unused file in Koha.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
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>
WNC amended patch - tidied
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00
instade of current date and we get Error 500
to reproduce
1. Connect to staff interface
2. Go to Serials and create a new subscription
3. Click on Serial collection in the left menu (and note the
Subscription numnber)
4. Select a serial to edit and Click on «Edit serials»
5. In the Serial edition form, delete «Published on > and « Expected on
» dates and save
----> Error 500 page is displayed
6. Check the value of «Published on > and « Expected on » dates in the
database
select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>;
------> planneddate publisheddate have «0000-00-00» value
7. Apply the patch
8. run ./installer/data/mysql/updatedatabase.pl
9. repeat step 2, 3, 4, 5, 6
-----> Error 500 page is no more displayed
-----> «Published on » and « Expected on » field have NULL as value
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>
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>
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>
To test:
1. Apply patch
2. Search fof the FilterSearchResultsByLoggedInBranch system preference and set it to 'Do'.
3. Do a catalog search and notice the 'Show local items only' button above the "Location" column.
4. Click it to show information ( in that column ) that is only related to the branch you are currently logged in at.
5. In the same result set have some items that are checked out, withdrawn, lost, damaged, and notforlaon.
6. Play more with the search results and ensure everything is accurate.
7. Set the FilterSearchResultsByLoggedInBranch system preference to 'Don't' and confirm that there is no button to filter by branch 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>
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>
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>
This patch removes extra spaces breaking CSV parsing in tools like Excel.
To test:
1. Perform an item search selecting the CSV option
2. Open the CSV with a TEXT EDITOR of your choice
=> FAIL: Notice the extra spaces after the commas (those used as separators, no the ones within the double quotes)
3. Apply this patch
4. Repeat 1-2
=> SUCCESS: No extra spaces!
5. Sign off :-D
Note: On the first attempt you can open the file on Excel if you have it and notice things are not aligned.
Note2: Using double quotes on all fields regardless of the context works for most parsers, but is not correct CSV. Will deal with it on a separate bug.
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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
To Test:
BEFORE APPLYING PATCH:
1- Go to any patron account > Add message
2- Add a message for: "Staff - Internal note"
3- Add a second message for: "OPAC - [NAME OF THE PATRON SELECTED]"
4- Add any language (I'll use french-Canada, fr-CA, in this case):
From your koha instance, enter on the command line:
./misc/translator/translate install fr-CA
5- Go to Administration > System preferences > enter language
6- Make sure to check 'Français (fr-CA)' box from the 'StaffInterfaceLanguages'preference and save.
7- Go back to the specific patron in which you added the messages
8- Switch language to 'Français' (bottom left corner)
9- Notice that:
--> 'OPAC' is still the same (Since we spell OPAC the same way in both english and french. However, it might not be the case in other languages).
--> 'Staff note' is not translated.
10- apply patch
AFTER APPLYING PATCH:
11 - From you koha instance, enter on the command line:
./misc/translator/translate update fr-CA
./misc/translator/translate install fr-CA
12- Reload patron's page
13- Notice that 'Staff note' is now translated
** You should see this output: 'Note interne'
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>
This change impacts the display of patron fields listed in system preferences:
BorrowerMandatoryField
BorrowerUnwantedField
PatronSelfModificationBorrowerUnwantedField
PatronSelfRegistrationBorrowerMandatoryField
PatronSelfRegistrationBorrowerUnwantedField
To test:
1 - confirm that the sysprefs listed above include "Alternate contact: First name (contactfirstname)" and "Alternate contact: Surname (contactname)"
2 - confirm that toggling the display of these fields hides/shows the Guarantor first name and Guarantor surname fields in a patron record
3 - apply patch, restart_all
4 - confirm that sysprefs now show "Guarantor first name (contactfirstname)" and "Guarnator surname (contactname)"
5 - confirm toggling the display of these fields still hides/shows the correct fields in a patron record in the staff client, in self-ref, and in OPAC self-modification
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
- I think "Please enter a card number or name" sounds friendlier
- We don't add a "btn-primary" class to these buttons
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
If the "arrow" button on the patron search is clicked with no value in
the textbox, it redirects to members/members-home.pl and performs a
search with no value automatically. It makes more send for it to behave
as the "Patrons" link in the navbar that directs to members-home.pl
where the librarian can then perform a more advanced search.
Test Plan:
1) Click the "Search patrons" link on the header, then the arrow button
2) Note an empty patron search is performed immediately
3) Apply this patch
4) Restart all the things!
5) Repeat step 1
6) Note a paton search is no longer triggered automatically
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
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>
When starting SIP, Koha passes an incorrect value to the
Net::Server "group" parameter, which can generate an
error in the logs":
Couldn't become gid "<uid>": Operation not permitted
This change ensures that a valid numeric GID is passed instead.
Test plan:
1. Enter KTD shell.
2. To reproduce the error: sudo groupmod -g 8001 kohadev-koha
3. Restart SIP: sudo koha-sip --restart kohadev
4. Check SIP logs:
/var/log/koha/kohadev/sip-output.log
5. Observe the error:
Couldn't become gid "<uid>": Operation not permitted
6. Apply this patch.
7. Repeat steps 2 to 4.
8. Verify that the "Couldn't become gid" error is no longer logged.
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>
To test:
1 - add 856$u " www.cheese.com" to a record
2 - confirm link does not work from results or details in either staff interface or OPAC
3 - add 856$u "www.cheese.com " to a record
4 - confirm link does not work from results or details in either staff interface or OPAC
7 - apply patch, restart_all
8 - reload pages, confirm both links work in results and details in staff interface and OPAC
Optional final step: have some cheese as a treat
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
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>
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>
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>
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>
Corrected and standardized the capitalization of "Override Renew hold
for another" to "Override renew hold for another"
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>
Test Plan:
1. Apply Patch, go to the staff client
2. Navigate to the Administration
3. Search for staffShibOnly within System Preferences
4. Check that the description properly displays the right information
"staff to log in by means other than Shibboleth"
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>
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>
This patch redoes the fix that was made in bug 38450 to make sure
the "Waiting at ... since ..." string is picked up by the translation
tool. It's a parenthesis move.
See bug 38450 for explanation.
_("This %s is picked").format(foo)
_("This %s is NOT picked".format(bar))
To test:
1. Install a new langage
gulp po:update --lang fr-CA
./misc/translator/translate install fr-CA
2. Place a hold
3. Check in the item on hold and confirm the hold
4. Go to the record details page
--> Waiting at ... since ... is in English
5. Check the translation files
cd misc/translator/po/
git grep "Waiting at" fr-CA*
--> There is no "Waiting at %s, %s since %s."
6. Apply patch
7. Update strings again
8. Check translation files again
--> The string should be there
9. Translate the string (making sure to remove the fuzzy line if any)
10. Install the translation again (only the translate install part)
11. Check the record details page
--> It should be translated!
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>
To test:
1 - place a hold
2 - check an item in to fill your hold, confirm so item goes to Waiting status
3 - check item in again, get Hold Already Waiting modal
4 - clck Ignore, confirm modal reloads immediately
5 - apply patch, restart_all
6 - reload checkin page
7 - check item in again, get Hold Already Waiting modal
8 - click Ignore, confirm modal goes away and doesn't return
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Since version 25.11.00 (also valid in current main), while
adding or editing a record, launching the plug-in to help
complete the MARC21 006/008 fields results in a browser
pop-up with the message "Can't validate the xml data from
(...)/marc21_field_00{6,8}.xml".
The actual problem lies with how the value builder plugins
(marc21_field_00{6,8}.pl) try to validate the relevant XML
files against the Schema Definition (marc21_field_CF.xsd),
the latter containing two references to the K-C.org website
that still use the 'http' URL scheme.
This patch fixes that.
Test plan:
1) In a MARC21 instance, create a new record by going to:
Cataloging > New record > Books, Booklets, Workbooks,
then click inside the 008 field so it becomes populated.
2) Click the Tag editor icon next to field 008. Notice how
you get a pop-up window in your browser with the error:
"Can't validate the xml data from (...)/marc21_field_008.xml".
3) Apply this patch.
4) Repeat step 2) -- this time the tag editor should launch
correctly.
5) For extra credit, repeat the Test plan this time testing
field 006 -- its tag editor should work without problems
after applying the patch.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.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>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Passes invert_name flag to patron_to_html to restore previous
format in patron autocomplete.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This patch fixes the markup in the modal, introduced by Bug 32581,
asking whether to update the patron's expiration date when changing the
patron category. The markup needs to be updated to conform with
Bootstrap 5.
To test, apply the patch and go to Patrons.
- Search for any patron and edit it.
- Scroll down to the "Library management" section.
- Change the category.
- You should see a confirmation modal: "Confirm expiration date"
- Test each of the controls to confirm that they work correctly: The
"X" close button, the "Yes" and "No" buttons.
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: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This patch makes changing the expiration date optional, by providing a modal when switching a patron category. Confirming the modal will change the expiration date to the default and cancelling will keep the same expiration date.
To test:
1) Same plan as before except now there is a modal when changing the patron category.
- Attempt confirming the modal: expiration date should change to default.
- Attempt canceling the modal: expiration date should stay the same
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
To test:
1) In Administration-> Patron categories, set the enrollment period for the 'School' category to 12 months.
2) Find a patron that is from another category, edit their info and change their category from patron to school.
3) Note that the expiry date automatically changes to 12 months from today.
4) Save your changes and ensure on the patron's detail page that their expiration date was successfully changed.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
When creating an analytical record from scratch and filling the 773
field with marc21_linking_section.pl plugin, the information put
in field 773 is very basic, incomplete, sometimes buggy ($9, $0).
Test plan
=========
1. Configure a MARC bibliographic framework: enable essential
subfields in 773: 7, a, t, b, d, g, k, x, z, w (check the Editor
checkbox), put them in this order, and chose plugin
marc21_linking_section.pl for 773 $t.
2. Start creating a new record and go to 773 $t. Activate the plugin
to find the a record to become the host record (perform a search
for 'Linux kernel development'). Note the content of the 773
field.
3. Apply the patch, restart plack etc.
4. Repeat p. 2.-3. See that the generated 773 field contains now much
more information, including 773 $7.
Additionally, commented code has been removed and check/variable
initialization added to get rid of warnings in log.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
The AuthClient template plugin was causing 500 errors during database
upgrades when the identity_providers schema was out of sync. The plugin
tried to query the new 'auto_register_opac' column before the database
schema was updated, creating a chicken-egg problem.
This patch wraps the database query in Try::Tiny to handle schema
mismatches gracefully during upgrades, allowing the upgrade process
to continue without crashing the authentication interface.
Test plan:
1. On main, apply all bug 37711 patches BUT THIS ONE
2. Simulate an upgrade by:
* Edit Koha.pm so it points to the next version
* Move the atomicupdate file to the right number in db_revs
3. Restart everything:
$ ktd --shell
k$ restart_all
4. Access http://kohadev-intra.localhost
=> FAIL: You get a 500! With a stack trace!
5. Apply this patch
6. Repeat 3 and 4
=> SUCCESS: No 500 error, redirects to installer
7. Proceed with the upgrade:
=> SUCCESS: It works as it should
8. Run tests:
k$ prove -v t/db_dependent/Template/Plugin/AuthClient.t
=> SUCCESS: All tests pass
9. Sign off :-D
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This patch adapts the `Identity provider domains` CRUD page to handle
the new configuration options.
To test:
1. Have an IdP with some domains set. Make sure there's at least one
domain with auto-register enabled and one with it disabled.
2. Apply this patches
3. Run:
$ ktd --shell
k$ updatedatabase
=> SUCCESS: Updates successfully
4. Run:
k$ yarn build
5. Refresh the IdP domains page
=> SUCCESS: The domains table shows both OPAC and staff auto-register
options.
=> SUCCESS: The staff auto-register is disabled for both domains
=> SUCCESS: The OPAC auto-register matches what was set for each domain
regarding auto-register (remember that before this patchset,
auto-register only works for the OPAC).
6. Play with editing/adding/removing domain configurations
=> SUCCESS: Things work as expected, values are persisted on the DB
correctly.
7. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Before this patches, only OPAC auto-registration at login using
OAuth2/OIDC IdPs was allowed.
This patch makes the staff interface to be able to auto-register new
users.
On doing it, I had to track down the possible values for the `interface`
parameter in the case of the staff interface.
Koha::Template::Plugin::AuthClient uses 'staff' internally so I sticked
with it. The whole area needs more param validation and exceptions to
avoid mistakes for not knowing the valid values.
I added some safeguards on the Koha::REST::Plugin::Auth::IdP helpers.
They get tested on the added tests.
To test:
1. Apply this patch
2. Run:
$ prove t/db_dependent/Koha/REST/Plugin/Auth/IdP.t
=> SUCCESS: Tests pass!
3. Have a valid OAuth...
4. Enable Staff auto-register
5. Login with an external IdP on the staff interface
=> SUCCESS: It gets registered!
Note: it will probably lack permissions to access the staff interface,
but you can check on the DB it got registered.
6. Sign off :-D
Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This patch makes the API representation of the identity providers
domains match the new metadata.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This patch adds sorting to lists of lists in the OPAC.
The mechanism used here for op=list is similar to the one
used in op=view, so it's stylistically and functionally
consistent with the rest of the Lists module in the OPAC.
Test plan:
0. Apply the patch and restart Plack (ie koha-plack --restart kohadev)
1. Create 20+ public lists and 20+ private lists for a particular user
you control (try to use names that range throughout the alphabet)
2. Using SQL, update the Modification date for at least 1 public
list and 1 private list
3. As an anonymous (ie not logged in user), go to
/cgi-bin/koha/opac-shelves.pl?op=list&public=0
4. Note you cannot see any lists
5. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=list&public=1
6, Note you can see public lists with a toolbar with the button "Sort"
below the alert "Log in to create a new list"
7. Using the "Sort" option, try out all the different sort options
for default, "List name", and "Modification date"
8. After sorting, try paging through the list of lists. You should
note that the sorting is retained through the paging.
9. prove t/db_dependent/Virtualshelves.t
10. Celebrate!
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
cypress run --spec t/cypress/integration/ERM/Dialog_spec.ts
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
This patch prevents span elements being filled with "undefined"
which are then shown to screen readers and print output.
Test plan:
0. Apply the patch
1. Enable the following system preference: OpacStarRatings (results,
details, and patron).
2. Check out an item to a user you can log in as (e.g. koha user)
3. Go to /cgi-bin/koha/opac-user.pl in the OPAC
4. Click "Print" on the toolbar above the summary table
5. Note that 5 occurrences of "undefined" do not appear next to the
title in the print output
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
So we deal with punctuation like in other places.
If your autocomplete results include a patron without a surname,
Koha still puts a comma and space between the first name and the nonexistent surname, like ", Henry."
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
As I traversed the REST API spec to add the `late_since_days` embed
option, I noticed an inconsistency in the embed options we defined in
each place a basket is to be returned.
This patch makes all the places have the same embed options.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This patch adds the option to embed the return value of the
`late_since_days` method in basket objects in the REST API.
It does so by just adding it to the list of embeds in the spec. It is
added in every place baskets can be returned.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
- Use devtool: false to prevent emitting source maps for cypress.
- Add package script to clean built assets, artifacts.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Replaced the eager imports in the intranet APIClient aggregator with
lazy proxies so individual client modules are only fetched the first
time they are actually used.
Documented the pattern in the createClientProxy JSDoc, and kept the legacy
synchronous API intact by forwarding property access, method calls, and
promise chaining. The Vue aggregator remains on static imports for now
because the rspack bundles already would handle chunking (which we need to configure)
and would require broader consumer changes.
This is a bit hacky, but only touches the api-client itself, which I like.
Otherwise we would have to adjust all consumers.
Test plan:
1. Log in to the staff interface and visit Admin → System preferences.
2. Open DevTools, Network tab, and enable “Disable cache”.
3. Trigger an API call (e.g. edit a preference and click “Save”, or run
await APIClient.sysprefs.sysprefs.update_all({}).catch(()=>{}); from
the console).
4. Confirm a new request for js/fetch/system-preferences-api-client.js
appears and the page still behaves as before.
5. Theoretically we would need to test all call sites..
6. Sign-off
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
In the staff interface we set the class for the patron's title (Mr/Mrs/etc) to "patron_title," but we were making it "patron-title" in the OPAC. This patch standardizes them.
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
To test:
1- have a patron with values in all parts of name (firstname, preferred name, surname, othername, middlename)
2- log into OPAC as patron, observe where are how name is displayed, lack of classes on component parts
3- apply patch
4- reload OPAC pages, observe name looks the same but now has classes when inspected
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This patch adds a wrapper function in patron-title.inc that can be used to either span, or not if no html requested
It replaces the same concept that was used for patron title
to test:
1 - have a patron with all name parts
2 - load pages with a variety of name displays, confirm lack of classes
3 - apply patch
4 - reload pages from step 2, confirm there are now classes *except for where the name is called with no_html, like a page title
5 - Check page titles, patron search, placing a hold, patron search and confirm different links and views work as before
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
And move the comment where it belongs.
More changes on 41031.
Test plan:
Add a new biblio record with basic editor.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Development wise it is much simpler to do this check in perl when
opening the editor than getting this logic into the template with
javascript. Furthermore, older data may be corrupted, but we trust
the current plugins to not insert such fields anymore.
Test plan:
Run t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t
Open an existing record in the basic editor. Shorten 008 without plugin.
Save and open the record again. Do you get the alert?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
The command currently logs when deleting indexes and indexing records, it would be helpful
to have a log when resetting the mappings, and to log which mapping file has been used.
To test:
1 - perl misc/search_tools/rebuild_elasticsearch.pl -r
2 - No log of reset
3 - Apply patch
4 - perl misc/search_tools/rebuild_elasticsearch.pl -r
5 - Note reset is logged
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
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>
I just added an exception in the script. Sorry for the inconvenience.
Test Plan:
1- Enable the following system preference: OpacStarRatings (results,
details, and patron).
2- Apply the patch.
3- Go to the Opac.
4- Search a record.
5- Inspect the HTML code before the stars and notice that there is "Star
rating" in a span tag with the class "sr-only". Inspect the stars,
there should be a span tag for each star. After the stars, notice
that there is the average rating in a span with the "sr-only" class.
6- Click on a record and do the same as the 5: go to the star rating,
inspect the HTML code, and notice that there is a span tag for each
star.
7- Now, log into an account.
8- Search a record.
9- It should be the same information as in the step 5.
10- Click on a record to view the details. Now, you can change the
rating. Inspect the stars, each should have the number of stars in
the span tag with a "sr-only" class, which are in the link tags.
11- For this part, you need to have a record checked out (if you don't
have a record checked out, go to the staff interface and do it.
Choose your patron and enter the barcode of the record).
12- Go to your account. In the "Checked Out" section, you should see the
same as in the 10 step: the number of stars and be able to change
your rating or make a new one.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch moves the cypress test into the Acqusitions folder to help keep t/cypress/integration organized as we add more tests.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
It is a requirement to have id and class on the body tag. We had a test
that was incorrectly removed (see bug 41216)
Test plan:
Confirm that now reserve/request.pl and reserve/hold-group.pl have the
class "reserve" on the body tag.
Note that reserve/request.pl previously had "catalog", that feels wrong,
please let me know if you disagree with "reserve"
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
This patch does the following:
-Adds a 'btn' and 'btn-default' class to the buttons in the item-template-toolbar
-Removes the btn-group parent containers
-Changes the wording of the remember session checkbox to 'Remember for session', just like it is on the check out screen for due dates.
-Adds a visual divider after the 'Remember for session' checkbox
-Add CSS to addbiblio.css to make the checkbox/label appear a little nicer
To test:
-Add an item and 'Save as template'
-Notice the toolbar buttons look different from other toolbars in Koha.
-Apply patch
-Look again, the buttons should look better, hopefully!
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Test plan:
Enable the following system preferences: CookieConsent, EnableOpacSearchHistory, and OpacLangSelectorMode (both top and footer).
-Apply the patch.
-Go to the Koha OPAC.
-Check the vertical dividers in the navigation.
-If they are present with a coherent design, the test is successful.
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>
This patch adds table configuration options to the serial claims table,
including the option to set a default sort column.
The patch also moves the table column filter row to the top, which I
think is more standard in the staff interface.
To test, apply the patch and restart services.
- You'll need to have subscription issues which are missing, claimed, or
late.
- Go to Serials -> Claims, and select a vendor.
- In the table of missing issues, confirm that all DataTable controls
work correctly: Column visibility, export, and configuration options.
- Confirm that you can use Administration -> Table settings -> Serials
-> Claims to hide columns by default or set the default order.
- Confirm that the column header filter forms work correctly.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.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>
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>
Test plan:
Fill ReplytoDefault.
Check an error page on OPAC and intranet.
Verify that the send mail link refers to that email address.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
This patch removes a trivially not required DB object instantiation.
This implies saving CPU usage for the instantiation and algo for
fetching from the DB.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Item/Transfer.t
=> SUCCESS: Tests pass! They cover ->receive()
2. Apply this patch
3. Repeat 1
=> SUCCESS: No behavior change, tests pass!
4. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.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>
This patch adds the required mapping in
`Koha::Acquisition::Order::Claim` and adds it's definition to the API
spec.
To test:
1. Apply the patches
2. Verify the mapping makes sense and conforms to the current style and
API coding guidelines.
3. Run:
$ ktd --shell
k$ prove xt/api.t
=> SUCCESS: Tests pass
4. Sign off :-D
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.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>
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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
This patch adds a visible "Sort results by:" label above the sort dropdown
on the OPAC search results toolbar. Previously, only a screen-reader-only
label was present, providing no visible context for sighted users.
This improves accessibility (WCAG 2.1 compliance) and usability by making
the function of the dropdown clear.
To test:
1. Perform a search in the OPAC.
2. Confirm that the "Sort results by:" text appears above the sort dropdown.
3. Verify that the dropdown still functions correctly and the layout remains
consistent across screen sizes.
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 2ea04163a3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
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>
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>
Currently the column visibility is broken because the table is not using bKohaColumnsUseNames.
We should first fix that because it's a bug (and a regression certainly caused by DT's saveState, bug 33484).
Then it will be quite trivial to move it to the table's settings.
Column visibility must use bKohaColumnsUseNames when some columns are
displayed/hidden depending on sysprefs (or other variables).
Test plan:
0. Do not apply this patch
1. Check an item out for a patron
2. Turn on ExportCircHistory
3. Reload the checkouts table
=> The export column is not displayed (FAIL)
4. Open the dev console (ctrl+shift+c on Firefox), Storage tab => local
storage. Remove the 2 keys (only one may exist)
DataTables_circ_circulation_issues-table
DataTables_members_moremember_issues-table
5. Reload the checkouts table
=> The export column is displayed
6. Turn off ExportCircHistory
7. Reload the checkouts table
=> The column column is displayed (FAIL)
Well, you got the idea, the syspref's value is not taken into account
when a DataTable's state already exists in the local storage.
Now apply this patch and repeat the different steps, on the two tabs
* "Check out" (circ/circulation.pl)
* "Default" (members/moremember.pl)
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 17b3158b35)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
This patch introduces a new unique restriction type 'FINES' specifically
for the debar_patrons_with_fines.pl script to prevent duplicate
restrictions on repeated runs.
The original fix used 'SUSPENSION' but this conflicted with the
fine-in-days feature which uses SUSPENSION for time-limited restrictions
when overdue items are returned. Running the script would overwrite
those time-limited restrictions with indefinite ones.
Changes:
- Add new 'FINES' system restriction type to patron_restriction_types.yml
for new installations
- Create database update to add 'FINES' type to existing installations
- Update debar_patrons_with_fines.pl to use 'FINES' instead of 'SUSPENSION'
- Update AddUniqueDebarment and DelUniqueDebarment POD documentation
This keeps SUSPENSION exclusively for the fine-in-days feature while
preventing duplicate restrictions from the fines script.
Test plan:
1. Run database update
2. Verify new FINES restriction type exists in restriction_types table
3. Run debar_patrons_with_fines.pl multiple times
4. Confirm only one FINES restriction per patron (no duplicates)
5. Verify SUSPENSION restrictions from fine-in-days are not affected
6. Run tests: prove t/db_dependent/Patron/Borrower_Debarments.t
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d90333e911)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The cronjob debar_patrons_with_fines.pl is meant to add a restriction based on a fines threshold.
The problem is that the script adds a MANUAL restriction, which makes no sense. MANUAL restrictions are meant to be manually created, never automatic as this script does.
In addition, they are repeatable, not unique. Every time this script runs, it will add an additional restriction.
There is already a restriction type meant for this type of use case: SUSPENSION
We should change this script to create SUSPENSION restrictions instead of MANUAL restrictions.
In summary, this script should use the unique restriction type SUSPENSION to prevent multiple additional restrictions from being created on each run.
Test Plan:
1) Set up a patron with fines
2) Run misc/cronjobs/debar_patrons_with_fines.pl -c -m "Test message"
3) Note the restriction is created
4) Run misc/cronjobs/debar_patrons_with_fines.pl -c -m "Test message" again
5) Note another restriction is created
6) Delete the restrictions
7) Apply this patch
8) Run misc/cronjobs/debar_patrons_with_fines.pl -c -m "Test message"
9) Note the restriction is created
10) Run misc/cronjobs/debar_patrons_with_fines.pl -c -m "Test message" again
11) Note another restriction is *not* created!
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fdb7c9b405)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2721b0516d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the following corrections:
- Remove link from breadcrumb WRAPPER items. The right markup is
generated in html_helpers.inc if you add the "bc_active = 1" to the
breadcrumb_item WRAPPER.
- Remove "href='#'" from inactive links, and adjust CSS accordingly.
The W3C validator doesn't like it when a true "aria-disabled"
attribute is on a link which has an href attribute.
Signed-off-by: Jake Deery <jake.deery@openfifth.co.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3ef370f9e1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds aria-disabled and tabindex = -1 to a breadcrumb, if it
is the current page. This aids in accesssibility, and is generally good
practice.
== TO TEST: ==
a) Visit any page on the OPAC, and inspect the breadcrumb pertinent to
the current page
*) Notice the lack of aria-disabled and tabindex on the inspected
element
== APPLY PATCH ==
b) repeat step a
*) Notice how there is now an aria-disabled and tabindex = -1
*) Notice you cannot tab on to the final breadcrumb anymore
c) Ensure other breadcrumbs are unaffected and still work as links
== SIGN OFF ==
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d5f8f70326)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
Side note: The if test on ms_kw in OPAC masthead seems not to be used,
but considering that out of scope here.
Test plan:
Check the shorter text on OPAC search bar.
Toggle SearchMyLibraryFirst and OpacAddMastheadLibraryPulldown. Refresh.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 ea00bef828)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
This patch removes a trivial duplicate import.
To test:
1. Apply the patch
2. Run:
k$ prove t/db_dependent/Koha/Patron.t
=> SUCCESS: Tests don't break
3. Sign off :-D
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 61d44af600)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
The previous commit added orderData configurations to maintain grouping
when sorting, but the column indexes were off by one. Each orderData
should reference its own column index as the secondary sort criterion,
not the previous column's index.
Corrected mappings:
- Title (index 4): [1,3] -> [1,4]
- Record Type (index 5): [1,4] -> [1,5]
- Item Type (index 6): [1,5] -> [1,6]
- Collection (index 7): [1,6] -> [1,7]
- Location (index 8): [1,7] -> [1,8]
- Home Branch (index 9): [1,8] -> [1,9]
- Current Branch (index 12): [1,11] -> [1,12]
- Call Number (index 13): [1,12] -> [1,13]
- Copy Number (index 14): [1,13] -> [1,14]
- Charge (index 15): [1,14] -> [1,15]
- Fine (index 16): [1,15] -> [1,16]
- Price (index 17): [1,16] -> [1,17]
This ensures that when clicking a column header to sort, DataTables
will:
1. Sort by column 1 (group header) first to maintain grouping
2. Sort by the clicked column (using correct index) as secondary sort
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 053dbd5ad0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds aDataSort configurations for each sortable column such
that we always maintain the group sorting primarily and apply a
secondary sort using the column in question.
When sorting by due date you are much more likely to want the true date
sorting without forcing a primary sort on the grouping column. We achieve
that by removing the primary sort on checkout date and disable rowGrouping
in such a case.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. When sorting on "Due date", the grouping by
"Previous/Today's checkouts" is disabled.
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7a3fee3348)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
This patch adds missing RewriteRules for ERM, Preservation and Acquisition modules in koha-httpd.conf to restore staff client functionality.
Test plan:
1. Apply patch
2. Restart Apache
3. Access acquisitions and ERM pages
4. Confirm functionality restored
Signed-off-by: Vivek Kumar <vivek.kumar@bestbookbuddies.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Bug 41167: (follow-up) Correct rewrite rules in koha-httpd.conf
This follow-up patch fixes issues from the initial patch for Bug 41167:
- Adds missing asterisks (*) in rewrite rule patterns
- Removes erroneous RewriteRules from the OPAC virtualhost
- Ensures all ERM, Preservation, and Acquisition rewrite rules are correctly placed under the intranet virtualhost
Test plan:
1. Apply patch
2. Restart Apache
3. Access ERM, Preservation, and Acquisitions modules
4. Confirm pages load correctly without 404 or routing errors
Signed-off-by: Vivek Kumar <vivek.kumar@bestbookbuddies.com>
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 47384fb03f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. prove t/db_dependent/Auth.t
2. Observe success
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dbf812869d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Adds comprehensive selenium tests for the new functionality where
superlibrarians can manage 2FA settings for other patrons.
To test:
1. Run the existing authentication_2fa.t selenium tests
2. Notice missing coverage for cross-user 2FA management
3. Apply the patch
4. Run the tests again
5. Verify new subtests pass:
- Superlibrarian can view/disable other users' 2FA
- Enable button is hidden with explanatory message
- Non-superlibrarian gets 403 error for other users
Signed-off-by: Kyle M Hall <kyle@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 4c98193075)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
With thanks to Jonathan for suggesting this direction.
Test plan:
Go to patron detail, notices tab for a patron with some notices.
Look for a string that only occurs in the notice text of some notice.
Without this patch, you should not find that one.
With this patch, you should find it.
Manipulate the text of a notice to check display of bad html. (Click title.)
* Like: update message_queue set content='<p>test</p><a href="' where message_id=X;
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 7694dd09c7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 be977d81e4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change adds the lightbox from OPAC search results to OPAC lists
for cover images.
Test plan:
0. Enable the following system preferences:
- OPACAmazonCoverImages
- GoogleJackets
- OpenLibraryCovers
1. Using KTD, go to /cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
2. Note that the lightbox for cover images which displays one cover
at a time
3. Create a public list based off those search results
4. Go to that list and note that the 3 cover images just display all
at the same time, which does not look good
5. Apply the patch
6. Refresh the page for the public list results
7. Note that the lightbox is now used like in OPAC search results
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 f0c6f31e5f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
This patch removes the definite article from some labels, so that their
visual and hidden labels are in sync.
== TO TEST ==
a) (optionally) read the patch code to understand what locations have change
b) inspect the code on the results and details pages
c) note that some visual and hidden labels differ
*) specifically, the add to cart and place hold labels
== APPLY PATCH ==
d) repeat step b)
e) notice now that the visual and hidden labels match
== SIGN OFF ==
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 f40387ed12)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a9c1583675)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In order to prevent permission errors to user without the 'parameters'
permission we are introducing a separate endpoint for the ERM module to
retrieve additional fields for this specific module.
* Adds a new endpoint /erm/extended_attribute_types
* Adjusts Cypress and REST API tests
* Adds REST API swagger specs
I wanted to keep the code as simple as possible and decided to create a
wrapper for the additional fields API client. The magic is in
koha-tmpl/intranet-tmpl/prog/js/fetch/additional-fields-api-client.js
Ideally we should provide a test for this but I failed to write them.
If required by QA I would suggest to deal with them on a separate bug to
not delay this bugfix. The code has been kept designed to be used in
other contexts but the api client is not used outside of Vue and
outside of the ERM module.
Test plan:
Confirm that user without the 'parameters' permission can use the ERM
module with additional fields.
Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e0ca94ae18)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
To test:
1. prove t/db_dependent/Koha/Item.t
2. Observe success
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 d77c826c8c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
If a patron attribute is not editable at the OPAC it should not be
possible to make it mandatory.
Test plan:
Create a new patron attribute and confirm that checkboxes behaviour is
consistent.
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 d4a17b1b56)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
Test plan:
Read the patch.
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 1a2d1774f0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
It's not available at the OPAC, and we actually don't need it: we don't
save/restore DT's state.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 860dc5b845)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We cannot set the default value in the yaml file dynamically.
This is not ideal but we are going to modify the default "Item type" if
item-level_itypes is off.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bcb11b69e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It's no longer needed
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b09ac4bf93)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
So we can pick a column from the table settings
http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c7e673b84)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We can use the force_visibility flag to hide column when they are empty
or should not be displayed because of syspref.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 99f7388cb9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Make the OPAC holdings table ready to use visibility based on
column's names.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a6a6693adf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the Public Biblio endpoint respect the OpacSuppression
system preference and the biblio.opac_suppressed field introduced in
Bug 38330.
When OpacSuppression is enabled and a biblio has opac_suppressed set to 1,
the endpoint now returns a 404 (Not Found) response instead of exposing
the bibliographic record.
Test plan:
1. Apply patch
2. Run: prove t/db_dependent/api/v1/biblios.t
3. Verify all tests pass, including the new OpacSuppression subtest
4. Test manually:
- Enable OpacSuppression syspref
- Set a biblio's opac_suppressed field to 1
- Access /api/v1/public/biblios/{biblio_id}
- Confirm it returns 404
- Set opac_suppressed to 0
- Confirm it returns 200 with the record
- Disable OpacSuppression syspref
- Confirm record is visible regardless of opac_suppressed value
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 05aa74e921)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Just a last wake up call.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5bad556207)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch completes the deprecation cycle started in bug 36343 by
removing the backward compatibility code and deprecation warnings for
the old after_biblio_action hook signature.
Changes made:
1. Removed the duplicate biblio and biblio_id parameters from
_after_biblio_action_hooks in C4::Biblio that were marked for
deprecation in 24.11.00
2. Updated the test plugin to use only the new payload-based signature,
ensuring all parameters are accessed via $params->{payload}
The after_biblio_action hook now consistently uses the modern signature
with a payload parameter, matching the pattern used by other plugin hooks
like before_biblio_action, after_item_action, and after_hold_action.
Test plan:
1. Run: prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t
2. Run: prove t/db_dependent/Koha/Plugins/
3. Run: prove t/db_dependent/Biblio.t
4. All tests should pass
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1571fd489c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
For reusability and to limit files to the git index
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 647b28e536)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de5e76bac2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If some installs didn't notice the column was missing (not renamed) we
can still do it now.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a0cc8aa9d7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We can reach an inconsistent state if the upgrade DB failed and
new_record_id has been created but renamed.
I don't think we should try to recover from this state, but have a
specific error message in this case. We will guide people asking for
help.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9e0a70fced)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Amended-by: Jonathan Druart
Added + 1 to the plan
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c6484a3f83)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Follow the original test plan and compare the resulting tables to:
MariaDB [koha_kohadev]> desc additional_field_values;
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| field_id | int(11) | NO | MUL | NULL | |
| record_id | int(11) | NO | | NULL | |
| value | varchar(255) | NO | | | |
+-----------+--------------+------+-----+---------+----------------+
4 rows in set (0.003 sec)
MariaDB [koha_kohadev]> desc aqbookseller_aliases;
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| alias_id | int(11) | NO | PRI | NULL | auto_increment |
| vendor_id | int(11) | NO | MUL | NULL | |
| alias | varchar(255) | NO | | NULL | |
+-----------+--------------+------+-----+---------+----------------+
3 rows in set (0.004 sec)
MariaDB [koha_kohadev]> desc aqbookseller_interfaces;
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
| interface_id | int(11) | NO | PRI | NULL | auto_increment |
| vendor_id | int(11) | NO | MUL | NULL | |
| type | varchar(80) | YES | | NULL | |
| name | varchar(255) | NO | | NULL | |
| uri | mediumtext | YES | | NULL | |
| login | varchar(255) | YES | | NULL | |
| password | mediumtext | YES | | NULL | |
| account_email | mediumtext | YES | | NULL | |
| notes | longtext | YES | | NULL | |
+---------------+--------------+------+-----+---------+----------------+
9 rows in set (0.003 sec)
The Type field should be the only deviation from the previous version,
Null and Extra should be identical.
2. Run perl ../misc4dev/run_tests.pl --run-db-compare-only --compare-with v24.05.00
3. Sign off
Co-authored-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b9d392dd61)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
- Change `RENAME COLUMN <OLD> TO <NEW>` to `CHANGE COLUMN <OLD> <NEW>
<DATATYPE (required for this syntax)>`.
To test (assuming ktd):
1. Checkout upstream/24.11.x
2. Start ktd with `KOHA_IMAGE=24.11-bullseye(-arm64) DB_IMAGE=mariadb:10.3 ktd up
-d`
3. Checkout upstream/main
4. Run updatedatabase in the Koha container
5. Observe the error regarding the unsupported syntax.
6. Tear everything down again: ktd down
7. Repeat 1-2.
8. Once started up, checkout upstream/main
9. Apply the patch on top of it
10. Run updatedatabase in the Koha container
11. Observe a successful upgrade
12. Sign off
Side Note: I tested this against upstream/25.05.x, but this patch is
based on main.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 33f39f55af)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ec66781149)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
This change updates the spreadsheet format to escape formulas
using the built-in function if using Buttons 3.2.0+ or using
a workaround if not.
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29
2. Click on tab 1
3. For 100$a type in the following and save:
=SUM(1+1)
4. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?findborrower=42
5. Checkout barcode 39999000001310 to the patron
6. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl and login as that patron
7. Download the CSV for the summary table and open in Excel
8. Note that the "Author" is "'=SUM(1+1)" and not "=SUM(1+1)" or "2"
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>
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>
If two sysprefs are disabled we must hide the two related columns.
We should also force the visibility of the checkboxes: on the first
screen (op=show/edition) they must be displayed, on the result screen
(op=show_results) the must be hidden.
Test plan:
1. Create a report to see some patrons:
SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%2'
2. Run report and select 'Batch operations ...'
3. Batch patron modification
=> Notice that the table has the checkboxes in the first column
=> The table is sorted by cardnumber
4. Perform the modification
=> Notice that the result table does not have the checkboxes in the first column
=> The table is still sorted by cardnumber
Additional tests:
1. If the logged in user is superlibrarian then the columns "Password expiration date"
and "Protected" are displayed
2. Play with the table's settings and columns visibility to confirm that
they are working correctly (they were not before this patch set)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 17a07dcc2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
A table cannot use the table settings if columns are displayed depending
on sysprefs.
Additionally DT's saveState does not work correctly if some columns are shown/hidden from one screen to
another.
We must add data-colname and turn bKohaColumnsUseNames on for this
table.
Also note that there were several discrepancies between the table
structure and the number of columns in the yaml file.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 034587d8ec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 73dac4c5cc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Uncaught TypeError: patron_table.$ is not a function
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea123185b9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Without this patch it's always "{budget_description} (Inactive)"
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e057c02ca3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Create a basket and add an item to the order. Close the basket.
2. Receive shipment. Create an invoice.
3. Go to the invoice and then go to the receipt page.
4. Receive the item you had added to your basket. Under Fund you will only see “Keep current (your budget name)”. Active budgets are not visible.
5. Click on “Show inactive” — both inactive and active budgets become visible.
6. Apply the patch. Restart all.
7. Repeat step 3 and 4. Notice now that the active budgets are visible under your Fund dropdown. On this step you can create an inactive budget / fund if you don’t have one set already. Next click on “Show inactive” and notice that the active fund is active, and the inactive fund has a budget_description of inactive.
8. Test to make sure budgets stick.
9. Sign off and have a wonderful day!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1d2fc5133d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It seems we dropped a space somewhere so the class for default registers had become:
"{Branchcode}default" instead of "{Branchcode} default"
This broke the JS for selecting
To test:
1 - Enable UseCashRegisters system preference
2 - Create three registers for three different branches
3 - Make each register the default
4 - Click on username in top right
5 - Select 'Set library and cash register'
6 - Choose on of the three branches
7 - Note the dropdown does not populate with the default
8 - Note no registers can be selected
9 - Apply patch
10 - Reload the page
11 - Change libraries and verify all works as expected
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 301ec5dae2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Test plan, ktd:
1) Enable ILLModule
2) Install an additional backend plugin e.g. 'RapidILL':
https://github.com/openfifth/koha-ill-rapidill/releases/tag/v2.2.5
3) Restart plack if you have to:
$ koha-plack --restart kohadev
4) Edit the ILLOpacbackends system preference to just 'Standard'.
5) Now, attempt to create a request with the installed backend directly:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=RapidILL
6) Notice the form is shown. It shouldn't be, as the only OPAC back is Standard.
7) Apply patch. Repeat. You get a 404.
Signed-off-by: Nial Halford-Busby <n.halford-busby@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2d063d00d5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If 'default_save_state' is not in the yaml file then the feature is
enabled by default.
Caught by the following failure:
t/db_dependent/selenium/patrons_search.t ..
# Failed test 'Search works when category of patrons is limited to a library we are not signed in at'
# at t/db_dependent/selenium/patrons_search.t line 471.
# got: 'Showing 1 to 5 of 26 entries (filtered from 82 total entries)'
# expected: 'Showing 1 to 15 of 26 entries (filtered from 82 total entries)'
# Looks like you failed 1 test of 1.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eba0060286)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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 7c4c013645)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The changes made on bug 39533 for the export page have affected other
instance of select2.
eg. on the "place holds" view the select2 elements are too narrow.
This patch suggests to reduce the elements on which the CSS rule
'max-width: 60%' is applied.
Test plan:
Confirm that this patch does not affect the display of the select2
elements on the export and item edition pages.
Confirm that the pickup locations are wider (and their values are
displayed) when placing multi holds
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 353508cf0b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Batch patron operations are broken when using cardnumbers
From
commit d659526b5a
Bug 38664: Tidy the whole codebase
- [%- IF header_row.$place.cell == batch_type || header_types.item(header_row.$place.cell) == batch_type %]
-[%# We must not add whitespace to the cardnumbers %][% cells.cell | html %]
+ [%- IF header_row.$place.cell == batch_type || header_types.item(header_row.$place.cell) == batch_type %]
+ [%# We must not add whitespace to the cardnumbers %][% cells.cell | html %]
The auto tidy added the whitespaces back
This patch suggests to use TT to add the new lines.
+ [%- cells.cell | html -%][% "\n" | $raw %][%# We want 1 item per line, without whitespace %]
Test plan:
- save and run "SELECT cardnumber FROM borrowers"
- use the Batch Operations button to send all visible cardnumbers to batch patron modification
- see that all of your cardnumbers have been found
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 d79cf5665d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a9ffa8b64a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We want to add Cypress test for the force_visibility flag.
We do not test the basket table: the acq module will be rewritten
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c7a7fdde08)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Return early if there is no visibility to force
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ad906a523a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It's already set in the global config.
However it does make sense to have it for supplier_report: you don't
want to show it in the dropdown if the pref is off
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1ffa8aa6dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The _dt_visibility function is only called when the state is
initialized. Here we want to force the visibility of some columns even
if the state exists already.
The idea of this patch is to add a new 'force_visibility' flag to the
column when the visibility needs to be respected regardless what is in
the state. That should only be used when column cannot be toggled.
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 41b531b315)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The IF/ELSE block contents have been reversed in the JS code.
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3429bbfa12)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If a row exists in DB for a given table, default_sort_order will be NULL
in DB which will replace the flag from the YAML file: the feature won't
be available.
Test plan:
0. checkout main (we don't want bug 30633)
1. Go to http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst
=> Notice that "Default sort order" is not available for 'holdingst'
(it's added by bug 30633)
2. Save
3. Verify what you have in DB:
select * from tables_settings where module="opac" and tablename="holdingst";
4. Apply 30633, restart_all
5. Go to http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst
=> Notice that "Default sort order" is not available for 'holdingst' (not ok)
6. Save
7. Verify what you have in DB:
select * from tables_settings where module="opac" and tablename="holdingst";
8. Apply this patch set
9. Go to http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst
=> Notice that "Default sort order" is available for 'holdingst'!
10. Save, verify what you have in DB.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de27044ba2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
No change here.
Test plan:
Apply only this patch and confirm that the tests are still passing.
The previous code was dynamic but complicated to adjust. The next patch
needs more complex and specific comparisons.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 71553c5803)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
We had
[% IF item_level_holds > 0 || show_priority %]
[% ELSIF show_priority %]
We never reach ELSIF.
I am not sure what's the correct fix here. People involved on bug 39276
should help.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5d770843f3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 01c2e93a5d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ef5ba9a42d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Writing these I found that transferbook was generating two queue rebuilds - fixed that
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 168f52f99b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch does two things:
1:
It prevents rebulding the real time holds queue during a checkin if a reserve was found.
The reserve will either:
a - be set to waiting if at correct location and no confirmation - this is fine because we will rebuild the queue when
filling the hold
b - trigger a popup whihc will rebuild the queue when confirming the transfer, or be ignored
2:
It adds a form to ignoring a hold so that we can rebuild the holds queue if we decided not to use the current item
to fill the found hold
To test:
0 - Enable RealTimeHoldsQueue
1 - Place several holds for different libraries on a title
2 - Checkout a copy to a patron at current library (ignore current holds)
3 - Clean up DB so we can see outcomes from next steps:
delete from branchtransfers; delete from background_jobs; update reserves SET found=NULL where found='T';
4 - Check in item, confirm hold
5 - Check background jobs, note two rebuilds of the holds queue
6 - Check item out to previous patron, repeat 3
7 - Check in item, ignore the hold
8 - Check background jobs, note only one rebuild
9 - Apply patch, restart all
10 - Checkout item, repeat 3
11 - Checkin item, confirm hold
12 - Check background jobs, onlt one rebuild of holds queue
13 - Checkout item, repeat 3
14 - Checkin item, ignore hold
15 - Check background jobs, only one rebuild of holds queue
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 f9d096df27)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This test file was specifically testing the message_log return value
from CanBookBeIssued, which was removed as part of the bug 40866
patchset. The circulation message functionality has been reimplemented
elsewhere with proper test coverage, making this test file redundant.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2bd44c51f0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
From
commit 46f7158f44
Bug 38714: acqui/invoice.tt
Debugging stuff left, sorry!
Test plan:
1. Go to Acquisition.
2. Create a vendor.
3. Click "Receive Shipment"
4. Enter an invoice number and save.
5. Go to Administration->Authorized Values->Add A Category
6. Name it ADJ_REASON
7. Put in 2 options
8. Go to invoices in Aqusition
9. Add an adjustment (enter an amount and select a reason, then save)
10. The reason is set to "no reason"
11. Go to reports
12. new sql report
select * from aqinvoice_adjustments
13. Run the report and see your reason is saved.
14. go back to the invoice and click save adjustments
15. Run the report and see your reason is saved.
Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93d680b645)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
When a basket is generated via an EDI QUOTE message, the QUOTE message
includes a library's EAN code (buyer_ean). This patch makes the 'Create
EDIFACT order' button automatically use the EAN from the original QUOTE
message instead of requiring manual EAN selection.
This patch also fixes a bug in process_quote where all baskets in
multi-message QUOTE transports incorrectly used the first message's
buyer_ean, even when subsequent messages had different EANs.
Changes made:
1. Fixed Koha/EDI.pm process_quote auto-order creation to use the correct
buyer_ean for each message/basket pair in multi-message transports
2. Enhanced acqui/basket.pl to extract and provide the quote_ean from
QUOTE messages, handling both single and multi-message scenarios
3. Updated basket.tt template to automatically select the EAN from the
original QUOTE message when available and matching
Test plan:
1. Create a vendor with EDI account and multiple EANs configured
2. Process a QUOTE message that creates a basket
3. Go to the basket page and click "Create EDIFACT order"
4. Verify it automatically uses the EAN from the QUOTE message
(shows tooltip "Using EAN from original QUOTE message")
5. Test with multi-message QUOTE files to ensure each basket uses
the correct EAN from its corresponding message
6. Verify fallback behavior when no QUOTE EAN matches available EANs
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 47546f0849)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds unit tests to verify that when processing EDI QUOTE transports
containing multiple messages with different buyer EANs, each basket gets the
correct EAN for its corresponding message.
Test plan:
1. Run: prove t/db_dependent/Koha/EDI.t
2. Verify the new 'multiple_message_ean_handling' subtest passes
3. Verify that all existing EDI tests continue to pass
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd01562f5c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This state is no longer ever set anywhere
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 213de9af0b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This follow-up adds missing override state translations that were
discovered during testing. The patchset logs various override states
but some were not covered in the log viewer display template.
Missing states added:
- USERBLOCKEDNOENDDATE: Patron had an indefinite restriction
- CURRENTISSUE: Item is currently checked out to this patron
- UNSEEN: Unseen renewal
- SEEN: Seen renewal
These states are now properly displayed in the action logs viewer
when reviewing circulation override logging.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4c24c03769)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds unit tests to verify the hold override logging
functionality implemented in the previous patches. The tests cover the
logging of hold overrides in `C4/Reserves.pm` and the `Koha/REST/V1/Holds.pm`
API endpoint.
To test:
1. Run the following tests and confirm they pass:
- prove -lrv t/db_dependent/Circulation.t
- prove -lrv t/db_dependent/Reserves.t
- prove -lrv t/db_dependent/api/v1/holds.t
2. All tests should pass.
Changes:
t/db_dependent/Circulation.t:
- Added tests for hold override scenarios in circulation.
t/db_dependent/Reserves.t:
- Added tests to verify that hold overrides are correctly logged when
a hold is placed.
t/db_dependent/api/v1/holds.t:
- Added tests to ensure that the holds API correctly logs overrides
when a hold is created with the `x-koha-override` header.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 19dc33c649)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch implements proper override logging for holds following the
Alternative implementation pattern used for checkouts and renewals.
Instead of just removing the orphaned logging code from the original
Bug 9762 implementation, this patch properly implements override logging
by updating AddReserve to accept and log override information, similar
to how AddIssue handles confirmations and forced overrides.
Changes:
C4/Reserves.pm:
- Added JSON qw(to_json) import
- Updated AddReserve to accept confirmations and forced parameters
- Enhanced the existing logaction call to include override information
in JSON format when overrides are present
- Log format matches the Alternative implementation pattern:
* hold ID
* branchcode
* biblionumber
* itemnumber
* confirmations array
* forced array
Koha/REST/V1/Holds.pm:
- Added confirmations array building in the add() method
- Pass 'HOLD_POLICY_OVERRIDE' confirmation when override_all is true
- Pass confirmations parameter to AddReserve call
reserve/request.pl:
- Removed orphaned original implementation logging code
- Removed unused variables and imports (message, @message, user, etc.)
- Removed C4::Log import
koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc:
- Added 'HOLD_POLICY_OVERRIDE' case to translate_log_override block
- Displays as "Hold policy override" in log viewer
koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt:
- Added JSON display handling for HOLDS module (similar to CIRCULATION)
- Displays hold ID, biblionumber, and optional itemnumber with links
- Shows forced and confirmation overrides using translate_log_override
This ensures hold overrides are logged consistently with the Alternative
implementation pattern, providing proper audit trails for policy overrides
that are properly displayed in the log viewer.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1884f68c5b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes the duplicate logging code from circ/returns.pl that
was part of the original Bug 9762 implementation.
The original implementation added a separate logaction() call when
ignoring holds on return. This code created a custom JSON log entry
with the message "return an element that is reserved".
However, this logging appears to have been orphaned - there is no
corresponding Alternative implementation for return override logging
in the current codebase. The code was creating log entries but they
were not properly integrated with any override confirmation workflow.
Changes:
circ/returns.pl:
- Removed entire else block that created custom override log entries
- Removed unused variables: $message, @message, $user, $branchcode, $barcode
- Removed C4::Log qw(logaction) import as it's no longer needed
This eliminates the orphaned logging code and ensures returns.pl only
uses standard Koha logging mechanisms.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9ce4533b75)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes the duplicate logging code from renewal scripts
(circ/renew.pl and svc/renew) that was part of the original Bug 9762
implementation.
The original implementation created separate logaction() calls with
custom JSON messages whenever renewal overrides occurred. This caused
double logging alongside the Alternative implementation which properly
logs overrides via the confirmations parameter in AddRenewal.
Changes:
circ/renew.pl:
- Removed unused variables: $user, $branchcode, @message
- Removed separate logaction() calls for override logging
- Changed to use confirmations array with proper codes:
* 'RENEWAL_LIMIT' for override_limit
* 'ON_RESERVE' for override_holds
- Removed C4::Log qw(logaction) import
svc/renew:
- Removed unused variables: $borrower, $user, $message, @message
- Removed separate logaction() calls for override logging
- Changed to use confirmations array with proper codes:
* 'ON_RESERVE' for on_reserve override
* 'RENEWAL_LIMIT' for too_many override
- Removed C4::Log qw(logaction) import
The Alternative implementation in AddRenewal will now handle all
override logging consistently through the confirmations parameter.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ca47310a3b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes the duplicate logging code from the original
Bug 9762 implementation that was not properly removed when the
Alternative implementation was merged.
The original implementation added separate logaction() calls in
CanBookBeIssued and circulation.pl that created additional log
entries with a different JSON format. This caused double logging
when the Alternative implementation (which logs via AddIssue) was
merged on top.
Changes in this patch:
C4/Circulation.pm:
- Removed @message_log array and all pushes to it
- Removed the separate logaction() call at the end of CanBookBeIssued
- Removed 5th return value (@message_log) from CanBookBeIssued
- Removed all if ($issueconfirmed) blocks that were populating @message_log
circ/circulation.pl:
- Removed the problematic line that added OVERRIDDEN to every confirmed
checkout: $needsconfirmation->{'OVERRIDDEN'} = $issueconfirmed
This addresses the double logging issue where circulation overrides
were being logged twice with different formats.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2fea44ff25)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The $message variable was declared in circ/circulation.pl but never
actually set, making the "No patron matched" template block unreachable.
This is a remnant from old code that was incompletely cleaned when that
functionality was changed/removed.
This patch removes the unused variable, template parameter, and the
unreachable template block.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de962e15cf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
- The message 'No patron matched Restriction overridden temporarily' was appearing on every checkout, even when no restriction override occurred.
- This was caused by the message being set unconditionally after AddIssue in circ/circulation.pl.
- The message should not appear in circulation.pl, but in the Log Viewer.
To test:
1. Check out an item to a patron normally.
2. 'Restriction overridden temporarily' message appears.
3. Apply patches
4. Repeat 1.
---> Verify that no 'Restriction overridden temporarily' message appears.
5. Check out an item that requires an override (e.g., not for loan item with AllowNotForLoanOverride enabled).
---> Verify that no 'Restriction overridden temporarily' message appears.
6. Go to Tool -> Log viewer.
7. Enter the borrowernumber in Object field and submit.
---> Verify that the 'Restriction overridden temporarily' message is logged correctly.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3c41dfbe3f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
There is a JS warning raised by DT which makes the tests fail:
```
The following error originated from your application code, not from Cypress.
> DataTables warning detected in log: "DataTables warning: table id=holdings_table - Ajax error. For more information about this error, please see https://datatables.net/tn/7"
```
It is caused by a 404 returned by the API, because DT receives the
response during the afterEach (after the objects have been deleted)
We must wait for the responses when needed.
Test plan:
cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts
should still pass
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de85f171fd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7939c4d7d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
To test:
1. Add an required patron attribute
2. Go to the patron form ( memberentrygen.tt )
3. Look at the textarea for the required attribute
4. There is unwanted whitespace characters in the textarea
5. APPLY PATCH
6. Try again, the whitespace should be gone.
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2bf041ca4c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e39e568e6a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
1. Create several random patron circ messages with different dates. I used the following sql for my ktd:
-- INSERT INTO messages (borrowernumber, branchcode, message_type, message, message_date)
SELECT
51 AS borrowernumber,
'CPL' AS branchcode,
ELT(FLOOR(1 + (RAND() * 3)), 'L','B','E') AS message_type, -- L=Staff note, B=OPAC, E=Email (adjust to your codes)
CONCAT('Random test message ', FLOOR(RAND()*1000)) AS message,
DATE_ADD(CURDATE(), INTERVAL -FLOOR(RAND() * 1825) DAY) AS message_date -- random day in last ~5 years (5*365)
FROM (
SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5
UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10
) AS x;
2. View the patron account and notice that messages are sorted by type, but not by date.
3. Apply the patch and restart_all
4. Refresh the patron account page and clear the browser cache if necessary.
5. View the patron account again and notice that the messages are still sorted by type, but they are also sorted in descending order (newest to oldest).
6. Sign off and have a great day!
Signed-off-by: Jen Tormey <jntormey@dmpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7be401fcbd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Michelle <mspinney@clamsnet.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac80486f2e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Create a list
2. Sort this list by: title
3. Save
4. Edit the list, changing the the "Sort this list by:" to copyrightdate
5. Try to edit it again to any other type of sort. Save
6. Look again, it is reverted to copyrightdate
7. APPLY PATCH, restart_all
8. Now when you edit the list any value you use in "Sort this list by:" should be retained.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 83159051fe)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d6e5ee20b1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Go to the Advanced search page
2. Click "More options"
--> Note that the first line in the "Search" section has a drop-down for
operation (and/or/not), but subsequent lines do not. It should be
the other way around. Also, the alignment is strange.
3. Apply patch and refresh page
--> All lines except for the first line now have an op drop-down, and
the alignment looks correct.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d42ce0a368)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Test plan :
- before patch on ktd, go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=155
- in the holdings table search for "general" like "General Stacks".
- see that no items appear
- apply patch
- repeat the search
- all items appear now.
Signed-off-by: Mathieu <mathsabypro@gmail.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7e4f2f7c29)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
To test:
1. Without the patch:
-Clicking delete from the Actions button -> delete pops up both a JS alert and a BS confirmation modal. The deletion works.
-Clicking the "Delete item" button that appears when you hover over any cell pops up both a JS alert and a BS confirmation modal. The deletion does NOT work.
-The "Cancel" button in the delete-item-modal does nothing.
2. APPLY THE PATCH:
-Clicking delete from the Actions button -> 1 modal for confirmation. The deletion works.
-Clicking the "Delete item" button that appears when you hover over any cell pops up only a modal confirmation. The deletion works.
-The "Cancel" button in the delete-item-modal properly closes the modal.
Signed-off-by: Jason <jvasche@roundrocktexas.gov>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51f2b5e12d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/ILL/Requests.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 46ffd07b85)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
On
commit 959b7e8f05
Bug 40345: Add insertSamplePatron
We remove the ability to insert a patron using insertObject, we need to
use insertSamplePatron instead.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit be0dd91c41)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Make sure the display of city, state and zipcode is the same as before
the patch
Confirm that the new Cypress tests pass
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Amended-by: Jonathan Druart
Added $raw filter to [% ", " %]
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 67e04b039a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adjusts the logic to consider all permissions and not just the top level flags
Test plan:
1) Create or edit a user to have all acquisitions permissions except one (not relevant which one, any will do)
2) Log into the staff interface and go to acquisitions > vendors and click the vendor in the table
3) The left menu will be missing everything except invoices
4) Apply patch and restart_all
5) Refresh the page, the menu should now be populated
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 23fe21df61)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
This patch adds search functionality to the following columns: Suggester category, Patron reason, Library, Fund, Status.
Test plan:
1) Add some suggestions and navigate to the suggestions page
2) Use the search bar to search for data in any of the columns mentioned above.
3) It will not filter the results based on those columns
4) Apply patch and hard refresh
5) Use the search bar again, this time it should return results
Signed-off-by: Ludovic <ludovic.julien@inlibro.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a1fc548519)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
To test:
1 - Do an item search, select some rows
2 - Export selected rows as 'CSV'
3 - IMport into a spreadsheet or view and note missing/doubled delimiters after damaged status
4 - Apply patch
5 - Repeat export
6 - It works!
Signed-off-by: Nick Clemens <nick@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 e9c6c0ee43)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
- 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>
Regression from
commit e9b8004d19
Bug 38255: Replace dataTable constructor with kohaTable - Staff
We should keep the params passed and not override them
Test plan:
1 - Search for 'edna acosta' in check out search on koha home page
2 - See the one result
3 - You are expected to be redirected to the patron's page
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 1b57d75e96)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
To test:
1 - perform a search in the staff interface, click a title to go to biblio details
2 - note lack of search results browsing tools at top left of page
3 - apply patch
4 - repeat your search, click a title to go to biblio details
5 - note browsing results tools at top left of page
Signed-off-by: Kevin Kellenberger <kkellenberger@mrcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0547534fc3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
To tes:
1- add an order to a basket in acquisitions
2- confirm your order shows in the basket with a fund code selected
3- click Modify on your order
4- note that Fund is empty in the modify form and you need to re-select it
5. APPLY PATCH
6. Try steps 1 -4 again, the correct fund should be set on page load
Signed-off-by: Wendy Bartlett <wbartlett@cuyahogalibrary.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5ceb2c78e9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The acquisition config route should be accessible to users
with at least one acquisition subpermission or erm permission.
The list vendors route should be accessible to users with the erm
permission.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b7bd25885e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Same as bug 34303 and bug 33743, our test suite must parse/process files
that are part of the index, not all the other files.
It's currently failing on kohadev-db-request.txt that is owned by root.
But it's not part of the Koha codebase, this file should not be tested.
There were also node_modules and po files that were processed.
Test plan:
prove t/00-merge-conflict-markers.t
must now return gren
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 cc72eabc5f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
All was not returning all the files present in the git index, but all
Koha core files. Let's rename it with 'core' to remove ambiguity.
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 36bd4bd7b4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ae78ea6e5e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If an item is on order, it may take a while before becoming available.
Showing that too on the opac-user page is helpful for the user and
may reduce questions.
Test plan:
Pick an item and set notforloan to On order (-1) or another custom
negative notforloan status.
Put an item level hold on that item.
Go to the OPAC user page of that patron. Verify that the AV description
is added now to the status column of the holds table.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 4551cb4f42)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
# 'Details for opac holds test place hold button › Koha online catalog'
# doesn't match '(?^u:Details for: opac holds test place hold button)'
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0de9601048)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change adds "Available", "Unavailable", and "Not for loan"
categories in the availability cell of the "cataloging search"
found at /cgi-bin/koha/cataloguing/addbooks.pl
This change also adds missing location information for the
"Not for loan" items.
Test plan:
0. Apply the patch
1. Add available, checked out, and not for loan items for a test record
(like "Gairm" in koha-testing-docker)
2. Go to the cataloging search,
http://localhost:8081/cgi-bin/koha/cataloguing/addbooks.pl?q=test
3. Note that the items in the "Location" column now have labels
to differentiate which items are available, unavailable, and not for loan.
4. Note that the "Not for loan" data is similar to the "Available" data
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 89717f95d1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We must now use data-order to order dates, not title-string.
This patch adjusts the few occurrences that were using it and remove
the function from datatables.js to prevent new occurrences.
Test plan:
Create some recalls, go to the "Recalls to pull" and "Recalls awaiting
pickup" pages and confirm that the dates are ordered correctly when you
sort by dates.
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 1b2ee04e74)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
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>
To test:
1. Run:
$ ktd --shell
k$ yarn build
2. Run:
k$ git status
```
On branch main
Your branch is up to date with 'origin/main'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
.vstags
koha-tmpl/intranet-tmpl/prog/css/bookings-rtl.css
koha-tmpl/intranet-tmpl/prog/css/bookings.css
nothing added to commit but untracked files present (use "git add" to track)
```
=> FAIL: Bookings-related generated CSS show as untracked for git.
2. Apply this patch
3. Repeat 2
=> SUCCESS: No untracked files
4. Sign off :-D
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fd233e9068)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b9bf3609d1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch makes the the css selector specifically target the
report_param_form in guided reports
To test:
1. Go to Reports > Create guided report
2. Click Next >>
3. Click Next >>
3. Notice the form has been initialized as select2
4. Apply patch and refresh the page
5. Confirm the select column form is back to normal
6. Confirm select2 is still initialized for SQL reports
example: select * from items where homebranch IN <<Library|branches:in>>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 646109833f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates several templates to use internationalization
template functions to add context to the word "More." This gives
translators information about the context of the word.
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
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the strings which were
updated e.g. misc/translator/po/fr-FR-messages.po
- Locate instances of the string 'msgid "More"', for example:
#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_providers.tt:308
msgctxt "Show more information"
msgid "More"
msgstr ""
- Edit each of the three instances of the "msgstr" string however you
want (it's just for testing)
- Install the updated translation:
> perl translate install fr-FR
- In the staff interface, switch to the updated translation and confirm
that your translations appear:
- In the header menu
- In the toolbar shown on a patron checkout or detail page
- In Acquisitions -> Invoices -> Invoice search results ->
- Click the invoice number
- Follow the "Go to receipt page" link
- If necessary, receive a pending order so that the "Already
received" table appears.
- Confirm that your translated string appears as a column header
- Go to Administration -> Identity providers
- Edit an identity provider
- Under "Advanced configuration" you should see your translated
string as a link to show more information about the fields.
- Click the "Manage domains" link for an identity provider.
- Edit a domain.
- You should see your translated string as a link to show more
information under the "Domain" field.
Sponsored-by: Athens County Public Libraries
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 bf40cb58aa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1091533b91)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 256a7641d9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When implemented, the message here was believed to either be about Duplicate IDs, or guarantor issues.
We are now seeing a wider variety of issues possible from SQL errors, lock timeout or missings rows as examples
This patch adds an 'ErrorMessage' message to the return from AddReturn and displays it to the user.
To test:
1 - Issue an item to a patron, note the itemnumber
2 - On the command line, lock the row:
sudo koha-mysql kohadev
START TRANSACTION;
SELECT * FROM issues WHERE itemnumber=975 FOR UPDATE;
leave mysql open at this point
3 - On the interface, check in the item, wait a bit
4 - After a bit you get the error to check the config page, but nothing is there
5 - close mysql, apply patch, restart all
6 - Repeat 2
7 - Check in the item, wait a bit
8 - Note you now get the error from the DB:
Error: (DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Lock wait timeout exceeded; try restarting transaction at /kohadevbox/koha/Koha/Object.pm line 174 )
9 - Sign off!
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f61f6088f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch updates a batch of OPAC templates so that title tags can
be more easily translated.
To test, apply the patch and confirm that the following pages have
correct title tags:
As a user logged in to the OPAC:
- Change password (with OpacPasswordChange enabled)
- Privacy management (with OPACPrivacy enabled)
- Checkout history (with opacreadinghistory enabled)
- Search history (with EnableOpacSearchHistory enabled)
- Consent (set PrivacyPolicyConsent to "enforced")
- Place a recall (with UseRecalls enabled and recalls configured in
Circulation & Fine rules)
- View your recalls
- Place a hold
- Request and article (with ArticleRequests enabled and configured in
Circulation & Fine rules)
- Submit a comment (with OPACComments enabled)
- View your routing lists (with RoutingSerials enabled):
- In the staff interface, search for a subscription
- View the subscription details
- Click "Create routing list" in the sidebar
- Add yourself to the recipients list
- Return to the OPAC and view the routing lists page
Check these pages too:
- http://localhost:8080/cgi-bin/koha/opac-restrictedpage.pl
- Catalog search results
- Report a problem (with OPACReportProblem enabled)
- Password recovery (with OpacResetPassword enabled)
- Create an account (with PatronSelfRegistration enabled)
- Test with PatronSelfRegistrationConfirmEmail enabled.
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c20adb42cb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates a batch of OPAC templates so that title tags can
be more easily translated.
To test, apply the patch and confirm that the following pages have
correct title tags:
- Check the OPAC main page
- Follow the "Libraries" link
- Check one of the individual library pages
- From the OPAC main page, view the RSS feed for OPAC news (requires at
least one news item be added via Tools -> News -> New entry).
- Search the catalog and view the detail page for one of the results.
- View the IDREF page, e.g.
http://localhost:8080/cgi-bin/koha/opac-idref.pl?unimarc3=032581270
- With OverDrive configured and enabled, perform a catalog search.
- Follow the "Found X results in the library's OverDrive credentials"
link to view OverDrive search results.
- These pages normally aren't accessed directly but they are modified:
Download cart, e.g. http://localhost:8080/cgi-bin/koha/opac-downloadcart.pl?bib_list=5302/4893/4594
Download shelf, e.g. http://localhost:8080/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=X
Checkout note, e.g. http://localhost:8080/cgi-bin/koha/opac-issue-note.pl?issue_id=X
- In the staff client, add a local cover image to a bibliographic record
(requires the OPACLocalCoverImages system preference be enabled).
- View the detail page for that record in the OPAC.
- Under the images tab, right-click the image thumbnail and open in
a new tab.
- Search the catalog for a record with a subscription and view the
detail page. Under the "Subscriptions" page, click "More details,"
then the "Full history" tab.
- In the staff client, go to Tools -> Pages and create a page for the
OPAC. View that page.
- Log in to the OPAC. From your "Summary" page,
- View the curbside pickups page (requires the CurbsidePickup
preference be enabled)
- View the "Ask for discharge" page (requires the useDischarge
preference be enabled)
- View the holds history page (requires the OPACHoldsHistory
preference be enabled)
- View the ILL requests page (requires the ILLModule preference be
enabled
- View the "Personal details" page.
- View the messaging page (requires the
EnhancedMessagingPreferencesOPAC preference be enabled)
- From the "Summary" page, under the "Checked out" tab, click the "Add
note" for one of the checkouts (requires the AllowCheckoutNotes
preference be enabled).
- After adding a note
- View the "Personal details" page and submit an edit (requires
the OPACPatronDetails preference be enabled). Check the confirmation
page.
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 63f3a3f243)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The authorised value category for 'EBook' is not defined.
Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c62b4a031e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The authorised value category for 'authorisedValues.av_title_publication_types' is not defined.
Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7cd822031a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
TypeError: can't access property "authorised_values", e.type is undefined
Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit af8efd85ec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 18ff4d4933)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4df64c79f0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ad3ca52450)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 54f84f232a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Bug 38010 broke the vendors pages when Koha is running as a Mojolicious
application
This adds new routes to Koha::App::Intranet to mimic the Apache rewrite
rules added in bug 38010.
To be able to do that, the CGIBinKoha plugin's code had to be moved to a
controller. The logic remains the same.
Test plan:
1. Run `bin/intranet daemon -l http://*:3000/`
2. Point your browser to http://localhost:3000 (replace localhost by the
hostname/IP of koha's container, if needed)
3. Go to Acquisitions and search for a vendor. You should see the list
of vendors.
4. Click on "New vendor" button. Notice the URL changed to
.../acquisition/vendors/add.
5. Reload the page. You should still see the form to create a new vendor
6. Verify that you can create a vendor and that you are then redirected
to the list of vendors
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 b92fda21ce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the include file used to display the OPAC language
menu in the header and footer. The include already makes use of a
"context" variable which tells it whether it's in the header or footer.
We can use the same logic to give unique ids for each instance.
To test, apply the patch and rebuild the OPAC CSS.
- Go to Administration -> System preferences -> OpacLangSelectorMode and
set it to "both top and footer."
- Go to the OPAC and inspect the HTML for each language menu. The one in
the header should have the id "header_langmenu." The one in the footer
should have "footer_langmenu."
Sponsored-by: Athens County Public Libraries
Signed-off-by: Ludovic Julien <ludovic.julien@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 46ed6fbc04)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch will cause the ButtonMinus button on each of the advsearch
fieldsets to jump the focus to the next or previous line, whichever is
available. This is in response to a recent accessibility audit performed
by one of our customers. Thanks!
TO TEST:
a) go to /cgi-bin/koha/opac-search.pl?expanded_options=1
b) click / tab onto the ButtonMinus next to a field, click / press
enter
c) notice how the focus disappears
APPLY PATCH
d) repeat steps a-b
e) notice how the focus now either goes to the next line (if available)
or the previous line (otherwise)
SIGN OFF
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 14c25fe64e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Test plan, dont apply patch yet:
1. Go to Administration > Additional fields > Libraries (branches) > New field
2. Enter a name for the field
3. Click Save
4. Go to Administration > Libraries > New library
--> The form does not contain the additional field
5. Apply patch. Repeat.
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 e9713e5a03)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Go to SCO
2. Login but use the wrong password
3. The alert appears "You entered an incorrect username or password. Please try again! But note that passwords are case sensitive. Please contact a library staff member if you continue to have problems."
4. This alert is in a blue box with the class alert-info
5. APPLY PATCH
6. Try again, the box should be yellow with the alert-warning class.
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 a1bf7e1ab9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 97226193a6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3b041f4cf0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This change removes an unused variable from datatables.js
Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
2. Search for this payload: "abc123"
3. Click on "Search history" in the top right corner of the screen
4. Click ""CSV", "Copy", and "Print" on the "Current session" toolbar
5. Note that all the buttons work as expected
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 b572ae29eb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change ensures that "vue/dist" files are not mapped into
the pm_to_blib target of the Makefile, so that they are only handled
by the explicit compile steps in the top targets of the Makefile.
Test plan:
0. Apply the patch
1. perl build-resources.PL
2. ls ./koha-tmpl/intranet-tmpl/prog/js/vue/dist
3. Note that files are present
4. perl Makefile.PL
5. Take all the defaults
6. vi Makefile
7. Search for vue\/dist
8. Note that the only hit is for "cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist
blib/INTRANET_TMPL_DIR/prog/js/vue/"
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0b6f7a2701)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
On the licenses page, there are some occurrences of "licence"
(British English spelling). License (US American spelling)
should be used.
Test plan:
1. Go to More > About Koha > Licenses.
2. Search the page for "licence".
3. Note some occurrences of "licence", which is the British English
spelling.
4. Apply the patch and refresh the page.
5. Repeat step 2.
6. Note that there are now no occurences of "licence".
7. Sign off.
Signed-off-by: David Nind <david@davidnind.com>
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 11c1c88a68)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We build the the orders table depending on some conditions (sysprefs or if the
basket is closed/opened).
DataTables cannot correctly restore the state because the number of columns
stored in localStorage is different than the one we have one the table.
Test plan:
Open and close a basket
Confirm that the table is correctly displayed (no extra columns)
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 8456184878)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
prove t/db_dependent/api/v1/erm_custom_reports.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7491053be6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test this on the UI, you can add the following line of code at the beginning on 'new' in SushiCounter.pm:
->{response}->{Report_Header}->{Release} = 6;
This will force the release to be '6'. Then you can perform a harvest using the UI. The background job will fail with the error message saying that counter release 6 is not supported
prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t
Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9482590909)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
QA script still fails but I believe these are false positives caused by the tests files being moved
Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dcf28e5b8a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Update original tests to consider COUNTER 5 specifically.
Add new test for COUNTER 5.1.
Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cb97c60d16)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ff82cd37f5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This moves the original SUSHI COUNTER logic to a new
Koha::ERM::EUsage::COUNTER::5 class that extends
Koha::ERM::EUsage::SushiCounter.
Adds a new Koha::ERM::EUsage::COUNTER::5_1 class with COUNTER 5.1
specific logic.
Keeps common logic in Koha::ERM::EUsage::SushiCounter.
This ensures we support both COUNTER 5.0 and COUNTER 5.1, but should
hopefully help us better maintain COUNTER 5.1 going forward, without having
to worry about COUNTER 5.0, as the code is seperated.
This should also better set us up for adding support for possible future COUNTER releases.
Test plan, k-t-d:
1) Enable ERMModule
2) Add a new usage data provider at:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/add
3) Add the required credential parameters e.g. Customer ID and Requestor ID
4) Update the 'Report release' to '5.1', no single quote.
(If you add anything other than '5', it'll default to '5.1')
5) Visit the list of data providers and click the 'Run now' button for your data provider:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers
6) Click the background job link at the top. Verify the background job runs as expected.
7) After the successful harvest, run a custom report at, ensure the data is all correct:
<staff_url>/cgi-bin/koha/erm/eusage/reports
8) Visit the data provider at:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/<provider_id>
9) Click the 'Import logs' tab, download the COUNTER 5.1 counter file.
Open the file and verify the data is correct.
Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f58e2110ca)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We are now considering more than one COUNTER release. Move test files accordingly.
prove t/db_dependent/Koha/ERM/EUsage/*
Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1f94070e60)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 26203a6609)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Also fixed the link on circ-nav and the breadcrumbs links.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f86a07a9f7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch reduces the number of click for the average librarian user.
To test:
1. Change your logged in branch to something other than Centerville
2. Navigate to the circulation home page
3. Click on the Holds queue link
4. Observe that you have to hit Submit to continue
5. Apply patch
6. Repeat steps 1 and 2
7. Observe that the holds queue comes up with your branch preselected
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 00e10862e9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch modifies the OPAC's DataTables JS so that any table
heading with a "dtr-control-col" will trigger the application of title
and aria-label attributes on the responsive controls column.
All OPAC tables with a responsive configuration have been modified with
the class.
To test, apply the patch and check all affected tables.
- Narrow the width of the browser window until the responsive
functionality is triggered.
- Check that the expand/collapse button has title and aria-label
attributes, "Expand or collapse row details"
- Authority search results
- Course reserves - List of courses
- Course reserves - List of titles for a course
- Bibliographic detail page:
- Holdsings
- Subscriptions
- Search history
- Bibliographic, past and present
- Authorities, past and present
- Most popular titles
- Logged in user's active clubs
- Logged in user's scheduled curbside pickups
- Logged in user's recalls history
- Logged in user's checkout history
- Logged in user's messaging settings
- Logged in user's submitted tags
Sponsored-by: Athens County Public Libraries
Signed-off-by: Jake Deery <jake.deery@openfifth.co.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d16fde5cc1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 47f0aab19f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
CancelExpiredReserves had incorrect holiday logic that checked if **today** is a holiday instead of checking if the **hold's expiration date** was a holiday.
This caused:
* Holds that expired on non-holidays to remain active if cleanup script ran on holidays
* Holds that expired on holidays to be cancelled if cleanup script ran on non-holidays
The simple fix exposed additional edge cases around server downtime that could leave holds active indefinitely.
Changes:
* Implements comprehensive holiday logic when `ExpireReservesOnHolidays = 0`
* Same-day protection: Don't cancel holds that expire TODAY if today is a holiday
* Historical cleanup: Cancel holds that expired in the past when running on business days
* Retrospective cancellation: Handle server downtime by checking for missed business days
* Comprehensive test suite covering all scenarios including long-term expired holds
To test:
1. Apply the tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Reserves/CancelExpiredReserves.t
=> FAIL: Tests fail! The logic in the method is wrong!
3. Apply this patch
4. Repeat 2
=> SUCCESS: All tests pass, demonstrating correct behavior in all scenarios
5. Sign off :-D
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 31dced9c8b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds regression tests that demonstrate the bug in
CancelExpiredReserves where the holiday logic checks if today is a
holiday instead of checking if the hold's expiration date was a holiday.
The bug causes:
1. Holds that expired on non-holidays to remain active if the cleanup
script runs on a holiday
2. Holds that expired on holidays to be cancelled if the cleanup script
runs on a non-holiday
Test scenarios added:
- Hold expired on Monday (non-holiday), script runs on Tuesday (holiday)
- Hold expired on Wednesday (holiday), script runs on Thursday (non-holiday)
- Hold expired on Friday (non-holiday), script runs on Sunday (holiday)
- Hold expired on Saturday (holiday), script runs on Sunday (holiday)
These tests currently fail, demonstrating the bug exists. When the bug
is fixed, all tests should pass.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 828bf1917d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a new method to Koha::Calendar that returns a boolean indicating
whether there are any business days between two given dates (exclusive).
Implementation details:
* Returns 1 if any business days exist between start and end dates
* Returns 0 for consecutive days, same dates, or only holidays between
* Uses exclusive range (does not include start or end dates)
* Handles date comparison and timezone normalization
* Efficient early return when first business day is found
This is designed specifically for use cases like detecting missed
business days due to server downtime or scheduling issues.
To test:
1. Apply patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Calendar.t
=> SUCCESS: All tests pass!
3. Sign off :-D
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2bfb86afb5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f2adf0ad82)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
This patch removes the legacy right-to-left.css file, which is no
longer maintained and has started causing issues in the RTL
(Right-to-Left) UI.
We now use Gulp-generated RTL CSS files for better maintainability.
In limited cases, we use /*rtl:raw: to target RTL-specific styles. This
does not affect the default LTR (Left-to-Right) UI, as rtl:raw is
handled by the gulp-rtlcss plugin during the build phase.
To test:
1. Install the Arabic translation:
koha-translate -i ar-Arab
2. Open the staff interface (with the broken CSS) and confirm the issue
by browsing several pages.
3. Apply this patch.
4. Run: yarn css:build
5. Browse several pages in Arabic and confirm the issue is resolved.
6. Browse several pages in English and confirm not affected.
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 e9481a678c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch fixes the background color of the Perl modules when there are current modules after missing or in need of updgrade modules
1 You need to have in your installation of Koha a missing or in need of updgrade Perl module. Check in the About page Perl Modules Tab that perl modules after it that are current have the same background color that the missing/in need of upgrade
2 Apply patch, restart services
3 Repeat the first step. Now all the current modules have the right background color
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93db4a08d4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Fix a typo that caused an error 500 on the holds awaiting pickup page
when there are holds with cancellation requests.
To test:
1. Enable hold cancellation requests from the OPAC
i. Go to Administration > Circulation and Fines rules
ii. In the "Default waiting hold cancellation policy" section, add the rule:
All / All / Yes
2. Place at least two holds for pickup at the logged-in library (for ease of testing, place both holds for the same patron)
3. Check in items for both holds and confirm to set holds to Waiting
4. Log into the OPAC as the patron from step 2
5. Go to the patron's holds tab and request cancellation for both holds
6. In the staff interface, go to Circulation > Holds awaiting pickup
==> Error 500! :(
7. Apply patch and refresh the page
==> The page loads! :)
Bonus testing (KTD only):
1. Edit one of the cancellation request dates, so that they are not both
the same date:
ktd --shell
koha-mysql kohadev
SELECT * FROM hold_cancellation_requests;
UPDATE hold_cancellation_requests SET creation_date=<date> WHERE hold_cancellation_request_id = <id>;
2. Refresh the Holds awaiting pickup page again, and switch to the Holds
with cancellation requests tab
3. Sort by hold cancellation request date and confirm the sorting works
correctly
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 083db57f1e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 890d9069eb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 04c6afaff8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b04e71d4ba)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea40758cd6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch tries to fix the hold suspension search by copying the code
from the expiration date search function.
The patch also makes these changes:
- Change page title to use i18n functions
- Add specific breadcrumb for results page
- Update headings between search and results page
- Correct table settings (definition was missing from
columns_settings.yml
- Correct capitalization (e.g. "Pickup location" instead of "Pickup
Location"
- Use include files for displaying title and patron in update results
- Add subtitle and medium to title in search results
- Remove quotes from DataTables option names
- Add hold date to the search results view.
- Without a specified default sort, the table will sort the first
column. Since the first column is checkboxes, we ought to explicitly
set a default sorting column. I thought hold date seemed like a
better default than title.
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dc74b4821d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 575f2ab232)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9558bcab6c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ca30f2dd95)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fd7c85f47c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
TO TEST:
0. APPLY PATCHES, updatedatabase, restart_all
1. Create a user with limited permissions, making sure you give them the "batch_modify_holds" permission
2. Login as chosen patron.
3. Navigate to Tools page.
4. Note there's a link "Batch modify holds".
5. Remove permission from user.
6. Link to new tool is not displayed.
7. Navigate to new tool Tools->Batch modify holds.
8. Fill in some criteria to search holds with.
9. Confirm that holds found match your search criteria.
10. Set e.g. new expiration date for all or just selected holds.
11. Confirm that holds were modified as they should have.
12. Confirm this also from database.
13. Find holds with a found/waiting status.
14. Attempt to modify their suspend status.
15. Alert box with text "One or more holds have found status and can't be suspended." should be displayed.
16. Play around, test different modifications.
17. Create SQL report which contains column for reserve_id.
18. e.g "SELECT reserve_id FROM reserves limit 10".
19.. Run report.
20. Over report select "Batch operations" should be displayed and under that there should be option "Batch modify holds".
21. Click "Batch modify holds" option.
22. Confirm that holds displayed in "Batch mofidy holds" tool are same as found with your report.
23. Do a holds search that will bring up multiple pages of results
24. Try selecting some holds from different pages to modify
25. Ensure all selected holds are being modified
26. Play around, test different modifications.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f769e3c1e6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 54638fba03)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 cd4e1da3ec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In our codebase, there's a pattern we tend to use for searching patrons
by userid and falling back to find them by cardnumber:
* C4::Auth
* C4::SIP::ILS::Patron
* (slightly different) Koha::REST::V1::Auth::Password
* (slightly different) Koha::REST::V1::Auth
* C4::Circulation
* C4::Auth_with_cas
It generally uses the following pattern:
```perl
my $patron = Koha::Patrons->find( { userid => $identifier } );
$patron //= Koha::Patrons->find( { cardnumber => $identifier } );
```
The problem with this is that `find` actually produces a DBIX::Class
warn because `find` is being called without primary key parameters. I
haven't seen it in the wild, until the latest change in
`checkpw_internal` which made it throw warnings in SIP. My
interpretation is that SIP's special approach with the Trapper.pm class
made it show where other places just get it hidden.
That said, I implemented this using `search()` to overcome this.
To test:
1. Apply the patches
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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 3f19d4bf85)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 666223d61e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
- Add fa-check-circle as an icon to "Transform to checkout" button
- Remove unncessary booking_id input, placeholder and value in format call.
- Include completed in
- editable property of vis-timeline
- filters array of additional filters include
- init call to AdditionalFilters lib
- onChange handler of AdditionalFilters lib
- condition for rendering actions
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 78983569dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Sponsored-by: LMS Cloud <https://www.lmscloud.de/>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 087ffd0eea)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Directly from the bookings list, you can perform a checkout with booked
item.
Test plan:
1) Got an item booked :)
2) Click on transform to checkout
3) Normally you will be redirected to circulation.pl checkout view with
form infos from booking.
4) If issue is confirmed, the booking will be completed.
Sponsored-by: Association de Gestion des Œuvres Sociales d'Inria (AGOS)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8efe9aee5c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We really need a better fix at the translation script level for bug
18675. This change makes the template so much less readable!
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd73f9b0ce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The Status column was previously only visible when filters were applied,
making the interface inconsistent and potentially confusing. This change
ensures the Status column is always displayed regardless of filter state.
Test plan:
1. Navigate to a biblio record with bookings
2. Go to the Bookings tab
3. Verify the Status column is visible in the bookings table
4. Apply filters (Include expired/Include cancelled)
5. Verify the Status column remains visible
6. Remove all filters
7. Confirm the Status column is still visible and shows appropriate
status badges (New, Pending, Active, etc.)
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3e168c7176)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e655cbd95f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This follow-up patch extracts the filter functionality into a reusable library:
- Create AdditionalFilters.js library with chainable API for filter
functionality
- Rename table-filters.inc to additional-filters.inc for clarity
- Refactor to use explicit element IDs instead of interpolation for
better greppability (filter-expired vs filter-${id})
- Include proper cleanup methods (destroy) for memory management
The library provides a fluent API:
AdditionalFilters.init(['filter-expired', 'filter-cancelled'])
.onChange((filters, { anyFiltersApplied }) => { ... })
.build({ status: ({ filters, isNotApplied }) => ... });
Test plan remains identical except for applying both patches on step 1.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e358823091)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch aims to improve bookings/list.tt:
- Converting filter attributes to boolean data attributes (presence-based)
- Creating a reusable table-filters.inc for filter controls
- Moving inline styles to proper SCSS files for better caching and separation of concerns
- Fixing a runtime error when cancelling bookings from the timeline
- Improving JavaScript readability with helper functions
- Addressing the QA complaints from Bug 36789:
- Cleaning up the long lines for the button elements by moving them into template literals
- Using the format method instead of direct interpolation
- Using escape_str for all values received from the API.
Test plan:
1. Apply the patch and compile css
2. Navigate to a biblio record with bookings (Catalog > Search > View record > Bookings)
3. Verify the filter buttons (Exclude expired/cancelled) appear correctly
4. Click each filter button and verify:
- The button text toggles between "Include" and "Exclude"
- The table updates to show/hide the appropriate bookings
- The status column appears when any items are filtered
5. In the timeline view:
- Verify cancelled bookings show with a strikethrough pattern
- Try to cancel a booking by clicking the X on a timeline item
- Confirm the cancel modal opens without JavaScript errors
6. Check that the table actions (Edit, Cancel) work correctly
7. Verify no inline styles remain in the page source
8. Confirm the filter styles are properly loaded from compiled CSS
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3aac509787)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Without the patch:
t/db_dependent/Circulation/NoIssuesChargeGuarantees.t fails
t/db_dependent/Circulation/dateexpiry.t fails
With the patch:
t/db_dependent/Circulation/NoIssuesChargeGuarantees.t passes
t/db_dependent/Circulation/dateexpiry.t passes
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1ea765d3bd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Without this patch:
t/db_dependent/Circulation/CanBookBeIssued.t failes
With this patch:
t/db_dependent/Circulation/CanBookBeIssued.t passes
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a12b523113)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Without this patch:
prove -v /kohadevbox/koha/xt/use-test-no-warnings.t fails
With this patch:
prove -v /kohadevbox/koha/xt/use-test-no-warnings.t passes
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 942df980da)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit adds two key improvements to the Bug 9762 circulation override logging:
1. **Consistent JSON Logging**: Updated AddRenewal to always log in JSON format,
matching AddIssue behavior. Previously AddRenewal only logged JSON when
confirmations/forced were present, otherwise logged just the item number.
2. **Integration Tests**: Added comprehensive tests for both AddIssue and AddRenewal
JSON logging functionality:
- Test normal operations (empty confirmations/forced arrays)
- Test override operations (populated confirmations/forced arrays)
- Verify JSON structure and content accuracy
The AddRenewal function now consistently logs:
```json
{
"issue": 123,
"itemnumber": 456,
"confirmations": [...],
"forced": [...]
}
```
This ensures uniform action log format across all circulation operations and
provides better integration test coverage for the override logging functionality.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b31f8c566d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The test was failing with RegisterRequired exception because payin_amount()
requires a cash register when UseCashRegisters preference is enabled.
Fixed by setting UseCashRegisters to 0 in the lost item return policies test
to allow payments without requiring a cash register.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bcbbd8722)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The test was failing because:
1. IssuingInProcess preference was not explicitly set, affecting the code path for message logging
2. The patron category had a random noissuescharge value that overrode the system preference
Fixed by:
- Setting IssuingInProcess to 0 to ensure correct code path
- Setting patron category noissuescharge to undef to use system preference
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1660f68690)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 489780f3f9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 255c0897f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
An alternative approach to the original submission for bug 9762. Instead
of recording a distinct action log line for a set of override messages
in addition to the standard issue record, this patch updates the
existing issue log to include any confirmation or impossible responses
from the preceeding CanBookBeIssued call.
We continue to record these as a JSON structure as the prior patch did,
but instead of human messages we use the predefined codes as returned
from the existing CanBookBeIssued response.
To test:
After each step, a single action log message should be displayed under
`Tools > Log viewer`. The message itself will now consist of a JSON
string with an array of 'confirmations' and 'forced' strings
representing the overriden feedback from CanBookBeIssued.
Circulation -- Checking out
1) Check out an item that is age-restricted (AgeRestrictionOverride syspref)
2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride
syspref)
3) Check out an item that has a “lost” status (IssueLostItem syspref)
4) Check out an item to a patron who has reached the checkout limit
(AllowTooManyOverride syspref)
5) Check out an item to a patron who is not allowed to borrow this item type
6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride
and/or AllowFineOverride + noissuescharge sysprefs)
7) Check out an item on hold for someone else
8) Check out an item on hold ready for pickup by someone else
9) Check out an item already checked out to someone else
(AutoReturnCheckedOutItems syspref)
10) Check out to a patron who has restrictions
Circulation -- Checking in
11) Ignore a hold upon check in
12) Ignore a hold and transfer upon check in
Circulation – Renewing
13) Renew an item on hold for someone else
(AllowRenewalOnHoldOverride syspref)
14) Renew an item that has reached the maximum number of renewals
(AllowRenewalLimitOverride syspref)
Holds
15) Place a hold for a patron who is not allowed to place this item
type on hold (AllowHoldPolicyOverride syspref)
16) Place a hold for a patron who has reached the maximum number of
holds
17) Place an item-level hold when rules dictate that this is not
allowed
Sponsored-by: OpenFifth <https://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 5350a9276e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We never actually pass `$message` back to anywhere so there's no reason
to create it in the first place.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 86f4eb93aa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b4e26e9c48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ee74749058)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e51399c332)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1) Apply the patch
2) run prove t/db_dependent/Circulation/CanBookBeIssued.t
--After each step, a message will be displayed in the action_logs table and in Tools > Log viewer --
Circulation -- Checking out
1) Check out an item that is age-restricted (AgeRestrictionOverride syspref)
2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref)
3) Check out an item that has a “lost” status (IssueLostItem syspref)
4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref)
5) Check out an item to a patron who is not allowed to borrow this item type
6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs)
7) Check out an item on hold for someone else
8) Check out an item on hold ready for pickup by someone else
9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref)
10) Check out to a patron who has restrictions
Circulation -- Checking in
11) Ignore a hold upon check in
12) Ignore a hold and transfer upon check in
Circulation – Renewing
13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref)
14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref)
Holds
15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref)
16) Place a hold for a patron who has reached the maximum number of holds
17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3a084d020e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9183fca07d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch allows you to save commands that have been overridden by someone.
The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional.
To test:
--After each step, a message will be displayed in the action_logs table and in Tools > Log viewer --
Circulation -- Checking out
1) Check out an item that is age-restricted (AgeRestrictionOverride syspref)
2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref)
3) Check out an item that has a “lost” status (IssueLostItem syspref)
4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref)
5) Check out an item to a patron who is not allowed to borrow this item type
6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs)
7) Check out an item on hold for someone else
8) Check out an item on hold ready for pickup by someone else
9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref)
10) Check out to a patron who has restrictions
Circulation -- Checking in
11) Ignore a hold upon check in
12) Ignore a hold and transfer upon check in
Circulation – Renewing
13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref)
14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref)
Holds
15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref)
16) Place a hold for a patron who has reached the maximum number of holds
17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Sponsored-by: Solutions inLibro inc. <https://inlibro.com/>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 89811768b6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e327039ba1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
To test:
1. Set TransfersBlockCirc to 'Don't block'
2. Check in some items not from your library to initiate a transfer.
3. See the modal pop-op, "Transfer to home library"
4. However, you cannot continue to scan the next item unless you first dismiss the modal.
5. APPLY PATCH
6. Try again, this time at step 4 the barcode input should have focus and you'll be able to scan the next item.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a9d55676a6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds desk_id reset functionality to the revert_found method,
but only for waiting holds where desk_id is actually relevant.
Changes:
* Modified revert_found() to conditionally reset desk_id
* Only resets desk_id for waiting holds (found=W)
* Leaves desk_id unchanged for in transit (T) and in processing (P) holds
* Added comprehensive test coverage for all scenarios
* Updated POD documentation to explain desk_id behavior
The logic is conservative and only clears desk_id when it makes sense:
waiting holds have their desk assignment cleared since they are no longer
waiting at a specific desk, while transit and processing holds remain
unchanged as they do not use desk_id.
To test:
1. Apply patch
2. Run tests:
$ ktd --shell
k$ cd /kohadevbox/koha
k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: All tests pass including new desk_id handling tests
3. Verify all hold test suites still pass:
k$ prove t/db_dependent/Koha/Hold*.t
=> SUCCESS: All hold-related tests pass
4. Sign off :-D
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 2da5c04c2d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch makes updates to CSS and markup in order to fix the layout of
the enrollment period fields during the onboarding process.
To test, apply the patch and rebuild the staff interface CSS.
- Drop and recreate your Koha database.
- Restart all services
- Follow the web installer until you reach the onboarding stage "Create
a patron category."
- The enrollment period fields should look correct.
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fce45b4279)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects the template variable which populates the maxlenth
attribute on text fields in the add/edit item form.
To test, apply the patch and go Administratoin -> MARC bibliographic
frameworks -> (framework) -> Tag 952 -> Edit subfields.
- Click the "p" tab and set the "Max length" field to "20"
- Save the framework and go to Cataloging.
- Locate a bibliographic record that uses the framework you edited.
- Add or edit an item on that bibliographic record.
- Check the "Barcode" field. The input tag should limit your entry to 20
characters.
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c7eae54f82)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
This patch added the option to update borrowers.lastseen when a patron username
and password is verified via the REST API. This can be enabled or disabled
selectively using the TrackLastPatronActivityTriggers system preference
using the [ ] Patron authentication via API option..
To test:
1. Create a new user, ensuring to set the Username and password fields.
*Import to do this first*
2. Edit the TrackLastPatronActivityTriggers syspref and check all options.
3. Ensure the RESTBasicAuth syspref is set to Enable.
4. Check the lastseen date of your new user using a SQL report
SELECT borrowernumber, userid, lastseen FROM borrowers WHERE userid = 'USERNAME'
(Replace USERNAME with your chosen username for the new patron)
NOTE: **Ensure the cache expiry of the SQL report is set to 0**
5. The lastseen for your new user should be null
6. 'restart_all' Koha services to clear plack cache.
7. Run the attached api_verify_lastseen.pl test script
**Change P_USERNAME and P_PASSWORD to the username and password of your new user.
(script contains expected output for successful verification)
8. Re-check the lastseen date of your new user again via SQL (step 4)
The lastseen should still be null.
9. Apply Patch
10. 'restart_all' Koha services
11. Edit the TrackLastPatronActivityTriggers syspref and check the '[ ] Patron authentication via API' option
12. Rerun the api_verify_lastseen.pl
13. Re-check the lastseen date of your new user again via SQL (step 4)
The lastseen should now be updated to the time of the last script run.
For good measure:
14. Edit the TrackLastPatronActivityTriggers syspref and **UNcheck** the '[ ] Patron authentication via API' option
15. 'restart_all' Koha services to clear plack cache.
16. Rerun the api_verify_lastseen.pl
17. Re-check the lastseen date of your new user again via SQL (step 4)
The lastseen should have remained the same as previous.
Sponsored-by: Westlake Porter Public Library <https://westlakelibrary.org>
Signed-off-by: Bernard Scaife <bernard.scaife@openfifth.co.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ba43483f4d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch introduces tests for the feature enabling patron's `lastseen`
attribute be updated when a successful password validation happens
through the API.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/password_validation.t
=> FAIL: Tests fail! The feature is not implemented!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bab2635f5b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 6cfac72f7e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Test plan, k-t-d, don't apply patch yet:
1) Install a plugin that sends the cookie to output_html e.g.:
https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/tag/v2.3.8
2) Log out. Access this plugin's tool link directly:
<staff_url>/cgi-bin/koha/plugins/run.pl?class=Koha%3A%3APlugin%3A%3ACom%3A%3APTFSEurope%3A%3AIncDocs&method=tool
3) Notice you're presented the login screen. Login using koha:koha
4) Notice you're shown the plugin's respective tool page. It looks like you're authenticated but you're not. Click on any of the top links e.g. 'Circulation' or 'Patrons'.
5) Notice you're shown the login page again.
6) Apply patch. Repeat. Step 5 should no longer show the login page but instead the page you clicked on.
Signed-off-by: Tomas Jiglind <tomas.jiglind@mariestad.se>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f16187e605)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
This patch corrects a typo in the fastadd button class on the
circulation home page.
To test:
To recreate :
1. Apply patch
2. Go to the Circulation home page
3. Inspect the page (Ctrl + Shift + C)
4. Click on the Fast cataloging button
--> In the inspector, notice the class for the button is circ-button
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ee2f2ff897)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Run prove t/db_dependent/Reserves.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b981f4b557)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Run t/db_dependent/ILSDI_Services.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2ebd1e379e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We need a skip_future_holds flag in item->current_holds to make renewals
act as they did before. There is no need to add it to biblio->current_holds.
Test plan:
Run t/db_dependent/Holds.t
Interface test: Issue a book, place hold on tomorrow, set ConfirmFutureHolds
to 2 days. Verify that renew is not blocked by this hold.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c11dce94c1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
As requested by QA.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added an exception for renewals. Moving to new report.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1676c014b6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We were missing POD here.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2f20b00f1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Run t/db_dependent/Holds.t (Without previous patches, it would fail.)
Run t/db_dependent/Koha/Biblios.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ae5c6bbbee)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Easy way is to run the unit tests in the next patch.
One call of biblio->current_holds is hidden in acqui/parcel.pl. The
table column "Item holds / Total holds" should now make a difference
for an order referring to an item having future holds.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eedd4bcf2e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Add future item level hold for another branch.
Check in. Confirm and transfer.
Note that without this patch, there is no patron info for the column
On hold for on transferstoreceive.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 503a81efe1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Since this patch updates the script to use Koha::Items->search instead of a direct database query
--where options that refer to the items table will be broken and result in an error like:
execute failed: Unknown column 'items.withdrawn' in 'where clause'
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2de91aeacd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a new option to the delete_items cronjob
When --del_bibs is set, bib records will be deleted
if the last item is deleted.
The following plan assumes default ktd data.
To test:
1. Apply patch
2. Check the holdings for bib #115 and see 3 items
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=115
2. Run the cron with the following flags
perl ./misc/cronjobs/delete_items.pl --where "biblionumber=115 and homebranch ='MPL'" --verbose --del_bibs --commit
3. Notice in the output the count of current items on the bib record:
Where statement: where biblionumber=115 and homebranch='MPL'
Deleting empty bib records!
Deleting item '237' (of 3)
Deleting item '238' (of 2)
4. Confirm the two Midway items were deleted from bib #115, and the bib still exists with one item
4. Run the cron again but change the the --where flag to delete all the items from bib #115
perl ./misc/cronjobs/delete_items.pl --where "biblionumber=115" --verbose --del_bibs --commit
5. Notice in the output the bib is deleted after the last item is deleted
Where statement: where biblionumber=115
Deleting empty bib records!
Deleting item '239' (of 1)
Last item deleted - deleting bib '115'
8. Confirm the bib #115 was deleted
9. Add some more items and test with some other --where parameters
10. Test with and without --commit and --del_bibs, test the --help flag
Sponsored-by: CLAMS
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 80b04f7a90)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It could be before or after the amount. Assuming that it does not
contain digits itself ;)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f14e2c3dcc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates all existing calls to the renamed method throughout
the codebase to maintain compatibility.
Changes:
* Updated C4::Circulation calls to use revert_found()
* Updated C4::Reserves calls to use revert_found()
* Updated test files to use revert_found()
* Maintained all existing functionality and behavior
All existing functionality is preserved - this is purely a method
name change to reflect the expanded capability.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 4ad2c94690)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch refactors the revert_waiting method to handle all found statuses
instead of just waiting holds, making it more versatile and consistent.
Changes:
* Renamed method from revert_waiting() to revert_found()
* Expanded functionality to handle all found statuses (W, T, P)
* Updated exception logic to check is_found instead of is_waiting
* Changed exception message from hold_not_waiting to hold_not_found
* Added comprehensive tests for all found statuses
* Updated POD documentation to reflect new behavior
The method now reverts any hold with a found status back to a regular
hold with priority 1, regardless of whether it was waiting, in transit,
or in processing.
To test:
1. Apply the patches
2. Run tests:
$ ktd --shell
k$ cd /kohadevbox/koha
k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: All tests pass including new subtests for T and P statuses
3. Verify all hold test suites pass:
k$ prove t/db_dependent/Koha/Hold*.t
=> SUCCESS: All hold-related tests pass
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 bd9fa395e5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch removes the italics formatting from the shelving location
now that it is in its own column. The formatting was there to
differentiate the shelving location from the branch name when they were
in the same column. This is not necessary anymore.
To test :
1. Go to a record with items which have a shelving location.
--> The shelving location is in italics
2. Apply patch
3. `yarn build`
4. Refresh the page (Ctrl + F5)
--> The shelving location is displayed normally
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 8451fafb01)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This form is no longer used. We're now using a single cancellation hold modal and them form resides there, not here on this table
To test on the UI: Apply this patch and ensure cancelling holds works as before, from both pages (tested using borrowernumber 19:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=19
<staff_url>/cgi-bin/koha/reserve/request.pl?biblionumber=76&biblionumber=437&biblionumber=77
Fixed the failing test:
prove xt/find-missing-op-in-forms.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ef8e3f6786)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 52e89cf452)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test, select a few holds to suspend (but not all). Click 'Suspend selected'. Notice the selection doesn't reset. After this patch, it does reset.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cb60bc435f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This fixes the empty entry when clicking 'Columns' on the top right of
the table
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7a94a17a74)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan, k-t-d, patches applied:
1) Search for 'music':
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=music
2) Click the 'Select all' link on the left of the search toolbar
3) Click the 'Place hold' button on the same toolbar
4) On the patron input, add 'koha'
5) You need to pick the 'Pickup location' specifically for each hold. Click 'Place holds'
6) On this screen (reserve/request.pl) ensure the table(s) work. Selecting all works. Canceling selected works (it doesn't refresh immediatelly, it's a background job). Suspend works as before, sorting, etc.
7) Now visit the patron details page:
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
8) Click the 'Holds' tab.
9) Verify we now have a checkbox column at the start.
10) Test that selecting multiple holds and canceling selected works. Same for suspending.
11) Test the canceling or suspending a specific hold works.
12) Test that this table is compatible with AutoResumeSuspendedHolds sys pref i.e. you're unable to set a resume date when suspending in bulk or single if this sys pref is turned off.
13) Repeat steps 8-12 but for the circulation page from patron details at:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
14) Ensure tests added for API REST endpoint added here pass:
prove t/db_dependent/api/v1/holds.t
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d06ba0860b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5437c7bdd8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aea732cf72)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4780892239)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9b7b486527)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This is so that tables from patron-detail-tabs.inc can also make use of this JS
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dcce9ee610)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6d2f885190)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ad66f7d7d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Prior to bug 38010 we were able to search vendors by alias.
This patch restores it by moving the filter to kohaTable's "default_filters" to allow to pass a more complex condition
Test plan:
Create several vendors, some with aliases
Confirm that searching by alias return the vendors
Confirm that refining the search (using the table's global search) works
as expected
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 3f5953f23d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes a typo in the staff interface's ILL request template,
removing an extra word.
I'm not sure how to test the patch via the interface. It looks like
'mark_completed' action doesn't involve a confirmation step, so the
relevant case in the breadcrumbs menu logic doesn't ever get triggered.
However, examining the patch should be sufficient for QA.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2fcb88ecc3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
1. Find a patron and edit their Library use, then locate their Patron Account Flags
2. Note the name of "gone no address" and set the flag to true
3. Log into OPAC as the changed user and make modifications to their account address, then save
4. Return to staff-end and check the queue for pending patron actions for the "gone no address" flag there as well
5. Apply patch, restart_all
6. Refresh page and repeat steps 2-4, checking if the name has changed to "Address correction needed"
Signed-off-by: Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cf5359b90a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91cb819f88)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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 23a2b69a2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 a137c7a183)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a new method to the `Koha::Hold` class. The method
follows the original implementation in C4::Reserves.
Tests are added to cover all the code paths.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: Tests pass :-D
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a258f253b7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Joining the plugin classes strings and then performing regex checks on
it might be a bit fragile. I had hard time understanding the ands the
conditions for truth.
I rewrote it in a more intuitive way just using `none` and the tests are
easy to understand and pass.
The failure is probably because new plugins were added that make the
resulting string not match the expected structure.
The new new tests design is more readable anyway and not subject to this
errors in future additions.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 67ba381a29)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch simplifies the code a bit, removing duplicated pieces of code
and making it slightly more readable.
The main change is that it now just filters the `@plugin_classes` list
as required, and leaves the original codebase for dealing with loading
the plugins untouched.
A BIG change it implements is that it now requires full class names. I
don't see the use case for partial names, and I generally think we
should be stricter in this area. If there's the need for partial class
names, this should be handled with specific parameters, etc.
It also makes it explicit that the `include` and `exclude` parameters
are mutually exclusive.
A minor idiomatic issue is fixed as well.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Amaury GAU <amaurygau@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a9dbb26290)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
I have added the options --include and --exclude to the install_plugins.pl script. When running the script, you can now specify which plugins you want to install (--include) and which ones you do not want to install (--exclude).
--include installs only the plugins from the specified classes.
--exclude installs all plugins except those from the specified classes.
It's possible to specify the package to install a specific plugin.
--include and --exclude cannot be used simultaneously.
Usage example:
./misc/devel/install_plugins --include <package::pluginClass> --include <anotherPluginClass>"
TEST PLAN
1) Apply the patch
2) Add at least three plugins to the plugin directory ([Koha]/plugins/Koha/Plugin/)
3) Empty the "plugin_data" and "plugin_methods" tables (SQL command: "delete from plugin_data; delete from plugin_methods;")
4) In a terminal, execute this command "./misc/devel/install_plugins.pl --include <package::pluginClass> --include <anotherPluginClass>" (Replace <package::pluginClass> and <anotherPluginClass> with the class and package of your plugins)
5) In your Koha intranet, go to "Koha administration > Manage plugins"
6) Verify that only the specified plugins are installed
7) Repeat step 3
8) In a terminal, execute this command from your Koha project"./misc/devel/install_plugins.pl --exclude <package::pluginClass> --exclude <anotherPluginClass>"
9) Verify that all plugins except the specified ones are installed
10) Run the tests from the Plugins.t file ([Koha]/t/db_dependent/Koha/Plugins/Plugins.t)
11) Ensure that all tests are successful
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Amaury GAU <amaurygau@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd60490292)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f3b63bdded)
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 aff0c6a447)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Also add tests to searching for specific language code
prove t/db_dependent/api/v1/additional_contents.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7c6ad4bbe3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/api/v1/additional_contents.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 8e4793a604)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38b19d72cb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 316745f3e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2da24a2002)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
(cherry picked from commit ef0bde190a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
- Add a new subscription to a serial record (with option 'When receiving the serial --> create an item record')
- Receive several issues and create the items linked
- Back to bibliographic record
- Select several items and click to 'Modify selected items'
- Modify data (like add a public note)
- A box opens indicating that 'some of the items have linked serial issues, would you like to edit these as well ?'
- Click on "Edit serial issue"
- We switch to the issues
- Modify data of the issues (add a note for example like for the items) and save
- Both modifications (item and issue) are validated
Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3aa675795b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
- Add a new subscription to a serial record (with option 'When receiving the serial --> create an item record')
- Receive one issue and create the item linked
- Back to bibliographic record
- Edit item and modifying data
- Save changes
- A box opens indicating that an issue is linked to the item.
- Click on "Edit serial issue"
- We switch to the issue
- Modifying data of the issue and save
- Both modifications (item and issue) are validated
Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8e83c5c3d9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds useful data-attributes to the bookcover/bookcoverimg
container in the OPAC/staff search results.
To test:
0. APPLY PATCH
1. Turn on at least 1 image service for both the OPAC and staff interface
2. Do a search that returns results
3. You should see the following data attributes, even when no cover
image is supplied:
data-biblionumber
data-itemtype
data-itemtype_description
data-title
data-subtitle
data-author
data-isbn
You can now target these with just CSS.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0e0c150303)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Turn on EmailPurchaseSuggestions and add an email address to EmailAddressForSuggestions.
2. Create a new suggestion and set the "
Created by:" field to a patron with an email address
3. Check the message queue ( select * from message_queue where letter_code = "NEW_SUGGESTION" )
4. There is a NEW_SUGGESTION queued, the to_address should be the email you entered in EmailAddressForSuggestions.
5. The borrowernumber is the borrower who made the suggestion.
6. APPLY PATCH, restart_all
7. Repeat steps 2 - 4.
8. This time a NEW_SUGGESTION should be queued, but the borrowernumber will be undef
9. Check in the patron's notice tab, there should be nothing queued.
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6b6d9f275e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In Administration > MARC bibliographic frameworks, add a direct link to default framework can be very useful.
Currently one needs to move to the actions button, click to open it, and click on "MARC Structure".
Test plan :
1) Apply patch
2) Go to Administration > MARC bibliographic frameworks
3) See new link in tools bar "View default framework"
4) Click on it, you go to default framework MARC structure
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ed9a24cfb2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find or create an item that belongs to a library other than the logged-in library
4. Make sure the item has a callnumber (edit it to add one if needed)
4. Check the item in to generate a transfer slip
--> Confirm the information is all filled in correctly on the slip
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 dcdb8b058c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change removes a line in the developer doc which is no
longer relevant.
There's not really much to test here.
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 a6713d8849)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1. Go to guided reports and go through the steps
2. On the final page of the reports 'Confirm custom report' page, the final sentence should have a fullstop and the button should say 'Save'
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 2a00970843)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
To test:
1: have patrons with self_check, self_checkin_module, and self_checkout_module permissions
2: observe that these patrons don't get icons by their names in the patroninfo sidebar
3: apply patch, restart_all
4: reload your patrons, see they now have icons for self checkout and/or self check-in
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ae5ca4c05)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
[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>
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>
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>
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>
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>
To test:
1. Check out some items to a patron so they have a circulation history,
the check in some of those items..
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 and reload the page.
4. 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.
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 70eeb057fd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the vendor detail view in order to make some menu
items translatable..
To test, apply the patch and run 'yarn build'. Test that the correct
strings are translatable. In this example I'm testing fr-FR:
- Update a translation:
> gulp po:update
> 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 vue/components/Vendors/VendorShow.vue for
translation, e.g.:
#: koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue:12
#, fuzzy
msgid "Basket"
msgstr "Paniers"
- Lines 12, 25, and 35 of VendorShow.vue have been modified.
- Delete the line "#, fuzzy"
- Edit the "msgstr" string if ncessary, however you want (it's just for
testing)
- Install the updated translation:
> perl translate install fr-FR
- Go to Acquisitions -> Vendors -> Vendor details.
- Switch to your updated translation.
- Confirm that the menu items under "New" are translated correctly.
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 a219bda218)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
If the name is already in use, we just return.
It might make sense to have a console.debug() or similar to notify
developers that this is happening. Open for other opinions.
To test:
1) Apply the first patch which adds an additional hydrate call in main-container.inc
2) Go to acqui/acqui-home.pl
3) Verify that you see this error in the dev tool's console tab:
Uncaught (in promise) NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "acquisitions-menu" has already been used with this registry
4) Apply the second patch
5) Run `yarn js:build` in ktd (assuming ktd).
6) Reload the page without cached assets (Ctrl/Cmd + Shift + R) and verify that the uncaught error is gone.
7) Sign off.
There's an additional problem here I (and probably you) noticed. But that's unrelated to this 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 e152b1be08)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
PA amendded: Commit title
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 559cebb000)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Now executable!
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 665753634b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 420add2908)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1 - confirm whether or not NewsLog is enabled on your system
2 - apply patch, updatedatabase, restart_all
3 - search system preferences, confirm you now have
AdditionalContentLog rather than NewsLog and that the new
description is accurate
4 - confitm AdditionalContentLog shows the value you previously had for
NewsLog
5 - go to Tools > Log Viewer
6 - confirm the checkbox here is labeled "Additional Content", that it
correctly reflects the syspref value, and that it links to the
syspref
7 - with AdditionalContentLog enabled, created/edit/delete news, HTML
customizations, and pages. confirm they log
8 - with AdditionalContentLog disabled, created/edit/delete news, HTML
customizations, and pages. confirm they don't log
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9805b4cb3e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
I noticed the rest of the html customizations don't have html in the option name, so I renamed for consistency.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1a1b85c87)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch moves the IntranetReportsHomeHTML system preference into
HTML customizations, making it possible to have language- and
library-specific content.
To test you should have some content in the IntranetReportsHomeHTML
system preference before applying the patch. Apply the patch and run the
database update process.
- In the staff client, go to Tools -> HTML customizations and verify
that the content from IntranetReportsHomeHTML is now stored there.
- The HTML customization entry form should offer
IntranetReportsHomeHTML as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
- perl misc/translator/translate update fr-FR
- perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
preferences -> language.
- Edit the IntranetReportsHomeHTML HTML customization and add unique
content to the "fr-FR" tab.
- Go to the reports home page. You should see the
content you added to the IntranetReportsHomeHTML HTML
customization.
- Switch to your updated translation and confirm that the content you
added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
"IntranetReportsHomeHTML." It should return no results.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20caaf611a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Jenkins was failing on Koha_Master/3350
With this patch we won't rely on the order (timestamp are identical and
may not be sorted as expected)
23:56:28 koha-1 | # Failed test 'GetLogs returns results in the log viewer for the merge of 526'
23:56:28 koha-1 | # at t/db_dependent/Koha/Patron/Log.t line 67.
23:56:28 koha-1 | # got: 'G7X8jre jVr_oz8M (eQXWiW9b4jX16424uC3Chn) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1 | # expected: 'exgnQtw lLmxQL9eWY (nHc_VZdFHIXr90p6WrIijDPgFrz8JM38) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1 |
23:56:28 koha-1 | # Failed test 'GetLogs returns results in the log viewer for the merge of 527'
23:56:28 koha-1 | # at t/db_dependent/Koha/Patron/Log.t line 82.
23:56:28 koha-1 | # got: 'exgnQtw lLmxQL9eWY (nHc_VZdFHIXr90p6WrIijDPgFrz8JM38) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1 | # expected: 'G7X8jre jVr_oz8M (eQXWiW9b4jX16424uC3Chn) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1 | # Looks like you failed 2 tests of 4.
23:56:28 koha-1 |
23:56:28 koha-1 | # Failed test 'Test Koha::Patrons::merge'
23:56:28 koha-1 | # at t/db_dependent/Koha/Patron/Log.t line 113.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f337c53ee)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ef460765d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8ed44fde97)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 80c656d79e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ad7b8607ed)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da4818054b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
without this patch , when patrons are merged , you can't see the merge in the log viewer.
To test:
-Apply the patch
-Make sure you have "BorrowersLog" on in you System Preference
-Search patrons
-Check two ore more patrons
-Merge selected patrons
-Merge patrons
-Go to log viewer
- Make sure there is the line with the action : "Merge"
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0424ebb439)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Including chmod 755 xt/use-test-no-warnings.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 02a9dd1489)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Maybe we could remove the warnings from misc/devel/tidy.pl if the file
was originally empty but for now it feels safer to skip the tidy of
empty files
Test plan:
prove xt/tt_tidy.t xt/use-test-no-warnings.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 a43065d307)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c456dd86b4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e4b27be895)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We've got those tests running without warnings now too.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b10a6f855f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 40d3fe470e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a new xt test (xt/use-test-no-warnings.t) to make sure
all our Perl test files will use Test::NoWarnings.
It also adds Test::NoWarnings to some files that were missing it and
that didn't need any other changes.
However we still have 7 non-trivial tests that we will consider
exception for now, until they are fixed.
Test plan:
prove xt/use-test-no-warnings.t
should return green.
And all other tests modified by this patch (the qa script will do that
for you)
You can also test the 2 selenium tests:
1. DROP and CREATE the DB
DROP DATABASE koha_kohadev;
CREATE DATABASE koha_kohadev;
restart_all
2. KOHA_TESTING=1 prove t/db_dependent/selenium/00-onboarding.t
3. Repeat 1
2. KOHA_TESTING=1 prove t/db_dependent/selenium/01-installation.t
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 63eb2e1f4a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This database update fixes existing RECEIPT and ACCOUNT_CREDIT notice
templates that may still use the old 'collected' variable instead of
'tendered'. It handles various formatting patterns and provides
verification that the conversion was successful.
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 4b300b1c1d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
"One Ring to rule them all, one Ring to find them, One Ring to bring
them all and in the darkness bind them"
We've been battling against this for years, with a mixed use of
terminology and thus confusion in templates vs controllers and notice
templates. I've decided to just try and make sure all the terminology
matches throughout, and use the more popular 'tendered' term over the
'collected' term.
This patch standardizes the terminology used throughout the payment
system to consistently use 'tendered' instead of the mixed usage of
'collected' and 'tendered' that has caused confusion over the years.
Changes include:
- Update all payment form templates to use 'tendered' input names
- Update JavaScript validation and change calculation logic
- Update controller parameter handling in pos/pay.pl, pos/printreceipt.pl,
and members/paycollect.pl
- Update sample notice templates (RECEIPT) to use 'tendered' variable
- Add null check for $total_tendered to prevent perl warnings
Test plan:
1. Test Point of Sale payments with tendered amounts and change calculation
2. Test member account payments with tendered amounts
3. Test receipt generation (both print and email)
4. Verify JavaScript validation works correctly
5. Confirm no perl warnings when tendered amount is undefined
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 f91310306c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d801d4b16a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the /auth/password/validation endpoint to use the new
api_validate_password permission instead of the generic borrowers
permission.
This provides more granular control over who can use the password
validation API endpoint.
To test:
1. Apply this patches
2. Rebuild the API spec
$ ktd --shell
k$ yarn api:bundle
3. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/password_validation.t
=> SUCCESS: Tests pass!
4. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
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 812b38d02c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change adds a `api_validate_password` permission which allows a user to only
validate borrowers by using the /api/v1/auth/password/validation endpoint.
This avoids scenarios where you want third-parties to authenticate a user without
giving them full permissions to perform CRUD operations on user data.
To test:
1. Apply patch
2. Run "koha-upgrade-schema kohadev"
3. koha-plack --reload kohadev
4. prove -v t/db_dependent/api/v1/password_validation.t
5. Visit http://localhost:8081/cgi-bin/koha/members/member-flags.pl?member=51
6. Note that a new subpermission `api_validate_password` appears under the "borrowers" permission
Signed-off-by: David Nind <david@davidnind.com>
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 79c1853b2b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 02aa7d08f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d6883d9e3c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Apply patch, restart_all, and regenerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface ) I also recommend clearing your browser cache.
2. Do a catalog search and notice the 'Show local items only' button above the "Location" column.
3. Click it to show information ( in that column ) that is only related to the branch you are currently logged in at.
4. In the same result set have some items that are checked out, withdrawn, lost, damaged, and notforlaon.
5. Play more with the search results and ensure everything is accurate.
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 580484e2da)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
No idea why it was not NULL in DB when I did my first SELECT
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fe14f8b7c6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When reviewing the different sysprefs that had "NULL" as default, I
only found those 2 occurrences that could be problematic. I think we
should default to 0 here.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ca6cbc3cf9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Some sysprefs have NULL as their default value, and systempreferences.value allows NULL values.
However C4::Context->set_preference does not unset a syspref if "undef" is passed.
Additionally some of the sysprefs that have NULL as default will generate warnings in the logs (and test suite output).
opac/opac-suggestions.pl: for my $f ( split( /\s*\,\s*/, C4::Context->preference("OPACSuggestionUnwantedFields") ) ) {
Here is the current list:
+-------------------------------+-------+
| variable | value |
+-------------------------------+-------+
| decreaseLoanHighHoldsDuration | NULL |
| decreaseLoanHighHoldsValue | NULL |
| ILLHiddenRequestStatuses | NULL |
| ILLOpacbackends | NULL |
| ILLSendStaffNotices | NULL |
| ListOwnerDesignated | NULL |
| MarcFieldDocURL | NULL |
| MaxFine | NULL |
| OPACSuggestionUnwantedFields | NULL |
| ReportsExportLimit | NULL |
| SerialsSearchResultsLimit | NULL |
+-------------------------------+-------+
Test plan:
Code review required here, please confirm the above and that the
different occurrences do not use "undef" as a value.
Note that some tests now do not longer generate warnings
(eg. t/db_dependent/selenium/opac_ill_requests.t)
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a3b4b5cdd0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9fefdd5674)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
- Update the dbrev to use say_success, and make dbrev and installer
consistent
- Change error div in moredetail.tt from info to warning
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3096833130)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. APPLY PATCH, updatedatabase, and restart_all
2. Search for the system preference, PreventWithDrawingItemsStatus
3. Select both in transit and checked out, then save
4. Find an item and put it in transit.
5. Now from the item detail page, go to manage items > edit item
6. Using the item that was put in transit, attempt to change the status to withdrawn.
7. You should see an error at the top of the page 'In transit item cannot be withdrawn.' Make sure the item did not get marked as withdrawn.
8. Using a different item, do a checkout
9. Now from the item detail page, go to manage items > edit item
10. Using the checked out item, attempt to change the status to withdrawn.
11. vYou should see an error at the top of the page 'Onloan item cannot be withdrawn.' Make sure the item did not get marked as withdrawn.
12. Now, using the in transit item, go to the items tab. ( catalogue/moredetail.pl?biblionumber=x )
13. Under Statuses, attempt to withdraw the item.
14. You should see an error near the top of the page "Cannot withdraw item in transit".
15. Now, using the checked out item, go to the items tab. ( catalogue/moredetail.pl?biblionumber=144 )
16. Under Statuses, attempt to withdraw the item.
17. You should see an error near the top of the page "Cannot withdraw checked out item.".
18. Using both the in-transit and checked out item, attempt to modify the status through batchMod.
19. Ensure that the items are not being updated to withdrawn.
20. Turn off PreventWithDrawingItemsStatus system preferece.
21. Going through each of the steps again, except this time your items should successfully withdraw.
prove t/db_dependent/Koha/Item.t
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4e920be91f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4b38f5acd5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eab5aa774c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fdd089a3ba)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ed1ce54918)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Edit system preferences:
emailLibrarianWhenHoldIsPlaced - Enable
ReplyToDefault - enter a fake/test email address
ExpireReservesMaxPickupDelay - Allow
ExpireReservesAutoFill - Do
ExpireReservesAutoFillEmail - same email address as ReplyToDefault
4. Place two holds on the same bib for two different patrons, Patron A
and Patron B
5. Edit an item on that bib to set a call number (if it doesn't have one
already)
6. Check in that item to set Patron A's hold to waiting
7. Edit the expiration date on Patron A's hold to yesterday's date
To do this in KTD:
ktd --shell
koha-mysql kohadev
UPDATE reserves SET expirationdate = <yesterday's date>
WHERE borrowernumber = <Patron A's borrowernumber>;
8. Run misc/cronjobs/holds/cancel_expired_holds.pl to automatically
cancel the expired hold and fill the next one
9. Open koha-mysql again and run the following query to view the
generated notices:
SELECT subject, content FROM message_queue
WHERE to_address = '<the email address you set in step 3>';
--> Confirm that HOLDPLACED and HOLD_CHANGED notices were both generated
--> Confirm that all information has been filled in correctly for those
notices
Signed-off-by: Marion Durand <marion.durand@biblibre.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f869d42807)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
- Add a new subscription to a serial record (with the option 'create an item record' selected)
- Receive several issues and create the linked items
- Return to the bibliographic record
- Select several items
- Click to 'Delete selected items'
- Tick the box 'delete serial issues linked to items' and confirm
- The items should be deleted correctly
- Back to subscription : the issues linked to items should no longer exist
Signed-off-by: Boubacar OUATTARA <boubacar.ouattara@biblibre.com>
Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 69b1d07d76)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
- Add a new subscription to a serial notice (with the option 'create an item record' selected)
- Receive one issue and create the linked item
- Return to the bibliographic record
- Edit item - Action - Delete
- Tick the box 'delete serial issues linked to item' and confirm
- The item should still be deleted correctly
- Back to subscription : the issue linked to the item doesn't exist any more
Signed-off-by: Boubacar OUATTARA <boubacar.ouattara@biblibre.com>
Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4260c84cde)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove xt/find-missing-filters.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91dd2049f3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This new 'Mark completed' screen only shows when ILL_STATUS_ALIAS is not empty, i.e. Koha installations that are not using ILL_STATUS_ALIAS will not see any change in their workflow.
Backends that don't implement 'mark_completed' are inherently already making use of core 'mark_completed' and will automatically adopt this enhancement.
Backends that do implement their own mark_completed don't automatically adopt this enhancement and will not see any change in their workflow.
Test plan:
1) Enable ILLModule sys pref
2) Create a new ILL request:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Add a type, cardnumber and library. Click 'Create'.
4) You should now be on the manage request screen. Click 'Confirm' and 'Confirm request'.
5) You should be on the manage request screen again. Click 'Mark completed'. The request's status became 'Completed'.
6) Add at least one AV entry to ILL_STATUS_ALIAS av category, visit:
<staff_url>/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=ILL_STATUS_ALIAS
7) Add 'abc_code' to 'Authorized value' and 'abc_description' to 'Description'. Click 'Save'.
8) Repeat steps 2 to 5. Notice that when you 'Mark completed' now, a new screen is shown prompting for a status_alias.
9) Pick a status_alias and save. Notice the 'status' now shows the alias.
Sponsored-by: NHS England
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bb790bea23)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/ILL/Requests.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 10fdcf23ee)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove /kohadevbox/koha/t/db_dependent/Koha/ILL/Requests.t
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cb074686b8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3449cb8eee)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6b8b964ae7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When the AutoILLBackendPriority system preference is enabled, the form that was used is always the Standard form, regardless of which backend the request ends up on.
It only makes sense that when editing an ILL request's item metadata, the form shown is also the Standard form if AutoILLBackendPriority is in use.
Test plan, k-t-d, don't apply patch:
1) Enable ILLModule
2) Install an external backend, e.g. the libkey lending tool (IncDocs) backend plugin:
https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/tag/v2.0.3
3) Restart plack
$ koha-plack --restart kohadev
4) Create a new IncDocs ILL request:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=IncDocs
5) Add a DOI '123', a cardnumber '42' and any library. Click 'Make request'.
6) Enable AutoILLBackendPriority system preference by ticking 'IncDocs'. This is only done now to simplify the test plan, as creating an 'IncDocs' request using AutoILLBackendPriority requires credentials configuration.
7) Back on the 'Manage request' page for the request created in step 5, click 'Edit item metadata'. Notice the form shown is not the 'Standard' form (its the IncDocs one). Edit any of the metadata values, click 'Save'. Verify the new metadata is saved correctly.
8) Apply patch. Repeat 7). Notice the form shown is the 'Standard' form now. Edit any of the metadata values, click "Save". Verify the new medata is saved correctly.
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 ed3b233f63)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
And list alphabetically on branchname
Signed-off by: Chris Rowlands <chris.rowlands6@nhs.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9657c19608)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
And list alphabetically on branchname
Signed-off by: Chris Rowlands <chris.rowlands6@nhs.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8698c8f7c5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
[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>
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>
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>
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>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3b5b3cf29c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We should not use cy.wait(delay), it's a poor pattern and can cause
random failures.
Test plan:
All cypress tests should still pass after this patchset.
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c3df0ee96)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Enable several languages for the staff interface
Go to http://localhost:8081/cgi-bin/koha/acquisition/vendors/1
Notice that the language selector menu is displayed
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 91fdde8172)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fbbeba87dc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
The recalls history template doesn't use the standard WRAPPER for
displaying breadcrumbs. This patch fixes it.
To test, apply the patch and enable recalls if necessary.
- Locate a patron and view their details.
- In the left-hand sidebar click "Recalls history"
- The breadcrumbs on the recalls history page should look correct, with
styling consistent with other pages' breadcrumbs menus
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e9b20d0bba)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Amended-by: Jonathan Druart
Move up, close to the other cypress entry
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a8b4a9fef9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Amended-by: Jonathan Druart
Moved right after the other dist entry
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a261111695)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This field is outdated and will never display. It should be removed.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 14a083fbf5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Go to Administration > Libraries and view a branch by clicking on the branch name.
2. Notice "Category:" field.
3. APPLY PATCH
4. The field should be gone.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e7f63ebf05)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
We have insert_final_newline = true to ensure files will contain a new
line at the end. However we have seen commits with "No new line" added
in the git log.
We should have a xt test to prevent more occurrences.
We should also have a test at the QA script level:
https://gitlab.com/koha-community/qa-test-tools/-/issues/96
Test plan:
prove xt/find-missing-new-lines-at-the-end-of-file.t
should return green.
Remove the new line at the end of a file, eg.
vim -b mainpage.pl
:set noeol
:wq
Now
prove xt/find-missing-new-lines-at-the-end-of-file.t
is failing on mainpage.pl.
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 e9eb20249e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 582f673faa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Update to show license version as v3, instead of the specific
minor and point release.
Update license to use US American spelling.
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 58d6d10103)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the license page with information
about Cypress.
Test plan:
1. Apply the patch.
2. In the staff interface, go to More > About > Licenses.
3. Scroll to Cypress and note the library name and
licensing information.
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 da585cfd3f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the license page with information
about Vue.
Test plan:
1. Apply the patch.
2. In the staff interface, go to More > About > Licenses.
3. Scroll down to Vue and note the library name and
licensing information.
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 755d29ca99)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Test plan:
1. Navigate to Tools > Patron clubs
2. Create a club template
3. Create a new club using new club template
4. Observe the date fields are "start date" and "end date"
5. Apply patch
6. Refresh page, observe that the date fields have changed to "Enrollment start date" and "Enrollment end date".
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 fd004d6016)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the default patron card layout to replace "Expires:
August 31, 2010" with the patron's account expiry date.
To test:
1. Apply patch and reset_all
2. Go to Tools > Patron card creator
3. Click New > Card batch
4. In Add by borrowernumber(s), enter borrowernumbers 1 to 6, one per line
5. Click Add patron(s)
6. Click Export card batch
7. Click Export
8. Open the PDF
--> Note that the patron's account expiry date is printed on the card
Optional : Change the expiry date of one or more patrons and redo steps 6-8.
--> The updated expiry dates should be printed on the cards.
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3e95c21d85)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test Plan:
1. In OPAC create a public list, add a book to the list.
2. Notice a link to the list on the biblio's detail page.
3. Create a private list and add the book to it. Notice there is no link to the list in the details page.
4. Apply patch, restart_all
5. Notice there is now a link to the private list
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 9517a57ee2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When displaying messages on a patron account, group the messages by
type and label which are OPAC messages and which are internal staff
messages.
To test:
1. Find a patron and add several messages to their account, alternating
between internal staff messages and OPAC messages
--> Note that the messages display in the order that they are added and
not explicitly labeled
2. Apply patch and refresh page
--> Confirm that all staff messages display first and all OPAC messages
display underneath
--> Confirm that messages are now labeled "Staff note" or "OPAC"
3. Play around on the patron account and confirm that the message
display is consistent after taking different actions:
- On the Details page
- On the Check out page
- After adding a new staff message
- After adding a new OPAC message
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 f30bed0d79)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Test plan:
1- Apply the patch and enable the folowing system preference: OpacBrowseResults
2- Make a search, choose a record, and expand the 'Browse results' menu.
3- Check the color contrast of these elements: close buttons, results number navigation, record name link and author name. (you can use a color checker like WCAG Color contrast checker)
4- If all the color contrast between the elements and the background are greater than or equal to 4.5 the test succeeds !
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 93546f729e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the install and upgrade process for plugins to add the
newly added extra parameters to the thrown exceptions.
This is covered by the tests
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove -r t/Koha/Exceptions.t \
t/db_dependent/Koha/Plugins
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5c95c02476)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch tweaks the `Koha::Exceptions::Plugin` class by adding an
extra parameter to the plugin install and upgrade related exceptions so
they carry the actuall error (if any).
* Koha::Exceptions::Plugin::InstallDied: install_error
* Koha::Exceptions::Plugin::UpgradeDied: upgrade_error
I didn't pick plain 'error' because it is a reserved word for
`Exception::Class` which makes it stringify using its value only.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit afd530ab0d)
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: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 36df107fc9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
I reused an implemented hook in C4::Letters and overlooked the
redundancy in it. This patch clears that.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Plugins/Notices_content_hook.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass! No behavior change!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 17d02662c4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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 9b0669f516)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
On the UI, not in the comment of the DB
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 2becb53709)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
To test:
apply the patch and search for RestrictPatronsWithFailedNotices in sysprefs. It will now include a note that the cron looks at the preceding 7 days.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 15740d1f64)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This displays the LOST authorized value description when checking an
item in, instead of the generic "Item was lost, now found." message.
Test plan:
1. Set an item’s Lost status to "Lost". When you check in that item,
you should see the message: “Item was lost, now found.”
2. Set an item’s Lost status to "Missing". When you check in that
item, you should see the message: “Item was lost, now found.”
(default behavior before patch)
3. Apply the patch.
4. Set an item’s Lost status to "Missing" again. When you check in
that item, the message should now be: “Item was Missing, now found.”
(using the authorised value description)
5. Repeat step 4 with other custom LOST authorised values. The check-in
message should correctly reflect the corresponding authorised
value descriptions.
6. Sign off and have a wonderful day! 😊
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 222329e97e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This is a trivial patch to correct the low color contrast of the
"Refine your search" link.
To test this patch, you can use the firefox extension: WCAG Contrast
Checker or WAVE.
Test plan:
1. Apply the patch
2. Search in the Koha OPAC
3. Check the color contrast of the "Refine your search" link.
4. If it is greater than 4.5, the test succeeds !
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 5556bf867b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1. Enable the system preferences: ILLModule, OPACHoldsHistory,
OPACHoldRequests.
2. Apply the patch and log in to a patron account.
3. Go to the "Interlibrary loan requests". Look at the "Show 'select
number' entries" and check the color contrast, which should be
greater than 4.5.
4. Search for a record, choose "Place hold", and check the color
contrast. The "show more options" should have a color contrast
greater than 4.5.
5. Now go to the Holds history, you need at least one record on hold.
Look at the "Showing 1 to ... of ... entries" and check the color
contrast, which should be greater than 4.5.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 47847f359d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The left margin is only necessary for span.required
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 77891363ce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects some CSS which was broken during the upgrade to
Bootstrap 5. The .required class should not add any style differences to
form fields.
To test, apply the patch and rebuild the staff interface CSS.
- Go to Administration -> Patron categories.
- Edit an existing category.
- Confirm that the contents of input fields are not styled red and
italic.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4988662703)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Test plan, apply patch:
1) Enable ILLModule
2) Create a new OPAC request, visit:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
3) Press 'Create'. Notice the required 'type 'is now validated before the form is submitted.
Additional testing:
1) Enable ILLOpacUnauthenticatedRequest. Log out. Repeat 2)
2) Press 'Create'. Notice the required unauthenticated fields are highlighted as required.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 738ab3b256)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the messages more streamlined.
To test:
1. Enable `useDischarge`
2. Have a patron with two checkouts
3. Log into the OPAC and try to request a discharge
=> FAIL: You get a message that says '2 item(s)' and has redundant
words.
4. Check one of the items in
5. Repeat 3
=> FAIL: Same, but says '1 item(s)'.
6. Check it in
7. Add a manual fee
8. Repeat 3
=> FAIL: Another redundant text about charges.
9. Apply this patch and repeat 2-8
=> SUCCESS: Things read better
10. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eadcf3452a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 007d66e314)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2025ed7fdc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd32425271)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
On smaller screens (phones, tablets), the 'Refine your search' expandable section in the Koha OPAC is not clearly announced by screen readers.
The reason for this is that the expandable section toggle button is instead identified and announced as a link.
This results in screen reader users incorrectly expecting to be redirected to another page, and not being informed that there is a expandable section.
For elements with a class of menu-collapse-toggle, add an aria-expanded attribute which defaults to false, and is toggled to true upon that specific section being expanded.
If the screen width is 992px or higher, then remove the aria-expanded attribute on load as it is irrelevant, and potentially misleading.
To test:
1) Apply the patch.
on a small screen:
2) Run a library catalogue search in the Koha OPAC.
3) Right click on the page to inspect it.
4) Inspect the 'Refine your search' element.
5) Notice that it now has a aria-expanded attribute which is set to false.
6) Open the expandable 'Refine your search' section.
7) Notice that the aria-expanded attribute on the 'Refinine your search' element is now set to true.
8) Navigate to Home > Most popular titles
9) Repeat steps 3-7
10) Navigate to Home > Details for > Full subscription history
11) Repeat steps 3-7
then, on a bigger screen (992px and above)
12) Run a library catalogue search in the Koha OPAC.
13) Right click on the page to inspect it.
14) Inspect the 'Refine your search' element.
15) Notice that there is no 'aria-expanded' attribute, as in this case the section isn't expandable.
16) Resize your viewport below 992px, and notice that 'aria-expanded' reappears and is set to false.
17) Resize your viewport while remaining below the 992px limit, and notice that 'aria-expanded' remains set to false.
18) Open 'Refine your search', notice that 'aria-expanded' is set to true.
19) Resize your viewport while remaining below the 992px limit, and notice that 'aria-expanded' remains set to true.
Note: now updated to handle screen resizes
Sponsored-by: British Museum
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c4ee078e50)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
After adding ConsiderHeadingUse system preference we can limit search
results of authority finder plugin to authorities useable in specyfic
type of fields (based on 008/14-16 data in authorities record).
The autocomplete feature in auth_finder.pl should obey the ConsiderHeadingUse
setting.
Test plan:
==========
0. Have a standard KTD enviromnent.
1. Apply Bug 38494.
2. Set ConsiderHeadingUse system preference to "Don't", ShowHeadingUse to
'Show'.
3. Go to the Cataloging editor and open the authority finder plugin for
the 650 field.
4. Type "Application" in "Search main heading ($a only)" field.
5. Notice two autocomplete values: "Application program interfaces
(Computer software)" and "Application software".
6. Click search button.
7. There are two result: "Application program interfaces (Computer
software)" (the one with 'v' Subject in Heading Use column) and
Application software Development (with 'x' Subject in Heading Use
column).
8. Close the authority finder window, cancel the editor. Set
ConsiderHeadingUse system preference to "Do".
9. Go to the Cataloging editor and open the authority finder plugin for
the 650 field.
10. Type "Application" in "Search main heading ($a only)" field.
11. Notice two autocomplete values: "Application program interfaces
(Computer software)" and "Application software".
12. Click search button.
13. There is only one result: "Application program interfaces (Computer
software)" (the one with 'v' Subject in Heading Use column).
So we get only one result but there were two autocomplete hints.
14. Apply the patch ; restart all ; clear the browser js cache (or go to
a private browser window).
15. Repeat p. 9-10.
16. Notice that there is only one autocomplete hint: "Application
program interfaces (Computer software)".
17. Click search button.
18. There is only one result: "Application program interfaces (Computer
software)" (the one with 'v' Subject in Heading Use column).
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 f801230f01)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The id attribute should be unique on the page, so I'm changing it to a
name attribute and updating the corresonding selector.
Also, we can eliminate find() here:
$(this).closest('form').find('input...
...because $(this) IS the form, so we can optimize a tiny bit by
removing the find().
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eef4683e9a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When a batch is cleaned from the staged marc records screen, the user
may be unaware of records that are imported within the batch which they
may want to revert in future. Cleaning the batch unlinks these and
makes reversion / cleanup difficult. This patch gives an extra warning
when cleaning a batch where there are still linked records attached.
Test plan:
1. Stage a marc record from a mrc file
2. Import the batch
3. Return to the managed staged records screen.
4. Click "clean"
5. Note message is "Clear all reservoir records staged in this batch?
This cannot be undone."
6. Apply patch and restart all.
7. Repeat steps 1-4 with a new batch
8. Note message has changed to "This batch contains imported records.
Are you sure you wish to clear all the reservoir records? This
cannot be undone."
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fd425e815c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the information message on the Koha to MARC mapping
page to mention that batchRebuildItemsTables.pl should also be run
if changes are made to mappings that affect the items table.
Test plan:
1. Go to Koha administration > Catalog > Koha to MARC mapping.
2. Note that the information box only mentions running
misc/batchRebuildBiblioTables.pl after mapping changes.
3. Apply the patch.
4. Refresh the page.
5. Note that it now also mentions running batchRebuildItemsTables.pl
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ddcd824071)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds DataTable features and table settings to the EDI
accounts administration page.
The patch also includes some minor simplification of template logic in
the table.
To test, apply the patch and restart_all.
- Go to Administration -> EDI accounts.
- If necessary, add at least a few random EDI accounts.
- Test the DataTable listing the accounts you added. Confirm that all
DataTable features work correctly: Sorting, filtering, column display,
etc.
- Click the "Configure" button to jump to the table settings page in
Administration.
- Alter the default configuration by hiding columns, changing default
sort order, etc. It's probably wise to uncheck the "Save
configuration state on page change" checkbox so that you can easily
see if your configuration changes work.
- Return to Administration -> EDI accounts and confirm that the new
configuration is being applied.
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 10d3a0940a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We shouldn't use the ->validation method anymore as it isn't stable. We need to pass the params into the method accounting for any param changes made
Test plan:
1) Apply the regression test patch and run the test
2) Test should fail
3) Apply this patch
4) Run test again
5) Test should pass
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 f30b6f668c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove t/db_dependent/Koha/REST/Plugin/Objects.t
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 f45dd34d6e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes the reliance on `$c->validation->output` for the
query-in-body feature. This will allow bug 40417 to move forward.
It also fixes some wrong design decisions we made 5-6 years ago. This
was discussed with the Mojolicious::Plugin::OpenAPI maintainer and the
agreement was `$c->validation->output` was not stable nor intended to be
accessed like we do.
To test:
1. Run:
$ ktd --shell
k$ prove t/Koha/REST/Plugin/Query.t \
t/db_dependent/api/v1/*.t \
t/db_dependent/Koha/REST/Plugin/*
=> SUCCESS: Tests pass!
2. Apply this patchset
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 17b851bff0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
I wanted to isolate the changes for the query-in-body handling and it
made sense to refactor this dupicated code at the same time. So I add
this patch for tidying the area in preparation for the other part.
Duplicated code gets simplified.
To test:
1. Apply the unit tests patch
2. Run:
$ ktd --shell
k$ prove t/Koha/REST/Plugin/Query.t \
t/db_dependent/api/v1/*.t \
t/db_dependent/Koha/REST/Plugin/
=> SUCCESS: Tests pass!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 710bf4bb1b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 5c82766985)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch aligns handling of the header with how other headers are
managed.
* A helper is added which reads the header and stashes the value
* The helper is called in the same place similar helpers are called
(authenticate_api_request)
* The `objects.search_rs` helper is adjusted to use the stashed value
instead of picking it from the reserved params.
To test:
1. Apply this patches
2. Run:
$ ktd --shell
k$ prove t/Koha/REST/Plugin/Query.t \
t/db_dependent/api/v1/*.t \
t/db_dependent/Koha/REST/Plugin/*
=> SUCCESS: Tests pass! No behavior change!
3. Sign off :-D
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 5e94e44ee2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 84c8f53769)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
The test output was a little verbose in places, however the diag's can
be helpful when debugging failures. I've opted to comment rather than
completely remove them.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a1bfc15cbf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Tests for the logger calls introduced in the create_edi_order
in the last commit.
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 4c69085376)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds Test::NoWarnings to our EDI unit tests. In doing so, it
reminded me that we still had some old carp style error handling in the
process_quote section and that we shoudl replace those with calls to
Koha::Logger instead.
Changes made:
1. Added Test::NoWarnings import to catch any warnings
2. Replace 'carp "Message"' appropriately with
'$logger->warn("Message")'
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 ac3eced5d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This adds a test to verify that EDI invoice processing correctly handles
invoices without TAX segments (undefined tax rates).
The test covers:
1. Processing invoices without TAX segments
2. Verifying no warnings about uninitialized values in multiplication
3. Confirming tax rates are set to 0 when no tax information is present
4. Ensuring invoice processing completes successfully
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 dda29248ba)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When processing EDI invoices without TAX segments, warnings were
generated due to undefined tax rates in multiplication operations.
The tax_rate() method in Koha::Edifact::Line correctly returns undef
when no TAX segments are present in the EDI message. However, the
invoice processing code in Koha::EDI didn't handle this case properly.
This patch fixes the issue by:
- Adding checks for undefined tax rates before using them in calculations
- Defaulting to 0 tax rate when no tax information is present
- Ensuring tax_value calculations use 0 instead of undefined values
This eliminates "Use of uninitialized value in multiplication" warnings
while maintaining correct processing of invoices without tax information.
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 68aa216317)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes several warnings that occur when running Edifact tests:
1. Changed `my $self = ()` to `my $self = {}` in Koha::Edifact constructor
to properly initialize as hashref instead of empty list
2. Added null/empty checks in Koha::Edifact::Segment::_parse_seg() to prevent
warnings when processing undefined or empty segments
3. Added null/empty checks in Koha::Edifact::Segment::_get_elements() to
handle undefined segments gracefully
4. Added Test::NoWarnings to t/Edifact.t to catch any remaining warnings
These changes eliminate "Use of uninitialized value" warnings and ensure
clean test runs without affecting EDI functionality.
Test plan:
1. Run prove t/Edifact.t and verify no warnings are displayed
2. Test EDI message processing to ensure no regression
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac266cad8b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/Budgets.t .. 153/156 Use of uninitialized value in multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 543.
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 554.
t/db_dependent/Budgets.t .. 154/156 Use of uninitialized value in multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 543.
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 554.
t/db_dependent/Budgets.t .. 155/156 Use of uninitialized value in addition (+) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 510.
This change seems correct, but I am not 100% sure it won't introduce a
regression. What about 0 vs undef?
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 15a8f0444d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
This patch updates the terminology for the output for
reports from "To screen into the browser" to
"To screen in the browser" ("into" changed to "to").
Test plan:
1. Go to Reports
2. Click on Acquisitions
3. Check output language is To screen in the browser
4. Go to Report
5. Click on Patrons
6. Check output langugae is To screen in the browser
7. Go to Reports
8. Click on Catalogy
9. Check output language is To screen in the browser
10. Go to Reports
11. Click Circulation
12. Check output language is To screen in the browser
13. Go to Reports
14. Click Serials
15. Check output language is To screen in the browser
16. Got to Reports
17. Click Cash register
18. Check output language is To screen in the browser
19. Go to Reports
20. Click Holds
21. Check output language is To screen in the browser
22. Go to Reports
23. Click Patrons with the most checkouts
24. Check output language is To screen in the browser
25. Go to Reports
26. Click Most-circulated items
27. Check output language is To screen in the browser
28. Go to Report
29. Click Patrons who haven't checked out
30. Check output language is To screen in the browser
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 152b8ef199)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1b3868e79c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 984edc806c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds detailed JSDoc documentation to all Cypress testing
plugin files.
Documentation added to:
- insertData.js: Data insertion utilities with examples
- api-client.js: API wrapper functions with usage patterns
- mockData.js: Schema-based mock data generation
- auth.js: Authentication helper functions
- db.js: Database query utilities
- readYamlFile.js: YAML file reading utilities
- index.js: Main plugin configuration
Each function now includes:
- Complete parameter descriptions with types
- Return value documentation
- Practical usage examples
- Error conditions and handling
- Module-level overviews
This addresses the documentation gap identified during QA review,
hopefully making it easier for future devs to adopt the new framework of
tools.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d9122cd5ac)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 3f6a2cb872)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1. Acquisitions > Search vendors > Search
2. In the actions column, click "Receive shipments"
=> Without this patch the receive shipment from vendor [name] page opens in a new tab/window
=> With this patch applied it does not
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 20439c9e97)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
See comment 1 on the bug.
We are adding the capability to insert vendors and baskets.
Test plan:
Confirm that
yarn cypress run t/cypress/integration/Toolbar_spec.ts
pass, even if you do not have any vendors in DB.
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 250580016d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The test added in xt/api.t was not fully accurate, we skipped the
columns that have the same name as the api attribute (ie. the ones not
part of to_api_mapping)
Test plan:
prove xt/api.t should pass
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 410497a4f0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 022cbe9e67)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 56fb5dc52f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
yarn cypress run --spec t/cypress/integration/KohaTable/OPACCirculationHistory_spec.ts
must return green
Revert commits from bug 38102
Run again the Cypress tests
=> They fail
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 6a913fcc8a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Pass the confirmation token to force the checkout
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 ed2c56ee6e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
So it's easier to build and insert a new patron
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 959b7e8f05)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
So we won't generate a new patron per checkout
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 96bb7116b0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 a88c1b5445)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 19843bd9ba)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We are here testing that data inserted by insertData tasks can be
easily removed from the DB using deleteSampleObjects
Test plan:
Cypress test t/cypress/integration/t/insertData.ts must pass
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 34e4b19ff5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This will prevent the test to reload when the URL changes
See https://github.com/cypress-io/cypress/issues/2777
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 3ba5e7863c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 7733e6441f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To be able to test the OPAC interface we need to add those 2 new
commands
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 3ff1e96931)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We want the task to accept an Object or an Array of Objects
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 5e4032f0f1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 e3ee3a0541)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch heavily reuses what has been introduced by the previous
patches in the tree, and add a insertSampleHold task to be reusable
easily in other tests.
Test plan:
All Cypress tests must pass
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 af311b5395)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Prevent "Out of range value for column 'deliverytime'" in a later
follow-up bug reports.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 065f00ad67)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
From MM thread https://chat.koha-community.org/koha-community/pl/aptoodssm7gu8x491onfgxs1xr
Cypress tests need RESTBasicAuth - I’m stuck in a chicken-and-egg problem being eaten by its own tail...
I need advice. Some Cypress tests need RESTBasicAuth, but it's disabled by default.
My plan was to turn it on globally (ie. set before any tests, and reset to its original value after)
but we cannot right now:
Update in DB could work, but its cached
Call the svc script won't work, as we are not logged in yet (and this script require the session cookie)
so, I have a lot of solutions, but not sure which one to pick
* have a "flush cache" route (smells the rabbit hole)
* login to get the cookie, set the syspref via the svc script, logout (ugly, and will slower the cypress tests)
* require the pref on for cypress tests
* ?
I would opt now for the third option, turn it on in Jenkins when we run the cypress tests. And explode for devs when the pref is not set.
What do you think?
If we push this as it, Jenkins is going to fail.
We need to restructure how Jenkins is running the Cypress tests anyway:
we need a dedicated job to run them all. We will turn ON the syspref for
this job.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 ddf8014ead)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When we generate several objects we often get "Duplicate ID" from the
server. This mostly happens when the tests failed previously and the
objects have not been removed from the DB.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 7f8e4fd4b5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Data too long for column 'checkprevcheckout'
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 da17bc0f91)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 9ca9d1e764)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
So we can easily retrieve the value for the Authorization header.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 52c57538c7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This is the first step toward implementing true end-to-end testing with
Cypress.
Until now, we have been mocking responses using cy.intercept(), but this
approach can lead to confusion. In some cases, we have even had to mock
global JavaScript variables, which makes the code unnecessarily complex
and unconventional (e.g. win.categories_map).
All the bug reports listed under this tree have helped lay the
groundwork for this patch. With it, we are able to build mock objects
(via plugin mockData) and insert them directly into the database
(insertData). Once the tests are complete, we’ll restore the database to
its previous state by removing any data generated during the tests.
The tests in KohaTable/Holdings_spec.ts have been updated to leverage
this new setup.
Additionally, a caching mechanism has been added to prevent _id
attributes from being generated with the same values (a rare issue we
occasionally encountered).
While this is still not a perfect solution, it introduces a solid
foundation for future improvements.
Test plan:
All Cypress tests must pass
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 892df0f0c0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Cypress Warning: Cypress detected that you returned a promise in a
test, but also invoked one or more cy commands inside of that promise.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 18bde948ca)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 892b0f4d53)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We returned the response too late: if something was wrong we processed
the response already and thrown an error.
This may introduce side-effects but it feels like a correct change.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 14635a2db4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We will need to call REST API endpoints from Cypress tests, and more
specifically from Cypress's tasks.
It will be useful to reuse what has been done in http-client.js instead
of using the low-level fetch JS function.
1. Add missing get and getAll functions
2. Allow overwrite of return_response and mark_submitting
3. Add a "default" client that will bring flexibility (can call any
routes)
4. Add rspack config to generate
t/cypress/plugins/dist/api-client.cjs.js that will make it reusable
from Cypress's tasks
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 0985c64a54)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
00:40:25 koha-1 | < `checkprevcheckout` enum('yes', 'no', 'inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.',
00:40:25 koha-1 | ---
00:40:25 koha-1 | > `checkprevcheckout` enum('yes','no','inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.',
00:40:25 koha-1 | ERROR - DB structures are not identical
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ffd7a4ec10)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Running this update twice fails before this patch with:
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Data truncated for column 'checkprevcheckout' at row 3 at /kohadevbox/koha/C4/Installer.pm line 825
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch changes the capitalisation for the labels displayed in
the OPAC and staff interface for UNIMARC 214$r and $s from capital
case to sentence case, to be consistent with other labels:
- 214$r: Printing and/or publishing information transcribed
as found in the main source of information
- 214$s: Printing and/or publishing information transcribed
as found in the colophon
Test plan:
1. Have a look at the patch and confirm the changes look correct.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4883dd2754)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch changes the capitalization for the labels displayed
in the MARC tag editor for UNIMARC subfields 181$a, 181$c,
$182$a, 182$c, and 183$c, when the value builders are used. The
labels are changed from capital case to sentence case, for
consistency with other labels:
- Content Form -> Content form (181$a)
- Content Type -> Content type (181$c)
- Media Type Code -> Media type code (182$a)
- Media Type -> Media type (182$c)
- In the dropdown list (183$a):
. Audio Carriers -> Audio carriers
. Computer Carriers -> Computer carriers
. Microform Carriers -> Microform carriers
. Microscopic Carriers -> Microscopic carriers
. Stereographic Carriers -> Stereographic carriers
Test plan:
1. In your KTD shell navigate to
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder
2. Run "git grep Audio Carriers" you should get results
3. Run "git grep Computer Carriers" you should get results
4. Run "git grep Content Form" you should get results
5. Run "git grep Content Type" you should get results
6. Run "git grep Media Type" you should get results
7. Run "git grep Media Type Code" you should get results
8. Run "git grep Microform Carriers" you should get results
9. Run "git grep Microscopic Carriers" you should get results
10. Apply the patch
11. Repeat steps 2-9 you should not get results
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 784c5ac2a1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch changes the capitalisation for the labels displayed in
the MARC editor for UNIMARC 181$b, when the value builder
unimarc_field_181b.pl is used. The labels are changed from capital
case to sentence case, to be consistent with other labels:
- Specification of type (position 0)
- Specification of motion (position 1)
- Specification of dimensionality (position 2)
- Sensory specification 1, 2 and 3 (positions 3 to 5)
Test plan:
1. Check the capitalisation in the patch.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93824068bf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
- Fixed grammar: "Returns true if the patron is the anonymous patron"
- Fixed test cleanup: use txn_rollback instead of txn_begin
- Fixed test subroutine closure syntax
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 097ffd0af9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The first motivation of this patch is to remove the following warnings
from t/db_dependent/Auth.t:
Use of uninitialized value $anonymous_patron in string eq at /kohadevbox/koha/C4/Auth.pm line 1497
Actually a correct fix seems to add a new `is_anonymous` method to
Koha::Patron in order to remove the warnings from everywhere else.
Test plan:
Confirm that you cannot log in using the anonymous patron and that the 2
tests are passing
prove t/db_dependent/Auth.t t/db_dependent/Koha/Patron.t
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 e49602a87e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
XMLin complains because there are several nodes with the same name
attribute. Not sure what is correct or not, but we actually cannot use
the admin/DBMS user to login to the Koha interface.
We use KOHA_USER env var or default to 'koha'.
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 298884805a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The test was failing because the new FacetSortingLocale system preference
added was not included in the mock preference handler in t/db_dependent/Search.t.
This caused warnings about the unknown preference when the _sort_facets_zebra
function was called.
This commit adds the FacetSortingLocale preference to the mock, returning
'default' as the value, which matches the expected fallback behavior of
the new unicode collation sorting feature.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 21a217d5bf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a skippable unit test for the fi_FI locale to prove
that the patches work well for other locales that don't use
the default Unicode collation. It will run on koha-testing-docker,
but will be skipped on systems lacking it.
This patch also fleshes out the existing unit tests a bit more
to prove that the patches also improves the sorting of names
with diacritics generally. That is, the default Unicode sort
is better than the existing stringwise/bytewise sort even for
English and French locales.
Test plan:
0. prove -v t/Koha/SearchEngine/Elasticsearch/Search.t \
t/db_dependent/Search_FacetSorting.t
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8c66e830b3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 01543503ce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c0546d4c22)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The Koha::I18N module was missing POD documentation. This adds complete
documentation for all exported functions including usage examples and
descriptions.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5acbf16948)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This follow-up adds two major enhancements to the locale-based facet sorting
implementation:
1. **System Preference Integration**
- Adds FacetSortingLocale system preference for configurable locale selection
- Dynamically detects available system locales using Koha::I18N
- Provides user-friendly dropdown with locale descriptions
- Supports both Elasticsearch and Zebra search engines
2. **Zebra Search Engine Support**
- Extends locale-based sorting to Zebra (in addition to existing Elasticsearch)
- Implements _sort_facets_zebra() function in C4::Search
- Maintains consistent Unicode-aware sorting behavior across search engines
Key Features:
- Dynamic locale detection via Koha::I18N::available_locales()
- Proper module architecture with comprehensive unit tests
- Clean fallback chain: preference → system LC_COLLATE → default
- Admin UI integration in System Preferences → I18N/L10N
- Universal facet sorting for international library systems
Test plan:
1. Apply patch and restart services
2. Install/run database update
3. Navigate to Administration → System Preferences → I18N/L10N
4. Verify "Sort facet names using" dropdown shows available system locales
5. Test facet sorting with different locales and both search engines
6. Run: prove t/Koha/I18N.t t/Koha/SearchEngine/Elasticsearch/Search.t t/db_dependent/Search_FacetSorting.t
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 146aca25f5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change uses a configurable locale-based collator to sort
the ES facet names.
Test plan:
0. Apply the patch
1. vi /etc/locale.gen
2. Uncomment the locale you want to generate (e.g. fi_FI.UTF-8 UTF-8)
3. locale-gen
4. vi "/etc/default/koha-common"
5. Add the following to the bottom of the file:
export LC_ALL=fi_FI.UTF-8
6. koha-plack --restart koha-common
7. Setup some test records with authors with accented and unaccented names,
and different cases for the lead letter
e.g. Aa author, Åa author2, aa author, étienne
8. Switch to using Elasticsearch and reindex
koha-elasticsearch -b -v --rebuild kohadev
9. Do a test search
e.g. http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
10. Confirm the facet names are sorted in ascending order following
Finnish collation rules
e.g.
aa author
Aa author
étienne
Farley, David
Humble, Jez
Martin, Robert C.
Åa author
NOTE: Any collation and language can be used. Finnish is just
an example of a Latin-based script which has a different
alphabetical ordering than just A-Z
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b76df3a168)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Test Plan:
1. Apply patch
2. In Staff Interface inspect element and notice HTML has data attributes
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 353cd8f8d6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6f1bd24e87)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception:
DBD::mysql::st execute failed: Unknown column 'date_due desc' in 'order
clause' at /kohadevbox/koha/Koha/Objects.pm line 401
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 bb71c19635)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
> 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 ea703016d4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 26f17cbf68)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
So that we can reuse it from somewhere else.
The current need is to be able to reuse it from Cypress tests.
Test plan:
Try to hit several places where APIClient is used:
* Syspref edition
* Translation of item type description (be aware of bug 40161)
* Delete of cover images
* checkin, renew from the checkout list
* etc.
Note that this does not affect Vue components.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 44ed8d5400)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch restores the generation of subfield s from field 240 (Uniform Title)
in the MARC21 773 field generation, addressing cataloger feedback about the
critical importance of this field for:
- Bibles and books of the Bible
- Laws and statutes
- Translations
- Academic and specialized library materials
- Legal materials and treaties
The MARC21 standard defines subfield s as "Uniform title (NR)" and this data
is essential for proper bibliographic relationships.
This patch also fixes a warning when 245 indicator 2 contains non-numeric
values by adding proper validation.
Test plan:
1. Create a record with a 240 field containing uniform title data
2. Generate a child record from it
3. Verify the 773 field now contains subfield s with the uniform title
4. Run prove t/db_dependent/Koha/Biblio.t to ensure all tests pass
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 5f025aee75)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the Koha::Biblio->generate_marc_host_field method to
more closely match the updated logic in C4::Biblio::prep_marc_host.
We change a number of things including:
1) Constructinging the 773 subfield generation from a hash to an array
to preserve field order.
2) Updating main entry handling for 100/110/111 fields to clone the
field and then remove relevant subfields as apposed to fetching only
a limited set of subfields.
3) Add handling to generate subfield 7 content depending on LDR and
Main Entry information
4) Improve handling for title subfield construction from 245 to respect
non-filing characters and remove trailing punctuation
5) Remove trailing punctuation from subfield b when generated from 250
6) Remove generation of subfield s from the 240 field entirely
7) Remove trailing punctuation from subfield d when generated from 260
8) Add generation of subfield k from 800-830 fields
Rebased-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
We dropped the upstream aforementioned C4::Biblio method, but this patch
faithfully replicates it's functionality within
Koha::Biblio->generate_marc_host_field
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 610ad29bf8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When creating a child record (New > New child record from Normal view)
the information put in field 773 is very basic, sometimes not
complete (e.g. only one ISBN, only 245 $a in 773 $t, 773 $w
missing 003 of the host record etc.) and put in random order.
Test plan:
==========
1. Find any record to be a host record for an analytical record. You
can enrich the record with multiple 020, 490+830 fields, make sure that
there are 001 and 003 fields present.
2. From upper menu chose New > New child record.
3. See the generated field 773 - the subfields are incomplete and in
random order.
4. Apply the patch ; restart_all.
5. Repeat p. 2.-3. See that the generated 773 field contains now much
more information, including 773 $7 and also preset leader.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Rebased-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
The rebase removed the majority of this patch as the prepare_host_field
method was removed entirely upstream. The follow-up patch re-implements
the same but in the newer Koha::Biblio->generate_marc_host_field method
instead. We also dropped the Unit tests that were introduced in the
subsequent patch.
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 0b4b8e7078)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Enable the system preference: marcflavour: choose UNIMAR,
PrivacyPolicyConsent, ILLModule, TagsEnabled, OpacCloud.
1- Apply the patch
2- Go to the OPAC, log in to a patron account. Go to personal details,
check the html code of the date of birth field, and notice that there
is a aria-hidden="false".
3- Inspect the search bar, and notice in the library select, there is a
label with a for attribute which match the id.
4- Search a record, click on "save to list" and check the Category
select, inspect if the label has a for attribute and match the select
id.
5- Go to interlibrary Loan Request in the user menu, Check if the "Note"
field has a label for attribute which match the id.
6- Go to Consent, check if the checkbox has a label for "Yes" and "No".
7- Go to Suggestions and check that the checkbox has the same id as the
label in the Summary column.
8- Go to "Tag Cloud", inspect the HTML code of the "Tags to show from
other users" label, notice that there is a for attribute which match
the id of the input tag. and check if in the html code there is an
aria-label with the term of the tag.
9- Go to Subject Cloud, check the html code, and notice that there is a
label that surounds the input tag.
10- Go to Advanced Search, click on "More options", and check that all
the additional options have a label with a for attribute which match
the id of the select.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 59a8b35f8c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
Some web-browsers now only allow HTTPS, we should change links in
templates with SSL :
https://schema.koha-community.org, https://wiki.koha-community.org ...
Test plan :
Just look patch to check http > https
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 2f864811ef)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
**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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 04ab86f1f7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
This patch makes some spacing changes to the address display include in
order to prevent address parts (e.g. city, state, zip, etc) from missing
spaces in between.
To test, apply the patch and locate or edit a patron record to include
data in all main address fields.
- Check out to the patron and check the display of the address in the
sidebar. Confirm that the spacing is correct.
- Test with all variations of the AddressFormat system preference.
- Test with and without the use of road types (Administration ->
Authorized values -> ROADTYPE) and street numbers.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51cb82b02e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We must remove it so that it will be set as the default value defined
at the DBMS level
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5b797b2560)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We need to reset to the default value. We might have a problem (later)
if it's NOT NULL and no default is set, which is not handled by this
patch. But the situation does not seem to exist yet anyway.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b4a561c133)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51473dfd36)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
On bug 40178 and bug 40179 we defined checkprevcheckout attributes as
ENUM at the REST API level, so the specs prevent us from inserting
values that are no yes, no, inherit in DB.
However the DB schema didn't have that constraint.
This has been caught by some tests that were failing:
eg. t/db_dependent/selenium/patrons_search.t with "Not in enum list: yes, no, inherit."
Test plan:
Apply this patch, run `updatedatabase`, `dbic` and `restart_all`
`prove t/db_dependent/selenium/patrons_search.t` should now pass.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3c3cc6622c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 87cbdf8e37)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This reverts commit ff403dcfb3.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a827e5dbe3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Apply the "tests" patch first
prove xt/api.t
=> fail
Apply this patch
=> pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 958ff7427c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6b50274e5a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Apply the "tests" patch first
prove xt/api.t
=> fail
Apply this patch
=> pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8f6b15f4bb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 05fef548bc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Apply the "tests" patch first
prove xt/api.t
=> fail
Apply this patch
=> pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 25dfe5e5da)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1f3592491)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Apply the "tests" patch first
prove xt/api.t
=> fail
Apply this patch
=> pass
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f461b4d419)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a new subtest to xt/api.t
It ensures that maxLength will appear in the rest api spec file when
there is a size constraint at the DB level
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 40ad33852d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes a few minor changes to the search filter administration
template.
To test, apply the patch and rebuild the staff interface CSS.
- If the SavedSearchFilters system preference is not enabled, go to
Administration -> System preferences and enable it.
- Perform a catalog search.
- From the search results page, click "Save as search filter" at the
top of the results.
- Save your filter.
- Go to Administration -> Search filters.
- The table of filters should be wrapped in a "page-section" div with
the heading above it.
- In the "Actions" column the buttons should be aligned in a row with
space between each.
- Click "Edit filter"
- In the modal the form fields should be well laid out.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Felicie <felicie.thiery@biblibre.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 22cd54f1a4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
This patch suggests to replace cypress-mysql with mysql2
cypress-mysql provides a custom Cypress command (cy.query) that run within the browser context.
This approach mixes test-side and server-side and is limited in flexibility and error handling.
mysql2 runs inside Cypress plugins (Node process) via cy.task calls, which are executed server-side (outside the browser)
This is needed for the follow-up bug reports where we need to request
the DB from other plugins
Test plan:
Run `yarn install` to install the mysql2
All the Cypress tests modified by this patch must still pass
The new test t/cypress/integration/t/db.ts must also pass
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 79060544a4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f0b4bd4fa2)
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 85b65afd1d)
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 35c4a6eb07)
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 09bfbd5060)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We are ready to reuse Koha::Devel::Files in other places where
`git ls-files` is used.
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 48263039af)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
With this patch we adjust what's needed to make misc/devel/tidy.pl run
identically as before
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 e7e42c5e88)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch introduces a new Koha::Devel namespace. It clearly shows
that its purpose is for development and will not contain any business
logic.
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 1d4071298c)
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 b5a077425e)
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 25951ea83f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8a5a0ab39e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d538261fd4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1c7cb4d43b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
When paginate is false, pageLength is still used.
If more than 20 checkouts should be displayed, only 20 will.
Test plan:
Have more than 20 checkouts, use the batch extend due date tool and
notice that all checkouts are displayed when this patch is applied.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested on top of bug 39081.
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1e81401295)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
This patch makes some updates to the circulation statistics wizard in
order to make more information translatable.
The patch also adds some template plugins to the output of filter
options in order to be able to show descriptions instead of codes, and
corrects the markup for the 'Patron library' dropdown which wasn't
working.
To test apply the patch and go to Reports -> Statistics wizards ->
Circulation.
- Test setting some or all options in the "Filter column" and running
the report.
- Confirm that the "Patron library" dropdown works.
- At the top of the results there should be a list of the filter options
you selected and their values.
- All the filter labels should be correct, and the filter values should
should be in their full/description form rather than in code form
(e.g. library, item type, collection code, sorting field, etc.)
Sponsored-by: Athens County Public Libraries
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 da12f99507)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This fixes the patron circulation history page so that the type column
is hidden.
The type column on a patron's circulation history page was hidden by
Bug 38954 - Hide checkout type using colvis.
However, the commit for Bug 37273 - Add ID column to Agreements
table in the ERM, inadvertently reversed hiding the column.
Test plan:
1. Check out an item to a patron (for example, 39999000011418 to Mary
Burton).
2. Look at the patron's circulation history page (Patrons > Mary Burton
> Circulation history), and note there is a 'Type' column shown
with a value of 'standard_checkout'.
3. Note that you can't hide the column, from either selecting the
'Columns' or 'Configure' options for the table.
4. Apply the patch, restart everything (restart_all), and clear your
browser cache.
5. Repeat step 2. Note that there is now no 'Type' column shown and
it is not configurable, from either selecting the 'Columns' or
'Configure' options for the table.
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 3622664b91)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f8a1e44f5c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4b18fba007)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1. Apply patch
2. Go to item search
1. Notice that there is now a date accessioned column
2. Export the table into a CSV and notice that there is also a date accessioned column there
3. Sign off and have an amazing day :D
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5875adce83)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If an order is added from a suggestion in the first place, the
suggestion automatically changes status to ORDERED, and a notice is
sent out to the patron. If a suggestion is linked to the order after
the fact, it should move to ORDERED and notify the patron as well.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8436f799c1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 73de7c716e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8643b6c0fd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This enhancement allows library staff to link an order (in an unclosed basket, or a standing order) to an accepted suggestion.
To test:
1) In the staff interface, go to Suggestions and create at least two suggestions.
2) Mark at least two suggestions as Accepted.
3) Go to Acquisitions, create a vendor if you don't have one already.
4) Have or create two baskets - one should be standing, and one not standing (normal).
5) In the normal basket (not standing), add an order from any source but NOT from a suggestion.
6) When you save the order, there should be a new link in the Modify column of the Orders table - "Search for suggestion to link". Click this.
7) Choose one of your suggestions to link to the order.
8) You should be redirected back to the basket. Confirm your order has been correctly linked to the suggestion. Confirm there is no link to "Search for suggestion to link" for this order now that a suggestion has already been linked.
9) Add another order to this basket from any source but NOT from a suggestion.
10) Close the basket. Confirm there is no link to "Search for suggestion to link" because the basket is closed, but you could reopen the basket to link the order if you wanted to.
11) Go to Baskets in the left navigation so you can find your standing basket.
12) Add an order to your standing basket from any source but NOT from a suggestion.
13) Go to the vendor and Receive shipments. Receive your standing order and finish receiving.
14) Go to the standing basket. There should be a new unreceived standing order for the record you just received, with a link to "Search for suggestion to link". Click this.
15) Choose a suggestion to link to the order.
16) You should be redirected back to the basket. Confirm your orders for this record have been correctly linked to the suggestion.
Sponsored-by: Pymble Ladies' College
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7546669920)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This patch corrects the terminology used in the patron category
settings page, changing 'preference' to 'system preference'.
https://wiki.koha-community.org/wiki/Terminology#P
To test:
1. Apply patch
2. Go to Administration > Patron categories
3. Click 'New category'
4. Check that the hints under 'Checkout charge limit', 'Guarantees
checkout charge limit', and 'Guarantors with guarantees checkout
charge limit' use 'system preference' and not 'preference'
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 7d7697cd74)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects the link to the NoIssuesChargeGuarantorsWithGuarantees
system preference in the patron category creation/modification page.
To test:
1. Apply patch
2. Go to Administration > Patron categories
3. Click 'New category'
4. Check that the hint under 'Guarantors with guarantees checkout charge
limit' links to the correct system preference
5. Click on the link and make sure it links to the correct system preference
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ed5e0d9160)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
This patch makes the tests related to `can_place_holds` cover more use
cases, and highlight an underlying issue in the controller.
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f2c5ce20ee)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes a subtle (yet naive) error making the controller not
care about blocking conditions if they were more than one and the first
one was overridden.
To test:
1. Apply the regression tests
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail! Some tests expect a 409 (denied for a conflict) but
return a 201!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit afd00523a3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c5f64db21f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
This patch adds new behaviors to the `POST /holds` endpoint.
It uses the framework we created in the past for overriding policy
rules, and add new options:
* expired
* debt_limit
* bad_address
* card_lost
* restricted
* hold_limit
Some status codes are changed from 403 to 409. This should be revisited
accross the codebase, as I think we made a wrong choice. Happy to review
in this bug.
The feature makes use of the newly introduced
`$patron->can_place_holds()` method, which accepts to be passed through
the overrides.
To test:
1. Apply this patches
2. Run:
$ ktd --shell
k$ yarn api:bundle
k$ koha-plack --restart kohadev
k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
3. Test the endpoint with the various scenarios using your favourite
REST tool (Postman!)
4. Sign off :-D
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f245ad1605)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the way patron restrictions are displayed in the OPAC
and staff interface, with the intention of making the details of each
restriction more clear. In the OPAC, a new include file is created to be
reused on the holds page and the user summary page. opac-user.pl is
updated to allow a parameter to be passed to automatically open the
"Overdues" tab.
Test plan:
1. Before applying the patch, check how the display is currently. First
set syspref PatronRestrictionTypes to "Allow"
2. Add two different new restriction types, fill out both "Code" and
"Label"
3. Go to a patron's checkout page and add one of each of these
restrictions, but do not fill out the comment field when adding them!
4. Observe that in the checkouts page and details page of the patron, it
just says "Restricted since..." and does not show the restriction
types.
5. Add another restriction, this time fill out the comment field
6. Observe that now in checkout and detail pages, the labels from the
restriction types are listed and the comment shown.
7. Apply patch
8. Go to patron's details and checkout pages and check the restrictions
are now displayed correctly, that is the text "with the explanation"
is only shown for the restrictions that actually have a comment
8b. Log in to the OPAC with that patron and check they are displayed
correctly in their summary page and when the patron is trying to
place a hold.
9. Go to a different patron's account and add a restriction without a
comment
10. Check it is now displayed correctly
11. Add more restrictions and check they are displayed correctly. Also
add an OVERDUES restriction:
11a. Find a patron with an overdue item checked out (or create an
overdue checkout on a patron's account)
11b. Go to Tools -> Overdue notice/status triggers
11c. Set up a rule for that patron's category, e.g. "First" ->
Delay: 1, make sure to mark the check box for "Restrict" and
"Print"
11d. Run misc/cronjobs/overdue_notices.pl
11e. That patron should now also have an OVERDUES restriction
12. Turn PatronRestrictionTypes off again and check the patrons if
everything is still displayed correctly
13. Go to another different patron and add a restriction with no
comment, check if it is displayed correctly
14. Add another restriction with a comment and check it is displayed
correctly
15. Log in to the OPAC with the patron that had OVERDUES restriction and
check they are displayed correctly in their summary page and when
the patron is trying to place a hold.
16. Same thing for the other patron without the OVERDUES restriction.
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 9516fe517c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Enable ERM module
2) Create an agreement and a license with a vendor
3) The table filters will be out of sync
- Agreements - only the vendor filter is incorrect, it sits above the name column instead of the vendor column
- Licenses - all dropdown filter options will be left shifted by one
4) Apply patch
5) yarn js:build
6) Hard refresh the browser
7) All the filters should now be above the correct columns
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5e5d53fea2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 33032f99a8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a new method to the `Koha::Patron` class.
As described in the POD, this method makes checks on the patron's
current situation and returns a boolean telling if it should be allowed
to place holds. This doesn't check specific item/biblio holdability. It
only covers patron specific conditions that could prevent holds to be
placed.
Both in `opac-reserve.pl` and `reserve/request.pl` this checks are all
run, and all blocking situations are presented to the UI user. Feedback
in community (so far) expressed this is a desirable situation, so that
behavior can be retained with the use of the `no_short_circuit`
parameter.
If `no_short_circuit` is not passed, then the routine will return on the
first blocking condition it finds.
An `overrides` parameter is added, allowing to be passed a list of
strings that match the possible error messages.
This way, this method can be asked not to check for patron expiration,
for example, and things like that. This is of course designed with the
API overrides use case in mind.
To test:
1. Apply this patches
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Patron.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 61c59ac1b1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 54f41e0e61)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da3fb17670)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d66e792215)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch improves the contributor section display in the about page
by implementing a condensed view for version lists. When a contributor
has more than 2 versions for a role, only the first 2 are shown with
an ellipsis (...) that can be hovered to reveal the remaining versions.
The implementation:
- Sorts versions in reverse chronological order (most recent first)
- Shows first 2 versions directly
- Hides additional versions under a hoverable ellipsis using Bootstrap tooltips
- Adds CSS styling for the ellipsis with dotted underline and help cursor
This makes the contributor lists more readable while preserving access
to complete version information.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f271368712)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds missing role mappings to the about-team.inc template
to ensure all roles defined in teams.yaml are properly displayed.
Added role mappings include:
- manager_assistants (plural form)
- maintainer_assistants (plural form)
- maintainer_mentors (plural form)
- accessibility_advocates (plural form)
- security_manager
- meeting_facilitator
- social_media
- website
Also adds display logic for historical roles that may not be present
in current teams but appear in contributor lists from teams.yaml.
This ensures complete coverage of all team roles across historical
and current release teams.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1159aecb11)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the teams.yaml to include the voted in 25.11
release team.
Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 780eb529c1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Test plan:
Just read the patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5493e212f6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a bit more control to what CookieManager does by
adding a hardcoded allowlist of cookie names that are cleared at
logout. Allowing at the same time to add entries to that list by
using koha-conf <remove_cookie> lines or removing entries from the
hardcoded list by using <do_not_remove_cookie> lines.
The patch fixes the expiration of cookies that should be removed
by passing max-age 0.
Also it adds a theoretical path correction for always_show_holds but
since we do not clear that cookie, it is currently unused. This seems
to be the only Koha cookie where we use a longer path.
Test plan:
Run t/CookieManager.t
Go to OPAC, login, select a few OPAC search results and send them
to cart. This would create cookie bib_list. (Check dev tools.)
Logout from OPAC and check cookie in your browser dev tools. What
you see, depends on the browser. But the cookie should be either
gone or empty and expired (FF: Session).
Now add a <do_not_remove_cookie> line for bib_list in koha-conf.
Restart all. Repeat search, add to cart. Logout. Check again in dev
tools that bib_list is not empty, not expired.
Check out an item. And click on 'Always show checkouts...' on
the patron checkout form. This should create the cookie with
value DO. Logout from intranet. Check that cookie was not affected.
Now add a <remove_cookie> line for the following cookie:
issues-table-load-immediately-circulation. Restart all.
Login and logout from staff again. Check that cookie is empty
and expired, or just gone.
Bonus for devs: Create some custom cookie, and test keeping or
removing it similar as above.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 221126f3dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Spell system preference in full, instead of syspref.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a50409ebfa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes some minor changes to the "Holds awaiting pickup" page
so that the cancel buttons are clear and usable.
The patch also wraps the reference to the
TransferWhenCancelAllWaitingHolds system preference in a permission
check so that it can be linked to the preference when appropriate.
To test you should have some waiting holds in three categories:
1. Holds which have not been waiting longer than the number of days
specified in the ReservesMaxPickUpDelay system preference.
2. Holds which have been waiting longer. I belive the only way to test
this is to manually update the expiration date of an already waiting
hold so that it is in the past.
3. Waiting holds which a patron has requested be cancelled. (Requires
that the patron and hold are allowed according to the "Cancellation
allowed" setting under Administration -> Circulation and fine rules
-> Default waiting hold cancellation policy.
- Log in to the OPAC as a patron who has a waiting hold. On the "Your
summary" page, under the "Holds" tab, click the "Request to cancel"
button for at least one of the waiting holds.
- In the staff interface, go to Circulation -> Holds awaiting pickup.
- Under each tab, check the appearance of the "Cancel selected"
buttons (and the "Cancel and transfer all" button under "Holds
awaiting past..." tab).
- When testing as a user with system preference privileges, and the
TransferWhenCancelAllWaitingHolds preference set to "Don't transfer,"
the hint shown under the "Holds awaiting past..." tab should be linked
to system preferences. A user without system preference privileges
should not see a link.
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a18a15f2c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ce15eacc5e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes a number of changes to the "My virtual card" page and
associated menu item:
1. Rename it to "Library card." This fits better with the naming of
other user pages. This change includes updates to the page title,
breadcrumb menu, and page heading.
2. Move the menu item up to appear right after the "Summary" link.
3. Make some style changes to the display of the card, giving the card
more comfortable padding and adding some responsive behavior to the
card width.
To test, apply the patch and rebuild the OPAC CSS.
- If necessary, go to Administration -> System preferences and enable
the OPACVirtualCard preference.
- Log in to the OPAC.
- You should see a "Library card" menu item in the left-hand sidebar
menu, right below the "Summary" item.
- On the "Library card" page, the page title, breadcrumb item, and page
heading should read "Your library card."
- The "card" should look good, and should adjust well at various browser
widths.
- Above 769px wide, the card should not expand wider than 500px.
- Below 769px wide, the card should have a width of 100% and should
adjust as the viewport is narrowed.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit faabb96519)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch simplifies the logic for displaying the "make a purchase
suggestion" and "interlibrary loan request" links on the OPAC search results page.
Previously, the visibility of the purchase suggestion link was tied to a
complex set of conditions evaluated in C4/Auth.pm, involving user login status and
permissions. This was unintuitive, as the authorization to make a
suggestion should be handled by the suggestions page itself
(opac-suggestions.pl), I think.
This patch alters the template (opac-results.tt) to check the
'suggestion' and 'IllModule' system preferences directly. If suggestions are allowed
system-wide or the master switch for the 'IllModule' is on, the links will be shown
shown to all patrons, regardless of login status.
To test:
1. Go to Administration > System Preferences > OPAC.
2. Ensure 'Suggestion' is set to 'Enable'.
3. Log out of the OPAC if previously logged in.
4. Perform a search that won't yield any results and verify
the "Make a purchase suggestion" link appears on the results page.
5. Click the link and verify that you are prompted to log in.
6. Now set the 'AnonSuggestions' system preference to 'Allow'.
7. Make sure that the 'AnonmousPatron' borrowernumber is set to
something other than 0 (is this right, though)?
8. Click the link and verify that you are able to make an anonymous
suggestion.
9. Log in as a patron who is NOT allowed to make suggestions (check their
patron category permissions).
10. Perform a search and verify the link is still visible.
11. Here we then get a 404, this should be handled more gracefully, but
still in opac-suggestions.pl to not make opac-results dependent on
a patron object. Ideas very welcome!
11. Go back to System Preferences and set 'suggestion' to 'Don't allow'.
12. Refresh the OPAC search results page.
13. Verify the "Make a purchase suggestion" link is now hidden for both
anonymous and logged-in users.
14. This confirms the link's visibility is controlled solely by the
'suggestion' system preference.
15. Now the simpler aspect of 'IllModule', first set everything related
to suggestions back to defaults. Then set 'IllModule' to 'Enable'.
16. Make sure the link to place an "interlibrary loan request" is now
shown for unauthenticated patrons as well.
17. Leave some comments regarding the unsolved issue in 11) or other
problems that you might anticipate through this change.
I first thought this was trivial, but it is not :_D!
Signed off by: Esther Melander <esther@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 138ad36592)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Uncaught (in promise) TypeError: table.row is undefined
We need to use the DataTable object.
Test plan:
Have several languages installed
Edit an item type and click "Translate into other languages" to open
the modal
Translate into another language and note that:
Without this patch you get a JS error in the browser console and the
row is not added to the table
With this patch applied the row is added correctly with your translation
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 be1729ed68)
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: 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>
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>
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>
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>
Bug 38255 standardized our DataTables using kohaTable. kohaTable returns
the affected table as a jQuery object, but JavaScript on the article
requests page in the staff client expects a DataTable object. This patch
updates the template accordingly.
To test, apply the patch and enable the ArticleRequests system
preference if necessary.
- Log in to the OPAC and place several article requests.
- In the staff interface, go to Circulation -> Article requests.
- From the list of new article requests, test the menu options under
"Actions."
- Changing the status of a request should make it disappear from the
"New" tab and appear under the tab for the new status (or it should
be removed, in case of cancel or complete).
- Test the same processes under the "Pending" and "Processing" tabs.
- Each time you perform one of these tasks the counters on each tab
should be updated correctly.
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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6b5a891cfb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 90c2a53b99)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
"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>
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>
This is already done for all select dropdowns by default. If a
particular table provides an empty value it should be skipped or 2
empty options may show
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 082274d157)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 197fa3ed04)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
1) Enable ILLModule
2) Create a new ILL request:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Add a type, a cardnumber '42' and any library. Click 'Make request'.
4) You should now be on the 'Manage request' page. Click 'Edit item metadata'.
5) Change the type. Notice the form doesn't update the fields (as it does when you create a new ILL request).
6) Apply patch. Repeat step 5. Notice the form now updates the fields as it does when you create a new ILL request.
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 585f66e07c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7e9c897c03)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
This patch aims to fix reflow issues present in dropdown menus, by specifying text-wrap behaviour, and by reducing line-height values in some places to make dropdown items more distinguishable from each other.
To test:
a) log in to the opac
b) create a list with an excessively long name (I chose 'a list about New New New New New New New New New New New New New New New New York')
c) open the lists menu in the navbar, zoom in to 400%
-) notice how the title of the list rolls off the page
-) exit the dropdown menu
d) open the user menu in the navbar, zoom in to 400%
-) notice how the clear searches button has broken across two lines
-) zoom back to 100%
APPLY PATCH
e) repeat step c
-) notice how the title of the list now wraps at the designated width
-) zoom back to 100%
-) notice how the text is still wrapping, and the dropdown menu is no excessively wide
f) repeat step d
-) notice how the clear searches button now sits on its own line
-) zoom back to 100%
-) notice how the clear searches button returns to its usual location
g) check other dropdowns for clear bugs
-) places i could find were on opac-results and opac-details
SIGN OFF
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 3da91c5152)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The `MoveReserve` method is called once, in `AddIssue`. The latter has the related `Koha::Item` object already fetched from the DB, but it passed the `itemnumber` which is used by `MoveReserve` to fetch the item from the DB. This should not happen.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/Reserves* \
t/db_dependent/Koha/Hold* \
t/db_dependent/Hold* \
t/db_dependent/Circulation*
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. 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 1886165eae)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch tweaks the unauthenticated ILL request details page so it
doesn't display 'Unauthenticated ...' more than really needed.
To test:
1. Enable ILLModule
2. Enable ILLOpacUnauthenticatedRequest
3. Set ILLOpacbackends to 'Standard'
4. Make a search in the OPAC (not logged in)
5. At the bottom of the page, follow the 'Make an interlibrary loan
request' link.
6. Place a request, you are redirected to the request details page
=> FAIL: There are some strings that could go away:
* Unauthenticated first name
* Unauthenticated last name
* Unauthenticated email
7. Apply this patch
8. Reload the page
=> SUCCESS: It looks more polished, with no 'Unauthenticated' all over
the place. You still see 'Status: Unauthenticated' anyway
9. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 235ecfca70)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Remove unneeded <br> in RECALL_REQUESTER_DET
Add IFs to RECALL_REQUESTER_DET to avoid displaying empty lines if
there is no phone, email, and/or callnumber to display
Use checkout.date_due instead of item.onloan due to bug 39985
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d4450cdd5f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The following notices relating to recalls all need to be updated to use Template Toolkit syntax:
RETURN_RECALLED_ITEM
PICKUP_RECALLED_ITEM
RECALL_REQUESTER_DET
To test:
1) Observe the default notice contains <<>> tags
2) Apply the patch
3) reset_all
4) Check that the notice is now all in template toolkit [% %] tags with html selected
5) Enable recalls
6) Enable SMS
7) Check an item out to a patron
8) Make sure the patron has a primary email, sms, and recall notices enabled
9) Make sure a secondary patron has a primary email, sms, and recall notices enabled
10) Generate a recall on the checked out item for the second patron
11) Check the first patron's notices tab to confirm the return recalled item notice generated properly.
12) Check the item back in and generate the recall slip and confirm it generated correctly.
13) Check the second patron's notices tab to confirm the pickup recalled item notice generated properly.
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 98c0cf2648)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7668bf1ed5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 10dd01174a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the OPAC page structures to add <main> and <header>
tags to them.
Test plan :
1- On the opac of koha, check if the pages contain the basic semantic
elements (header, nav, main, and footer )
2- If they do, the test succeeds.
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 28bbadcd49)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the OPAC search history page to make table headings
consistent with each other.
To test, apply the patch and log in to the OPAC, ideally as a user who
has performed catalog searches on previous occasions.
- On the patron's search history page, each table should have the same
heading configuration: An unsorted first column with an information
icon at the top. The icon should display a tooltip on mouse-over.
- Check the Catalog current session, catalog previous sessions,
Authority current session, and authority previous sessions.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a35af961f8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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 5eeb04be97)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 702d1d2792)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b0ee8a675c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 87a522e463)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b44c08eb4f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 56eb4a6850)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f24e0d52e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4fc93fee00)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 57bd44ae0f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a sticky toolbar to the vendors form
Test plan:
N.B: This patchset will not work on a sandbox
1) Navigate to Acquisitions and click New vendor
2) The toolbar should appear at the top of the page underneath Add vendor
3) Scroll down, the toolbar should stick and be given the 'floating' class
4) Scroll back up and the toolbar should unstick and lose the 'floating' class
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 716980ce2f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9cdf597a83)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects the position of the table search box on the course
reserves details pages by warpping the presented table in a 'rows' class
div.
We also update the search box dom configuration in the datatable itself
to match that of other opac tables.
Test plan
1) Add some course reserves to a course
2) View that course on the OPAC
3) Note that the search box for the table is aligned to the top of the
main section of the page and over to the far right almost off screen.
4) Apply this patch
5) Confirm that the display of the search box is now nested just above
the table in the same location as the course reserves list page
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32242f438a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
At some point our SIP server stopped logging fatal errors to either logs or standard error. We should restore this vital functionality.
Test Plan:
1) Apply the first patch which will cause the patron information request
to fail
2) Stop the SIP server
3) Start it again with: perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
4) Trigger the failure with the following command:
./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l MPL --patron koha -m patron_information
5) Note "THIS IS A TEST" is not found in logs or stderr
6) Apply the second patch
7) Repeat steps 2-4
8) Note the error message is now visible from stderr at the command line
and also in the SIP log
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f214db14dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Remove "tag" and "staff" and add the missing "note"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1d10d8b8c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch removes unused "tag" and "staff" scrubber profiles.
Test plan:
0. Apply the patch
1. prove t/Koha/Plugins/HtmlScrubber.t
2. prove t/Scrubber.t
3. Grep around the code for C4::Scrubber and make sure "tag"
and "staff" aren't used as arguments for C4::Scrubber
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e846abeeb7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This ui_context is supposed to be opac, not staff.
For the purposes of these tests, this is not important, as the ui_context is
only needed for the template params and this is testing if the history check
stage is supposed to show or not.
Reckon this was a copy paste without consequences hence missed, but the code
is now semantically more correct.
prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dfd028871a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Unless there is a cardnumber or an authenticated user
Test plan:
1) Apply only the the tests file highlighting the issue:
prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
2) Notice it fails.
3) Apply this patch.
4) Run tests again. Notice it passes.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a0fcefa22)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ae2e9e23de)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch corrects the "Overdues with fines" page so that the page
title, breadcrumbs, and main heading match the name used in navigation
menus.
To test, apply the patch and go to Circulation -> Overdues with fines.
Confirm that the page title, breadcrumb menu, and page heading are
correct: "Overdues with fines at [library]"
Sponsored-by: Athens County Public Libraries
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 28cf1da6ea)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch applies the same logic to `koha-disable`.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2ffae92a7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Taking advantage of the `get_worker_queues` function introduced in bug
31124, this patch makes `koha-create` start all defined queues.
To test:
1. Run:
$ ktd --shell
k$ sudo -s
k$ koha-create --create-db test
=> FAIL: No mention of `long_tasks`
2. Apply 31124 and then this patch
3. Run:
k$ cp debian/scripts/koha-functions.sh \
/usr/share/koha/bin/koha-functions.sh
k$ debian/scripts/koha-create --create-db test1
=> SUCCESS: `long_tasks` worker is started
4. Sign off :-D
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 45089704fa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes two things:
* Adds a `get_worker_queues` function to koha-functions.sh
* Makes `koha-remove` loop through all the defined queues to stop all
the running workers before trying to remove the unix user for the
instance.
To test:
1. Run:
$ ktd --shell
k$ sudo -s
k$ koha-create --create-db test1
k$ service koha-common restart
k$ koha-remove test1
=> FAIL: There's an error about not being able to drop the instance user
2. Run:
k$ ps -ef | grep test1
=> FAIL: There's a running process for the 'long_tasks' queue worker.
3. Apply this patch
4. Run:
k$ cp debian/scripts/koha-functions.sh \
/usr/share/koha/bin/koha-functions.sh
5. Repeat 1 naming the instance `test2`
=> SUCCESS: The instance is removed correctly. No error about running
processes
=> SUCCESS: No process is running for `test2`
6. Sign off :-D
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 576c496442)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField
2) Log in to the opac
3) Go to "Personal details"
4) Select any value for "Date of birth"
5) Click save
6) This must not yield error 500. (But may be a successful save or a validation error).
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 04ebdd4ac1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c4f7b14906)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Hit cataloguing/addbiblio.pl?frameworkcode=FA
Without this patch you get warnings in the Koha log file:
Use of uninitialized value in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 572.
Use of uninitialized value in substitution (s///) at /kohadevbox/koha/Koha/UI/Form/Builder/Biblio.pm line 55.
with this patch applied: no warning
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0ba11f98f9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
prove t/db_dependent/Koha/Plugins/Recall_hooks.t
should return green
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit db655799ad)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Because we still use CGI::Session (bug 17427), we need to mock
CGI::Session to remove those 2 warnings
rollback ineffective with AutoCommit enabled
Test plan:
Run the tests after this patch, it should be green
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eaaabf66dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
0. APPLY PATCH
1. Make a few AVs for SUGGEST ( reason ) and SUGGEST_STATUS ( status ).
2. Make some new suggestions and give them new statues w/ a reason.
3. The reason should display, in parentheses, in the status column.
4. There should be a status class and a reason class for each.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 35baa3ec46)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
prove t/db_dependent/Koha/Auth/Client.t
should return green
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c695e6ce4c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
prove t/db_dependent/Koha/AdditionalContents.t
should return green
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 827ad21244)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes the code in `CheckReserves` survive the non-existence
of the referenced item type in the `items` table for the passed item.
To test:
1. Apply the regression tests
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Reserves.t
=> FAIL: Tests explode like this:
```
Can't call method "notforloan" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 870.
```
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 854783c836)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6c26ce01d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc some calls do not set 'index' var generating idx="idx_".
Set 0 has default value.
Test plan :
1) Enable system preference 'IntranetCatalogSearchPulldown'
2) Go to catalogue advanced search
3) Look HTML source and check you see:
<select class="advsearch" name="idx" id="idx_0">
<select class="advsearch" name="idx" id="idx_1">
<select class="advsearch" name="idx" id="idx_2">
4) In page page toolbar, click 'Search catalog'
5) Click on 'More options' icon
6) Look HTML source of this part and check you see:
<select class="advsearch" name="idx" id="idx_0">
Without patch you see:
<select class="advsearch" name="idx" id="idx_">
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0d39336f71)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This followup corrects a problem in image deletion which isn't really
the same issue (it's not CSRF related) but is another problem with
deletion. The JS for grabbing all the checkboxes by name wasn't working
when there is only one checkbox.
To test, apply the patch and delete all but one image from the patron
card creator image manager.
- Check the checkbox for the last image and click the "Delete selected"
button.
- The image should be deleted successfully.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 727b9d2dde)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The patron image deletion operation was not fully updated in Bug 34478.
The individual "Delete" buttons in the table of images need to be
updated to use form-submit.js
Unrelated: I removed an invalid "align" attribute from a <td>.
To test, apply the patch and go to Tools -> Patron card creator -> Image
manager.
- Upload multiple images
- Test the individual "Delete" buttons in the table of images.
- Test that both the "OK" and "Cancel" operations work correctly.
- Test the process of checking one or more checkboxes and clicking the
"Delete selected" button.
- Test that both the "OK" and "Cancel" operations work correctly.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f3bfcfa66)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan (ktd):
1) reset_all
2) Run first part of the 241200017.pl atomicupdate manually
koha-mysql kohadev
ALTER TABLE illrequests DROP FOREIGN KEY illrequests_bnfk;
3) Create an ILL request linked to a borrower that doesn't exist (simulate old data):
INSERT INTO illrequests (`backend`, `borrowernumber`,`branchcode` ) VALUES ('Standard', '99999', 'CPL');
4) Run the 2nd part of the atomicupdate manually:
ALTER TABLE illrequests ADD CONSTRAINT illrequests_bnfk FOREIGN KEY(`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE;
5) Notice you get the error:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (., CONSTRAINT FOREIGN KEY () REFERENCES () ON DELETE SET NULL ON UPDATE CASCADE)
6) Run the added query in the patch:
UPDATE illrequests SET borrowernumber = NULL WHERE borrowernumber NOT IN (SELECT borrowernumber FROM borrowers);
7) Repeat step 4)
8) Notice there's no errors
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 94d5c37db8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 688b5961c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 79567178ec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7715e3ae4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Navigate to a vendor record
2) Click the Receive shipments button
3) It will open in a new tab
4) Apply patch - yarn js:build
5) Hard refresh the browser
6) Repeat steps 1 - 2
7) The page will open in the same tab
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 052cc1b6ef)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This followup replaces the $raw filter with `scrub_html type => 'note' |
$raw`.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb19513f48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the notes field to a $raw filter to prevent html
escaping of the data within it.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3bcbb66ded)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Choose a staff patron and assign them the following permissions
- catalogue
- edi_manage
2) Enable the edifact syspref
3) Log in as the chosen staff patron and navigate to Acquisitions > EDI accounts from the left hand menu
4) The breadcrumb will contain Administration
5) Clicking this will result in a permissions error
6) Apply patch
7) Refresh the page and the breadcrumb will now read Acquisitions and will work
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ff366554fe)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch simply adds 'timestamp = current_timestamp()' to the SQL statements
run when editing a biblio. This ensures the tables timestamps are kept in sync
To test:
1 - Choose a biblio in the database and make an update to a 650 field
2 - Check the timestamps in MySQL:
SELECT biblio.timestamp, biblioitems.timestamp, biblio_metadata.timestamp FROM biblio JOIN biblioitems USING (biblionumber) JOIN biblio_metadata USING (biblionumber) WHERE biblionumber=9;
3 - Note the timestamps
4 - Edit the same 650 again
5 - Check the timestamps and note that the biblio_metadata is updated, but the others are not
6 - Apply patch, restart all
7 - Update the 650 again
8 - Check the timestamps, all are updated!
9 - Sign off
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0aa820de32)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Navigate to a vendor record and select the baskets view from the left menu
2) Click "add to basket" in the table
3) A modal will display requiring the user to define a budget and fund
4) Apply patch and restart_all
5) Repeat steps 1 and 2
6) You will get the modal to add to the basket
Signed-off-by: David Nind <david@davidnind.com>
Amended-by: Jonathan Druart
Remove import of GetBudget
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3293ae32bc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
prove /kohadevbox/koha/t/db_dependent/Koha/Item.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 53a9631335)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1. Install a plugin that does not have any background_tasks, e.g. https://github.com/HKS3/HKS3GeoSearch/releases/tag/v0.12
2. Navigate to http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl, observe a 500
3. Apply patch
4. Observe no 500
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 53630add0d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Prevent SQL injection.
Note: output_error in Output.pm needs further attention, but out
of scope here. (The error passed gets replaced by 404 here too.)
Test plan:
Pass something else than table.field in Line or Column URL param.
(Manipulate URL.)
You should be redirected to 404 error instead of 500.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eedb6cece6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes the exection of the report Acquisitions statistics if you fill only the To date
Test plan:
1 Execute the report Acquisitions statistics filling only To date filter in Placed on or Received on (/cgi-bin/koha/reports/acquisitions_stats.pl) Koha returns an Internal Server Error
2 Apply patch, restart services
3 Repeat step 1, now the report returns the results page as expected
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed superfluous COALESCEs.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 856a85d3af)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds handling for the 264 field in precedence to the 260 for
the generate_marc_host_field method and also adds subfields n and p to
the 245 handling.
Test plan
1) The routine is currently only called during bundle linking so...
1a) Creating a new bundle
* Add a new bib record
* Mark the bib record as a 'collection' type by setting leader
position 7 to 'c'
* Add a new item to this bib record
* You should see a new 'Manage bundle' button available in the
'Actions' column of the Holdings table.
* Clicking 'Manage bundle' should expand the table to include a new
row directly beneath this one.
* Use the new 'Add to bundle' button that appears in this row to
trigger a modal that allows entering the barcode of items you wish
to add to the bundle
* Ensure the 'Add MARC link' checkbox is checked to create 773 links
and trigger the code above
2) Inspect the MARC record for the host biblio and confirm the 773 has
been built.
3) Run unit tests to confirm they now pass
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 300247d2c6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds unit tests to confirm that the 773 record created by
Koha::Biblio now takes account of RDA updates and subfield ordering.
Test plan
1. Apply patch
2. Run `prove ./t/db_dependent/Koha/Biblio.t`.
3. Test fails.
4. Apply next patch in series
5. Run `prove ./t/db_dependent/Koha/Biblio.t`.
6. All tests pass.
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f234fe5a1c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes the JS on the saved SQL reports page so that the
subgroup column filter is correctly cleared when the tab changes. The
wrong table column is targeted.
To test, apply the patch and go to Reports -> Saved SQL reports.
- If necessary, at least two SQL reports, each with in a different group
and different subgroup. For example:
- sql: SELECT * FROM items LIMIT 10;
- group: Catalog
- subgroup: Statistics
...and...
- sql: SELECT * FROM borrowers LIMIT 10;
- group: Patrons
- subgroup: Statistics
- From the saved reports page, go to the tab for one of your reports and
filter by subgroup.
- Switch to a different tab containing SQL reports. The reports should
be shown as expected.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2de0265166)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Download a record you already have in Koha
2. Cataloging > Stage MARC records for import
3. Record matching rule: KohaBiblio (99$c)
4. Stage for import > View batch
5. In the table results there should be a link to 'View' in the 'Diff' column.
6. Notice the Record comparison is not side by side.
7. APPLY PATCH
8. Try steps 1 - 6 again, this time the record comparison should be side by side.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0cafda92b6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Even if severity does not exist. Additionally, only add severity to message if it exists.
Test plan:
1) Apply tests patches. Run tests (they should fail):
prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t
2) Apply this patch and run tests again (they should pass this time).
UI test:
1) Create a new data provider linked to Gale Cengage, service url:
https://api.siqcloud.online/counterapi/r51
2) Add report release 5, customer id: '123', requestor id: '123', report types: 'TR_J1'
3) Run a report for this data provider, from Feb 2025 to Apr 2025. Notice that before applying patches, the job report results in a red bar with no error message.
4) Apply patches, repeat 3. Notice it now results in a nice error message.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 023f935360)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9b0d6260bb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d618dc808f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
In order to remove false positives with the QA script we should replace some tabs with spaces.
There are more but I wanted to make sure no regression would be
introduced
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 492e6814a1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c81784956b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1) Apply this test patch. Run. Verify it fails
2) Apply other patch. Run. Verify it passes.
prove t/db_dependent/api/v1/patrons.t
Verify no other regressions are introduced, run:
prove t/db_dependent/Koha/Patron/Attribute.t
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 efe048ec66)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 732c7d11ce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
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>
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>
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>
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>
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>
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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit da75bdc692)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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>
2025-06-17 21:42:49 +02:00
3006 changed files with 50337 additions and 13342 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>
Alex Sassmannshausen <alex.sassmannshausen@openfifth.co.uk> <alex.sassmannshausen@ptfs-europe.com>
Andrew Auld <andrew.auld@openfifth.co.uk> <andrew.auld@ptfs-europe.com>
Andrew Isherwood <andrew.isherwood@openfifth.co.uk> <andrew.isherwood@ptfs-europe.com>
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>
"The checkin for the following issue failed, Please go to the about page and check all messages on the 'System information' to see if there are configuration / data issues ($@)"
"The checkin for the following issue failed, Please go to the about page and check all messages on the 'System information' to see if there are configuration / data issues, or see the specific message in parentheses ($@)"
# FIXME: CheckReserves should return the Koha::Hold
my$hold=Koha::Holds->find($resrec->{reserve_id});
# if a hold is found and is waiting at another branch, change the priority back to 1 and trigger the hold (this will trigger a transfer and update the hold status properly)