When parse_letter was renamed to parse_overdue_letter on bug 12933 an error was introduced so that overdue_notices.pl cannot find the subroutine
Created attachment 45105 [details] [review] Bug 15242 - Missing subroutine in overdue_notices.pl This patch changes the call to parse_overdues_letter to use the full namespace to ensure the subroutine can be found.
Created attachment 45115 [details] [review] Bug 15242 - Missing subroutine in overdue_notices.pl This patch changes the call to parse_overdues_letter to use the full namespace to ensure the subroutine can be found. Signed-off-by: Marc Véron <veron@veron.ch>
QA Style note, we tend to import routines over adding full namespaces.. I'd prefer to stick to that standard unless you can come up with a good/valid reason against doing so?
We have this line at the top of the script: 43 use C4::Overdues qw(GetFine GetOverdueMessageTransportTypes); I think adding the new routine the same way would be more consistent. Can you please provide a new patch?
(In reply to Martin Renvoize from comment #3) > QA Style note, we tend to import routines over adding full namespaces.. (...) There is one more full name space in line 323: my @overduebranches = C4::Overdues::GetBranchcodesWithOverdueRules(); I think this should be fixed as well to be consistent. Ah, is it necessary that the subs are exported in C4/Overdues.pm? Line 47 following: GetBranchcodesWithOverdueRules is not listed
Oh man we're inconsistent in this script :(. Well spotted Marc, reading C4::Overdues I note it's using EXPORT instead of EXPORT_OK too :(. Personally, I believe if a routine is intended to be used in another module it should appears in the EXPORT_OK block not the EXPORT block, and that it should be explicitly imported into the using module with a use statement. So.. if I were being picky I'd say.. convert the EXPORT to EXPORT_OK (but this may break modules that expect to have access to the routines without explicitly importing them :( ), add the routine your found to the EXPORT_OK block also, and then clean up here to match. Perhaps split the work into two bugs.. one clean up and one just fixing the initial bug.. thoughts?
s/this script/these scripts/
I think best to fix the one problem identified here ... and do general cleanup separately :)
(In reply to Katrin Fischer from comment #8) > I think best to fix the one problem identified here ... and do general > cleanup separately :) +1 :-)
Created attachment 45124 [details] [review] Bug 15242 - Missing subroutine in overdue_notices.pl This patch changes the call to parse_overdues_letter to use the full namespace to ensure the subroutine can be found.
Created attachment 45137 [details] [review] [SIGNED OFF] Bug 15242 - Missing subroutine in overdue_notices.pl This patch changes the call to parse_overdues_letter to use the full namespace to ensure the subroutine can be found. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 45144 [details] [review] Bug 15242 - Missing subroutine in overdue_notices.pl This patch changes the call to parse_overdues_letter to use the full namespace to ensure the subroutine can be found. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Martin Renvoize from comment #3) > QA Style note, we tend to import routines over adding full namespaces.. > > I'd prefer to stick to that standard unless you can come up with a > good/valid reason against doing so? And I prefer the other way :) I personally think it adds readability and eases refactoring.
Patch pushed to master. Thanks Nick!