From: Bill Erickson Date: Mon, 15 Jul 2019 14:34:56 +0000 (-0400) Subject: JBAS-2314 Patron expire date extension repair X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=128b0996911b521781b39f26b17b558f44ce2388;p=working%2FEvergreen.git JBAS-2314 Patron expire date extension repair Extend accounts whose last activity occurred after midnight the previous day. This fixes an issue where accounts whose latest activity is always yesterday (e.g. scko logins) were never updated. Signed-off-by: Bill Erickson --- diff --git a/KCLS/utility-scripts/patron_activity/patron_activity.sql b/KCLS/utility-scripts/patron_activity/patron_activity.sql index 28757abd4b..d54d816e3b 100644 --- a/KCLS/utility-scripts/patron_activity/patron_activity.sql +++ b/KCLS/utility-scripts/patron_activity/patron_activity.sql @@ -6,7 +6,8 @@ UPDATE actor.usr usr FROM permission.grp_tree grp where grp.id = usr.profile and usr.id IN ( SELECT DISTINCT(usr) FROM actor.usr_activity - WHERE event_time BETWEEN current_date - 2 AND current_date - 1 + -- Events that occurred after midnight yesterday. + WHERE event_time > current_date - 1 AND actor.usr_activity.usr IS NOT NULL ) AND NOT barred