Bugzilla – Attachment 67953 Details for
Bug 18625
Update borrower last seen from SIP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18625: Update lastseen in patron info request
Bug-18625-Update-lastseen-in-patron-info-request.patch (text/plain), 1.71 KB, created by
Marcel de Rooy
on 2017-10-11 12:50:29 UTC
(
hide
)
Description:
Bug 18625: Update lastseen in patron info request
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-10-11 12:50:29 UTC
Size:
1.71 KB
patch
obsolete
>From 3dbb8e1f21af64e05a4a2ba9c0413ebfa35cead2 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 18 May 2017 15:59:49 +0100 >Subject: [PATCH] Bug 18625: Update lastseen in patron info request >Content-Type: text/plain; charset=utf-8 > >Many services use SIP patron req info to validate a patron against >the koha database. If recording lastseen sites will >also want to record that the user has accessed these >library facilities although they have not logged into koha > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Verified that Patron Info request (63) updates lastseen when the pref has >been enabled. >--- > C4/SIP/ILS/Patron.pm | 10 ++++++++++ > C4/SIP/Sip/MsgType.pm | 1 + > 2 files changed, 11 insertions(+) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 6cd3300..4f66049 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -433,6 +433,16 @@ sub charge_denied { > return "Please contact library staff"; > } > >+sub update_lastseen { >+ my $self = shift; >+ my $p; >+ if (C4::Context->preference('TrackLastPatronActivity') >+ && $p = Koha::Patrons->find({ borrowernumber => $self->{borrowernumber} })) { >+ $p->track_login; >+ } >+ return; >+} >+ > sub _get_address { > my $patron = shift; > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index dded51e..3de4323 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -932,6 +932,7 @@ sub handle_patron_info { > > $resp = (PATRON_INFO_RESP); > if ($patron) { >+ $patron->update_lastseen(); > $resp .= patron_status_string($patron); > $resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language; > $resp .= timestamp(); >-- >2.1.4
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 18625
:
63533
|
67953
|
67954
|
68650
|
68651
|
68652
|
72557
|
72558
|
73920
|
73921
|
73922