Bug 16344 - Add a circ rule to limit the auto renewals given a specific date
Summary: Add a circ rule to limit the auto renewals given a specific date
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 15581
Blocks: 16413 15582
  Show dependency treegraph
 
Reported: 2016-04-25 21:29 UTC by Jonathan Druart
Modified: 2017-05-24 15:30 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 16344: Add a circ rule to limit the auto renewals given a specific (16.58 KB, patch)
2016-04-25 21:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.69 KB, patch)
2016-04-25 21:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Fix alignment between top and bottom columns (1.13 KB, patch)
2016-04-26 15:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Add a circ rule to limit the auto renewals given a specific (16.28 KB, patch)
2016-07-15 13:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.69 KB, patch)
2016-07-15 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Fix alignment between top and bottom columns (1.13 KB, patch)
2016-07-15 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Add a circ rule to limit the auto renewals given a specific (16.22 KB, patch)
2016-10-18 08:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Fix alignment between top and bottom columns (1.08 KB, patch)
2016-10-18 08:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.71 KB, patch)
2016-10-18 08:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Add a circ rule to limit the auto renewals given a specific (16.22 KB, patch)
2016-10-24 12:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Fix alignment between top and bottom columns (1.08 KB, patch)
2016-10-24 12:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.71 KB, patch)
2016-10-24 12:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.85 KB, patch)
2016-10-30 18:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Add a circ rule to limit the auto renewals given a specific (16.16 KB, patch)
2016-11-24 10:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Fix alignment between top and bottom columns (1.08 KB, patch)
2016-11-24 10:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.71 KB, patch)
2016-11-24 10:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Add a circ rule to limit the auto renewals given a specific (16.23 KB, patch)
2017-03-14 16:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Fix alignment between top and bottom columns (1.08 KB, patch)
2017-03-14 16:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.71 KB, patch)
2017-03-14 16:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16344: Add a circ rule to limit the auto renewals given a specific (16.36 KB, patch)
2017-03-23 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 16344: Fix alignment between top and bottom columns (1.21 KB, patch)
2017-03-23 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.83 KB, patch)
2017-03-23 08:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 16344: Add a circ rule to limit the auto renewals given a specific (16.41 KB, patch)
2017-04-28 13:11 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16344: Fix alignment between top and bottom columns (1.26 KB, patch)
2017-04-28 13:11 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16344: [DO NOT PUSH] Schema changes (1.88 KB, patch)
2017-04-28 13:11 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16344: Fix test in GetHardDueDate.t (853 bytes, patch)
2017-05-24 15:28 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-04-25 21:29:47 UTC
A new column issuingrules.no_auto_renewal_after_hard_limit will allow to restrict the auto renewals based on a specific date.
The idea is to stop renewals at a given date. That way the library will have time to send overdues and get the books back before the students do on holiday.
Comment 1 Jonathan Druart 2016-04-25 21:50:26 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-04-25 21:50:30 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-04-26 15:59:05 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2016-07-15 13:04:58 UTC
Created attachment 53428 [details] [review]
Bug 16344: Add a circ rule to limit the auto renewals given a specific

This patch adds a new circulation rule (no_auto_renewal_after_hard_limit) to block/allow
auto renewals after a given date.
The idea is to stop renewals at a given date. That way the library will have
time to send overdues and get the books back before the students do on holiday.

Test plan:
0/ Execute the update DB entry
1/ Define a rule with no_auto_renewal_after_hard_limit set to tomorrow
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed
4/ Modify the no_auto_renewal_after_hard_limit and set it to yesterday
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed
Comment 5 Jonathan Druart 2016-07-15 13:05:01 UTC
Created attachment 53429 [details] [review]
Bug 16344: [DO NOT PUSH] Schema changes
Comment 6 Jonathan Druart 2016-07-15 13:05:05 UTC
Created attachment 53430 [details] [review]
Bug 16344: Fix alignment between top and bottom columns
Comment 7 Liz Rea 2016-07-18 03:13:19 UTC
Applying: Bug 16344: Add a circ rule to limit the auto renewals given a specific
fatal: sha1 information is lacking or useless (C4/Circulation.pm).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 16344: Add a circ rule to limit the auto renewals given a specific

