Bug 28144: Check if issue_id defined
authorNick Clemens <nick@bywatersolutions.com>
Tue, 13 Apr 2021 15:14:11 +0000 (15:14 +0000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Mon, 24 May 2021 18:35:40 +0000 (18:35 +0000)
commitcf49c5126e98a388e9a69544473d4be2ac2cd9bb
tree3f477d594c78b47a8b1cd07b0893c3fdacdf6dcf
parentb62b66bddccdb441d494608ef69256476b03a06f
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bf13a36c8a80d2b7b38c897b4ae3bdf2c91fb934)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f76e8409707fe8da1f35e3ae6192dbe81c8a0448)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Overdues.pm