From: Bill Erickson Date: Wed, 30 Sep 2015 14:22:38 +0000 (-0700) Subject: JBAS-886 skip ecards/classrooms expire extension X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=665968da18a6c04f8a713080c0d38ef4f12bc609;p=working%2FEvergreen.git JBAS-886 skip ecards/classrooms expire extension Avoid extending the expire date for Student Ecards and Classroom Databases accounts. Minor reformatting for readability. 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 f301c46fe9..f906937ee4 100644 --- a/KCLS/utility-scripts/patron_activity/patron_activity.sql +++ b/KCLS/utility-scripts/patron_activity/patron_activity.sql @@ -2,14 +2,15 @@ BEGIN; SET SESSION STATEMENT_TIMEOUT TO 0; UPDATE actor.usr usr -SET expire_date = now() + grp.perm_interval::interval -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 -AND actor.usr_activity.usr IS NOT NULL -) AND NOT barred -AND NOT deleted -AND profile NOT IN (31, 91, 17, 26, 23, 32, 90, 92, 93); + SET expire_date = now() + grp.perm_interval::interval + 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 + AND actor.usr_activity.usr IS NOT NULL + ) + AND NOT barred + AND NOT deleted + AND profile NOT IN (31, 91, 17, 26, 23, 32, 90, 92, 93, 901, 902); COMMIT;