From 1018b09666aeef908a5c46e9a2561e84c2c04d2f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 26 Jul 2017 17:37:05 -0400 Subject: [PATCH] LP#1257910 Webstaff handles precats in scan missing pieces Avoid crashing in the Scan As Missing Pieces interface when a pre-cat copy is used by using the dummy title instead of a nonexistent simple record title. Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/staff/cat/item/missing_pieces.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/missing_pieces.js b/Open-ILS/web/js/ui/default/staff/cat/item/missing_pieces.js index 06fad21abd..d31e82dbeb 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/missing_pieces.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/missing_pieces.js @@ -47,11 +47,16 @@ function($scope , $q , $window , $location , egCore , egConfirmDialog , egAlertD function mark_missing_pieces(copy) { + var title = + copy.call_number().id() == -1 ? // precat copy + copy.dummy_title() : + copy.call_number().record().simple_record().title(); + egConfirmDialog.open( egCore.strings.CONFIRM_MARK_MISSING_TITLE, egCore.strings.CONFIRM_MARK_MISSING_BODY, { barcode : copy.barcode(), - title : copy.call_number().record().simple_record().title() + title : title }).result.then(function() { -- 2.11.0