From a66045ebd76a604bafa53f804f1eb9dcd48bf972 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 31 May 2017 13:10:28 -0400 Subject: [PATCH] webstaff: use sub start date as default first pub date for new sub Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/serials/services/core.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/serials/services/core.js b/Open-ILS/web/js/ui/default/staff/serials/services/core.js index 615a4596f4..24bc4bb3b6 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/services/core.js +++ b/Open-ILS/web/js/ui/default/staff/serials/services/core.js @@ -331,6 +331,10 @@ function(egCore , orderByFilter , $q , $filter , $uibModal , ngToast , egConfirm } date = new Date(curr_iss.date_published()); + } else { + // starting from scratch, so default the + // first publication date to the subscription start date + if (!date) date = new Date(sub.start_date()); } args.date = date; @@ -436,7 +440,7 @@ function(egCore , orderByFilter , $q , $filter , $uibModal , ngToast , egConfirm $scope.count = options.count; $scope.label = options.label; $scope.save_label = options.save_label; - $scope.pubdate = options.date || new Date(); + $scope.pubdate = options.date; $scope.type = options.type || 'basic'; $scope.args = {}; -- 2.11.0