Bugzilla – Attachment 176535 Details for
Bug 38893
Longoverdue cronjob gives error when run with "--library" flag and CircControl syspref set to "The library you are logged in at"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38893: Quit job with message when longoverdue run with --library and CircControl set to logged in library
Bug-38893-Quit-job-with-message-when-longoverdue-r.patch (text/plain), 1.75 KB, created by
Andrew Fuerste-Henry
on 2025-01-14 20:05:41 UTC
(
hide
)
Description:
Bug 38893: Quit job with message when longoverdue run with --library and CircControl set to logged in library
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2025-01-14 20:05:41 UTC
Size:
1.75 KB
patch
obsolete
>From 23ed14ba989244e0470a5878762b95964b5c3544 Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Date: Tue, 14 Jan 2025 20:02:52 +0000 >Subject: [PATCH] Bug 38893: Quit job with message when longoverdue run with > --library and CircControl set to logged in library > >To test: >1: Set CircControl to "the item's library" and run longoverdue with the --library flag, it works >2: Set CircControl to "the library you are logged in at" and run longoverdue, it gives an error >3: Apply patch, restart all >4: run longoverdue, it quits and tells you "Use of --library flag not permitted when the CircControl system preference set to 'the library you are logged in at'" >--- > misc/cronjobs/longoverdue.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 6288f9d9d3..505ba7ff0b 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -477,7 +477,10 @@ foreach my $startrange (sort keys %$lost) { > $patron ||= Koha::Patrons->find( $row->{borrowernumber} ); > $lib = $patron->branchcode(); > } elsif ( $_ eq 'PickupLibrary' ) { >- $lib = C4::Context->userenv->{'branch'}; >+ pod2usage( >+ '-exitval' => 1, >+ '-message' => "Use of --library flag not permitted when the CircControl system preference set to 'the library you are logged in at'", >+ ) > } else { # ( $_ eq 'ItemHomeLibrary' ) > if ($home_holding_pref eq 'homebranch') { > $lib = Koha::Items->find( $row->{itemnumber} )->homebranch(); >-- >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 38893
:
176535
|
176889