The Time Tracking module records how long employees spend on individual tasks, feeding the data into productivity analytics and manager dashboards. Logs can be created in two ways: through a timer session that the system measures in real time, or through a manual entry that records a start and end time after the fact. Both methods produce aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Paramount-Intelligence/HR_Monitoring_System/llms.txt
Use this file to discover all available pages before exploring further.
TimeLog record linked to a specific task, and the source_type field on each log preserves which method was used.
Two Entry Methods at a Glance
Timer-Based
Start a live timer on a task. Pause and resume as needed. Stop the timer to create a finalised
TimeLog. The system measures elapsed seconds with full accuracy, accounting for pause periods.Manual Entry
Submit an explicit
started_at and ended_at timestamp pair. Useful as a fallback when a timer was forgotten or work occurred offline. Duration is calculated from the two timestamps.source_type enum distinguishes the two:
source_type | Set when |
|---|---|
timer | Log was created by stopping a timer session |
manual | Log was created via the manual entry endpoint |
Timer Session Lifecycle
Start the timer
POST /api/v1/time-logs/start with the task_id. A TaskTimerSession is created in status running. Only one active or paused timer is allowed per user across all tasks. Attempting to start a second timer returns an error.Pause (optional)
POST /api/v1/time-logs/pause with the task_id. The session transitions to paused and accumulated seconds are snapshotted. A pause_reason is recorded — possible reasons include manual_pause, attendance_checkout, break_started, and system.Resume (optional)
POST /api/v1/time-logs/resume with the task_id. The session returns to running and last_resumed_at is updated so live elapsed time can be recalculated by the client.Timer Pause Reasons
pause_reason | Trigger |
|---|---|
manual_pause | Employee explicitly pressed pause |
attendance_checkout | Session auto-paused when employee checked out of attendance |
break_started | Session auto-paused when a break was started |
system | System-initiated pause (e.g., session integrity guard) |
Timer API Reference
- Start
- Pause
- Resume
- Stop
- Active Timer
TaskTimerRead object showing the new running session.Start/Stop Request Fields
The task to associate this timer session with. The task must be in an active state —
blocked, completed, and archived tasks reject timer starts.Optional summary of what was accomplished. Only applicable on the
stop request. Stored on the resulting TimeLog.Manual Log Entry
Use the manual endpoint when a timer was not running during actual work — for example when work happened offline, in a meeting, or before the timer feature was in use.Manual Entry Fields
Task to credit with this time. Subject to the same active-state requirement as timer starts.
When work began. Must be strictly before
ended_at.When work ended. Must be strictly after
started_at — validation rejects equal or reversed pairs.Optional description of the work performed during this period.
TimeLog Response Fields
Every time log endpoint returns aTimeLogRead object. Key fields:
Unique log identifier (internal — not displayed as a label in the UI).
The task this log is attributed to.
Resolved title of the parent task — use this for display instead of
task_id.Resolved title of the project the task belongs to.
Full name of the employee who logged the time.
Session or manual entry start time, serialised in UTC.
Session or manual entry end time.
null while a timer session is still running.Total minutes logged. Populated on stop/completion;
null for in-progress timer logs.timer or manual — indicates how this log was created.active (timer still running), completed (finalised), or invalid (flagged by the system).The work summary provided at stop time or in the manual entry.
Viewing Time Log History
- Own Logs
- Team Logs
TimeLog records created by the authenticated user, ordered by creation time descending. Includes both timer-sourced and manual entries.How Logs Link to Tasks
EachTimeLog row carries a task_id foreign key. This linkage powers several downstream calculations:
actual_duration_minuteson the task: The task record accumulates total logged minutes across all associatedTimeLogrows. Comparing this toexpected_duration_minutes(set by the manager via the complexity endpoint) yields an efficiency ratio used in the employee growth module.- Admin overview
currently_workingcounter: Counts distinctTaskTimerSessionrows withstatus = runningat query time, giving admins a live headcount of who is actively working. - Project-level rollup: Project analytics aggregate
duration_minutesacross all tasks belonging to the project for total effort reporting.
Productive Time Calculation
The platform distinguishes timer-based logs from manual logs in scoring:Timer logs (
source_type = timer) represent work the system directly measured. The accumulated_seconds on the underlying TaskTimerSession captures only the intervals between last_resumed_at and pause/stop events — pause periods are excluded automatically.Manual logs (source_type = manual) represent self-reported work. The duration equals ended_at − started_at in full. There is no automatic deduction for any period within that window.Both log types contribute equally to actual_duration_minutes on the task. Downstream analytics may surface source_type to managers as a signal when reviewing time breakdowns.Role Restrictions
| Action | Employee | Manager / Team Lead | Admin / HR Ops |
|---|---|---|---|
| Start / pause / resume / stop own timer | ✅ | ✅ | ✅ |
| Add manual log for own tasks | ✅ | ✅ | ✅ |
View own logs (/me) | ✅ | ✅ | ✅ |
View team logs (/team) | ❌ | ✅ Team scope | ✅ All |
| Edit or delete a time log | ❌ | ❌ | ✅ Admin only |
Standard employees and managers cannot edit or delete completed time logs. If a log was created in error, an Admin must intervene. This restriction preserves the integrity of historical productivity data.
