LP1746360 Bib bucket 'Edition' display repair
authorBill Erickson <berickxx@gmail.com>
Mon, 4 Feb 2019 19:36:26 +0000 (14:36 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 22 Feb 2019 14:14:43 +0000 (09:14 -0500)
Parse the JSON string value when fetching the metabib.wide_display_entry
data used to render the new Edition value.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js

index aebfb25..6bbb09f 100644 (file)
@@ -533,6 +533,15 @@ function($scope,  $q , $routeParams,  bucketSvc,  egCore,  $window,
         setQuery : function(q) {
             if (q) query = q;
             return query;
+        },
+        itemRetrieved: function(item) {
+            // De-JSON-ify a wide display entry field.
+            // We don't use egBibDisplay.mwdeJSONToJS() since this
+            // is not a full "mwde" object.  Instead it's a single
+            // non-multi-field, JSON-encoded value.
+            var edition = item['biblio_record.wide_display_entry.edition'];
+            item['biblio_record.wide_display_entry.edition'] = 
+                edition ? JSON.parse(edition) : '';
         }
     };