Beispiel #1
0
def finish(un, tid):#optimize it
    t=_get_task(tid)
    t['finished']=time()
    t['finisher']=un
    path=core.getview('task-views', 'tasks/getfullpath', tid, reduce=True)
    t['finish_view']=path[-1]
    _set_task(t)
    view=core.getdoc('task-views', path[-1])
    if view['_id'].split('_')[1]=="proj":
        _add_task_to_view(view['_id'], tid, dest="finished_tasks")
    _move_task_beth_cat(path[-1], un+"_arch", tid)
    return True
Beispiel #2
0
def _username_is_free(un):
    t=core.getview('users', 'registration/check_free', un)
    if t==[]:
        return True
    else:
        return False
Beispiel #3
0
def mv(tid, vid):
    path=core.getview('task-views', 'tasks/getfullpath', tid, reduce=True)
    _move_task_beth_views(path[-1], vid, tid)
    return True
Beispiel #4
0
def _del_task(tid):
    core.deldoc('tasks', tid)
    _del_task_from_views(core.getview('task-views', 'tasks/getvidlistbytid', tid, reduce=True), tid)