Bug 28144 - Historical OVERDUE fines may not have an issue_id
Summary: Historical OVERDUE fines may not have an issue_id
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-13 15:13 UTC by Nick Clemens
Modified: 2021-05-24 18:51 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06,20.05.12


Attachments
Bug 28144: Check if issue_id defined (1.54 KB, patch)
2021-04-13 15:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28144: Check if issue_id defined (1.61 KB, patch)
2021-04-26 14:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28144: Add a regression test (1.95 KB, patch)
2021-04-27 13:04 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-04-13 15:13:48 UTC

    
Comment 1 Nick Clemens 2021-04-13 15:18:36 UTC
Created attachment 119541 [details] [review]
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
Comment 2 Martin Renvoize 2021-04-26 14:32:48 UTC
Created attachment 120175 [details] [review]
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>
Comment 3 Martin Renvoize 2021-04-26 14:33:22 UTC
Works as expected, going straight for PQA.
Comment 4 Jonathan Druart 2021-04-27 13:04:58 UTC
Created attachment 120220 [details] [review]
Bug 28144: Add a regression test
Comment 5 Jonathan Druart 2021-04-27 14:26:01 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-04-30 08:47:06 UTC
Pushed to 20.11.x for 20.11.06
Comment 7 Andrew Fuerste-Henry 2021-05-24 18:39:01 UTC
Pushed to 20.05.x for 20.05.12
Comment 8 Victor Grousset/tuxayo 2021-05-24 18:51:52 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.