def _add_estimatelog(task): for sprint in task.sprints: nlog = Estimatelog() nlog.estimate = sprint.estimate nlog.date = datetime.date.today() sprint.estimatelog.append(nlog) return task
def update_callback(request, sprint): for log in sprint.estimatelog: if log.date == datetime.date.today(): log.estimate = sprint.estimate return sprint nlog = Estimatelog() nlog.estimate = sprint.estimate nlog.date = datetime.date.today() sprint.estimatelog.append(nlog)