LP1919465 Pull list only shows holds with current_copy
authorBill Erickson <berickxx@gmail.com>
Wed, 22 Sep 2021 15:04:18 +0000 (11:04 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 24 Sep 2021 19:21:23 +0000 (15:21 -0400)
This avoids a scenario where copy-level holds would appear in the pull
list even if they are not pull-able, because they have "a copy" (i.e.
the requested copy), but no current copy (i.e. targeted copy).

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jennifer Weston <jennifer.weston@equinoxOLI.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts

index 4b7b776..70ad178 100644 (file)
@@ -249,6 +249,10 @@ export class HoldsGridComponent implements OnInit {
             filters.capture_time = null;
             filters.frozen = 'f';
 
+            // cp.* fields are set for copy-level holds even if they
+            // have no current_copy.  Make sure current_copy is set.
+            filters.current_copy = {'is not': null};
+
             // There are aliases for these (cp_status, cp_circ_lib),
             // but the API complains when I use them.
             filters['cp.status'] = [0, 7];