Koha-clms/t/db_dependent/Koha
Aleisha Amohia be375ed01c
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>
2023-10-04 16:40:17 -04:00
..
Account Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Acquisition Bug 32496: Fix tests 2023-09-22 12:35:47 -03:00
Auth Bug 30843: Add unit test for Koha::Auth::TwoFactorAuth::verify 2023-09-25 10:53:52 -03:00
BackgroundJob Bug 32781: Prevent import from list to fail if package does not exist 2023-03-13 15:56:41 -03:00
BackgroundJobs Bug 32366: (bug 30460 follow-up) Add tests 2022-12-01 10:02:21 -03:00
Biblio Bug 33270: Add record_strip_nonxml routine to Koha::Biblio::Metadata 2023-07-18 12:46:57 -03:00
Cash
…
Charges Bug 32351: Fix t/db_dependent/Koha/Charges/Sales.t 2022-11-30 15:58:20 -03:00
Checkouts Bug 33362: Allow return claims to be resolved even if the issue has since been delete from the database 2023-05-24 11:21:31 -03:00
CirculationRules
…
Club
…
Config Bug 32478: (QA follow-up) Shebang and chmod for Koha/Config/SysPrefs.t 2023-06-07 15:25:22 -03:00
Database Bug 33584: Fix failures for Commenter.t on MySQL8 2023-04-24 12:08:00 -03:00
ERM Bug 32267: (bug 32154 follow-up) Fix Agreements.t 2022-11-18 12:04:25 -03:00
Edifact Bug 34415: Remove T::D::C from EdiTransport.t, move to t/db 2023-09-18 12:06:28 -03:00
Filter Bug 33214: (follow-up) Make tests less fragile 2023-03-13 16:53:25 -03:00
Import Bug 32437: Add replace method to Koha::Import::Record objects 2023-03-31 13:13:26 +02:00
Item Bug 24606: (QA follow-up) Fix Template.t 2022-11-22 13:33:39 -03:00
Items Bug 32019: Unit tests 2023-02-20 09:54:19 -03:00
Library
…
Object/Mixin Bug 11844: (follow-up) Fix tests 2023-05-16 12:58:38 +02:00
Objects Bug 33083: Add a generic class to handle methods for collections of records 2023-03-13 15:11:59 -03:00
Old Bug 34609: Add tests 2023-09-01 11:07:34 -03:00
Patron Bug 17499: (QA follow-up) Fix permissions 2023-09-12 16:21:40 -03:00
Patrons Bug 34617: Unit tests 2023-09-01 12:08:33 -03:00
Plugins Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Policy Bug 30825: Move holds_control_library to Koha::Policy::Holds 2023-09-22 12:35:46 -03:00
REST Bug 33971: Remove x-koha-query header support 2023-07-03 10:35:06 -03:00
SMTP Bug 33964: Use Email::Sender::Transport::SMTP::Persistent for sending email 2023-07-24 14:55:33 -03:00
SearchEngine Bug 33444: Update AddRenewal to take a hashref of params 2023-07-19 12:06:52 -03:00
Subscription
…
Tags
…
Template/Plugin Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Ticket Bug 31028: Add new Koha::Object(s) classes 2023-03-06 11:23:17 -03:00
UI/Form/Builder Bug 34266: Add unit tests 2023-09-01 12:08:35 -03:00
XSLT
…
Z3950Responder Bug 29234: Further clean Z3950 Tests 2023-04-03 10:49:58 -03:00
Account.t Bug 34912: Add 14 hours to 1970 date in Account(s).t 2023-10-04 09:15:39 -04:00
ActionLogs.t
…
AdditionalContents.t Bug 29144: Add $contents->find_best_match, $library->opac_info 2022-09-16 09:55:19 -03:00
AdditionalField.t Bug 11844: Add tests 2023-05-16 12:58:38 +02:00
ApiKey.t
…
ArticleRequest.t
…
ArticleRequests.t Bug 34916: Fix wrong borrowernumber in ArticleRequests.t 2023-10-04 09:15:39 -04:00
Authorities.t Bug 32735: (follow-up) Make Koha::Objects::Record::Collections->print_collection work with Authorities and Biblios 2023-05-05 12:13:50 -03:00
BackgroundJob.t Bug 32394: Add tests 2022-12-14 14:32:27 -03:00
BackgroundJobs.t Bug 31969: Use filter_by_last_update 2022-11-25 09:40:09 -03:00
Biblio.t Bug 33958: Add tests 2023-10-04 11:08:28 -04:00
BiblioFrameworks.t
…
Biblios.t Bug 33974: Add Koha::Biblios->api_query_fixer 2023-07-03 14:51:42 -03:00
Checkout.t
…
Checkouts.t
…
CirculationRules.t Bug 32271: Unit test 2023-07-19 13:00:37 -03:00
Cities.t
…
ClassSortRules.t
…
ClassSources.t
…
ClassSplitRules.t
…
CoverImages.t
…
CsvProfiles.t
…
CurbsidePickups.t Bug 32891: (QA follow-up) Fix perlcritic error 2023-02-21 10:22:33 -03:00
Database.t
…
Desks.t
…
Encryption.t
…
Hold.t Bug 34333: Add Koha::Hold->cancellation_requested 2023-09-18 15:31:48 -03:00
Holds.t Bug 32496: Fix tests 2023-09-22 12:35:47 -03:00
Illbackend.t Bug 34223: (QA follow-up) Fix file permissions 2023-09-06 16:47:09 -03:00
Illrequests.t Bug 22440: Add Koha::Illrequests->filter_by_visible 2023-05-05 09:13:40 -03:00
Item.t Bug 34722: Prevent other items from displaying to fill item-level recalls 2023-10-04 16:40:17 -04:00
ItemTypes.t Bug 34357: Replace SUPER->imageurl in ItemTypes 2023-08-15 12:16:48 +03:00
Items.t Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
KeyboardShortcuts.t
…
Libraries.t Bug 9525: (QA follow-up) Tidy 2023-10-04 16:40:12 -04:00
Library.t Bug 29144: Add $contents->find_best_match, $library->opac_info 2022-09-16 09:55:19 -03:00
MarcSubfieldStructures.t
…
Notice_Util.t Bug 33360: Extend Koha::Notice::Util with domain groups 2023-04-14 11:35:30 -03:00
Notices.t
…
Object.t Bug 34930: Change timezone in Koha/Object.t where tests assume it 2023-10-03 08:51:15 -04:00
Objects.t
…
Old.t
…
Patron.t Bug 33245: Add unit test 2023-10-04 11:07:50 -04:00
Patron_generate_userid.t Bug 32426: Patron::generate_userid - add plugin hook 2023-03-27 12:49:50 +02:00
Patrons.t Bug 34489: Fix timezone problem in Patrons.t 2023-10-03 08:51:14 -04:00
Pseudonymization.t Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Quotes.t
…
Ratings.t Bug 33953: Adjust tests 2023-07-13 15:19:36 -03:00
Recall.t Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Recalls.t Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
Reports.t Bug 27824: Add a test 2023-07-13 15:19:32 -03:00
Reviews.t
…
SMS_Providers.t
…
SearchField.t
…
SharedContent.t
…
Statistics.t Bug 30928: Add tests 2023-05-10 14:19:21 -03:00
Subscription.t
…
Suggestion.t
…
Suggestions.t Bug 32942: (QA follow-up) Add tests for STATUS checking in Suggestion::store 2023-09-18 15:31:45 -03:00
Tags.t
…
Ticket.t Bug 31028: (follow-up) Fix executable bit 2023-03-07 14:54:29 -03:00
Virtualshelf.t
…
Virtualshelves.t
…
Z3950Servers.t Bug 30571: Z3950Servers.t - Add another subtest 2022-10-03 08:29:25 -03:00