From: Bill Erickson Date: Mon, 28 Dec 2020 23:36:01 +0000 (-0500) Subject: LP1888723 Call number modification repair X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9e0d50bfe9de8879cbc14266ff77522552cd3235;p=evergreen%2Ftadl.git LP1888723 Call number modification repair Fixes an issues where modifying the call number label without modifying any items would result in modifying the call number for all linked items instead of the items actually loaded in the volcopy editor. Also fixes a case where modifying call numbers failed to reflect correctly in the catalog holdings view. Signed-off-by: Bill Erickson Signed-off-by: Ruth Frasur Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts index 6d09b11d3a..d08c7ff5da 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts @@ -353,6 +353,12 @@ export class VolCopyComponent implements OnInit { return; } + // Be sure to include copies when the volume is changed + // without any changes to the copies. This ensures the + // API knows when we are modifying a subset of the total + // copies on a volume, e.g. when changing volume labels + if (newVol.ischanged()) { copy.ischanged(true); } + if (copy.ischanged() || copy.isnew() || copy.isdeleted()) { const copyClone = this.idl.clone(copy); // De-flesh call number 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 37103a3b3e..d0273a5c27 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 @@ -247,8 +247,14 @@ export class HoldingsMaintenanceComponent implements OnInit { this.broadcaster.listen('eg.holdings.update').subscribe(data => { if (data && data.records && data.records.includes(this.recordId)) { - this.refreshHoldings = true; - this.holdingsGrid.reload(); + this.hardRefresh(); + // A hard refresh is needed to accommodate cases where + // a new call number is created for a subset of copies. + // We may revisit this later and use soft refresh + // (below) vs. hard refresh (above) depending on what + // specifically is changed. + // this.refreshHoldings = true; + // this.holdingsGrid.reload(); } });