]> git.koha-community.org Git - koha.git/commit
Bug 16787: 'Too many holds' message appears inappropriately and is missing data
authorNick Clemens <nick@bywatersolutions.com>
Tue, 21 Jun 2016 13:52:47 +0000 (09:52 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 22 Apr 2021 12:37:14 +0000 (14:37 +0200)
commit0f23622041dba9d882ff27b0a879aae7f642a6c8
tree49534c70e96da31c78f9be7488b9a6743cb82d7f
parentc3625010bbf4e1eff428d9d1d7c5db2cd24045aa
Bug 16787: 'Too many holds' message appears inappropriately and is missing data

This patch alters C4/Reserves.pm to pass back 'noReservesAllowed' when
allowedreserves=0. This allows passing to the user an appropriate
message about the availability of items for holds

This patch also fixes a FIXME about using effective_itemtype to fetch item rules

To test:
1 - Set one itemtype to allow no holds
2 - Set 'Holds per record' to 0 for another itemtype/patron combination
3 - Create or find 2 records, each with items only of the itemtypes above
3 - Attempt to place a hold for a patron on each record above
4 - The message will be 'Too many holds'
5 - Apply patch and repeat
6 - Message should be "Cannot place hold: no item are available to be placed on hold"
7 - Try placing a multihold with either record above and a holdable record,
  message should end "Cannot place hold on some items'
8 - prove -v t/db_dependent/Holds.t

Rebase - Fix test expectation

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Reserves.pm
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
reserve/request.pl
t/db_dependent/Holds.t