Bugzilla – Attachment 120175 Details for
Bug 28144
Historical OVERDUE fines may not have an issue_id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28144: Check if issue_id defined
Bug-28144-Check-if-issueid-defined.patch (text/plain), 1.61 KB, created by
Martin Renvoize
on 2021-04-26 14:32:48 UTC
(
hide
)
Description:
Bug 28144: Check if issue_id defined
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2021-04-26 14:32:48 UTC
Size:
1.61 KB
patch
obsolete
>From 308da96ab5dc6f452f446f3112b0fa09fcded7bf Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 13 Apr 2021 15:14:11 +0000 >Subject: [PATCH] Bug 28144: Check if issue_id defined > >Historical OVERDUE fines may not have an issue_id - this causes >flooding of the logs when calling update fine > >Trivial change, reading the code should be enough, but test plan below > >To test: >1 - Create some fines without an issue_id > - Either checkout an old version of Koha and add manually or > - Checkout some items (backdated) to a patron, run fines.pl then > UPDATE accountlines SET issue_id = NULL; >2 - Checkout a backdated item with fines in the circ rule to the same patron >3 - Run fines.pl >4 - Note the errors >5 - Apply patch >6 - Repeat and note no errors > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Overdues.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index d484c67b0f..faea77e0f3 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -545,7 +545,7 @@ sub UpdateFine { > # - accumulate fines for other items > # so we can update $itemnum fine taking in account fine caps > while (my $overdue = $overdues->next) { >- if ( $overdue->issue_id == $issue_id && $overdue->status eq 'UNRETURNED' ) { >+ if ( defined $overdue->issue_id && $overdue->issue_id == $issue_id && $overdue->status eq 'UNRETURNED' ) { > if ($accountline) { > $debug and warn "Not a unique accountlines record for issue_id $issue_id"; > #FIXME Should we still count this one in total_amount ?? >-- >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 28144
:
119541
| 120175 |
120220