From: Bill Erickson Date: Thu, 28 Oct 2021 14:23:04 +0000 (-0400) Subject: LP1904036 Batch hold edit set bools false X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b9827f482aeef46abc65d2f47095d3c236ada2f7;p=Evergreen.git LP1904036 Batch hold edit set bools false Avoid sending null values on batch hold update for boolean fields. Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/holds/manage.component.ts b/Open-ILS/src/eg2/src/app/staff/share/holds/manage.component.ts index f21e64946d..4dd2d561d9 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holds/manage.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/holds/manage.component.ts @@ -66,6 +66,12 @@ export class HoldManageComponent implements OnInit { // Use a dummy hold to store form values. this.hold = this.idl.create('ahr'); + // Set all boolean fields to false on startup so they are + // not sent to the server as null when saving. + this.idl.classes.ahr.fields + .filter(f => f.datatype === 'bool') + .forEach(f => this.hold[f.name]('f')); + } else { // Form values are stored in the one hold we're editing. this.pcrud.retrieve('ahr', this.holdIds[0])