Bug 28931 - use EXPORT_OK in Koha::DateUtils
Summary: use EXPORT_OK in Koha::DateUtils
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 17600
Blocks:
  Show dependency treegraph
 
Reported: 2021-08-31 13:22 UTC by Jonathan Druart
Modified: 2022-06-06 20:24 UTC (History)
5 users (show)

See Also:
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:


Attachments
Bug 28931: Use EXPORT_OK from Koha::AuthUtils (133.36 KB, patch)
2021-08-31 13:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28931: Use EXPORT_OK from Koha::AuthUtils (30.26 KB, patch)
2021-09-10 11:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28931: Use EXPORT_OK from Koha::AuthUtils (30.20 KB, patch)
2021-09-14 18:04 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 28931: Remove unuse Koha::DateUtils from tests (2.67 KB, patch)
2021-10-04 08:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28931: Use EXPORT_OK from Koha::DateUtils (30.35 KB, patch)
2021-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28931: Remove unused Koha::DateUtils from tests (2.76 KB, patch)
2021-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!