Koha-clms/t/db_dependent
Aleisha Amohia 7c8dbf75ec
Bug 39985: Set items.onloan when recall adjusts checkout due date
This enhancement ensures the due date stored in items.onloan is changed when a recall causes a checkout due date to change.

To test:

1. Enable UseRecalls syspref and set corresponding circulation rules:
    - Recalls allowed
    - Recalls per record
    - On shelf recalls allowed - set to "If any unavailable"
    - Recall due date interval - set to 1
    - Recall pickup period
2. Check out an item to a patron (Patron A)
  2a. Make sure this patron has a primary email address set
  2b. Check the patron's messaging preferences - make sure this patron has the 'Email' checkbox checked for the 'Return recalled item' notice
3. Go to Tools -> Notices & slips and find the RETURN_RECALLED_ITEM notice. In the Email notice, change "[% checkout.date_due | $KohaDates %]" to "[% item.onloan | $KohaDates %]" and Save.
4. Log into the OPAC as another patron
5. Search for the item checked out in step 2, and place a recall on that item
6. Search for that item in the staff interface
=> Note that the item status says, "Checked out to <patron>: due <tomorrow>"
7. Create the following SQL report in the reports module, using the barcode of the item that was recalled:
SELECT onloan FROM items WHERE barcode='xxxxxxxxx'
8. Run the report
=> The onloan value is still set to the item's original due date, not the updated due date of tomorrow
9. Go to Patron A's account again and view their Notices tab. Click on the 'Notification to return a recalled item'
=> The original due date is used in the notice.
10. Apply the patch and restart services
11. Reset to run the tests again:
    - Check in the item, but do not confirm the recall in the pop-up
    - Go to the biblio detail page and cancel the recall
12. Repeat steps 2 to 5.
13. Run your report again (step 8)
=> The onloan value should now show the updated due date of tomorrow
14. View Patron A's latest 'Notification to return a recalled item' notice (step 9)
=> The updated due date should be used in the notice.
15. Confirm tests pass
    - t/db_dependent/Koha/Recalls.t

