LP1888723 Call number modification repair
authorBill Erickson <berickxx@gmail.com>
Mon, 28 Dec 2020 23:36:01 +0000 (18:36 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Sun, 15 Aug 2021 23:55:56 +0000 (19:55 -0400)
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 <berickxx@gmail.com>
Signed-off-by: Ruth Frasur <rfrasur@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts

index 6d09b11..d08c7ff 100644 (file)
@@ -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
index 37103a3..d0273a5 100644 (file)
@@ -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();
             }
         });