From: Bill Erickson Date: Wed, 13 Jul 2022 15:51:57 +0000 (-0400) Subject: LP1956986 Copy alerts consistently set ack_staff X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c65cb43b00c97a5ab56af61eebfc70808364c4f7;p=evergreen%2Fpines.git 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 --- 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;