Use stopped time to calculate duration for current activity in history table
This commit is contained in:
@@ -113,8 +113,8 @@ class DataFactory(object):
|
|||||||
'started AS date',
|
'started AS date',
|
||||||
'started',
|
'started',
|
||||||
'stopped',
|
'stopped',
|
||||||
'strftime("%s", "now") - started - \
|
'SUM(CASE WHEN stopped > 0 THEN (stopped - started) ELSE (strftime("%s", "now") - started) END) - \
|
||||||
SUM(CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) AS duration',
|
SUM(CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) AS duration',
|
||||||
'SUM(CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) AS paused_counter',
|
'SUM(CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) AS paused_counter',
|
||||||
'user_id',
|
'user_id',
|
||||||
'user',
|
'user',
|
||||||
|
|||||||
Reference in New Issue
Block a user