:(
Comment 8 Jonathan Druart 2016-07-20 14:02:30 UTC
(In reply to Liz Rea from comment #7)
> Applying: Bug 16344: Add a circ rule to limit the auto renewals given a
> specific
> fatal: sha1 information is lacking or useless (C4/Circulation.pm).
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three-way merge.
> Patch failed at 0001 Bug 16344: Add a circ rule to limit the auto renewals
> given a specific
> 
> :(

It applies cleanly on top of bug 15581. Please try again.
Comment 9 Michael Kuhn 2016-10-16 14:28:10 UTC
First I successfully applied bug 15581:

vagrant@kohadevbox:kohaclone(003)$ git bz apply 15581
...
Applying: Bug 15581: Add a circ rule to limit the auto renewals given a delay
Applying: Bug 15581: Display the latest auto renew date possible when renewing manually
Applying: Bug 15581: Display the generic "schedule for auto renew" message on the checkouts table
Applying: Bug 15581: [DO NOT PUSH] Schema changes


Then I tried to apply bug 16344 but this failed with the same message as given by Liz Rea:


vagrant@kohadevbox:kohaclone(003)$ git bz apply 16344
...
Applying: Bug 16344: Add a circ rule to limit the auto renewals given a specific
fatal: sha1 information is lacking or useless (C4/Circulation.pm).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 16344: Add a circ rule to limit the auto renewals given a specific
...
Comment 10 Jonathan Druart 2016-10-18 08:47:14 UTC
Created attachment 56616 [details] [review]
Bug 16344: Add a circ rule to limit the auto renewals given a specific

This patch adds a new circulation rule (no_auto_renewal_after_hard_limit) to block/allow
auto renewals after a given date.
The idea is to stop renewals at a given date. That way the library will have
time to send overdues and get the books back before the students do on holiday.

Test plan:
0/ Execute the update DB entry
1/ Define a rule with no_auto_renewal_after_hard_limit set to tomorrow
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed
4/ Modify the no_auto_renewal_after_hard_limit and set it to yesterday
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed
Comment 11 Jonathan Druart 2016-10-18 08:47:19 UTC
Created attachment 56617 [details] [review]
Bug 16344: Fix alignment between top and bottom columns
Comment 12 Jonathan Druart 2016-10-18 08:47:23 UTC
Created attachment 56618 [details] [review]
Bug 16344: [DO NOT PUSH] Schema changes
Comment 13 Jonathan Druart 2016-10-18 08:48:18 UTC
Patches rebased.
Comment 14 Michael Kuhn 2016-10-19 21:10:20 UTC
According to the test plan I did the following.

I successfully applied patches 15581 and 16344.

0) I executed the update DB entry

vagrant@kohadevbox:kohaclone(003)$ sudo koha-shell kohadev
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ perl installer/data/mysql/updatedatabase.pl
DEV atomic update: bug_15581.sql
DEV atomic update: bug_16344.sql

1) In Koha menu "Administration > Circulation and fine rules" I defined a rule for all categories and all item types:
* Renewals allowed (count): 3
* No automatic renewal after (hard limit): 20/10/2016

Then I checked out the item with number 1 (otherwise it couldn't be updated with following statement).

2) I modified the table "issues" with issuedate two days before as followes:

UPDATE issues SET issuedate = "2016-10-17 22:48:00" WHERE itemnumber=1;

3) I executed the renewals cronjob script as follows:

vagrant@kohadevbox:kohaclone(003)$ sudo koha-shell kohadev
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ misc/cronjobs/automatic_renewals.pl

I cannot confirm that the issue has been renewed. Instead, nothing has changed.
Comment 15 Jonathan Druart 2016-10-24 12:16:22 UTC
Created attachment 56750 [details] [review]
Bug 16344: Add a circ rule to limit the auto renewals given a specific