Sponsored-by: Auckland University of Technology
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 95f2639d64)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-12-03 16:44:16 +01:00
..
Acquisition Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
Auth Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
AuthoritiesMarc Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Authority Bug 40119: Unit tests 2025-06-22 23:48:48 +02:00
Biblio Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Budgets Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Circulation Bug 40866: (follow-up) Remove obsolete CanBookBeIssued.t test file 2025-10-29 10:02:22 +01:00
CourseReserves Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Creators Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Exporter Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Holds Bug 40058: Adjust existing tests 2025-09-20 10:42:49 +02:00
HoldsQueue Bug 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t 2025-07-24 10:23:40 +02:00
Items Bug 23010: Add tests for AutomaticItemModificationByAge 2025-09-16 14:02:06 +02:00
Koha Bug 39985: Set items.onloan when recall adjusts checkout due date 2025-12-03 16:44:16 +01:00
LDAP Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
Labels Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Letters Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Members Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
OAI Bug 40265: (try to) prevent OAI/Server.t to fail on slow server 2025-10-23 23:06:38 +02:00
Patron Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings 2025-09-16 14:02:25 +02:00
Record Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00
Reports Bug 37784: Do not show forbidden columns in reports dictionary 2025-04-14 08:51:23 +02:00
Reserves Bug 40636: Regression tests 2025-09-20 10:43:49 +02:00
SIP Bug 40915: (RMaint follow-up) Backport adaptation to satisfy xt/find-license-problems.t 2025-10-29 10:02:11 +01:00
Search Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Serials Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Template/Plugin Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Utils Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
api/v1 Revert "Bug 39336: Public Biblio endpoint should honour OpacSuppression syspref" 2025-11-25 19:17:03 +01:00
cronjobs Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
data Bug 39345: (QA follow-up): Add exception handling for unsupported counter release 2025-09-20 10:43:55 +02:00
misc/translator Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings 2025-09-16 14:02:25 +02:00
mojo Bug 39980: Add Test::NoWarnings 2025-09-25 16:22:44 +02:00
selenium Revert "Bug 41038: Add tests for superlibrarian managing other users' 2FA" 2025-11-26 11:49:57 +01:00
www Bug 40379: Remove warnings from t/db_dependent/www 2025-07-24 21:04:33 +02:00
00-strict.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Accounts.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Acquisition.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Amazon.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ArticleRequests.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
AudioAlerts.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Auth.t Bug 40401: Implement Koha::Patron->is_anonymous 2025-07-24 21:04:38 +02:00
AuthUtils.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Auth_with_cas.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Auth_with_ldap.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Auth_with_shibboleth.t Bug 40317: Remove warnings from Auth_with_shibboleth.t output 2025-07-10 22:47:38 +02:00
AuthorisedValues.t Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings 2025-09-16 14:02:25 +02:00
AuthoritiesMarc.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
AuthoritiesMarc_GetTagsLabels.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Barcodes.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Barcodes_ValueBuilder.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Biblio.t Bug 40390: Remove warnings from t/db_dependent/Biblio.t 2025-07-24 10:23:32 +02:00
Biblio_holdsqueue.t Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
Breeding.t Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
Breeding_Auth.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Budgets.t Bug 40371: Remove warnings from Budgets.t output 2025-08-22 09:47:50 +02:00
Cache.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Calendar.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Charset.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Circulation.t Bug 40969: Mock the RenewalPeriodBase preference correctly 2025-10-29 10:02:35 +01:00
ClassSources.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Clubs.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Context.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Contract.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
CourseReserves.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
DecreaseLoanHighHolds.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Filter_MARC_ViewPolicy.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Fines.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
FrameworkPlugin.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Heading.t Bug 39503: Unit tests 2025-05-13 18:46:59 +02:00
Heading_MARC21.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Hold.t Bug 40671: Update method calls from revert_waiting to revert_found 2025-09-20 10:43:02 +02:00
Holds.t Bug 37651: (follow-up) Still skip future holds for renewals 2025-09-20 10:43:07 +02:00
HoldsQueue.t Bug 20747: (follow-up) Fix hold queue to work with LocalHoldPriority Group options 2025-05-15 08:34:20 +02:00
Holidays.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ILSDI_Services.t Bug 41012: (bug 40622 follow-up) Clear the MSS cache 2025-10-29 10:02:23 +01:00
ImportBatch.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
ImportExportFramework.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Installer.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Items.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha.t Bug 40277: Add a test 2025-07-10 22:47:32 +02:00
Koha_Database.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Elasticsearch.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_ExternalContent_OverDrive.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Koha_MetadataRecord_Authority.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Misc_Files.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Languages.t Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
Letters.t Bug 40410: Remove warning from Letters. 2025-07-24 10:23:37 +02:00
LibraryGroups.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Linker_Default.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Linker_FirstMatch.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Log.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
MarcModificationTemplates.t Bug 32950: Remove unecessary DELETE 2025-10-23 23:06:50 +02:00
Matcher.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Members.t Bug 37418: (follow-up) Add unit tests for GetBorrowersToExpunge() 2025-04-25 08:46:52 +02:00
Message.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
MungeMarcPrice.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Overdues.t Bug 40409: Remove warnings from t/db_dependent/Overdues.t 2025-07-24 10:23:38 +02:00
Passwordrecovery.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
PatronLists.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patroncards.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patrons.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Prices.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Realtime_holdsqueue.t Bug 34596: Unit tests 2025-10-29 10:02:24 +01:00
Record.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
RecordProcessor_EmbedSeeFromHeadings.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Reports.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Reserves.t Bug 40866: Add unit tests for hold override logging 2025-10-29 10:02:18 +01:00
RotatingCollections.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Search.t Bug 37883: (follow-up) Add a test 2025-09-16 14:02:21 +02:00
Search_FacetSorting.t Bug 36947: (QA follow-up) Add skippable unit test for fi_FI locale 2025-07-24 10:23:44 +02:00
Serials.t Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
Serials_2.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Service.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ShelfBrowser.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Sitemapper.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
SocialData.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
StockRotationItems.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
StockRotationRotas.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
StockRotationStages.t Bug 39717: Use numeric comparison for stock rotation stages 2025-04-24 19:53:15 +02:00
SuggestionEngine_ExplodedTerms.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Suggestions.t Bug 39883: (follow-up) Retrieve messages by letter_code 2025-09-20 10:42:51 +02:00
TablesSettings.t Bug 41042: default_save_state is enabled by default 2025-10-29 10:02:36 +01:00
Tags.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Templates.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
TestBuilder.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Upload.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
UsageStats.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Virtualshelves.t Bug 39427: (follow-up) Adjust number of tests 2025-08-22 09:48:26 +02:00
XISBN.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
XSLT.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
check_kohastructure.t Bug 38944: Fix tidiness t/db_dependent/check_kohastructure.t 2025-03-17 11:59:48 +01:00
check_sysprefs.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
db_structure.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
rollingloans.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
sysprefs.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
yaml.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
zebra_config.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00