Bugzilla – Attachment 156901 Details for
Bug 15504
Track Patron's Last Activity
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15504: Remove update_lastseen method
Bug-15504-Remove-updatelastseen-method.patch (text/plain), 2.79 KB, created by
Martin Renvoize (ashimema)
on 2023-10-12 06:18:21 UTC
(
hide
)
Description:
Bug 15504: Remove update_lastseen method
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-10-12 06:18:21 UTC
Size:
2.79 KB
patch
obsolete
>From b5449503f0ce7081b457bced6fa52c393aecda23 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 14 Jun 2023 14:15:33 +0000 >Subject: [PATCH] Bug 15504: Remove update_lastseen method > >This patch removes update_lastseen which has been replaced by a call to track_login_daily > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/SIP/ILS/Patron.pm | 15 --------------- > t/db_dependent/SIP/Patron.t | 24 +----------------------- > 2 files changed, 1 insertion(+), 38 deletions(-) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 4b3e76f1a8c..b01f0727bef 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -501,21 +501,6 @@ sub charge_denied { > return "Please contact library staff"; > } > >-=head2 update_lastseen >- >- $patron->update_lastseen(); >- >- Patron method to update lastseen field in borrower >- to record that patron has been seen via sip connection >- >-=cut >- >-sub update_lastseen { >- my $self = shift; >- my $kohaobj = Koha::Patrons->find( $self->{borrowernumber} ); >- $kohaobj->track_login if $kohaobj; # track_login checks the pref >-} >- > sub _get_address { > my $patron = shift; > >diff --git a/t/db_dependent/SIP/Patron.t b/t/db_dependent/SIP/Patron.t >index d7e86eb4447..de1c784ea3c 100755 >--- a/t/db_dependent/SIP/Patron.t >+++ b/t/db_dependent/SIP/Patron.t >@@ -4,7 +4,7 @@ > # This needs to be extended! Your help is appreciated.. > > use Modern::Perl; >-use Test::More tests => 10; >+use Test::More tests => 9; > > use t::lib::Mocks; > use t::lib::TestBuilder; >@@ -188,28 +188,6 @@ subtest "Test build_custom_field_string" => sub { > > }; > >-subtest "update_lastseen tests" => sub { >- plan tests => 2; >- >- my $seen_patron = $builder->build( >- { >- source => 'Borrower', >- value => { >- lastseen => "2001-01-01", >- } >- } >- ); >- my $sip_patron = C4::SIP::ILS::Patron->new( $seen_patron->{cardnumber} ); >- t::lib::Mocks::mock_preference( 'TrackLastPatronActivity', '' ); >- $sip_patron->update_lastseen(); >- $seen_patron = Koha::Patrons->find({ cardnumber => $seen_patron->{cardnumber} }); >- is( output_pref({str => $seen_patron->lastseen(), dateonly => 1}), output_pref({str => '2001-01-01', dateonly => 1}),'Last seen not updated if not tracking patrons'); >- t::lib::Mocks::mock_preference( 'TrackLastPatronActivity', '1' ); >- $sip_patron->update_lastseen(); >- $seen_patron = Koha::Patrons->find({ cardnumber => $seen_patron->cardnumber() }); >- is( output_pref({str => $seen_patron->lastseen(), dateonly => 1}), output_pref({dt => dt_from_string(), dateonly => 1}),'Last seen updated to today if tracking patrons'); >-}; >- > subtest "fine_items tests" => sub { > > plan tests => 12; >-- >2.41.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 15504
:
152332
|
152333
|
152334
|
152335
|
152336
|
152500
|
152501
|
152502
|
152503
|
152504
|
152505
|
152506
|
155290
|
155291
|
155292
|
155293
|
155294
|
155295
|
155296
|
155534
|
155535
|
155536
|
155537
|
155538
|
155539
|
155540
|
156598
|
156599
|
156600
|
156601
|
156602
|
156603
|
156604
|
156605
|
156606
|
156607
|
156608
|
156742
|
156855
|
156856
|
156857
|
156858
|
156859
|
156860
|
156861
|
156862
|
156863
|
156864
|
156865
|
156866
|
156867
|
156868
|
156869
|
156870
|
156875
|
156879
|
156898
|
156899
|
156900
|
156901
|
156902
|
156903
|
156904
|
156905
|
156906
|
156907
|
156908
|
156909
|
156910
|
156911
|
156912
|
156913
|
156914
|
156915
|
156917
|
156918
|
156919
|
156920
|
156921
|
156922
|
156923
|
156924
|
156925
|
156926
|
156927
|
156928
|
156929
|
156930
|
156931
|
156932
|
156933
|
156934
|
156935
|
157602
|
157603
|
157604
|
157605
|
157606
|
157607
|
157608
|
157609
|
157610
|
157611
|
157612
|
157613
|
157614
|
157615
|
157616
|
157617
|
157618
|
157619
|
157620
|
157624