Bugzilla – Attachment 163766 Details for
Bug 36137
update_totalissues.pl should always skip_holds_queue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36137: Make update_totalissues cron always skip the holds queue
Bug-36137-Make-updatetotalissues-cron-always-skip-.patch (text/plain), 2.16 KB, created by
Frédéric Demians
on 2024-03-25 08:47:01 UTC
(
hide
)
Description:
Bug 36137: Make update_totalissues cron always skip the holds queue
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2024-03-25 08:47:01 UTC
Size:
2.16 KB
patch
obsolete
>From 162f6a2cb01457d539f976742b2d7ef1b6f10913 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 20 Feb 2024 16:20:08 +0000 >Subject: [PATCH] Bug 36137: Make update_totalissues cron always skip the holds > queue >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >1. Run the update_totalissues cron, the holds queue is updated. >2. APPLY PATCH, restart services >3. Run update_totalissues cron again, this time the holds queue should always be skipped. > >NOTE: This patch also eliminates what looks to me to be an unessesary if/else case. >This patch also adds POD for the skips_hold_queue variable in C4/Biblio > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> >--- > C4/Biblio.pm | 2 ++ > misc/cronjobs/update_totalissues.pl | 8 +------- > 2 files changed, 3 insertions(+), 7 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 97048ca5f3..0b32c2a4e5 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -3038,6 +3038,8 @@ Update the total issue count for a particular bib record. > > =item C<$value> is the absolute value that total issues count should be set to. If provided, C<$increase> is ignored. > >+=item C<$skip_holds_queue> parameter to optionally skip updating the holds queue. >+ > =back > > =cut >diff --git a/misc/cronjobs/update_totalissues.pl b/misc/cronjobs/update_totalissues.pl >index eee8fdef62..00b934ca9a 100755 >--- a/misc/cronjobs/update_totalissues.pl >+++ b/misc/cronjobs/update_totalissues.pl >@@ -166,13 +166,7 @@ sub process_query { > print "Processing bib $biblionumber ($totalissues issues)\n" > if $verbose; > if ( not $test_only ) { >- my $ret; >- if ( $incremental && $totalissues > 0 ) { >- $ret = UpdateTotalIssues( $biblionumber, $totalissues ); >- } >- else { >- $ret = UpdateTotalIssues( $biblionumber, 0, $totalissues ); >- } >+ my $ret = UpdateTotalIssues( $biblionumber, $incremental, $totalissues, 1 ); > unless ($ret) { > print "Error while processing bib $biblionumber\n" if $verbose; > $num_bibs_error++; >-- >2.34.1
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 36137
:
162301
|
163766
|
164610
|
165842
|
166142