Bugzilla – Attachment 125588 Details for
Bug 25429
`cleanup_database.pl` should remove resolved claims returned after X days
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25429: (QA follow-up) Add extra variable for days
Bug-25429-QA-follow-up-Add-extra-variable-for-days.patch (text/plain), 1.65 KB, created by
Marcel de Rooy
on 2021-10-01 09:02:57 UTC
(
hide
)
Description:
Bug 25429: (QA follow-up) Add extra variable for days
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-10-01 09:02:57 UTC
Size:
1.65 KB
patch
obsolete
>From a703e11bd52f224ca8fba826aee7c99a7a8ee651 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 1 Oct 2021 08:45:48 +0000 >Subject: [PATCH] Bug 25429: (QA follow-up) Add extra variable for days >Content-Type: text/plain; charset=utf-8 > >I think it is a bit more clear to use another variable for the >number of days from the preferences than overwriting the flag >variable. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested by adding an authval for LOST. >Filling prefs ClaimReturnedLostValue, CleanUpDatabaseReturnClaims. >Claiming a return, resolving it. Setting date back via SQL. >Running the script with -v --return-claims, toggling --confirm. >The claim is counted and deleted with confirm. >--- > misc/cronjobs/cleanup_database.pl | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl >index 84db2b9210..2adccfda04 100755 >--- a/misc/cronjobs/cleanup_database.pl >+++ b/misc/cronjobs/cleanup_database.pl >@@ -530,14 +530,13 @@ if ($pStatistics) { > } > } > >-$return_claims = C4::Context->preference('CleanUpDatabaseReturnClaims') if $return_claims; >-if ($return_claims) { >- print "Purging return claims older than $return_claims days.\n" if $verbose; >+if( $return_claims && ( my $days = C4::Context->preference('CleanUpDatabaseReturnClaims') )) { >+ print "Purging return claims older than $days days.\n" if $verbose; > > $return_claims = Koha::Checkouts::ReturnClaims->filter_by_last_update( > { > timestamp_column_name => 'resolved_on', >- days => $return_claims >+ days => $days, > } > ); > >-- >2.20.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 25429
:
104611
|
104612
|
104798
|
114601
|
114602
|
115042
|
115086
|
115087
|
115088
|
115089
|
115090
|
115907
|
115908
|
118880
|
118881
|
119219
|
120927
|
120928
|
120929
|
120930
|
125584
|
125585
|
125586
|
125587
| 125588