This patch adds a new circulation rule (no_auto_renewal_after_hard_limit) to block/allow
auto renewals after a given date.
The idea is to stop renewals at a given date. That way the library will have
time to send overdues and get the books back before the students do on holiday.

Test plan:
0/ Execute the update DB entry
1/ Define a rule with no_auto_renewal_after_hard_limit set to tomorrow
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed
4/ Modify the no_auto_renewal_after_hard_limit and set it to yesterday
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed
Comment 16 Jonathan Druart 2016-10-24 12:16:53 UTC
Created attachment 56751 [details] [review]
Bug 16344: Fix alignment between top and bottom columns
Comment 17 Jonathan Druart 2016-10-24 12:16:59 UTC
Created attachment 56752 [details] [review]
Bug 16344: [DO NOT PUSH] Schema changes
Comment 18 Michael Kuhn 2016-10-25 22:50:29 UTC
According to the test plan I did the following.

I successfully applied patches 15581 and 16344.

0) I executed the update DB entry

vagrant@kohadevbox:kohaclone(002)$ sudo koha-shell kohadev
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ perl installer/data/mysql/updatedatabase.pl
DEV atomic update: bug_15581.sql
DEV atomic update: bug_16344.sql

1) In Koha menu "Administration > Circulation and fine rules" I defined a rule for all categories and all item types:
* Renewals allowed (count): 3
* No automatic renewal after (hard limit): 27/10/2016

Then I checked out the item with number 1 (otherwise it couldn't be updated with following statement).

2) I modified the table "issues" with issuedate two days before as followes:

UPDATE issues SET issuedate = "2016-10-24 14:48:00" WHERE itemnumber=1;

3) I executed the renewals cronjob script as follows:

vagrant@kohadevbox:kohaclone(002)$ sudo koha-shell kohadev
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ misc/cronjobs/automatic_renewals.pl

I still cannot confirm that the issue has been renewed. Instead, nothing has changed (the due date is still set to 25/10/2016).
Comment 19 Jonathan Druart 2016-10-26 08:02:15 UTC
(In reply to Michael Kuhn from comment #18)
> I still cannot confirm that the issue has been renewed. Instead, nothing has
> changed (the due date is still set to 25/10/2016).

Check your issuing rules:
  SELECT issuelength, lengthunit, renewalperiod FROM issuingrules;
Comment 20 Michael Kuhn 2016-10-26 09:08:55 UTC
mysql> SELECT issuelength, lengthunit, renewalperiod FROM issuingrules;
+-------------+------------+---------------+
| issuelength | lengthunit | renewalperiod |
+-------------+------------+---------------+
|        NULL | days       |             0 |
+-------------+------------+---------------+

These are the standard values in the kohadevbox. Should I set these to different values? Which are these?
Comment 21 Jonathan Druart 2016-10-26 09:45:44 UTC
(In reply to Michael Kuhn from comment #20)
> mysql> SELECT issuelength, lengthunit, renewalperiod FROM issuingrules;
> +-------------+------------+---------------+
> | issuelength | lengthunit | renewalperiod |
> +-------------+------------+---------------+
> |        NULL | days       |             0 |
> +-------------+------------+---------------+
> 
> These are the standard values in the kohadevbox. Should I set these to
> different values? Which are these?

Yes, the issuelength and renewalperiod should be defined and set to something > 0
Comment 22 Michael Kuhn 2016-10-26 11:57:32 UTC
According to the test plan I did the following.

I successfully applied patches 15581 and 16344.

0) I executed the update DB entry

vagrant@kohadevbox:kohaclone(002)$ sudo koha-shell kohadev
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ perl installer/data/mysql/updatedatabase.pl
DEV atomic update: bug_15581.sql
DEV atomic update: bug_16344.sql

1) In Koha menu "Administration > Circulation and fine rules" I defined a rule for all categories and all item types:
* Loan period: 3
* Unit: days
* Renewals allowed (count): 3
* Renewal period: 5
* No automatic renewal after (hard limit): 27/10/2016

