Koha/koha-tmpl/intranet-tmpl/prog/js
Julian Maurice 2b58f4d89c
Bug 27249: Prevent infinite loop when searching for an open day
Calendars can be configured in a way that all days are closed.
The simplest way to do that is to configure a repeatable holiday for
every day of the week.
With such calendars, searching for an open day will literally take
forever.

This patch sets a hard limit on how many iterations are allowed before
giving up. This limit is set to the arbitrary value of 5000, which
should be large enough to be able to consider there is no open days if
we haven't found any with that many iterations, and small enough to
allow the loop to end quickly

Test plan:
1. Set system preference 'useDaysMode' to 'Use the calendar to push the
   due date to the next open day' ('Datedue'). Make sure the existing
   circulation rules do not conflict with that setting.
2. Browse to Tools » Calendar
3. Set every day of the week to "Holiday repeated every same day of the
   week"
4. Issue an item to a patron
5. Check the box and select 'Renew selected items'
6. The renewal should fail pretty quickly

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:31 -03:00
..
modals
pages Bug 34369: Require CSRF token for updating system preferences 2023-09-25 18:18:40 -03:00
vue Bug 34369: Pass csrf token from syspref API client (for Vue app) 2023-09-25 18:18:40 -03:00
acq.js
acquisitions-menu.js
additem.js Bug 34109: Check mandatory item fields when creating during recipt 2023-09-06 09:57:02 -03:00
addorderiso2709.js
admin-menu.js
ajax.js
audio_alerts.js
auth-finder-search.js
authorities-detail-modal.js
authtype.js
automatic_item_modification_by_age.js
basket.js Bug 34553: Update send list and send cart popup footers 2023-09-22 11:35:46 -03:00
biblio_framework.js
browser.js
calendar.js
cart.js
cashup_modal.js
catalog.js Bug 34562: Update more pop-up windows with consistent footer markup 2023-10-09 11:41:25 -03:00
cataloging.js Bug 33744: Fix cloning (sub)fields with framework plugins 2023-09-01 11:07:40 -03:00
cataloging_additem.js
categories.js
charts.js
checkout_renewals_modal.js
checkouts.js Bug 27249: Prevent infinite loop when searching for an open day 2023-10-17 14:45:31 -03:00
cookieconsent.js Bug 27378: Introduce cookie consent to OPAC and staff client 2023-09-12 09:45:07 -03:00
datatables.js Bug 34310: Input prompt in datatables column search boxes untranslatable 2023-09-08 11:54:56 -03:00
desk_selection.js
elasticsearch-mappings.js Bug 34625: Fix search engine configuration tables header problem 2023-09-05 11:52:26 -03:00
file-upload.js
funds_sorts.js
holds.js Bug 34402: Sorting holds on patron account includes articles 2023-09-12 09:45:03 -03:00
ill-availability-partner.js
ill-availability.js
ill-batch-modal.js Bug 30719: (QA follow-up) Updating remaining naming 2023-10-17 14:45:23 -03:00
ill-batch-table.js Bug 30719: (QA follow-up) Updating remaining naming 2023-10-17 14:45:23 -03:00
ill-batch.js Bug 30719: (QA follow-up) Rename illbatches endpoint to ill/batches 2023-10-17 14:45:20 -03:00
ill-list-table.js Bug 30719: (QA follow-up) Updating remaining naming 2023-10-17 14:45:23 -03:00
item_search_fields.js Bug 34401: Fix inconsistencies in Item search fields page titles, breadcrumbs, and headers 2023-10-17 14:45:29 -03:00
job_progress.js
letter.js
localcovers.js
mana.js
marc_modification_templates.js
marc_subfields_structure.js Bug 34114: Replace the use of jQueryUI sortable 2023-09-22 13:00:00 -03:00
members-menu.js
members.js
merge-record.js
messaging-preference-form.js
onboarding.js
patron-webcam.js
recalls.js
register_selection.js
resolve_claim_modal.js
restrictiontypes.js Bug 16223: Add ability to define liftable restrictions 2023-10-11 12:13:06 -03:00
rotating-collections.js
select2.js
serials-toolbar.js
showpredictionpattern.js
sms_providers.js
staff-global.js Bug 21246: (QA follow-up) Add new syspref to control how many previous patrons are displayed 2023-10-11 10:31:40 -03:00
subscription-add.js
table_filters.js
tools-menu.js
upload-images.js
viewlog.js
xmlControlfield.js
z3950_search.js