[koha-commits] main Koha release repository branch 3.18.x updated. v3.18.05.1-27-gb10ef90
Git repo owner
gitmaster at git.koha-community.org
Tue Mar 31 07:39:43 CEST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, 3.18.x has been updated
via b10ef9005d1e9edef70cb6b2559e3c5ea4816418 (commit)
via 46d8457f048c767b55fefa576e00cb60a07d8f65 (commit)
via 891d9214081ab1a60d82584ea1a948c40cad9a63 (commit)
from 6a24376001404b5a36592ddcb261d8c6fa630c99 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b10ef9005d1e9edef70cb6b2559e3c5ea4816418
Author: Jonathan Druart <jonathan.druart at biblibre.com>
Date: Tue Jan 6 14:27:17 2015 +0100
Bug 11120: the date input should be in a iso format (YYYY-MM-DD)
Note that it cans also accept a date in the same format defined in the
dateformat system preference.
Signed-off-by: Brendan Gallagher <brendan at bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen at gmail.com>
(cherry picked from commit 39bb5fd43f5947f3a6ad1630eb8987d9522955cf)
Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
commit 46d8457f048c767b55fefa576e00cb60a07d8f65
Author: Katrin Fischer <Katrin.Fischer.83 at web.de>
Date: Mon Jan 5 23:05:27 2015 +0100
Bug 11120: Follow-up: adding a hint about the date format
Adding 2 hints about the expected date format to the error
message and the help.
To test:
- Run overdue_notices.pl --date <someinvaliddate>
- Run overdue_notices.pl -man
- Verify hint about date format shows up
Signed-off-by: Brendan Gallagher <brendan at bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen at gmail.com>
(cherry picked from commit e6d987180fc30b4f5e89fa72f410b83185855f7b)
Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
commit 891d9214081ab1a60d82584ea1a948c40cad9a63
Author: Jonathan Druart <jonathan.druart at biblibre.com>
Date: Wed Oct 23 10:13:50 2013 +0200
Bug 11120: FIX the --date option for overdue_notices cronjob
Bug 7447 introduces the --date option for overdue notices.
This option has never worked: the code is waiting for a value but the
option is defined as a boolean.
This patch fixes the option and change the way to calculate the range of
dates.
This range is now managed in Perl instead of in the SQL query. To do it
in Perl allows to build dates simply using the DateTime and
DateTime::Duration modules.
To test this patch you should have a DB with a lot of overdues, (I
tested on a DB with 512 overdues).
A test plan could be:
1/ Dump your message_queue table
2/ Verify the number of overdues in the database before applying the
patch:
mysql> DELETE FROM message_queue;
perl misc/cronjobs/overdue_notices.pl -v -t
(the triggered option will generate overdue for today)
mysql> SELECT COUNT(*) FROM message_queue;
Note this value 2A
mysql> DELETE FROM message_queue;
perl misc/cronjobs/overdue_notices.pl -v
mysql> SELECT COUNT(*) FROM message_queue;
Note this value 2B
2/ Apply the patch
4/ Verify the number of overdues generated by the patched script:
mysql> DELETE FROM message_queue;
perl misc/cronjobs/overdue_notices.pl -v -t
mysql> SELECT COUNT(*) FROM message_queue;
Note this value 4A
mysql> DELETE FROM message_queue;
perl misc/cronjobs/overdue_notices.pl -v
mysql> SELECT COUNT(*) FROM message_queue;
Note this value 4B
mysql> DELETE FROM message_queue;
# The date should be defined depending your dateformat preference
# and should be the date of the current day
perl misc/cronjobs/overdue_notices.pl -v -t --date="YYYY-MM-DD"
mysql> SELECT COUNT(*) FROM message_queue;
Note this value 4C
mysql> DELETE FROM message_queue;
# The date should be defined depending your dateformat preference
# and should be the date of the current day
perl misc/cronjobs/overdue_notices.pl -v --date="YYYY-MM-DD"
mysql> SELECT COUNT(*) FROM message_queue;
Note this value 4D
5/ Compare the values: All values generated with the -t options should
be equals. Same for values without the -t options.
=> 2A == 4A == 4C and 2B == 4B == 4D
6/ Go back to a normal activity for 3 days or manually change the
date_due for issues in the DB:
mysql> update issues SET date_due = DATE_SUB(date_due, INTERVAL 3 DAY);
Do again step 4C and 4D with a date equals to today - 3 days.
Values should be the same as 4C and 4D.
Signed-off-by: Jonathan Druart <jonathan.druart at biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Tested with my own test data, checked generating overdues
with and without the --date option.
All worked as expected.
Signed-off-by: Brendan Gallagher <brendan at bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen at gmail.com>
(cherry picked from commit 0f4a831344b45795eae1de082f9110de501f5233)
Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
-----------------------------------------------------------------------
Summary of changes:
misc/cronjobs/overdue_notices.pl | 36 +++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)
hooks/post-receive
--
main Koha release repository
More information about the koha-commits
mailing list