Koha-clms/t/db_dependent
Aleisha Amohia c3cd54c312 Bug 34722: Prevent other items from displaying to fill item-level recalls
This patch prevents other items attached to a record from being displayed as 'recalled' by item-level recalls.

To test:
1. Ensure UseRecalls system preference is enabled and circulation rules relevant to recalls are configured. Set 'on shelf recalls allowed' circulation rule 'if any unavailable' for ease of testing.
2. Search for a record that has multiple items, or create one with multiple items. Check out two of the items (Item A and Item B) to a patron, Patron A.
3. Log into the OPAC as another patron, Patron B. Search for the record and place a recall. Choose to recall a specific item and select Item A.
4. Go back to the staff interface and view the catalogue detail page for the record. Notice that every item has a 'recalled by...' message, even though Item A was specifically recalled.
5. Log into the OPAC as another patron, Patron C. Search for the record and place a recall. Choose to recall a specific item, notice every item has a 'recalled by...' message. Select Item B and Confirm.
6. In your terminal, the 'Other items are not returned for item-level recalls' test should fail when running
prove t/db_dependent/Koha/Item.t

7. Apply the patch and restart services

8. Confirm tests at t/db_dependent/Koha/Item.t now pass
9. Refresh the staff interface, confirm only Items A and B have the recalled message and the recall patron information for each item is accurate
10. Log into the OPAC as another patron, Patron D. Search for the record and place a recall. Choose to recall a specific item. Confirm only Items A and B have the recalled message.

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Perltidied new code.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be375ed01c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 60d5a6f0fb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-17 17:35:39 +00:00
..
Acquisition Bug 31649: Add unit tests 2022-10-11 10:00:08 -03:00
Auth
…
AuthoritiesMarc
…
Authority Bug 19693: Add test sub to Merge.t 2022-10-24 17:20:25 -03:00
Biblio Bug 29697: Fix tests 2022-07-22 15:24:11 -03:00
Budgets Bug 27550: Add unit test for CloneBudgetHierarchy 2022-09-22 08:18:43 -03:00
Circulation Bug 34279: Don't enforce overduefinescap unless it is greater than 0 2023-08-18 10:37:11 +00:00
CourseReserves Bug 32351: Fix CourseItems.t 2022-12-02 10:54:58 +00:00
Creators
…
Exporter
…
Holds Bug 32455: Cleanup and expand ExpireReservesAutoFill.t 2023-02-08 16:24:05 +00:00
Illrequest Bug 30484: Add unit tests 2022-09-23 09:18:46 -03:00
Items Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-10-25 11:16:57 -03:00
Koha Bug 34722: Prevent other items from displaying to fill item-level recalls 2023-10-17 17:35:39 +00:00
LDAP
…
Labels Bug 24001: (follow-up) Fix t_Profile.t 2022-04-28 20:26:20 -10:00
Letters Bug 32442: Add tests 2023-01-31 17:45:23 +00:00
Members
…
OAI Bug 29697: Replace some missing occurrences 2022-07-25 09:30:30 -03:00
Patron Bug 31095: Remove GetDebarments from Borrower_Debarments.t 2023-02-01 15:38:41 +00:00
Record Bug 29697: Use flag embed_items 2022-07-22 15:24:11 -03:00
Reports
…
Reserves Bug 33210: Add unit test 2023-05-11 11:32:10 +01:00
SIP Bug 34848: (QA follow-up) Resolve warn on useless constant 2023-10-17 12:20:41 +01:00
Search
…
Serials Bug 23775: Claiming a serial issue doesn't create the next one 2023-07-18 13:00:04 +00:00
Template/Plugin Bug 32127: Add unit test 2023-04-18 12:05:51 +00:00
Utils
…
api/v1 Bug 34054: Add tests 2023-10-17 12:12:34 +01:00
cronjobs
…
data Bug 29697: Fix t/db_dependent/Search.t 2022-07-25 10:16:48 -03:00
misc/translator
…
selenium Bug 34513: (QA follow-up) Tidy 2023-09-28 09:18:28 +00:00
www Bug 33020: (QA follow-up) POD and chmod 2023-03-01 09:29:07 +00:00
00-strict.t
…
01-test_dbic.t
…
Accounts.t Bug 34912: Add 14 hours to 1970 date in Account(s).t 2023-10-17 17:11:31 +00:00
Acquisition.t Bug 32351: Fix Acquisition.t 2022-12-02 10:53:04 +00:00
Amazon.t
…
ArticleRequests.t
…
AudioAlerts.t
…
Auth.t Bug 34513: (QA follow-up) Tidy 2023-10-17 12:44:38 +01:00
AuthUtils.t
…
Auth_with_cas.t
…
Auth_with_ldap.t Bug 30646: Unit tests for Auth_with_ldap 2022-10-03 14:02:40 -03:00
AuthorisedValues.t Bug 32997: Add tests 2023-03-03 12:11:20 +00:00
AuthoritiesMarc.t
…
AuthoritiesMarc_GetTagsLabels.t Bug 30446: Add a test for GetTagsLabels 2022-04-21 21:01:09 -10:00
BackgroundJob.t
…
Barcodes.t
…
Barcodes_ValueBuilder.t
…
Biblio.t Bug 32060: Improve performance of columns_to_str 2023-06-12 11:42:35 +00:00
Biblio_holdsqueue.t Bug 30728: Add unit tests 2022-05-12 22:17:46 -10:00
Breeding.t Bug 33404: Add unit tests 2023-07-18 13:27:56 +00:00
Breeding_Auth.t Bug 33404: Add unit tests 2023-07-18 13:27:56 +00:00
Budgets.t Bug 32351: Fix Budgets.t 2022-12-02 10:54:17 +00:00
Cache.t
…
Calendar.t Bug 33727: (QA follow-up) perl tidy whole file 2023-07-18 15:28:28 +00:00
Charset.t
…
Circulation.t Bug 30362: (Rmaint fix) Fix failing test 2023-09-01 10:35:19 +00:00
Circulation_holdsqueue.t Bug 30728: Add unit tests 2022-05-12 22:17:46 -10:00
Clubs.t
…
Context.t Bug 32687: Get server version in Context::get_versions 2023-02-28 17:06:35 +00:00
Contract.t
…
CourseReserves.t
…
DecreaseLoanHighHolds.t Bug 29102: Do not count patron's own hold against limits 2022-11-04 19:20:24 -03:00
Filter_MARC_ViewPolicy.t Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t 2023-06-07 10:16:07 +00:00
Fines.t
…
FrameworkPlugin.t
…
Heading.t Bug 33557: Add LinkerConsiderThesaurus system preference 2023-05-16 07:32:11 +01:00
Heading_MARC21.t Bug 33277: Do not search using thesaurus when linking non 6XX fields 2023-05-15 10:40:52 +00:00
Hold.t Bug 14783: (QA follow-up) Rename method and move tests 2022-10-17 15:43:22 -03:00
Holds.t Bug 32894: (QA follow-up) Fix tests 2023-07-12 09:10:20 +00:00
HoldsQueue.t Bug 33761: (RMaint follow-up) Remove errant test from bug 31557 added by git) 2023-06-09 11:11:30 +00:00
Holidays.t
…
ILSDI_Services.t Bug 29924: Update ILSDI to be aware of expired passwords 2022-05-06 10:33:09 -10:00
Illcomments.t
…
Illrequestattributes.t
…
Illrequests.t Bug 22440: (follow-up) Fix existing tests 2023-05-12 14:38:48 +01:00
ImportBatch.t Bug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t 2023-03-17 17:19:48 +00:00
ImportExportFramework.t
…
Installer.t
…
Items.t Bug 34656: (QA follow-up) perltidy 2023-10-12 15:31:50 +00:00
Koha.t Bug 30870: Don't skip tests if Test::Deep if not installed 2022-06-01 13:40:26 -03:00
Koha_Database.t
…
Koha_Elasticsearch.t
…
Koha_ExternalContent_OverDrive.t
…
Koha_MetadataRecord_Authority.t Bug 30756: Rename to Koha_MetadataRecord_Authority 2022-06-02 13:53:39 -03:00
Koha_Misc_Files.t
…
Languages.t Bug 32775: (QA follow-up) remove useless empty line 2023-06-05 16:51:50 +00:00
Letters.t Bug 34825: Merge Letters.t into t/db/Letters.t 2023-10-17 17:11:33 +00:00
LibraryGroups.t
…
Linker_Default.t Bug 30280: Add Unit tests 2022-10-03 10:00:12 -03:00
Linker_FirstMatch.t
…
Log.t Bug 27342: (QA follow-up) Fix test 2022-08-16 10:50:47 -03:00
MarcModificationTemplates.t Bug 31644: (QA follow-up) Add two missing shebang lines 2022-10-24 11:53:19 -03:00
Members.t Bug 32351: Fix Members.t 2022-12-02 10:54:33 +00:00
Message.t Bug 18398: (follow-up) Update POD & Unit tests 2023-05-09 21:34:01 +01:00
MungeMarcPrice.t
…
Overdues.t
…
Passwordrecovery.t Bug 31739: Password recovery from staff fails if previous expired reset-entry exists. 2022-10-24 14:12:16 -03:00
PatronLists.t
…
Patroncards.t
…
Patrons.t Bug 12446: (QA follow-up) Rename canbeguarantee => can_be_guarantee 2022-06-23 13:34:05 -03:00
Prices.t Bug 34967: Move to db_dependent 2023-10-17 16:56:22 +00:00
Record.t
…
RecordProcessor_EmbedSeeFromHeadings.t
…
Reports.t
…
Reserves.t Bug 34666: (Rmaint follow-up) Fix unit test 2023-09-15 14:02:33 +00:00
RotatingCollections.t Bug 29144: Remove opac_info from a few tests 2022-09-16 09:55:20 -03:00
Search.t Bug 34847: Fix t/db_dependent/Search.t 2023-10-12 16:10:54 +00:00
Serials.t Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
Serials_2.t
…
Service.t
…
ShelfBrowser.t
…
Sitemapper.t
…
Stats.t
…
StockRotationItems.t Bug 30518: Unit test 2022-04-19 21:25:50 -10:00
StockRotationRotas.t
…
StockRotationStages.t
…
SuggestionEngine_ExplodedTerms.t Bug 31069: Remove ExplodedTerms dependency on templates 2022-07-18 12:37:35 -03:00
Suggestions.t Bug 32942: (follow-up) Fix test 2023-10-12 16:00:24 +00:00
TablesSettings.t
…
Tags.t Bug 31517: Remove unused get_tag function 2022-11-04 19:30:56 -03:00
Templates.t Bug 29695: Remove GetColumnDefs 2022-04-12 11:40:16 +02:00
TestBuilder.t Bug 32350: Add subtest for bad columns 2022-12-01 12:41:27 +00:00
Upload.t Bug 31598: Fix random failure on Jenkins for Upload.t 2022-09-22 08:07:01 -03:00
UsageStats.t
…
Virtualshelves.t Bug 30933: (follow-up) Consolidate transfer checks 2022-07-20 09:04:07 -03:00
XISBN.t
…
XSLT.t Bug 32268: Prevent XSLT.t to fail randomly 2022-11-18 12:04:28 -03:00
check_kohastructure.t
…
check_sysprefs.t
…
db_structure.t
…
rollingloans.t
…
sysprefs.t
…
yaml.t
…
zebra_config.pl
…