Bug 9032: (follow-up) restore documented intepretation of virtualshelfshares.sharedate
authorGalen Charlton <gmc@esilibrary.com>
Sun, 20 Apr 2014 22:46:39 +0000 (22:46 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 20 Apr 2014 22:52:21 +0000 (22:52 +0000)
commit9708138a86dd66e876bf3ff6e24dfdf1ae3d51d9
treebe4e0d101b153b457c83e479fc3d53b15588e161
parentb33879026d8f1eda851bc1ad127d81c3dfaf9af2
Bug 9032: (follow-up) restore documented intepretation of virtualshelfshares.sharedate

The sharedate column is documented as having the following meaning:

"date of invitation or acceptance of invitation"

This patch adjust the new list-sharing code to stick with that
interpretation, as otherwise the column should have been renamed
to 'invite_expiration_date' or the like.

It also removes the "housekeeping" functionality from AddShare, as
otherwise the routine should have been named AddShareAndDoOtherStuff.

To prevent list shares from piling up, a new --list-invites flag
has been added to cleanup_database.pl.  The default crontabs have
been modified to use the --list-invites flag by default.

To test
-------
[1] Make some list share invites and accept some, but now all of them.
[2] Wait 14 days (or more reasonably, manually edit the sharedate
    values for the unaccepted shares to put them at least 14 days in the
    past.).
[3] Run cleanup_database.pl --list-invites
[4] Verify that accepted shares remain, as to share invites that have
    not yet reached more than 14 days of age.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/VirtualShelves.pm
debian/koha-common.cron.daily
misc/cronjobs/cleanup_database.pl
misc/cronjobs/crontab.example
t/db_dependent/VirtualShelves.t