[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_4 updated. f3b226819c2d89213c01fd276e6fb7d33d591238

Evergreen Git git at git.evergreen-ils.org
Fri Feb 14 01:22:26 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_4 has been updated
       via  f3b226819c2d89213c01fd276e6fb7d33d591238 (commit)
      from  192a1f7b9c26e1ca038680200d51a7dc666d8a14 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f3b226819c2d89213c01fd276e6fb7d33d591238
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Feb 12 17:19:55 2014 -0500

    LP1046026 - Fix duplicate rows in holds pull list
    
    If there are multiple CAPTURE-blocking penalties we could see dupes on the
    pull list.  This avoids that.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    
    Fixed whitespace vs. tab changes between major versions.
    
    Conflicts:
    	Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
index 4d7b1ee..b1ac6eb 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
@@ -744,15 +744,20 @@ sub hold_pull_list {
 		  FROM	$h_table h
 		  	JOIN $a_table a ON (h.current_copy = a.id)
 		  	LEFT JOIN $ord_table ord ON (a.location = ord.location AND a.circ_lib = ord.org)
-			LEFT JOIN actor.usr_standing_penalty ausp 
-				ON ( h.usr = ausp.usr AND ( ausp.stop_date IS NULL OR ausp.stop_date > NOW() ) )
-			LEFT JOIN config.standing_penalty csp
-				ON ( csp.id = ausp.standing_penalty AND csp.block_list LIKE '%CAPTURE%' )
 		  WHERE	a.circ_lib = ?
 		  	AND h.capture_time IS NULL
 		  	AND h.cancel_time IS NULL
 		  	AND (h.expire_time IS NULL OR h.expire_time > NOW())
-			AND csp.id IS NULL
+			AND NOT EXISTS (
+				SELECT  1
+				FROM  actor.usr_standing_penalty ausp
+				JOIN config.standing_penalty csp ON (
+					csp.id = ausp.standing_penalty
+					AND csp.block_list LIKE '%CAPTURE%'
+					)
+				WHERE h.usr = ausp.usr
+				AND ( ausp.stop_date IS NULL OR ausp.stop_date > NOW() )
+			)
 			$status_filter
 		  ORDER BY CASE WHEN ord.position IS NOT NULL THEN ord.position ELSE 999 END, h.request_time
 		  LIMIT $limit
@@ -761,18 +766,23 @@ sub hold_pull_list {
 
     if ($count) {
         $select = <<"        SQL";
-            SELECT    count(*)
+            SELECT    count(DISTINCT h.id)
               FROM    $h_table h
                   JOIN $a_table a ON (h.current_copy = a.id)
-                  LEFT JOIN actor.usr_standing_penalty ausp 
-                    ON ( h.usr = ausp.usr AND ( ausp.stop_date IS NULL OR ausp.stop_date > NOW() ) )
-                  LEFT JOIN config.standing_penalty csp
-                    ON ( csp.id = ausp.standing_penalty AND csp.block_list LIKE '%CAPTURE%' )
               WHERE    a.circ_lib = ?
                   AND h.capture_time IS NULL
                   AND h.cancel_time IS NULL
                   AND (h.expire_time IS NULL OR h.expire_time > NOW())
-                  AND csp.id IS NULL
+                  AND NOT EXISTS (
+                    SELECT  1
+                      FROM  actor.usr_standing_penalty ausp
+                            JOIN config.standing_penalty csp ON (
+                                csp.id = ausp.standing_penalty
+                                AND csp.block_list LIKE '%CAPTURE%'
+                            )
+                      WHERE h.usr = ausp.usr
+                            AND ( ausp.stop_date IS NULL OR ausp.stop_date > NOW() )
+                )
                 $status_filter
         SQL
     }

-----------------------------------------------------------------------

Summary of changes:
 .../Application/Storage/Publisher/action.pm        |   32 +++++++++++++-------
 1 files changed, 21 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list