From 5fb705b99d37357a70b4bacd495713ebf8e3c000 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 13 Jul 2022 11:56:13 -0400 Subject: [PATCH] LP1956986 Holdings View display correct copy alerts count Avoid counting ACK'ed copies as active copy alerts in the catalog Holdings View, copy alert column. Signed-off-by: Bill Erickson Signed-off-by: Elaine Hardy --- Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts index 0c31d592b4..d946bb45ef 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts @@ -704,6 +704,11 @@ export class HoldingsMaintenanceComponent implements OnInit { copy.parts().map(p => p.label()).join(','); } + // Ignore alerts that have already been ACK'ed + // Over a long enough time, this list could grow large, so + // consider fetching non-ack'ed copy alerts separately. + copy.copy_alerts(copy.copy_alerts().filter(a => !a.ack_time())); + if (stat === 1 /* checked out */ || stat === 16 /* long overdue */) { // Avoid looking up circs on items that are not checked out. this.itemCircsNeeded.push(copy); -- 2.11.0