From 2c39e81b0599287f7b3aaded8ee644d41c81193c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 29 Aug 2017 16:11:13 -0400 Subject: [PATCH] LP#1708291: tweak to subscription selector When entering the Manage Predictions or Manage Issues tab and only one subscription is present in the current OU scope, automatically select it rather than making the operator have to select it manually. Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js b/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js index 7556046419..2918e784e5 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js @@ -24,6 +24,9 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , function reload() { egSerialsCoreSvc.fetch($scope.bibId, $scope.selected_owning_ou).then(function() { $scope.subscriptions = egCore.idl.toTypedHash(egSerialsCoreSvc.subTree); + if ($scope.subscriptions.length == 1 && !$scope.ssubId) { + $scope.ssubId = $scope.subscriptions[0].id; + } }); } }] -- 2.11.0