WIP on action/log
This commit is contained in:
12
task.py
12
task.py
@@ -58,8 +58,12 @@ def create_task(args, active_project_id, conn):
|
||||
task_id = cursor.lastrowid
|
||||
|
||||
logging.debug('CREATE ACTION ' + str(active_project_id) + str(task_id) )
|
||||
action.create_action(cursor, project_id=active_project_id, task_id=task_id)
|
||||
|
||||
action_message = '{} (status: {}, priority: {}, project: {})'.format(args.create_name, status, priority,
|
||||
active_project_id)
|
||||
# TODO if date/time/other => add to message
|
||||
|
||||
action.create_action(cursor, project_id=active_project_id, task_id=task_id, message=action_message)
|
||||
print('created task {}: {} (status: {})'.format(task_id, args.create_name, status))
|
||||
|
||||
def edit_task(args, task_id, conn):
|
||||
@@ -85,7 +89,11 @@ def edit_task(args, task_id, conn):
|
||||
else:
|
||||
print('updated task {}: set active task')
|
||||
|
||||
action.create_action(cursor, task_id, message = 'update ' + str(update_args))
|
||||
# TODO If not edit name... => retrieve name ?
|
||||
# TODO Retrieve project id ?
|
||||
action_message = '{} ({})'.format(args.edit_name, ', '.join("%s: %s" % (k, v) for k, v in update_args.items()))
|
||||
logging.debug('UPDATE TASK - ACTION MESSAGE : ' + action_message)
|
||||
action.create_action(cursor, task_id=task_id, action=action.TypeAction.UPDATE, message = action_message)
|
||||
|
||||
def moving_task(args):
|
||||
print('moving')
|
||||
|
||||
Reference in New Issue
Block a user