Back to Super Productivity

Worklog

docs/wiki/4.21-Worklog.md

18.4.46.5 KB
Original Source

Worklog

The worklog in Super Productivity is a date-organized view of the time you have logged on tasks: it turns each task’s time spent per day into a hierarchy of years, months, and days (or years, weeks, and days) so you can see what you worked on and for how long on any given date. The worklog is generated from your task and archive data—it does not store time separately. It is read-only: you view and export it, but you do not edit logged time through the worklog screen. (A related view, Quick History, uses the same data in a week-centric, current-year layout and allows inline editing of time per task; see [[4.22-Quick-History]].) Understanding how worklog entries are built, where the data comes from, and how accuracy and refresh work helps you use the worklog and daily summary for review and export.

For how time is recorded on tasks (time spent per day), see [[4.14-How-Time-Is-Logged]]. For how archived tasks and their time are included, see [[4.20-Task-Archiving]].

What a Worklog Entry Represents

A worklog entry is one row in the worklog for a specific day: it ties a task to time spent on that day. When the worklog is built, each task’s per-day time (from “time spent per day” on the task) becomes one or more entries—one per day on which time was logged. For display and export, each entry is effectively “this task, on this date, this much time.” Subtasks can be linked to their parent so they appear under the parent in the list; the app also tracks whether an entry should be excluded from certain restore operations, but that is an internal detail. So from your perspective: the worklog is a list of task–date–duration rows, grouped by day (and by month and year, or by week).

How the Worklog Is Generated from Time-Tracking Data

The worklog is not a separate store of time. It is computed from:

  • Active tasks — The current task list (in your work context) and each task’s time spent per day (the same data that shows “30m today” or “2h” on the task).
  • Archived tasks — Tasks that have been moved to the archive but still have time-tracking data. The app loads both active and archived tasks for the current context, then builds the worklog from all of them so you see full history, not only current tasks.

The transformation does the following:

  • Iterates over every task and every day in that task’s “time spent per day” map.
  • Builds a hierarchy — Year → month → day (or, in week view, year → week → day). Each day has a list of entries (task + time for that day) and a total time for the day.
  • Places subtasks — When a task has a parent, its entry is placed immediately after the parent (or after a sibling) so the list reflects hierarchy.
  • Uses locale and work times — Day labels use your locale; if you have work start/end times configured, they can be shown per day where available.
  • Aggregates without double-counting — Only leaf tasks (tasks with no subtasks) contribute their time to the day/month/year totals. Parent tasks’ own “time spent per day” is not added again on top of subtask time, so the totals are not inflated.

So the worklog is a reorganized view of the same “time spent per day” data that lives on tasks (and in the archive). When you open the worklog, daily summary, or quick-history view, the app loads the relevant tasks (active + archive for the context), runs this transformation, and shows the result.

Accuracy and Completeness

  • Source of time — Every worklog entry comes from task.timeSpentOnDay, which is filled by the normal time-tracking flow (ticks while a task is active, batched persistence every few minutes). So the worklog reflects the same data as the task list and reports.
  • Missing data — If a task has no “time spent per day” (e.g. legacy or edge case), the app applies defaults so the task still appears: subtasks may inherit the first date from the parent’s time or completion date; other tasks may use their creation or completion date with a minimal duration so they show up in the list. That keeps the worklog from dropping tasks that should be visible.
  • No double-counting — Only leaf tasks count toward the aggregated totals at day, month, and year level. So the numbers you see for “total time on this day” match a single count of work time.
  • Timezone safety — Dates are compared using date strings (e.g. YYYY-MM-DD) rather than raw clock times, so timezone or DST changes don’t shift time to the wrong day.
  • When the worklog updates — The worklog is refreshed when you navigate to the worklog, daily summary, or quick-history screen, or when you trigger a manual refresh. It does not update continuously as you track time; you may need to open the view or refresh to see the latest logged time.

Read-Only and Export

  • Read-only — The worklog is a view of existing data. You cannot edit “time spent per day” through the worklog UI; changes to logged time happen by tracking time on tasks, or by other flows (e.g. idle reassignment). So the worklog is for review and export, not for correcting time.
  • Export — You can export the worklog (e.g. to CSV or for external time sheets). Export uses the same task–date–duration data and can be filtered by project and date range. An option lets you exclude time that falls outside the chosen range, so only time within the range is included in the export. That way you get a clean slice of work for the period you care about.

Summary

  • Worklog = date-organized view (year → month → day, or year → week → day) of time spent per day on tasks. Each entry is task + date + duration.
  • Source — Built from active tasks and archived tasks for the current work context; no separate worklog store.
  • Totals — Only leaf tasks contribute to day/month/year totals so there is no double-counting.
  • Refresh — Updates when you open the worklog/daily summary/quick-history or when you refresh manually; not live as you track.
  • Read-only — View and export only; you don’t edit logged time from the worklog.
  • Export — Filter by project and date range; optional exclusion of time outside the range.
  • [[4.22-Quick-History]] — Week-centric, current-year view of the same data with inline time editing
  • [[4.14-How-Time-Is-Logged]] — How “time spent per day” is recorded on tasks (the source of worklog data)
  • [[4.20-Task-Archiving]] — How archived tasks and their time are included when building the worklog