Fixing LP 1203796.
authorChris Sharp <csharp@georgialibraries.org>
Mon, 22 Jul 2013 16:35:46 +0000 (12:35 -0400)
committerBen Shum <bshum@biblio.org>
Mon, 26 Aug 2013 16:21:13 +0000 (12:21 -0400)
The alternate view in the Item Status screen shows a "Total Circs"
field that was under-counting circulations because UNION filtered
out duplicates.  This commit replaces UNION with UNION ALL, which
allows duplicate rows.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/examples/fm_IDL.xml

index f4c2440..6107b95 100644 (file)
@@ -10444,7 +10444,7 @@ SELECT  usr,
                        asset.copy cp
                                JOIN action.circulation circ ON (cp.id = circ.target_copy)
                GROUP BY 1, 3, 4
-               UNION
+               UNION ALL
                SELECT
                        cp.id as copy,
                        COUNT(circ.id),
@@ -10454,7 +10454,7 @@ SELECT  usr,
                        asset.copy cp
                                JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
                GROUP BY 1, 3, 4
-               UNION
+               UNION ALL
                SELECT
                        id as copy,
                        circ_count,