From c65cb43b00c97a5ab56af61eebfc70808364c4f7 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 13 Jul 2022 11:51:57 -0400 Subject: [PATCH] LP1956986 Copy alerts consistently set ack_staff Moves the logic of when to apply a value for ack_staff into the copy alerts dialog. Signed-off-by: Bill Erickson Signed-off-by: Elaine Hardy --- Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts | 4 +--- .../src/app/staff/share/holdings/copy-alerts-dialog.component.ts | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts index ecd0e868a3..35a08ed6c7 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts @@ -452,9 +452,7 @@ export class CopyAttrsComponent implements OnInit, AfterViewInit { existing.alert_type(alert.alert_type()); existing.temp(alert.temp()); existing.ack_time(alert.ack_time()); - if (alert.ack_time() === 'now') { - existing.ack_staff(this.auth.user().id()); - } + existing.ack_staff(alert.ack_staff()); copy.ischanged(true); } }); diff --git a/Open-ILS/src/eg2/src/app/staff/share/holdings/copy-alerts-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/share/holdings/copy-alerts-dialog.component.ts index 8ae114cce9..04eb9d52cc 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holdings/copy-alerts-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/holdings/copy-alerts-dialog.component.ts @@ -179,6 +179,13 @@ export class CopyAlertsDialogComponent const changedAlerts = this.copy ? this.copy.copy_alerts().filter(a => a.ischanged()) : []; + + changedAlerts.forEach(alrt => { + if (alrt.ack_time() === 'now') { + alrt.ack_staff(this.auth.user().id()); + } + }); + if (this.inPlaceCreateMode) { this.close({ newAlerts: this.newAlerts, changedAlerts: changedAlerts }); return; -- 2.11.0