Signed-off-by: John Yorio <jyorio@equinoxinitiative.org>
Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
(ath.core_type = 'circ' AND targ_circ.id = atev.target)
LEFT JOIN action.hold_request targ_ahr ON
(ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
- WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
+ WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
'circ.staff.max_visible_event_age',
COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)