Introduce a new AllowHoldCheckoutOverride system preference (default 1
to preserve existing behaviour) that lets libraries prevent staff from
overriding held-item blockers at the circulation desk.
When AllowHoldCheckoutOverride is set to 0, CanBookBeIssued still
returns the hold-related keys (RESERVED, RESERVE_WAITING, TRANSFERRED
and PROCESSING) in the confirmation hash, but circ/circulation.pl
promotes them to the impossible hash before rendering the template.
This means no override button appears, and checkout of the held item
is refused outright with a clear message explaining which patron the
hold is for.
Matching entries have been added to the IMPOSSIBLE block of the
circulation template so the blocked-checkout message is meaningful.
This sits alongside the existing Allow*Override family
(AllowTooManyOverride, AllowNotForLoanOverride, AllowHoldPolicyOverride
and AllowRenewalOnHoldOverride) and uses the same staff-only semantics.
Test plan:
1. Set AllowHoldCheckoutOverride=1 (default). Place a waiting hold
for patron A on an item. At /cgi-bin/koha/circ/circulation.pl
attempt to check the item out to patron B: a confirmation dialog
appears with "Check out anyway" override buttons.
2. Set AllowHoldCheckoutOverride=0. Repeat: checkout is refused with
a message stating the item has been waiting for patron A. No
override button is offered.
3. Repeat with pending holds (reserves.found IS NULL), items in
transit and items being processed: each is refused when the
preference is 0 and offered as an overridable confirmation when
the preference is 1.
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This extends the fix from Bug 37966 to circ/circulation.pl. The original
bug fix addressed circ/renew.pl, where renewing a book on hold with an
empty due date would result in the due date being set to "now" (today).
The same issue occurs in circ/circulation.pl when:
1. Attempting to check out an item that is already checked out to the
same patron (which triggers a renewal)
2. The item has a hold on it, triggering the hold override dialog
3. The librarian overrides the hold without specifying a due date
In this scenario, the renewal would incorrectly set the due date to
today instead of calculating it based on circulation rules.
CHANGES:
1. circ/circulation.pl (lines 550-558)
- Added logic to handle the `renewonholdduedate` parameter when
both RENEW_ISSUE and RESERVED conditions are present
- Follows the same pattern as circ/renew.pl
- If `renewonholdduedate` is empty, passes empty string to AddIssue/
AddRenewal, allowing proper date calculation
2. koha-tmpl/.../circulation.tt (lines 351-356)
- Added "Renewal due date" input field in the hold override dialog
- Only appears when both RESERVED and RENEW_ISSUE are true
- Optional field - if left empty, due date is calculated per
circulation rules
TEST PLAN:
1. Enable the RenewalOnHoldOverride system preference (set to "Allow")
2. Set up a patron, item, and circulation rules:
- Create a patron (or use existing)
- Create an item (or use existing)
- Ensure circulation rules have a renewal period (e.g., 14 days)
3. Create a hold scenario:
- Check out the item to the patron
- Place a title-level hold on the same item (you may need a second
patron or use the same patron depending on your holds rules)
4. Test renewal via circulation.pl:
- Go to Circulation (Home > Circulation)
- Scan the patron's barcode
- Scan the item's barcode (the one that's already checked out with
a hold)
- Observe the hold override dialog appears
5. Test WITHOUT this patch:
- Leave the "Renewal due date" field empty
- Click "Yes, renew"
- BUG: The due date is set to today (same as check-in date)
6. Test WITH this patch:
- Leave the "Renewal due date" field empty
- Click "Yes, renew"
- SUCCESS: The due date is calculated based on circulation rules
(e.g., 14 days from now if that's your renewal period)
7. Test optional due date override:
- Repeat the renewal process
- This time, enter a specific date in "Renewal due date" field
- Click "Yes, renew"
- SUCCESS: The due date is set to your specified date
8. Test SpecifyDueDate preference interaction:
- If SpecifyDueDate is enabled and a due date is set via that
interface, it should take precedence over renewonholdduedate
TECHNICAL NOTES:
The fix ensures that when `renewonholdduedate` is empty (empty string),
it's passed through to AddIssue which then calls AddRenewal. The
improved empty string handling in C4::Circulation (from the follow-up
commit) ensures empty strings are not parsed as "now" but instead
trigger proper date calculation based on circulation rules.
This matches the behavior fixed in circ/renew.pl and provides a
consistent user experience across both circulation interfaces.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The warnings:
[WARN] Argument "" isn't numeric in numeric gt (>) at
/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
line 1072.
[WARN] Argument "" isn't numeric in numeric gt (>) at
/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
line 1188.
appears in the plack-intranet-error.log.
Test plan:
==========
1. Use a fresh KTD, observe plack-intranet-error.log.
2. Find any patron and go to "Check out" tab.
==> Warnings should appear in plack-intranet-error.log
3. Apply the patch; restart_all.
4. Repeat 2. No warnings in plack-intranet-error.log
Sponsored-by: Ignatianum University in Cracow
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>
- Replace plain <a> renewal links in patron_messages.inc with the
reusable throttled-button component introduced in Bug 40896
- Covers all four renewal links: warndeparture and expired states,
in both circulation and patron detail contexts
- Include throttledButton.js in circulation.tt and moremember.tt
- Add persist mode and done icon state to throttled-button component
so the button stays disabled on bfcache restore with a check icon
instead of a misleading spinner
Test plan:
1) Create or update a patron category with an enrollment fee and an
enrollment period in months (e.g. 24 months)
2) Create a patron of that type and write off any initial enrollment
fee
3) Set the patron's dateexpiry to the past so the account is expired
4) Go to /cgi-bin/koha/circ/circulation.pl and scan the patron
5) Observe the "Renew" link in the expiration warning now shows as a
small button with a rotate icon
6) Click "Renew" and confirm the button becomes disabled with a
spinner, preventing a second click
7) Verify the patron is renewed correctly with only one enrollment
fee charged and the correct expiry date
8) Press the browser back button to return via bfcache
9) Verify the button remains disabled and shows a check icon instead
of the spinner, indicating the action was already completed
10) Repeat from the patron detail page (moremember.pl) to verify the
same throttle and done-state behavior there
11) Test the warndeparture case by setting dateexpiry to a near-future
date and confirming the same behavior
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>
This patch implements fine override functionality for the checkouts
table on the circulation page (circ/circulation.pl), completing the
debt override feature for all renewal workflows.
Changes:
- Added override_debt checkbox to checkouts-table.inc when
AllowFineOverrideRenewing preference is enabled
- Updated /svc/renew to accept and process override_debt parameter,
matching the pattern used for override_limit
- Enhanced circulation-api-client.js to pass override_debt parameter
through the renewal API call
- Implemented specific CSS classes for renewal error types
(renewals-allowed-too_many, renewals-allowed-too_much_owing, etc.)
to enable selective checkbox control
- Modified override checkbox handlers to selectively enable only
relevant renewal checkboxes based on the specific blocking error:
* override_limit enables checkboxes for 'too_many' and 'on_reserve'
* override_debt enables checkboxes for 'too_much_owing' and
'auto_too_much_owing'
- Added AllowFineOverrideRenewing JavaScript variable to circulation.tt
This provides clear visual feedback to staff about which renewals will
be affected by each override option, improving usability and reducing
confusion when multiple items have different blocking reasons.
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
OPACFineNoRenewals no longer applies just to OPAC.
To avoid confusion rename it as FineNoRenewals and
also rename all occurences in code.
To test, confirm everything works as described in
previous test plans.
Also prove t/db_dependent/Circulation.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
It is possible to renew items for patron who has fines over accepted
limit on renew page or from checkout list. This patch adds confirmation
alerts to these renew actions when patron has fines over
"noissuescharge" syspref.
Test plan:
1. Have patron with checkouts and fines over allowed limit
2. Renew checkouts either from renew page or checkout list
=> renew is successful
3. Apply patch
4. Repeat steps 1 and 2
=> On renew page an alert is displayed and user has to confirm
renew
=> When renew is done from checkout list confirmation pop-up
is displayed
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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: Lucas Gass <lucas@bywatersolutions.com>
System preference ClaimReturnedWarningThreshold manages the display of a patron message in case of too many claims.
But this preference may be empty. It is created empty in installer/data/mysql/mandatory/sysprefs.sql.
This generates a warning :
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 128.
Test plan :
1) Set systempreference 'ClaimReturnedWarningThreshold' empty
2) Go to a patron details page
3) Check there is no warning in logs
4) Go to a patron check-out page
5) Check there is no warning in logs
6) Set systempreference 'ClaimReturnedWarningThreshold' with an integer (ie 5)
Repeat from 2)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This adds the UI elements required to group selected holds from the
patron pages as well as 2 new concepts:
Visual group ID:
The visual group ID is designed to be easy to understand from a UI/UX
perspective and not show the user an indefinitely incremented value.
When holds are cancelled, filled or moved to a different group, if the
old group is left empty or with a single hold, the hold group is deleted.
Signed-off-by: Anneli <anneli.osterman@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
Test plan:
git grep on "Context.Scalar"
Go to book with holdable items in staff catalogue detail. Check if
Place hold is seen in the horizontal toolbar above the title.
Place an article request with a patron. Check the article requests
tab on patron detail.
Same for the article requests tab on moremember (Patron details).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
- The combobox dropdown in modals scrolled with the modal body instead of overlaying, due to Bootstrap's overflow: hidden on
modals clipping extending content.
- Added context parameter to combobox config; setting context: 'modal' uses Popper's fixed positioning strategy for proper
overlay.
- For reference: https://popper.js.org/docs/v2/constructors/#strategy
To test:
1. Make an item bookable
1.1. Go to a record (e.g. http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=285)
1.2. Go to the Items tab on the left side of the screen
1.3. Under Bookable, choose Yes and click 'Update'
2. Place a booking
2.1. Click 'Place booking' at the top of the detailed record screen
2.2. Fill out the form
2.3. Click 'Submit'
3. Try to cancel the booking
3.1. Go to the 'Bookings' tab on the left side of the screen
3.2. Click 'Cancel' next to the booking
--> A modal appears with a text field for the cancellation reason
3.3. Click 'No, do not cancel'
4. Add one authorised value in BOOKING_CANCELLATION
4.1. Go to Administration > Authorized values
4.2. Search for BOOKING_CANCELLATION
4.3. Click 'Add'
4.4. Fill out the form
4.5. Click 'Save'
5. Redo step 3
--> The option appears as a dropdown below the text field -- OK
6. Add one or two more authorised values
7. Redo step 3
--> The options appear as a dropdown below the text field -- OK
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
It can be useful, for instance, if a library has the same title from
different publishers (so 1 title but several biblio records) but the
user only wants a copy of the book, regardless of the publisher.
Test plan:
0. Run updatedatabase.pl and misc/devel/update_dbix_class_files.pl
1. Go to intranet search, display some results, click on some checkboxes
and click on 'Place hold' button at the top of the results.
2. Search for a patron
3. Check the 'Treat as hold group' checkbox
4. Click on 'Place hold'
5. In the next screen you should see all the holds you placed with the
additional text '(part of a hold group)' in Details column.
6. Click on the "hold group" link. A modal window should appear with
the content of the hold group (a list of holds)
7. Check in an item of one of the reserved biblios and confirm the hold
8. The hold status is changed to Waiting, and all other holds are deleted.
The other holds will also be removed from the holds queue.
9. Confirm tests pass
- t/db_dependent/Koha/Holds.t
- t/db_dependent/Reserves/HoldGroup.t
Note: the "hold group" link is displayed in the following pages:
- reserve/request.pl
- circ/circulation.pl
- members/moremember.pl
- circ/pendingreserves.pl
- circ/view_holdsqueue.pl
Note: A hold group is counted as only one hold
Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
We have reports of progressive slowdown on the circulation page during
long sessions. A likely cause might be a block in `circ/circulation.tt`
that attaches a new keypress handler to `#barcode` on every submit. Some
submits do not navigate (e.g. waiting holds modal, quick slip on empty
barcode), and pages restored from the bfcache keep previously attached
handlers. Over time, listeners accumulate and the UI becomes sluggish.
This patch installs a single, namespaced keypress handler at page load,
guarded by an in-flight flag toggled on submit. The handler shows the
“Barcode submitted” modal and prevents typing only while a submit is
in flight. The flag is reset on bfcache restores via `pageshow`. This
preserves existing UX while keeping the listener count constant.
Test plan:
1. Before applying the patch, open circ/circulation.pl for any patron.
2. In the browser console, run:
(function () {
const el = $('#barcode')[0];
const dataFn = jQuery._data || jQuery.data;
const ev = (dataFn && dataFn(el, 'events')) || {};
return (ev.keypress || []).length;
})()
Note the keypress handler count.
3. Enter a barcode and submit. Use the browser Back button to return.
4. Re-run the IIFE from step 2. The count has increased.
5. Repeat steps 3–4 a few times and observe the count continues to grow.
6. Apply the patch.
7. Reload the page and re-run step 2; count should be ~1.
8. Enter a barcode and submit. Use Back to return. Re-run step 2.
The count remains ~1 across submits and back/forward navigations.
9. Confirm UX is preserved:
- While submit is in flight, pressing keys in `#barcode` shows the
“Barcode submitted” modal and prevents typing.
- Waiting holds flow still shows its modal and behaves as before.
- Submitting with an empty barcode still triggers the quick slip
behavior per system preference and does not add handlers.
10. Optional: Simulate scanner behavior by pressing Enter rapidly after
submit. Verify the handler count remains stable.
Signed-off-by: krimsonkharne <philip.orr@posteo.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
Now that the form-submit code has been added to the global js-includes
files for both the staff interface and OPAC, it no longer needs to be
included directly in each template file.
To test:
1. Apply patch
2. Clear browser cache
3. git grep "form-submit.js"
--> Confirm that all imports of the form-submit.js asset have been
removed, and the only results are the comment in global.js and
staff-global.js
4. Test OPAC > Account page > Renew a checkout to confirm the link
submission still works as expected in the OPAC
i. Check out an item to a patron
ii. Set a known password for that patron
iii. Log into that patron's account in the OPAC
iv. Click the "Renew" link next to that checkout in the checkouts
table on the patron's OPAC account page
--> Confirm the item is renewed as expected
5. Test some of the following buttons to confirm the link submission
still works as expected in the staff interface:
- Bib record > Holds > Revert transit/waiting status on a hold
- Acquisitions > Basket > Create EDIFACT order
- Acquisitions > Invoices > detail for a specific invoice > Delete
- Acquisitions > Invoices > perform actions on invoices using the
action drop-down
- Acquisitions > Invoices > open/close invoices by selecting the
checkboxes
- Administration > Additional fields > Delete an additional field
- Administration > Background jobs > Cancel a background job
- Edit an item > scroll up > Actions drop-down > Print label
- Cataloging > Label creator > Manage label batches > Edit a batch
> Delete batch
- Cataloging > Label creator > Manage label batches > Delete a batch
- Patron account > holds > delete a hold
- Tools > Patron lists > delete a list from the Actions drop-down
- Reports > Saved reports > Preview SQL on a report > Delete
- Reports > Saved reports > Delete a report from the actions drop-down
- Rotating collections > Delete a collection from the actions drop-down
- Stock rotations > move item to the next stage
- Stock rotations > remove item from a rota
- Stock rotations > Add/remove "In demand"
- More > Lists > edit a specific list > Edit drop-down > Delete
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
If syspref CheckPrevCheckout is enabled, Koha checks if patron
has previously checked out item within timeperiod set in
syspref CheckPrevCheckoutDelay. This however doesn't take into
account cases where item is currently checked out for patron and
they are trying to check out another item from same record (can
be done if syspref AllowMultipleIssuesOnABiblio is enabled). We
should always check if item is currently checked out for the
patron if CheckPrevCheckout is enabled.
To test:
1. Enable syspref CheckPrevCheckout and set CheckPrevCheckoutDelay
as e.g. 10. Also enable syspref AllowMultipleIssuesOnABiblio.
2. Find a record that has been checked out for patron over 10 days ago.
3. Attempt to check out item from same record for same patron.
=> Note that you have to confirm if you want to check out item for
the patron.
4. Find record that is currently checked out for a patron.
5. Attempt to check out item from same record for same patron.
=> Note that item is checked out for patron without confirm message.
6. Apply this patch and restart services if needed.
7. Repeat steps 2. and 3.
=> Confirm that you still have to confirm if you want to check out
item for the patron.
8. Repeat steps 4. and 5.
=> New confirm message "Patron has this title currently checked out:..."
should be displayed and you have to confirm if you want to check out
item for the patron.
Also prove t/db_dependent/Patron/Borrower_PrevCheckout.t
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Felicie <felicie.thiery@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
When OnSiteCheckoutsForce is set it is possible to on-site checkout an
item to a restricted patron. But the due data that is labelled with
"Automatic due date:" is not being set. As a result, when such a
checkout is performed and you do not set the date manually, the due
date will be set as for normal checkout (even if it is marked as
on-site checkout).
Test plan:
==========
1. Enable OnSiteCheckouts and OnSiteCheckoutsForce; manually restrict
a patron.
2. Go to checkout page for this patron. You will notice:
"On-site checkouts only. Automatic due date:" with an empty input
field for the date. Perform the checkout (pick any existing
barcode).
Note the due date in patron's checkouts. In standard ktd it will be
+5 days from today, as for a regular checkuot (cf. Circulation and
fine rules) and the checkout will be marked as on-site checkout.
3. Apply the patch ; restart_all.
4. Repeat p. 2 (with another barcode or after checking-in). The date
in the date input field should be set to today's date and after
performing the checkout the sue date should also be set to
the current date.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. Navigate to circ/circulation.pl?borrowernumber=X
2. See the console error `document.referrer.split(...)[1] is undefined`
3. Go to circ home circ/circulation-home.pl and search for a patron
4. See the console error when you select a patron or are taken directly to them
5. APPLY PATCH
5. JS error should be gone in both instances
squash
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds some friendly styling to the new form and adds
autocomplete functionality.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds a search box when visiting the check out page before a patron has been
selected
To test:
1 - From Koha home browse to Circulation -> Check out
2 - Note an empty page, though you have the header search forms
3 - Apply patch
4 - Repeate above - now you have a patron search box
5 - Search by name or cardnumber
6 - Confirm search works as expected
7 - Sign off!
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds CSRF protection to patron list deletions.
Also changed: The "Delete selected lists" button is now in a floating
toolbar.
To test, apply the patch and go to Tools -> Patron lists.
- If necessary, create a few patron lists.
- Test the two methods for list deletion available on the page:
- Check one or more checkboxes and then click the "Delete selected
lists" at the top of the page.
- Click the "Actions" button for an individual list and choose "Delete
list."
- Open the checkout page for a patron.
- Under the "Patron lists" tab, add the patron to a list.
- Click the "Actions" button for an that list and choose "Delete
list."
- When you are taken to the patron lists page the list should have
been deleted.
- Perform the same test on the patron details page.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This fixes an internal server error when renewing an expired
child patron without a guarantor, when the ChildNeedsGuarantor
is set to "must have".
Test plan:
1. Create or edit a child patron:
- Don't add a guarantor.
- Set the "Expiry date" to a date in the past.
2. Set the ChildNeedsGuarantor system preference to "must have".
3. Refresh or view the patron's check out or details page, and
select the "Renew" link under the attention heading -
this generates an internal server error message.
4. Apply patch.
5. Repeat step 3, you will now get a standard error message
"This patron could not be renewed: they need a guarantor."
6. Add a guarantor for the patron.
7. Repeat step 3, and click "Renew" - the patron is now renewed.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is generated using:
% perl misc/devel/tidy.pl
*within* ktd, to get the same version of perltidy than what will be used
by our CI (currently v20230309).
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
For templates which use the intranet-bottom include file, the markup in
that template lacks the main container's closing </div>, expecting it to
be closed in intranet-bottom.inc.
This patch moves that closing </div> into each template. This is
intended to make it clearer to anyone trying to maintain the correct
structure of the page and hopefully to make it possible to automatically
tidy template files.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
In addition to checking the referrer for the URL domain and path
we should also check the query string of the referrer to make sure
it was from a circulation fast add.
It should include frameworkcode=FA&circborrowernumber
To test:
1. From anywhere on the additem.pl page where you are adding or editing an item
2. Click on Checkout in the menu bar and enter a patron's barcode
3. When circulation.pl loads it triggers a blank issue slip to be printed
4. Apply patch and repeat steps 1-3, no slip is triggered to print
5. Go to Circulation Checkout for a patron and enter a non existing barcode like 1337
6. Click '+ Add record using fast cataloging'
7. Fill in required fields and click 'Add item'
8. Confirm the item is auto checked out
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
rowGroup plugin is now part of the datatables.min.js bundle. We no
longer need to include its css and js files, and they no longer exist
anyway!
[2024/11/27 08:52:37] [WARN] File not found : lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css at /kohadevbox/koha/Koha/Template/Plugin/Asset.pm line 107
[2024/11/27 08:52:37] [WARN] File not found : lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js at /kohadevbox/koha/Koha/Template/Plugin/Asset.pm line 84.
Test plan:
Confirm that the checkouts are grouped "today" and "previous" on the
checkout page.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds functionality that will remember whether an action has been confirmed for a particular patron for the session. While carrying out an action on that patron, if the same checkout confirmation message keeps appearing the user can now select to remember their confirmation while they are still working on that patron. When the user moves onto a new patron the confirmations then reset and accumulate again for the new patron.
Test plan:
We're going to use rental fees as the example to prompt the checkout confirmation dialog. If you wish to use something else to test then feel free, it should work the same. Do not use patron debts though, as we already track a confirmation for this elsewhere and the test plan will appear to fail when in fact it is behaving as expected
1) In system preferences set RentalFeesCheckoutConfirmation to 'ask'
2) Choose a patron and checkout an item to that patron that incurrs a rental charge (in KTD this will be any item that does not have an itype of 'BK', 'REF' or 'VM'
3) A dialog should display asking you to confirm the checkout.
4) There should be a checkbox on the dialog to "Remember for the session for this patron"
5) Click Yes, checkout out without checking this checkbox
6) Select another item and checkout - the dialog should display again
7) This time, check the checkbox and click Yes, check out
8) Checkout another item (depending on your fines limit settings, you may need to pay the rental charges before the system will allow you to checkout again so go ahead and do this)
9) This time the dialog should not appear as the system has remembered our confirmation for this patron for the session
10) Choose a new patron
11) Repeat steps 2 - 9
12) It should work as outlined above
13) Sign off!
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'AlwaysLoadCheckoutsTable' and set it to 'Do'.
3. Go to 'circ/circulation.pl?borrowernumber=X' for a patron with checkouts. ( Check out tab ).
4. The table should load right away.
5. Go to 'members/moremember.pl?borrowernumber=X' for a patron with checkouts. ( Details tab ).
6. The table should load right way.
7. Set a value in the 'LoadCheckoutsTableDelay' system preference.
8. Back on 'circ/circulation.pl?borrowernumber=X', make sure the delay is honored. You should see a message like "Checkouts table will automatically load in X seconds".
9. The delay should NOT be honored on'members/moremember.pl?borrowernumber=X', that table should load right away/
10. Turn off 'AlwaysLoadCheckoutsTable' and make sure the table does not load, or loads according to the cookie set when checking the 'Always show checkouts automatically' checkbox.
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
We need to set is_hidden for the column we want to force hide (depending
on system config)
This patch fixes t/db_dependent/selenium/regressions.t
Obviously there will be incorrect behaviours if we restore from a state
and that the settings have been modified in the meanwhile.
Not sure we can deal with that properly.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1) Apply dependencies and this patch
2) Maybe update class files w/ update_dbix_class_files.pl
3) Build a new bundle w/ yarn api:bundle
4) Restart plack
5) Add a couple bookings to a patron
6) Go to any of the above modules
7) Cancel the booking and note
7.1) That the value you input is correctly received by the backend for cancellation_reason
7.2) Do it for the other 2 modules
8) Configure some authorised values under category BOOKING_CANCELLATION
9) Repeat 7 and note that you can select them in the combobox
10) Sign off or leave your feedback
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
If at least one AV exists for bsort1 we will show a dropdown list in
the column filter for bsort1. Same for bsort2.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
The audio alert feature is not correctly designed and is problematic.
It looks at the class name in the DOM, not when the element with this class name
will be displayed to the end user
So it's not possible to make it work for modals for instance, or if an element
is built in JS then displayed
This patch remove the modal code from the code, if there are no waiting
holds. It is the behaviour that existed prior to the Bootstrap update.
However it is kind of random behaviour, the song that is played when the
librarian open the circ page is different if the user has waiting holds or not.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch updates the OPAC and staff interface to use Bootstrap 5.
Bootstrap CSS assets are now pulled from node_modules and compiled into
staff-global.css and opac.css at build time. This update lays the
foundations of some other chnages, especially the addition of a dark
mode in the future.
Hundreds of templates have been updated, mostly with updates to the grid
markup. Most of the responsive behavior is still the same with the
exception of improved flexibility of headers and footers in both the
OPAC and staff interface.
The other most common change is to add a new "namespace" to data
attributes used by Bootstrap, e.g. "data-bs-target" or "data-bs-toggle".
Modal markup has also been updated everywhere. Other common changes:
dropdown button markup, alert markup (we now use Bootstrap's "alert
alert-warning" and "alert alert-info" instead of our old "dialog alert"
and "dialog info").
Bootstrap 5 now uses CSS variables which we can override in our own
'_variables.scss' (in both the OPAC and staff) to accomplish a lot of
the style overrides which we previously put in staff-global.scss.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds a check for the referrer to the circulation page.
If the referrer is from the same origin's additem.pl then get the
barcode from the url parameters, fill the form and submit.
Test plan:
1. Apply patch
2. Enter a barcode not in the system, eg 99999
3. Click '+ Add record using fast cataloging'
4. Fill required bib fields 000, 008 and 245a and click 'Save'
5. Add required item field y - Koha item type and click 'Add item'
6. Notice the barcode is filled and the form is submitted automatically
7. Confirm the item is checked out and the dutedate specified works
8. Add an html customization somewhere else in koha with a link like
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=38&barcode=99999&duedatespec=&stickyduedate=
9. Click on the link to simulate a csrf attack
10. Confirm the checkout page is loaded for that patron but no checkout is made
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1. Find an item to checkout and a patron to check out to.
2. Set a due manually: "Specify due date (MM/DD/YYYY):"
3. Before checking out click the "Remember for session:" checkbox.
4. Check the item out.
5. The specific due date is not retained.
6. APPLY PATCH
7. Try 1 -4 again, now the date should be sticking.
8. Turn on the OnSiteCheckouts system pref and make sure it still works
9. Turn on the OnSiteCheckoutAutoCheck system pref and make sure the on-site checkbox is still checked after doing an on-site checkout.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
When checking out an item to a statistical patron, where that item
is already checked out to another patron, the patron details in the
message do not link to that patron.
This patch fixes this so that the patron details are now linked.
This could be useful so that staff can more easily access the patron's
details, and can, for example, check for any incorrect charges.
Test plan:
1. Set up a statistical patron for local use:[1]
1.1 Add a statistical patron category (Administration > Patrons and
circulation > Patron categories), for example:
- Category code: STAT
- Description: Statistical
- Enrollment period: 99
- Category type: Statistical
1.2 Add a new statistical paton (Patrons > +New patron > Statistical),
for example:
- Surname: Reference Statistical Patron
- Card number: refstat
2. Check out an item to a standard patron.
3. Check out the same item to the statistical patron created in step 1.2.
4. Note that when the item is checked out to the statistical patron,
the patron name and number in the message are not linked:
"Item checked in from: PATRON_NAME (BORROWERNUMBER)".
5. Apply the patch.
6. Repeat steps 2 and 3.
7. Note that the patron details in the message are now linked.
[1] Monday Minutes: Statistical Patron and Local Use:
https://bywatersolutions.com/education/monday-minutes-statistical-patron-and-local-use
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>