Bugzilla – Attachment 50615 Details for
Bug 16276
When automatically deleting expired borrowers, make sure they didn't log in recently
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen
Bug-16276-Add-a-new-pref-TrackLastPatronActivity-a.patch (text/plain), 4.81 KB, created by
Jonathan Druart
on 2016-04-25 09:10:14 UTC
(
hide
)
Description:
Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-04-25 09:10:14 UTC
Size:
4.81 KB
patch
obsolete
>From ecdec8f23dcee92706a2d6152834a3d0ce834fb7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 24 Apr 2016 16:03:49 +0100 >Subject: [PATCH] Bug 16276: Add a new pref TrackLastPatronActivity and new > column borrowers.lastseen > >Sponsored-by: BULAC - http://www.bulac.fr/ >--- > installer/data/mysql/atomicupdate/bug_16276.sql | 3 +++ > installer/data/mysql/kohastructure.sql | 2 ++ > installer/data/mysql/sysprefs.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 7 +++++++ > 4 files changed, 13 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_16276.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_16276.sql b/installer/data/mysql/atomicupdate/bug_16276.sql >new file mode 100644 >index 0000000..121bfdb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_16276.sql >@@ -0,0 +1,3 @@ >+ALTER IGNORE TABLE borrowers ADD COLUMN lastseen datetime default NULL; >+ALTER IGNORE TABLE deletedborrowers ADD COLUMN lastseen datetime default NULL; >+INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('TrackLastPatronActivity', '0', 'If set, the field borrowers.lastseen will be updated everytime a patron is seen', NULL, 'YesNo'); >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 242755d..67bd790 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -266,6 +266,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons > `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber > `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history > `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts >+ `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface) > UNIQUE KEY `cardnumber` (`cardnumber`), > PRIMARY KEY `borrowernumber` (`borrowernumber`), > KEY `categorycode` (`categorycode`), >@@ -916,6 +917,7 @@ CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower > `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber > `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history KEY `borrowernumber` (`borrowernumber`), > `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts >+ `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface) > KEY borrowernumber (borrowernumber), > KEY `cardnumber` (`cardnumber`), > KEY `sms_provider_id` (`sms_provider_id`) >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index f221919..d995734 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -492,6 +492,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('TraceCompleteSubfields','0','0','Force subject tracings to only match complete subfields.','YesNo'), > ('TraceSubjectSubdivisions','0','1','Create searches on all subdivisions for subject tracings.','YesNo'), > ('TrackClicks','0',NULL,'Track links clicked','Integer'), >+('TrackLastPatronActivity','0',NULL,'If set, the field borrowers.lastseen will be updated everytime a patron is seen','YesNo'), > ('TransfersMaxDaysWarning','3',NULL,'Define the days before a transfer is suspected of having a problem','Integer'), > ('TransferWhenCancelAllWaitingHolds','0',NULL,'Transfer items when cancelling all waiting holds','YesNo'), > ('UNIMARCAuthorityField100','afrey50 ba0',NULL,'Define the contents of UNIMARC authority control field 100 position 08-35','Textarea'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 22c2b27..6eed69c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -159,6 +159,13 @@ Patrons: > yes: Do > no: "Don't" > - charge a fee when a patron changes to a category with an enrollment fee. >+ - >+ - pref: TrackLastPatronActivity >+ choices: >+ yes: Do >+ no: "Don't" >+ - track last patron activity. >+ - Everytime a patron will connect, the borrowers.lastseen will be updated with the current time. > "Norwegian patron database": > - > - pref: NorwegianPatronDBEnable >-- >2.7.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16276
:
50615
|
50616
|
50617
|
50618
|
50619
|
50620
|
51191
|
51407
|
51408
|
51409
|
51410
|
51411
|
51412
|
54588
|
54589
|
54590
|
54591
|
54592
|
54612
|
54613
|
54614
|
54615
|
54616
|
54617
|
54618
|
54619
|
54620
|
54621
|
54622
|
54623
|
54624
|
54625
|
55495
|
55496
|
55497
|
55498
|
55499
|
55500
|
55501