Bug 28931

Summary: use EXPORT_OK in Koha::DateUtils
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: trivial    
Priority: P5 - low CC: kyle, m.de.rooy, martin.renvoize, nick, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29395
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Circulation function:
Bug Depends on: 17600    
Bug Blocks:    
Attachments: Bug 28931: Use EXPORT_OK from Koha::AuthUtils
Bug 28931: Use EXPORT_OK from Koha::AuthUtils
Bug 28931: Use EXPORT_OK from Koha::AuthUtils
Bug 28931: Remove unuse Koha::DateUtils from tests
Bug 28931: Use EXPORT_OK from Koha::DateUtils
Bug 28931: Remove unused Koha::DateUtils from tests

Description Jonathan Druart 2021-08-31 13:22:20 UTC

    
Comment 1 Jonathan Druart 2021-08-31 13:24:04 UTC
Created attachment 124283 [details] [review]
Bug 28931: Use EXPORT_OK from Koha::AuthUtils
Comment 2 Jonathan Druart 2021-09-10 11:07:15 UTC
Created attachment 124750 [details] [review]
Bug 28931: Use EXPORT_OK from Koha::AuthUtils

It has been missed on bug 17600.
Comment 3 Jonathan Druart 2021-09-10 11:08:07 UTC
Got the list using

 % grep --files-without-match "use Koha::DateUtils.*dt_from_string" `git grep dt_from_string|cut -d':' -f1|sort|uniq`
Comment 4 Nick Clemens (kidclamp) 2021-09-14 18:04:38 UTC
Created attachment 124870 [details] [review]
Bug 28931: Use EXPORT_OK from Koha::AuthUtils

It has been missed on bug 17600.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Katrin Fischer 2021-10-02 21:55:40 UTC
There was no test plan... 

Should these files be updated as well?

debian/templates/plack.psgi:use Koha::DateUtils;
t/db_dependent/Circulation/IsItemIssued.t:use Koha::DateUtils;
t/db_dependent/Items.t:use Koha::DateUtils;
t/db_dependent/Koha/SearchEngine/Indexer.t:use Koha::DateUtils;
t/db_dependent/Koha/Template/Plugin/TablesSettings.t:use Koha::DateUtils;
t/db_dependent/Log.t:use Koha::DateUtils;
t/db_dependent/SIP/ILS.t:use Koha::DateUtils;
t/db_dependent/Search/History.t:use_ok('Koha::DateUtils');
Comment 6 Jonathan Druart 2021-10-04 08:55:14 UTC
Created attachment 125686 [details] [review]
Bug 28931: Remove unuse Koha::DateUtils from tests
Comment 7 Jonathan Druart 2021-10-04 08:56:09 UTC
(In reply to Katrin Fischer from comment #5)
> There was no test plan... 

It's impossible to provide a full test plan for this kind of patches. If the QA script passes it's already a good step for this one, as the compilation will be checked.

> Should these files be updated as well?

> t/db_dependent/Circulation/IsItemIssued.t:use Koha::DateUtils;
> t/db_dependent/Items.t:use Koha::DateUtils;
> t/db_dependent/Koha/SearchEngine/Indexer.t:use Koha::DateUtils;
> t/db_dependent/Koha/Template/Plugin/TablesSettings.t:use Koha::DateUtils;
> t/db_dependent/Log.t:use Koha::DateUtils;
> t/db_dependent/SIP/ILS.t:use Koha::DateUtils;
> t/db_dependent/Search/History.t:use_ok('Koha::DateUtils');

We can remove the use statement as it's not used.

> debian/templates/plack.psgi:use Koha::DateUtils;

I don't know about this one, we preload it but without the import. I prefer to keep it like that.
Comment 8 Marcel de Rooy 2021-10-07 06:40:39 UTC
Created attachment 125857 [details] [review]
Bug 28931: Use EXPORT_OK from Koha::DateUtils

It has been missed on bug 17600.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Adjusted commit title.
Comment 9 Marcel de Rooy 2021-10-07 06:40:43 UTC
Created attachment 125858 [details] [review]
Bug 28931: Remove unused Koha::DateUtils from tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Jonathan Druart 2021-10-07 09:20:50 UTC
Pushed to master for 21.11, thanks to everybody involved!