Bugzilla – Attachment 156955 Details for
Bug 35030
Extend TrackLastPatronActivity with placing article request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35030: Add 'article' to patron activity triggers
Bug-35030-Add-article-to-patron-activity-triggers.patch (text/plain), 2.09 KB, created by
Martin Renvoize (ashimema)
on 2023-10-12 11:58:30 UTC
(
hide
)
Description:
Bug 35030: Add 'article' to patron activity triggers
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-10-12 11:58:30 UTC
Size:
2.09 KB
patch
obsolete
>From 927de93ba23f0d3611ffd665129fd4851a5e3a6b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 12 Oct 2023 12:53:34 +0100 >Subject: [PATCH] Bug 35030: Add 'article' to patron activity triggers > >This patch adds 'article' to the list of triggers available for >tracking patron activity. > >Test plan >1) Select 'Placing an article request > TrackPatronLastActivityTriggers system preference >2) As a staff member, place a hold on any item for a test user >3) Confirm that the borrowers.lastseen field is updated for that > test borrower >--- > Koha/ArticleRequest.pm | 14 ++++++++++++++ > .../prog/en/modules/admin/preferences/patrons.pref | 1 + > 2 files changed, 15 insertions(+) > >diff --git a/Koha/ArticleRequest.pm b/Koha/ArticleRequest.pm >index 42d2d011f1d..1bfbda34847 100644 >--- a/Koha/ArticleRequest.pm >+++ b/Koha/ArticleRequest.pm >@@ -64,6 +64,7 @@ sub request { > if $debit; > > $self->store(); >+ $self->patron->update_lastseen('article'); > $self->notify(); > return $self; > } >@@ -226,6 +227,19 @@ sub borrower { > return Koha::Patron->_new_from_dbic($rs); > } > >+=head3 patron >+ >+Returns the Koha::Patron object for this article request >+ >+=cut >+ >+sub patron { >+ my ($self) = @_; >+ my $rs = $self->_result->borrowernumber; >+ return unless $rs; >+ return Koha::Patron->_new_from_dbic($rs); >+} >+ > =head3 branch > > Returns the Koha::Library object for this article request >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 9e80c862652..32d37aa5451 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 >@@ -101,6 +101,7 @@ Patrons: > check_out: "Checking out an item" > renewal: "Renewing an item" > check_in: "Returning an item" >+ article: "Places an article request" > - > - pref: AutoApprovePatronProfileSettings > choices: >-- >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 35030
:
156955
|
156961
|
156964