Bugzilla – Attachment 176534 Details for
Bug 38894
Longoverdue cron should follow HomeOrHoldingBranch as well as CircControl when using --library flag
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38894: Use HomeOrHoldingBranch with longoverdue cronjob
Bug-38894-Use-HomeOrHoldingBranch-with-longoverdue.patch (text/plain), 3.11 KB, created by
Andrew Fuerste-Henry
on 2025-01-14 19:50:42 UTC
(
hide
)
Description:
Bug 38894: Use HomeOrHoldingBranch with longoverdue cronjob
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2025-01-14 19:50:42 UTC
Size:
3.11 KB
patch
obsolete
>From 99ef971cfe9be385e9cb14d51359cda7e47eab5c Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Date: Tue, 14 Jan 2025 19:49:36 +0000 >Subject: [PATCH] Bug 38894: Use HomeOrHoldingBranch with longoverdue cronjob > >To test: >1: have 4 items, 2 with homebranch = Library A and 2 with homebranch = Library B >2: Logged into Library A, check out 1 Library A item and 1 Library B item, both with due dates in the past enough for the longoverdue cron >3: set yourself to Library B, check out 1 Library A item and 1 Library B item, both with due dates in the past enough for the longoverdue cron >4: Run longoverdue cron with --verbose, without --confirm, and without --Library. see that it would act on all 4 items >5: Set CircControl to "the library the item is from" >6: Set HomeOrHoldingBranch to "the item's home library" >7: Run longoverdue cron with --verbose and --library="A" (where A is the code for your Library A), wihout --confirm >8: See the cron wants to act on the items with homebranch = A >9: Set HomeOrHoldingBranch to "the item's holding library" >10: Run longoverdue cron with --verbose and --library="A" (where A is the code for your Library A), wihout --confirm >11: See the cron is still trying to act on the two items with homebranch = A >12: Apply patch, restart all >13: Run longoverdue cron with --verbose and --library="A" (where A is the code for your Library A), wihout --confirm >14: See the cron is now trying to act on the two items with holdingbranch = A >15: Set HomeOrHoldingBranch to "the item's home library" >16: Run longoverdue cron with --verbose and --library="A" (where A is the code for your Library A), wihout --confirm >17: See the cron wants to act on the items with homebranch = A >--- > misc/cronjobs/longoverdue.pl | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 4da8846d65..6288f9d9d3 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -355,6 +355,7 @@ sub longoverdue_sth { > > my $dbh = C4::Context->dbh; > my $circ_control_pref = C4::Context->preference('CircControl'); >+my $home_holding_pref = C4::Context->preference('HomeOrHoldingBranch'); > > my @available_categories = Koha::Patron::Categories->search()->get_column('categorycode'); > $borrower_category = [ map { uc $_ } @$borrower_category ]; >@@ -478,7 +479,11 @@ foreach my $startrange (sort keys %$lost) { > } elsif ( $_ eq 'PickupLibrary' ) { > $lib = C4::Context->userenv->{'branch'}; > } else { # ( $_ eq 'ItemHomeLibrary' ) >- $lib = Koha::Items->find( $row->{itemnumber} )->homebranch(); >+ if ($home_holding_pref eq 'homebranch') { >+ $lib = Koha::Items->find( $row->{itemnumber} )->homebranch(); >+ } else { # ( $home_holding_pref eq 'holdingbranch' ) >+ $lib = Koha::Items->find( $row->{itemnumber} )->holdingbranch(); >+ } > } > } > next ITEM unless ( $branches_to_process{$lib} ); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38894
:
176534
|
176888