From ce45d4cf4466af277b3a681fb0964c430288694b Mon Sep 17 00:00:00 2001
From: Thomas Berezansky <tsbere@mvlc.org>
Date: Fri, 18 Apr 2014 09:46:13 -0400
Subject: [PATCH] LP#1277551: Limit simplified pull list to available copies

Copies that are targeted by a hold but are not in available or reshelving
statuses should not show up on a pull list.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
---
 Open-ILS/examples/fm_IDL.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 2f9fc7f51d..63987ef8ad 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -5423,7 +5423,8 @@ SELECT  usr,
 			ahr.capture_time IS NULL AND
 			ahr.cancel_time IS NULL AND
 			csp.id IS NULL AND
-			(ahr.expire_time is NULL OR ahr.expire_time > NOW())
+			(ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
+			acp.status IN (0,7)
 		]]></oils_persist:source_definition>
 		<fields oils_persist:primary="id">
 			<field reporter:label="Status" name="status" oils_persist:virtual="true" />
-- 
2.11.0