Index: trunk/ippTools/share/chiptool_pendingimfile.sql
===================================================================
--- trunk/ippTools/share/chiptool_pendingimfile.sql	(revision 19181)
+++ trunk/ippTools/share/chiptool_pendingimfile.sql	(revision 19334)
@@ -20,19 +20,10 @@
     ON chipRun.label = chipMask.label
 WHERE
-    chipRun.state = 'new'
+    (chipRun.state = 'new'
     AND chipProcessedImfile.chip_id IS NULL
     AND chipProcessedImfile.exp_id IS NULL
     AND chipProcessedImfile.class_id IS NULL
-    AND chipMask.label IS NULL
-
--- new where logic for update.  we probably need to add a 'data_state'
--- field to chipProcessedImfile and update it (full, cleaned, etc) as
--- we cleanup or update
---    (chipRun.state = 'new'
---    AND chipProcessedImfile.chip_id IS NULL
---    AND chipProcessedImfile.exp_id IS NULL
---    AND chipProcessedImfile.class_id IS NULL
---    AND chipMask.label IS NULL) 
---    OR
---    (chipRun.state = 'update'
---    AND chipProcessedImfile.data_state = 'cleaned'
+    AND chipMask.label IS NULL)
+    OR
+    (chipRun.state = 'update'
+    AND chipProcessedImfile.data_state = 'cleaned')
