[Bug 35001] New: Patron->is_active should respect TrackLastPatronActivityTriggers
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Bug ID: 35001 Summary: Patron->is_active should respect TrackLastPatronActivityTriggers Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Depends on: 15504 Bug 33245 beat bug 15504 into Koha.. unfortunately this leads to the new method contained a series of hard coded queries for what the author felt are 'activity'.. Bug 15504 puts this into the hands of the librarians by exposing a preference for listing various actions that should trigger the lastseen update. We should update the is_active method to reduce the hard coded database calls used and utilise the activity stored in lastseen as defined by the Triggers preference. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15504 [Bug 15504] Track Patron's Last Activity -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |m.de.rooy@rijksmuseum.nl, | |matt.blenkinsop@ptfs-europe | |.com, tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_23_11_candidate -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|15504 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15504 [Bug 15504] Track Patron's Last Activity -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15504 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15504 [Bug 15504] Track Patron's Last Activity -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Martin Renvoize from comment #0)
Bug 33245 beat bug 15504 into Koha.. unfortunately this leads to the new method contained a series of hard coded queries for what the author felt are 'activity'.. Bug 15504 puts this into the hands of the librarians by exposing a preference for listing various actions that should trigger the lastseen update.
We should update the is_active method to reduce the hard coded database calls used and utilise the activity stored in lastseen as defined by the Triggers preference.
'for what the author felt' Does not sound very good? But okay. The 'author' asked for feedback on report 28688 which is still in the pipeline but was the starting point actually. Alas he got no feedback at all. Waited quite a bit too. So yes, I made a choice. Will have a look at the other report soon. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35027, 35030 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35027 [Bug 35027] Add holds to patron activity triggers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35030 [Bug 35030] Extend TrackLastPatronActivity with placing article request -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |martin.renvoize@ptfs-europe | |.com Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I would like to adjust this myself. But lets add hold and artreq first. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|15504 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15504 [Bug 15504] Track Patron's Last Activity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 156971 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156971&action=edit Bug 35001: Take patron activity triggers into account in ->is_active Still in concept. Test plan: TODO -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Martin: Just a first draft. My idea is that we need a query as long as this action is not in a trigger. If it is a trigger, lastseen should already give you the answer. The more triggers one has, the less extra queries are needed. Although a library may not add e.g. hold to a trigger (for some reason or even no reason), I strongly believe that we should check if (in that case) holds prove activity. Because the decision to send or not send an expiry notice may depend on it, or even expire or autorenew a patron. Same for the other queries. What could be a problem too, is the transition period between activating a trigger and the number of months used in membership expiry cron (say 6 months). If you activated the trigger yesterday, we are no longer looking back in holds etc. But lastseen has not been updated for holds in the last 6 months. This may be a bit fictional since many holds were placed after login. But could be an issue. Appreciate some feedback before continuing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This looks reasonable to me.. I must admit I'm still a little confused as to need for a hard coded 'what is activity' at all. The point of adding the triggers was to put it in the administrator's gift to define what is constituted as activity? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Since lastseen is updated already for logins and issues, I might wanna give up on the holds and issues queries. But what about article requests? We have users that may place article requests but have no holds or issues. The fast majority will have logged in. So we are talking about a very small number of patrons that let staff add article requests. Okay. I surrender. I will pick another battle :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron->is_active should |Simplify patron->is_active |respect |in light of |TrackLastPatronActivityTrig |TrackLastPatronActivityTrig |gers |gers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 157016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157016&action=edit Bug 35001: Simplify ->is_active in light of activity triggers The fact that we update lastseen for various triggers now, makes it a bit easier to let go of those 'hardcoded queries' ;) Test plan: Run t/db_dependent/Koha/Patron.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156971|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28688 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Hmm. A thought keeps lingering about installs that disable the triggers completely. I would not recommend that, but how do we warn them that running e.g. membership_expiry with --active may impact them in some unexpected and undesired way? Still not sure there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Maybe add a check on the pref in membership_expiry ? I will add a follow-up for that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Back to Assigned -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157016|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 157034 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157034&action=edit Bug 35001: Simplify ->is_active in light of activity triggers The fact that we update lastseen for various triggers now, makes it a bit easier to let go of those 'hardcoded queries' ;) Test plan: Run t/db_dependent/Koha/Patron.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 157035 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157035&action=edit Bug 35001: (folllow-up) Tiny addition to cronjob help This patch adds a tiny addendum to the -active documentation returned by the membership_expiry cronjob to clarify what constitutes as an active patron and hint at the new TrackLastPatronActivityTriggers system preference. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Oop, sorry Marcel.. I added my SO line before checking back on the bug. Happy to re-add it if you want to push over the top of my attachment. I'll take a look again once you're done. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 157036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157036&action=edit Bug 35001: Add some checks to membership_expiry Test plan: Toggle pref TrackLastPatronActivityTriggers (clear it). And try variations of --active, --inactive to see the warnings. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157035|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157036|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 157037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157037&action=edit Bug 35001: Add some checks to membership_expiry Test plan: Toggle pref TrackLastPatronActivityTriggers (clear it). And try variations of --active, --inactive to see the warnings. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good followup, better than the wording change I had done. QA scripts are happy and the function all works perfectly. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Please rebase ASAP. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157034|0 |1 is obsolete| | --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 157743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157743&action=edit Bug 35001: Simplify ->is_active in light of activity triggers The fact that we update lastseen for various triggers now, makes it a bit easier to let go of those 'hardcoded queries' ;) Test plan: Run t/db_dependent/Koha/Patron.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157037|0 |1 is obsolete| | --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 157744 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157744&action=edit Bug 35001: Add some checks to membership_expiry Test plan: Toggle pref TrackLastPatronActivityTriggers (clear it). And try variations of --active, --inactive to see the warnings. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Bug 35001 depends on bug 35027, which changed state. Bug 35027 Summary: Add holds to patron activity triggers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35027 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Bug 35001 depends on bug 35030, which changed state. Bug 35030 Summary: Extend TrackLastPatronActivity with placing article request https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35030 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #21 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 35027 not in 23.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Bug 35001 depends on bug 35027, which changed state. Bug 35027 Summary: Add holds to patron activity triggers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35027 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |Needs documenting Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Bug 35001 depends on bug 35030, which changed state. Bug 35030 Summary: Extend TrackLastPatronActivity with placing article request https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35030 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |Needs documenting Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Bug 35001 depends on bug 35027, which changed state. Bug 35027 Summary: Add holds to patron activity triggers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35027 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35001 Bug 35001 depends on bug 35030, which changed state. Bug 35030 Summary: Extend TrackLastPatronActivity with placing article request https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35030 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org