From: Galen Charlton Date: Wed, 31 May 2017 17:10:28 +0000 (-0400) Subject: webstaff: use sub start date as default first pub date for new sub X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a66045ebd76a604bafa53f804f1eb9dcd48bf972;p=working%2FEvergreen.git webstaff: use sub start date as default first pub date for new sub Signed-off-by: Galen Charlton --- 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 = {};