Bug 10256

Summary: Remove some unused subs from Overdues module
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: CirculationAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: minor    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10021
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 10256: Remove some unused subs from Overdues module
Bug 10256: Remove some unused subs from Overdues module
Bug 10256: Remove some unused subs from Overdues module

Description Marcel de Rooy 2013-05-16 07:53:40 UTC
Did a grep on the following exported subs:

CreateItemAccountLine
UpdateAccountLines
CheckAccountLineLevelInfo
CheckAccountLineItemInfo
CheckExistantNotifyid
GetNextIdNotify
GetNotifyId
ReplacementCost
ReplacementCost2
GetOverdueDelays
GetOverduerules

As it appears, they are not even used anywhere (anymore).
My proposal is now to remove them.
Comment 1 Marcel de Rooy 2013-05-16 08:07:40 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2013-05-16 12:27:14 UTC
Hi Marcel,

I think this is related to a bug I filed - only I was concentrating on the database relicts that are connected to those subs: bug 10021
Comment 3 Marcel de Rooy 2013-05-16 12:46:36 UTC
(In reply to comment #2)
> I think this is related to a bug I filed - only I was concentrating on the
> database relicts that are connected to those subs: bug 10021

Good catch, Katrin. Well, this patch could remove the first code. Your report is somewhat broader in scope.
Comment 4 Kyle M Hall (khall) 2013-06-07 16:17:19 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2013-06-14 08:36:47 UTC
QA comment:

I did not find any occurrence of these routines using git grep. So we can suppose that this patch remove unused code and will not break something.

Marked as Passed QA.
Comment 6 Jonathan Druart 2013-06-14 08:40:40 UTC
Created attachment 18978 [details] [review]
Bug 10256: Remove some unused subs from Overdues module

Removes the following exported but unused subs from Overdues.pm:
CreateItemAccountLine
UpdateAccountLines
CheckAccountLineLevelInfo
CheckAccountLineItemInfo
CheckExistantNotifyid
GetNextIdNotify
GetNotifyId
ReplacementCost
ReplacementCost2
GetOverdueDelays
GetOverduerules

Test plan:
It is hard to test the removal of something that was not used :) Try this:
Do a recursive grep on these routine names in the Koha codebase.
Compile some scripts that use the Overdues module.
And just to be sure we do not break something:
Go to Circulation: Do a checkout, checkin, place and confirm a hold.
Go to Patrons: Goto Check out. Goto Fines.
Run the command line scripts: fines.pl and overdue_notices.pl.
Go to opac-user.pl.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Galen Charlton 2013-06-17 16:13:50 UTC
Pushed to master.  Thanks, Marcel!