Bug 14960

Summary: Remove C4::Dates from files in misc/cronjobs
Product: Koha Reporter: Marc Véron <veron>
Component: Architecture, internals, and plumbingAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: joonas.kylmala, mirko, mtompset, tomascohen, ztajoli
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 14870    
Attachments: Bug 14960 - Remove C4::Dates from files in misc/cronjobs (part 1)
Bug 14960 - Remove C4::Dates from files in misc/cronjobs
Bug 14960 - Remove C4::Dates from files in misc/cronjobs
Bug 14960 - Remove C4::Dates from files in misc/cronjobs
[SIGNED-OFF] Remove C4 Dates from files in misc/cronjob
Bug 14960 - Remove C4::Dates from files in misc/cronjobs
Bug 14960: Simplify the date management in staticfines
[PASSED QA] Bug 14960 - Remove C4::Dates from files in misc/cronjobs
[PASSED QA] Bug 14960: Simplify the date management in staticfines

Description Marc Véron 2015-10-05 16:20:41 UTC
This patch removes C4::Dates from following files

- misc/cronjobs/batch_anonymise.pl
- misc/cronjobs/cleanup_database.pl
- misc/cronjobs/gather_print_notices.pl
- misc/cronjobs/serialsUpdate.pl
- misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl

(Note: The remainig files misc/cronjobs/overdue_notices.pl and
misc/cronjobs/staticfines.pl will be covered with a separate bug)
Comment 1 Marc Véron 2015-10-05 16:26:34 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-10-09 20:36:28 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2015-10-23 09:35:51 UTC
Still applies
Comment 4 Marc Véron 2015-10-29 14:07:43 UTC
Still applies.
Comment 5 Marc Véron 2015-11-04 22:37:57 UTC Comment hidden (obsolete)
Comment 6 Zeno Tajoli 2015-11-05 16:18:14 UTC
Marc, this bug cover also misc/cronjobs/overdue_notices.pl and
misc/cronjobs/staticfines.pl ?
Because I see modification also on those two scripts.
Comment 7 Marc Véron 2015-11-05 21:56:50 UTC
(In reply to Zeno Tajoli from comment #6)
> Marc, this bug cover also misc/cronjobs/overdue_notices.pl and
> misc/cronjobs/staticfines.pl ?
> Because I see modification also on those two scripts.

Yes, as mentioned in teh latest commit message.

Marc
Comment 8 Marc Véron 2015-11-06 12:31:10 UTC
Joonas, are you working on this bug? 
It was assigned to you since this morning.
Comment 9 Marc Véron 2015-11-06 13:45:09 UTC
Comment on attachment 44440 [details] [review]
Bug 14960 - Remove C4::Dates from files in misc/cronjobs

Hmm, something is wrong with the latest patch when I amended to make it apply.

Going back...
Comment 10 Marc Véron 2015-11-06 13:45:58 UTC
Comment on attachment 43310 [details] [review]
Bug 14960 - Remove C4::Dates from files in misc/cronjobs

Reactivating...
Comment 11 Marc Véron 2015-11-06 14:15:54 UTC Comment hidden (obsolete)
Comment 12 Mark Tompsett 2015-11-06 19:01:05 UTC
Eyeballs well. Have yet to test it.
Comment 13 Zeno Tajoli 2015-11-07 15:56:25 UTC Comment hidden (obsolete)
Comment 14 Mirko Tietgen 2015-11-07 17:31:29 UTC
Zeno: you forgot to set the bug to "signed off"
Comment 15 Zeno Tajoli 2015-11-07 20:32:01 UTC
Sorry, I forgot to change the status
Comment 16 Joonas Kylmälä 2015-11-08 18:32:21 UTC
(In reply to M. Tompsett from comment #12)
> Eyeballs well. Have yet to test it.

I can say also that the code looks good. Haven't ran the scripts thoroughly,  though.
Comment 17 Jonathan Druart 2015-11-11 12:33:22 UTC Comment hidden (obsolete)
Comment 18 Jonathan Druart 2015-11-11 12:33:30 UTC Comment hidden (obsolete)
Comment 19 Kyle M Hall (khall) 2015-11-17 17:13:47 UTC
Created attachment 44927 [details] [review]
[PASSED QA] Bug 14960 - Remove C4::Dates from files in misc/cronjobs

This patch removes C4::Dates from following files:

- misc/cronjobs/batch_anonymise.pl
- misc/cronjobs/cleanup_database.pl
- misc/cronjobs/gather_print_notices.pl
- misc/cronjobs/serialsUpdate.pl
- misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl
- misc/cronjobs/overdue_notices.pl
- misc/cronjobs/staticfines.pl

To test:
- Carefully review code changes.
- Verify that the cronjobs behave as before.

Amended to make patch apply and follwoing comments on IRC by putti
http://irc.koha-community.org/koha/2015-11-06#i_1752803
(misc/cronjobs/gather_print_notices.pl is using still C4::Dates, line 84)
6.11.2015 /mv

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 20 Kyle M Hall (khall) 2015-11-17 17:13:54 UTC
Created attachment 44928 [details] [review]
[PASSED QA] Bug 14960: Simplify the date management in staticfines

There is no need to create a DT objcet, then display in string/iso
then recreate a DT object from this string.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 21 Tomás Cohen Arazi (tcohen) 2015-11-17 18:53:56 UTC
Patches pushed to master.

Thanks Marc and Jonathan!