taskForm.setStoryPersistanceId(Integer.parseInt((String) request.getParameter("storyPersistanceId")));
// find the Story... if needed
if (StringUtils.isNotEmpty((String) request.getParameter("persistanceId"))) {
Task task = storyService.findTaskByPersistanceId(Integer.parseInt((String) request.getParameter("persistanceId")));
taskForm.setDaysEstimated(task.getDaysEstimated());
taskForm.setPersistanceId(task.getPersistanceId());
taskForm.setPersistanceVersion(task.getPersistanceVersion());
taskForm.setShortDescription(task.getShortDescription());
taskForm.setDaysCompleted(task.daysCompleted());
taskForm.setDaysRemaining(task.daysRemaining());
taskForm.setDifferenceInPercentBetweenEstimateAndCharge(task.differenceInPercentBetweenEstimateAndCharge());
taskForm.setDifferenceOfDaysBetweenEstimateAndCharge(task.differenceOfDaysBetweenEstimateAndCharge());
taskForm.setPercentCompleted(task.percentCompleted());
taskForm.setPercentRemaining(task.percentRemaining());
taskForm.setWarning(task.warning());
if (task.getOwner() != null) {
taskForm.setDevelopperPersistanceId(task.getOwner().getPersistanceId());
}
}
//populate listBox
populateListBox(request);