Example #1
0
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
Example #2
0
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)