Go to file
Kyle M Hall a15a88fa82 Bug 12632: Hold limits ignored for record level holds with item level itemtypes
The crux of the issue is that if you are using item level itemtypes, but
are allowing biblio levels holds, those holds do not have items.

So, in CanItemBeReserved, when Koha counts the number of holds to
compare against the given rule, it will always give 0 ( except of course
for found holds, and the occasional item-level hold ).

So the query is saying "link each of these reserves to the reserved
item, and count the number of reserves this patron where the itemtype is
DVD". However, since these are all record level reserves, there are no
items to link to, and so when it looks for all reserves this and item
whose itemtype is DVD, it finds zero reserves!

This patch solves the problem by looking first at the item level
itemtype, and if it does not exist, then it looks at the record
level itemtype. For installations using record level itemtypes, the
behavior remains unchanged.

Test plan:
1) Enable item level itemtypes
2) Create two records with one item each of a given itemtype
3) Create a single issuing rule and limit the holds allowed for that
   itemtype to 1
4) Place a record level hold on your first record
5) Attempt to place a record level hold for the same patron on your
   second record. You should not be able to but you can!
6) Apply this patch
7) Repeat step 5, note you can no longer place the hold!

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
2015-09-21 16:30:51 +12:00
C4 Bug 12632: Hold limits ignored for record level holds with item level itemtypes 2015-09-21 16:30:51 +12:00
Koha Catching up dbix updates 2015-09-21 14:40:08 +12:00
OpenILS Bug 9239 QA follow-up: remove stray debug code 2013-03-16 21:32:34 -04:00
acqui Bug 14440: get_template_and_user can not have an empty template_name (updatesupplier.pl) 2015-07-05 02:16:44 +00:00
admin Bug 14521: SQL injection in local use system preferences 2015-07-21 16:06:37 +12:00
authorities Bug 14387: Merge reference selection has no effect when merging authorities. 2015-08-11 09:23:01 +12:00
basket Bug 14330: Remove unused email_sender from sendbasket/sendshelf 2015-06-16 10:18:41 +12:00
catalogue Bug 14263: Fix export of item search results when translated 2015-08-04 13:20:11 +12:00
cataloguing Bug 14047: Order z39.50 biblioservers in cataloguing 2015-06-08 14:16:51 +12:00
circ Bug 14487: Noise best detected under Debian 8 2015-08-11 09:25:29 +12:00
course_reserves Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
debian Bug 14203: Message for non-existent lang removal 2015-06-08 10:25:20 +12:00
docs Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
errors Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
etc Bug 14453: (followup) Fix shipped XSLT files 2015-07-16 10:22:34 +00:00
install_misc Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
installer DBRev 3.18.10.01 2015-09-21 14:22:49 +12:00
koha-tmpl Bug 14690 - [3.18.x] Patron import tool page missing extra search patron options 2015-08-19 15:29:54 +12:00
labels Bug 12911: batch_id for new labels batches can be asssigned to several batches 2015-05-18 09:55:48 +12:00
members Bug 14566: Fix permissions in patronimage.pl 2015-08-24 11:06:24 +12:00
misc 3.18.10 Release Notes 2015-08-24 13:43:44 +12:00
offline_circ Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
opac Bug 11693: Default emailing preferences not loaded for self registering patron 2015-08-11 09:20:44 +12:00
patron_lists Bug 10565: (follow-up) add new user permission for patron list management 2013-10-14 22:43:03 +00:00
patroncards Bug 14366: Units doesn't get saved usefully for patroncards 2015-07-16 10:24:17 +00:00
plugins Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
reports Bug 14382: [QA Follow-up] Bad regex alarm 2015-07-16 10:20:15 +00:00
reserve Bug 8474: Holds done by librarians cause silent errors in koha-error_log, placerequest.pl -> $checkitem 2015-05-12 10:47:39 +12:00
reviews Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
rotating_collections Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
selenium
…
serials Bug 13423: Remove unused serials-recieve 2015-05-18 11:13:09 +12:00
services Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
skel Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
sms Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
suggestion Bug 10752: Alert the librarian if the suggestion has not been added 2015-05-17 16:23:14 +12:00
svc Bug 14299: Today's checkouts not always sorting correctly 2015-06-16 09:12:16 +12:00
t Bug 10961: (followup) Make query fields explicit and add regression tests 2015-08-11 13:53:06 +12:00
tags Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
test Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
tmp/modified_authorities
…
tools Bug 13663 - QA Followup, removing tab chars 2015-08-17 09:47:27 +12:00
virtualshelves Bug 14330: Remove unused email_sender from sendbasket/sendshelf 2015-06-16 10:18:41 +12:00
xt Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
.editorconfig Bug 12545: Add EditorConfig.org file to the source tree 2014-08-22 11:07:45 -03:00
.htaccess
…
.mailmap Bug 13314: Follow-up for m.de.rooy in .mailmap 2014-11-26 11:16:18 -03:00
INSTALL
…
INSTALL.debian
…
INSTALL.fedora7 Bug 11757: remove dependency on POE 2014-02-15 01:38:15 +00:00
INSTALL.opensuse Bug 11757: remove dependency on POE 2014-02-15 01:38:15 +00:00
INSTALL.ubuntu Bug 7764: (follow-up) editorial tweaks 2013-10-04 16:27:55 +00:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
README
…
README.robots
…
about.pl Bug 14006: about.pl checks the wrong zebra index mode 2015-05-17 17:36:25 +12:00
changelanguage.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
edithelp.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
fix-perl-path.PL Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
help.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
install-CPAN.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
koha_perl_deps.pl bug 10548: fix count of missing required dependencies by koha_perl_deps.pl 2013-07-11 14:03:32 +00:00
kohaversion.pl DBRev 3.18.10.01 2015-09-21 14:22:49 +12:00
mainpage.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
rewrite-config.PL Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00

README

Koha is a free software integrated library system.

Koha is distributed under the GNU GPL version 3 or later.
Please read the file LICENSE for more details.

To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.

Report bugs at http://bugs.koha-community.org/

Visit the Koha Project website at http://www.koha-community.org/