Then I checked out the item with number 1 (otherwise it couldn't be updated with following statement). It gets the due date of 29/10/2016.

2) I modified the table "issues" with issuedate two days before as followes:

UPDATE issues SET issuedate = "2016-10-24 14:00:00" WHERE itemnumber=1;

3) I executed the renewals cronjob script as follows:

vagrant@kohadevbox:kohaclone(002)$ sudo koha-shell kohadev
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ misc/cronjobs/automatic_renewals.pl

Still I cannot confirm that the issue has been renewed. Instead, nothing has changed and the due date is still set to 29/10/2016.
Comment 23 Jonathan Druart 2016-10-26 12:28:11 UTC
(In reply to Michael Kuhn from comment #22)
> Still I cannot confirm that the issue has been renewed. Instead, nothing has
> changed and the due date is still set to 29/10/2016.

If the due date is in the future, why do you want the issue to be renewed automatically? :)
Comment 24 Michael Kuhn 2016-10-26 12:36:20 UTC
Well, the test plan didn't say it can not be in the future... However as I know from my library days it is usual that users lend a book and they renew it as soon as possible, so they can keep it longer. Usually this is possible.
Comment 25 Michael Kuhn 2016-10-26 12:59:07 UTC
OK, in the case I described the issue is usually not renewed automatically. I'll try again on 29/10/2016.
Comment 26 Michael Kuhn 2016-10-29 09:38:22 UTC
Today I executed the renewals cronjob script again as follows:

vagrant@kohadevbox:kohaclone(002)$ sudo koha-shell kohadev
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ misc/cronjobs/automatic_renewals.pl

Still I cannot confirm that the issue has been renewed. Instead, nothing has changed and the due date is still set to 29/10/2016.

I will now definitely stop testing this case because it takes me far too much time for no result at all. I hope someone with better knowledge can successfully sign this off.
Comment 27 Jonathan Druart 2016-10-30 18:43:42 UTC
Created attachment 56977 [details] [review]
Bug 16344: [DO NOT PUSH] Schema changes
Comment 28 Janet McGowan 2016-10-31 17:08:31 UTC
Hi, I've just signed this off using our Sandbox.
 
My testing plan as follows:

Test plan:

0) I executed the update DB entry
1) I defined a rule with no_auto_renewal_after_hard_limit set to tomorrow 01/11/2016
2) I modified issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "2016-10-29 23:59:00"
    WHERE itemnumber = '6';

For my test the due date = 2016-11-01 (ie. due tomorrow). With this example it is also necessary to set a No renewal before value - e.g. 1 day in the Circulation rule - to allow the item to be autorenewed 1 day before it is due.

3) I ran the misc/cronjobs/automatic_renewals.pl
I confirmed that the issue is renewed until 22/11/2016 (following 21 days in the Circulation rule)

4) I modified the no_auto_renewal_after_hard_limit and set it to yesterday 30/10/2016
 
5) I ran the misc/cronjobs/automatic_renewals.pl
This time the issue has not been renewed - in the staff client the Renew column displays: "Can no longer be auto-renewed - number of checkout days exceeded"
Comment 29 Jonathan Druart 2016-11-24 10:57:48 UTC
Created attachment 57735 [details] [review]
Bug 16344: Add a circ rule to limit the auto renewals given a specific

This patch adds a new circulation rule (no_auto_renewal_after_hard_limit) to block/allow
auto renewals after a given date.
The idea is to stop renewals at a given date. That way the library will have
time to send overdues and get the books back before the students do on holiday.

Test plan:
0/ Execute the update DB entry
1/ Define a rule with no_auto_renewal_after_hard_limit set to tomorrow
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed
4/ Modify the no_auto_renewal_after_hard_limit and set it to yesterday
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed
Comment 30 Jonathan Druart 2016-11-24 10:57:51 UTC
Created attachment 57736 [details] [review]
Bug 16344: Fix alignment between top and bottom columns
Comment 31 Jonathan Druart 2016-11-24 10:57:55 UTC
Created attachment 57737 [details] [review]
Bug 16344: [DO NOT PUSH] Schema changes
Comment 32 Jonathan Druart 2017-03-14 16:40:07 UTC
Created attachment 61074 [details] [review]
Bug 16344: Add a circ rule to limit the auto renewals given a specific

