Main Koha release repository https://koha-community.org
Find a file
Julian Maurice 0f304c55e2 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>
(cherry picked from commit 2b58f4d89c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-10-24 20:27:34 -10:00
acqui Bug 34645: (follow-up) save sort1 and sort2 in order 2023-10-05 09:42:49 -10:00
admin Bug 34369: Require CSRF token for updating system preferences 2023-09-26 21:29:27 -10:00
api Bug 34054: Allow to embed biblio on GET /items 2023-09-22 09:42:52 -10:00
authorities Bug 33406: (QA follow-up) Adjust tests and tidy 2023-09-17 22:49:50 -10:00
basket Bug 34731: Don't call SendQueuedMessages if message_id is bad 2023-09-14 07:54:48 -10:00
bin
C4 Bug 34549: Strip non-XML chars during TransformHtmlToMarc 2023-10-09 09:28:05 -10:00
catalogue Bug 33047: Return 404 instead of 500 when biblio does not exist 2023-07-18 10:28:24 +01:00
cataloguing Bug 34689: Ignore itemnumber when creating item hash 2023-10-05 09:44:41 -10:00
circ Bug 34094: Use DefaultPatronSearchMethod consistently 2023-07-17 16:04:31 +01:00
clubs
course_reserves
debian Bug 30843: Add mfa_range configuration option for TOTP 2023-10-05 08:36:20 -10:00
docs Bug 34800: Adding openhub links for Koha contributors 2023-10-24 20:24:07 -10:00
erm
errors
etc Bug 30843: Add mfa_range configuration option for TOTP 2023-10-05 08:36:20 -10:00
ill
installer Bug 34558: Update custom.sql for it-IT webinstaller 2023-10-09 09:18:24 -10:00
Koha Bug 27249: Prevent infinite loop when searching for an open day 2023-10-24 20:27:34 -10:00
koha-tmpl Bug 27249: Prevent infinite loop when searching for an open day 2023-10-24 20:27:34 -10:00
labels
lib/CGI/Session/Serialize
members Bug 26558: Make guarantor information persist despite an error 2023-10-12 14:11:43 -10:00
misc Update release notes for 23.05.04 release 2023-09-28 08:42:50 -10:00
offline_circ Bug 33961: Remove built-in offline circ tool 2023-07-17 08:18:59 +01:00
opac Bug 33074: Take ReservesControlBranch into account in opac-reserve.pl 2023-10-09 09:56:08 -10:00
patron_lists
patroncards
plugins Bug 30367: (follow-up) Same adjustment for gitlab 2023-05-05 10:18:57 -03:00
pos Bug 34731: Don't call SendQueuedMessages if message_id is bad 2023-09-14 07:54:48 -10:00
recalls Bug 34013: Recalls awaiting pickup doesn't show count on each tab 2023-07-17 14:51:00 +01:00
reports Bug 34859: Remove unnecessary params from reports-home.pl 2023-10-05 14:52:14 -10:00
reserve Bug 34634: Show expirationdate of expired holds on reserve/request.pl 2023-09-07 20:13:21 -10:00
reviews
rotating_collections
serials Bug 34146: Counterpart for serials-edit 2023-07-17 15:57:40 +01:00
services
skel
suggestion Bug 34601: Fix edit/delete links on suggestion.tt 2023-08-30 09:51:33 -10:00
svc Bug 27249: Prevent infinite loop when searching for an open day 2023-10-24 20:27:34 -10:00
t Bug 27249: Prevent infinite loop when searching for an open day 2023-10-24 20:27:34 -10:00
tags
tools Bug 26978: Add item type option to batch extend due date tool 2023-10-12 13:58:06 -10:00
virtualshelves Bug 34731: Don't call SendQueuedMessages if message_id is bad 2023-09-14 07:54:48 -10:00
xt Bug 34911: Test files from HEAD instead of 'master' 2023-10-05 09:38:43 -10:00
.editorconfig
.eslintrc.json
.gitignore Bug 33710: Ignore how-to related files 2023-05-12 17:50:01 -03:00
.htaccess
.mailmap Update .mailmap 2023-07-17 08:12:22 +01:00
.perlcriticrc
.perltidyrc Bug 30002: Adjust perltidy 2023-07-12 07:55:00 +01:00
.proverc.dist
.stylelintrc.json
about.pl Bug 33934: Add more detail to 'No encryption_key in koha-conf.xml' 2023-06-09 12:05:00 -03:00
app.psgi
build-resources.PL
changelanguage.pl
cpanfile Bug 33964: (QA follow-up) Remove library from cpanfile 2023-08-07 20:05:46 -10:00
cypress.json Bug 33408: Extend defaultCommandTimeout for cypress 2023-04-13 11:48:00 -03:00
fix-perl-path.PL
gulpfile.js
help.pl
INSTALL
Koha.pm Increment version for 23.05.04 release 2023-09-28 08:07:03 -10:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl
Makefile.PL Bug 26700: Remove occurrences in Makefile.PL 2023-07-17 11:01:46 +01:00
MANIFEST.SKIP
package.json
README
README.md
README.robots
rewrite-config.PL
tsconfig.json
webpack.config.js
yarn.lock

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo