Use a current table + trigger

This commit is contained in:
2018-07-11 01:47:29 +02:00
parent c0ece7a11c
commit 6c2b4f2c58
4 changed files with 65 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ import logging
import sys
from action import record_action
from action import set_active
from action import TypeAction
from args import get_string_arg
@@ -195,7 +196,7 @@ def view_project_set_active(project_id, last_action, conn):
message = date + time + name
print(' {} {:d}: ({}) [{}] [{}] {} ({} tasks)'.format('*' if last_action.task_id == row[0] else ' ',
task_id, username, status, priority, message, nb_note))
record_action(cursor, TypeAction.ACTIVE, 'set active project ' + str(project_id),
project_id, last_action.task_id, last_action.note_id)
set_active(cursor, project_id=project_id)
# TODO Add a -v option to see notes?