Bug 30042 - Remove Date::Calc use
Summary: Remove Date::Calc use
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 29843
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-08 10:17 UTC by Tomás Cohen Arazi
Modified: 2022-02-08 19:29 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 30042: Remove Date::Calc dependency in batch_anonymize.pl (1.78 KB, patch)
2022-02-08 17:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2022-02-08 10:17:59 UTC

    
Comment 1 Jonathan Druart 2022-02-08 16:58:00 UTC
There is no occurrence of Date::Calc in tools/cleanborrowers.pl
Comment 2 Tomás Cohen Arazi 2022-02-08 17:48:38 UTC
Created attachment 130334 [details] [review]
Bug 30042: Remove Date::Calc dependency in batch_anonymize.pl

This patch makes the script use the Koha::DateUtils tools instead.

To test:
1. Run:
   $ kshell
  k$ perl misc/cronjobs/batch_anonymise.pl --verbose --days 7
=> SUCCESS: You see (the date may vary):
Checkouts and holds before 2022-02-15 will be anonymised.
2. Apply this patch
3. Repeat 1
=> SUCCESS: Same output
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi 2022-02-08 17:49:31 UTC
(In reply to Jonathan Druart from comment #1)
> There is no occurrence of Date::Calc in tools/cleanborrowers.pl

Right, sorry for that. I read 'the cronjob' on bug 29843 and jumped to  file this one so we don't forget, but didn't check if the file was the right one.
Comment 4 Jonathan Druart 2022-02-08 18:08:21 UTC
Why this script and not all other occurrences then?