Koha-clms/t/db_dependent
Nick Clemens ee235cd8d4 Bug 36331: Don't check reserves that an item cannot fill when checking if it can be renewed
Before this patch we get all holds on a record and see if we can fill them with available items.
This means we check to fill holds that the item in questoion may not be able to fill, especially
in the case where no holds are allowed on the item type, this is wrong

To test:
1 - Find or create a biblio with two items of different item types
2 - Make sure one item type allows holds, and the other has:
    "Default holds policy by item type"
    Set to "No holds allowed"
3 - Set system preference "AllowRenewalIfOtherItemsAvailable" to "Don't allow"
4 - Check out the unholdable item to a patron
5 - Set a hold for a different patron on the next available item
6 - Confirm the checked out item can be renewed (don't renew, just view the checkouts page)
7 - Checkout the other item to a third patron
8 - Confirm the first item can still be renewed
9 - Set system preference "AllowRenewalIfOtherItemsAvailable" to "Allow"
10 - Confirm the item cannot be renewed now
11 - Apply patch, restart all
12 - Confirm the item can be renewed
13 - Set the item type to a type that allows holds
14 - Confirm the item can no longer be renewed
15 - Restore the item type
16 - Set system preference "AllowRenewalIfOtherItemsAvailable" to "Don't allow"
17 - Confirm the item can be renewed
18 - Check in the item from the third patron
19 - Confirm the item can still be renewed
20 - prove -v t/db_dependent/Circulation.t - test still pass

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9cc622be1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-04-17 13:58:15 +02:00
..
Acquisition Bug 35524: Fix terminology in basket group CSV export 2024-01-03 15:22:05 +01:00
Auth Bug 36056: Clarify subpermissions AND behavior 2024-03-11 11:23:45 +01:00
AuthoritiesMarc
…
Authority Bug 29522: Unit test 2024-03-18 10:29:21 +01:00
Biblio Bug 34549: Strip non-XML chars during TransformHtmlToMarc 2023-10-09 11:41:32 -03:00
Budgets
…
Circulation Bug 35293: Unit test 2024-01-15 14:39:11 +01:00
CourseReserves Bug 32351: Fix CourseItems.t 2022-11-30 15:58:18 -03:00
Creators
…
Exporter Bug 25503: Add failing test for _get_biblio_for_export 2023-05-10 15:26:19 -03:00
Holds Bug 8367: (QA follow-up) Fix QA script 2023-11-01 18:01:36 -03:00
Illrequest Bug 34842: Fix Illrequest/Config.t if DB upgraded twice 2023-10-03 08:51:12 -04:00
Items Bug 36010: Fix Items/AutomaticItemModificationByAge.t failing since Bug 32029 2024-03-11 11:16:47 +01:00
Koha Bug 24879: (follow-up) Fix test suite 2024-03-27 10:23:07 +01:00
LDAP
…
Labels Bug 10762: Fix tests continued 2023-10-28 10:02:31 -03:00
Letters Bug 31383: Adjust and add tests 2023-10-20 14:43:57 -03:00
Members Bug 33947: Remove GetAllIssues 2023-10-20 11:03:03 -03:00
OAI
…
Patron Bug 16223: Tidy 2023-10-11 12:13:12 -03:00
Record Bug 33045: Fix shebang of marcrecord2csv.t 2023-09-15 11:57:17 -03:00
Reports
…
Reserves Bug 17798: Confirm hold when printing slip from another patron's account 2023-11-06 08:42:41 -03:00
SIP Bug 35461: Add unit tests 2024-01-31 14:27:39 +01:00
Search
…
Serials Bug 23775: Claiming a serial issue doesn't create the next one 2023-07-03 10:35:09 -03:00
Template/Plugin Bug 31383: (bug 29691 follow-up) Remove get_opac_news_by_id 2023-10-23 10:45:34 -03:00
Utils Bug 34913: Adjust C4::Utils::DataTables::VirtualShelves 2024-01-29 10:15:53 +01:00
api/v1 Bug 36329: (follow-up) Fix error message comparisson in testes 2024-03-21 11:07:57 +01:00
cronjobs
…
data Bug 35418: Add TR_B2 tests 2023-11-29 17:36:11 -03:00
misc/translator
…
selenium Bug 32671: Prevent selenium/basic_workflow.t to fail if run on slow servers 2024-03-18 09:54:37 +01:00
www Bug 35922: Fix www/batch.t 2024-02-01 17:15:42 +01:00
00-strict.t
…
Accounts.t Bug 34912: Add 14 hours to 1970 date in Account(s).t 2023-10-04 09:15:39 -04:00
Acquisition.t Bug 14092: (QA follow-up) Avoid fiddling with the hash in the template 2023-10-20 16:31:15 -03:00
Amazon.t
…
ArticleRequests.t
…
AudioAlerts.t
…
Auth.t Bug 36092: Add test 2024-02-19 14:41:11 +01:00
AuthUtils.t
…
Auth_with_cas.t
…
Auth_with_ldap.t Bug 29930: Regression tests 2024-01-31 13:56:32 +01:00
Auth_with_shibboleth.t Bug 33778: (QA follow-up) Update for master 2023-06-29 11:11:10 -03:00
AuthorisedValues.t Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t 2024-01-03 17:05:14 +01:00
AuthoritiesMarc.t Bug 27943: (QA follow-up) Perltidy 2023-10-30 09:02:21 -03:00
AuthoritiesMarc_GetTagsLabels.t
…
Barcodes.t
…
Barcodes_ValueBuilder.t
…
Biblio.t Bug 34014: Unit test 2023-10-20 11:02:59 -03:00
Biblio_holdsqueue.t
…
Breeding.t Bug 28166: (QA follow-up) Fix and tidy tests and code 2023-10-23 11:33:50 -03:00
Breeding_Auth.t Bug 33404: Add unit tests 2023-07-05 12:17:22 -03:00
Budgets.t Bug 31631: (QA follow-up) Tidy code 2023-10-18 15:41:37 -03:00
Cache.t
…
Calendar.t Bug 33727: (QA follow-up) perl tidy whole file 2023-07-14 12:14:37 -03:00
Charset.t
…
Circulation.t Bug 36331: Don't check reserves that an item cannot fill when checking if it can be renewed 2024-04-17 13:58:15 +02:00
Circulation_holdsqueue.t Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Clubs.t
…
Context.t Bug 32687: Get server version in Context::get_versions 2023-02-24 17:52:28 -03:00
Contract.t
…
CourseReserves.t
…
DecreaseLoanHighHolds.t Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Filter_MARC_ViewPolicy.t Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t 2023-05-16 11:24:26 +02:00
Fines.t
…
FrameworkPlugin.t Bug 24879: (follow-up) Fix test suite 2024-03-27 10:23:07 +01:00
Heading.t Bug 33557: Add LinkerConsiderThesaurus system preference 2023-05-10 15:26:26 -03:00
Heading_MARC21.t Bug 33277: Do not search using thesaurus when linking non 6XX fields 2023-05-10 15:26:22 -03:00
Hold.t
…
Holds.t Bug 17617: Unit tests 2023-11-08 11:41:26 -03:00
HoldsQueue.t Bug 35997: (QA follow-up) Number of tests 2024-03-18 10:14:59 +01:00
Holidays.t Bug 27249: Replace DateTime->now by dt_from_string 2023-10-17 14:45:34 -03:00
ILSDI_Services.t Bug 34893: (QA follow-up) Tidy code for qa script 2024-01-29 10:15:53 +01:00
IllbatchStatuses.t Bug 30719: (QA follow-up) Updating remaining naming 2023-10-17 14:45:23 -03:00
Illbatches.t Bug 30719: Remove unused Koha::Illbatch->requests_count method 2023-10-17 14:45:24 -03:00
Illcomments.t
…
Illrequestattributes.t Bug 33970: Fix tests 2023-10-25 12:09:46 -03:00
Illrequests.t Bug 34905: Fix icon 2023-10-04 09:15:41 -04:00
ImportBatch.t Bug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t 2023-03-17 09:59:12 -03:00
ImportExportFramework.t
…
Installer.t
…
Items.t Bug 32496: Fix tests 2023-09-22 12:35:47 -03:00
Koha.t Bug 34812: Move subtests to db_dependent/Koha.t 2023-09-18 12:06:27 -03:00
Koha_Database.t
…
Koha_Elasticsearch.t
…
Koha_ExternalContent_OverDrive.t
…
Koha_MetadataRecord_Authority.t
…
Koha_Misc_Files.t
…
Languages.t Bug 32775: (QA follow-up) remove useless empty line 2023-05-15 18:23:54 -03:00
Letters.t Bug 36244: Unit test for tt syntax in parameters 2024-03-27 07:54:16 +01:00
LibraryGroups.t
…
Linker_Default.t
…
Linker_FirstMatch.t
…
Log.t Bug 32057: (QA follow-up) Add a simple test 2023-03-14 08:49:34 -03:00
MarcModificationTemplates.t Bug 24480: (follow-up) Adjust tests 2023-11-03 12:04:35 -03:00
Matcher.t Bug 33869: Move Matcher.t to t/db_dependent 2023-09-01 11:07:45 -03:00
Members.t Bug 26170: Add protected status for patrons 2023-11-01 17:23:06 -03:00
Message.t Bug 33192: (QA follow-up) Fix it-IT sample data and unit tests 2023-04-14 11:35:40 -03:00
MungeMarcPrice.t
…
Overdues.t
…
Passwordrecovery.t
…
PatronLists.t Bug 32730: Add Patron Lists tab to patron details and circulation pages 2023-11-01 17:23:09 -03:00
Patroncards.t
…
Patrons.t
…
Prices.t Bug 34967: Move to db_dependent 2023-10-03 09:24:50 -04:00
Record.t
…
RecordProcessor_EmbedSeeFromHeadings.t
…
Reports.t
…
Reserves.t Bug 35491: Add logging to RevertWaitingStatus 2024-01-03 16:08:46 +01:00
RotatingCollections.t
…
Search.t Bug 34847: Fix t/db_dependent/Search.t 2023-09-22 10:52:43 -03:00
Serials.t Bug 24879: (follow-up) Fix test suite 2024-03-27 10:23:07 +01:00
Serials_2.t
…
Service.t
…
ShelfBrowser.t
…
Sitemapper.t Bug 33871: Test where parameter in Sitemapper.t 2023-09-01 11:23:26 -03:00
SocialData.t Bug 33833: Move to db_dependent 2023-09-05 14:35:36 -03:00
StockRotationItems.t
…
StockRotationRotas.t
…
StockRotationStages.t
…
SuggestionEngine_ExplodedTerms.t
…
Suggestions.t Bug 35215: Add few assumptions in Suggestions.t around emailing 2023-11-06 08:42:48 -03:00
TablesSettings.t
…
Tags.t
…
Templates.t
…
TestBuilder.t Bug 28966: (QA follow-up) Fix failing unit tests 2023-07-26 15:41:12 -03:00
Upload.t
…
UsageStats.t
…
Virtualshelves.t Bug 30418: Unit tests 2023-05-15 18:23:58 -03:00
XISBN.t
…
XSLT.t Bug 33733: Move to db_dependent 2023-05-16 12:38:16 +02:00
check_kohastructure.t
…
check_sysprefs.t Bug 34979: Add unit test for comparing YAMl files with sysprefs.sql 2024-01-31 14:10:42 +01:00
db_structure.t
…
rollingloans.t Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
sysprefs.t
…
yaml.t
…
zebra_config.pl
…