This patch adds a new circulation rule (no_auto_renewal_after_hard_limit) to block/allow
auto renewals after a given date.
The idea is to stop renewals at a given date. That way the library will have
time to send overdues and get the books back before the students do on holiday.

Test plan:
0/ Execute the update DB entry
1/ Define a rule with no_auto_renewal_after_hard_limit set to tomorrow
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed
4/ Modify the no_auto_renewal_after_hard_limit and set it to yesterday
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed
Comment 33 Jonathan Druart 2017-03-14 16:40:15 UTC
Created attachment 61075 [details] [review]
Bug 16344: Fix alignment between top and bottom columns
Comment 34 Jonathan Druart 2017-03-14 16:40:30 UTC
Created attachment 61076 [details] [review]
Bug 16344: [DO NOT PUSH] Schema changes
Comment 35 Martin Renvoize 2017-03-23 08:41:49 UTC
Created attachment 61511 [details] [review]
Bug 16344: Add a circ rule to limit the auto renewals given a specific

This patch adds a new circulation rule (no_auto_renewal_after_hard_limit) to block/allow
auto renewals after a given date.
The idea is to stop renewals at a given date. That way the library will have
time to send overdues and get the books back before the students do on holiday.

Test plan:
0/ Execute the update DB entry
1/ Define a rule with no_auto_renewal_after_hard_limit set to tomorrow
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed
4/ Modify the no_auto_renewal_after_hard_limit and set it to yesterday
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Comment 36 Martin Renvoize 2017-03-23 08:41:52 UTC
Created attachment 61512 [details] [review]
Bug 16344: Fix alignment between top and bottom columns

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Comment 37 Martin Renvoize 2017-03-23 08:41:56 UTC
Created attachment 61513 [details] [review]
Bug 16344: [DO NOT PUSH] Schema changes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Comment 38 Martin Renvoize 2017-03-23 08:50:45 UTC
Acting as git gopher for Jonathan Field and Janet McGowan again here, they did the actual testing and signoff.
Comment 39 Nick Clemens 2017-04-28 13:11:08 UTC
Created attachment 62820 [details] [review]
Bug 16344: Add a circ rule to limit the auto renewals given a specific

This patch adds a new circulation rule (no_auto_renewal_after_hard_limit) to block/allow
auto renewals after a given date.
The idea is to stop renewals at a given date. That way the library will have
time to send overdues and get the books back before the students do on holiday.

Test plan:
0/ Execute the update DB entry
1/ Define a rule with no_auto_renewal_after_hard_limit set to tomorrow
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed
4/ Modify the no_auto_renewal_after_hard_limit and set it to yesterday
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 40 Nick Clemens 2017-04-28 13:11:13 UTC
Created attachment 62821 [details] [review]
Bug 16344: Fix alignment between top and bottom columns

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 41 Nick Clemens 2017-04-28 13:11:16 UTC
Created attachment 62822 [details] [review]
Bug 16344: [DO NOT PUSH] Schema changes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 42 Kyle M Hall 2017-04-28 13:30:37 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 43 Katrin Fischer 2017-05-13 12:34:37 UTC
This won't get ported back to 16.11.x as it is an enhancement.
Comment 44 Jonathan Druart 2017-05-24 15:28:32 UTC
Created attachment 63707 [details] [review]
Bug 16344: Fix test in GetHardDueDate.t
Comment 45 Jonathan Druart 2017-05-24 15:30:37 UTC
(In reply to Jonathan Druart from comment #44)
> Created attachment 63707 [details] [review] [review]
> Bug 16344: Fix test in GetHardDueDate.t

Pushed to master