From a3a39064f1686bd58b90e2c0af7995ed85468d3a Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Fri, 7 Jul 2017 10:24:35 -0400 Subject: [PATCH 1/1] LP1702911: Correct Barcode State in Add Item When adding an item from the MARC editor the barcode state was incorrect because the empty_barcode flag is set on the copy and then not changed after assigning a barcode. At that point the only way to alter the flag is modifying the barcode in the UI, which the user likely would not think to do. This causes the Save buttons to remain disabled. To test pre patch: Open a record in the MARC editor, check Add Item Add a call number label and barcode above, click Save In the vol/copy editor, try as you might, you can't save. :( To test post-patch: Open a record in the MARC editor, check Add Item Add a call number label and barcode above, click Save In the vol/copy editor, the Save buttons will already be enabled (barring required stat cats, etc.) Signed-off-by: Jason Boyer Signed-off-by: Josh Stompro Signed-off-by: Kathy Lussier --- Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index bbf44a20b4..fce1e7ab7d 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -1209,7 +1209,10 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , ((!$scope.only_vols) ? true : false) ); - if (proto.barcode) cp.barcode( proto.barcode ); + if (proto.barcode) { + cp.barcode( proto.barcode ); + cp.empty_barcode = false; + } itemSvc.addCopy(cp) }); @@ -1256,7 +1259,10 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , true ); - if (proto.barcode) cp.barcode( proto.barcode ); + if (proto.barcode) { + cp.barcode( proto.barcode ); + cp.empty_barcode = false; + } itemSvc.addCopy(cp) } -- 2.43.2