diff --git a/www/extras/wobject/ProjectManager/projectDisplay.js b/www/extras/wobject/ProjectManager/projectDisplay.js index 0017cf532..306daf966 100644 --- a/www/extras/wobject/ProjectManager/projectDisplay.js +++ b/www/extras/wobject/ProjectManager/projectDisplay.js @@ -172,26 +172,32 @@ function getTotalDuration(te) { parseFloatOrNA(te.lagTime.value)); } +//-------------------------------------------------------------------------------------- function maybeDefaultTaskValues(te) { var todayString = intlDate(new Date()); - var tomorrowString = intlDate(datePlusDays(new Date(), 1)); + //var tomorrowString = intlDate(datePlusDays(new Date(), 1)); var timed = isTimed(te); - if (te.duration.value == "") te.duration.value = timed? durationOfFracDays(1) : 0; + //if (te.duration.value == "") te.duration.value = timed? durationOfFracDays(1) : 0; if (te.lagTime.value == "") te.lagTime.value = 0; if (te.start.value == "" && te.end.value == "") { te.start.value = todayString; - te.end.value = tomorrowString; + te.end.value = todayString; } else if (te.start.value == "") { setEndFromStartDate(te); } else if (te.end.value == "") { setStartFromEndDate(te); } + + if(timed && te.duration.value == 0) { + //TO DO - Calculate duration based on end date + } updateTaskArray(te); } +//-------------------------------------------------------------------------------------- function updateTaskArray(te) { var seqNum = te.seqNum.value; if (seqNum == "") return;