Skip to main content

Timesheets & Projects (TSM)

Module code TSM · Release R3 · Packaging Add-on · Requirements FR-TSM-*, BR-TSM-* in the PRD and BRD · Related Attendance, Organization (shared accounts)

1. Overview and scope​

TSM serves IT and services SMEs: who worked on which project and task, for how long, whether it is billable, and how actual effort compares with the plan.

In scope: projects linked to a shared client account; project roles and team assignment with allocation percentage; tasks with planned hours and dates; weekly grid entry with daily rows; the rule "timesheet hours ≤ attendance hours"; billable and non-billable flags and rates (export only); approval by project manager through NTF; defaulter detection and nudges; period lock; bench view; effort variance.

Out of scope: invoicing, resource capacity planning, Gantt charts.

2. Learned from the reference product​

Source: Spryple analysis, §10 and §21.8.

  • [Observed] Admin masters: Clients (contact, designation, start date, address), Projects, Assign Team, Tasks and Project Roles, with duplicate checks and Active/Inactive (A: Time Sheet).
  • [Observed] Manager dashboard: active projects, assigned employees, bench count, hours by project, status with and without variance, estimated vs consumed hours; pending approvals with bulk actions; Defaulters with "Send Notification" (M: Time Sheet).
  • [Observed] Employee submits rows of date, project, task, description, hours, % and task completed; an HR rule "limit timesheet hours to attendance hours" is referenced but not in the documented rules (E: Time Sheet; defect D11).
  • [Observed] Effort variance = (Actual − Planned) / Planned, verified on sample rows (§21.8).
  • [Inferred] Timesheet clients duplicate the CRM client master; no billable split, weekly grid or period lock (§10).

3. Our design decisions​

IDDecision [Proposed]Reason
D-TSM-01Projects reference org_account (shared with FFM).One client master.
D-TSM-02Weekly timesheet as the unit of submission and approval; daily rows inside.Matches how services teams work; fewer approvals.
D-TSM-03Attendance cap enforced per day with policy action BLOCK or WARN, reading att_day.worked_minutes (and allowing WFH/OD days).Implements the referenced rule explicitly.
D-TSM-04Period lock after month end; edits after lock need reopening by an admin.Billing exports must be stable.

4. Domain model​

5. State machines​

When a week has entries for several projects, each project manager approves their own lines (ALL mode in NTF); the sheet is approved when all lines are.

6. Key business logic​

validateDay(employee, date, entries, policy):
booked = sum(entries.hours on date)
day = ATT.day(employee, date)
cap = day.worked_minutes / 60 if day.status in (P, HD, WP, HP) else
policy.wfh_cap_hours if day.status in (WFH, OD) else 0
if booked > cap + policy.tolerance_hours: apply policy.cap_action (BLOCK or WARN)

defaulters(week):
employees with active project membership and timesheet missing or Draft after
policy.submit_by (e.g. Monday 12:00) ; nudge via NTF ; escalate to manager after N nudges

effortVariance(task) = (actual_hours - planned_hours) / planned_hours # as observed
bench(date) = active employees with no allocation valid on date

7. Configuration​

SettingTypeDefaultDescription
entry.granularityenumWEEKLYDAILY or WEEKLY submission
attendance_cap.enabledbooleantrueHours limited to attendance
attendance_cap.actionenumWARNBLOCK or WARN
attendance_cap.tolerance_hoursnumber0.5Allowance
wfh_cap_hoursnumber9Cap on WFH and on-duty days
submit_bystringMON 12:00Deadline for the previous week
defaulter.max_nudgesinteger2Before manager escalation
lock.after_daysinteger5Days after month end to lock
min_entry_hoursnumber0.25Smallest entry

8. Screens by persona​

PersonaWebMobile
EmployeeWeekly grid, copy last week, my tasks with progressDaily quick entry (R3)
Project managerApprovals with bulk actions, project dashboard (estimated vs consumed, variance), task assignmentApprovals
Line manager / HRDefaulters with send notification, bench—
AdminProjects, roles, tasks, team assignment, period lock—
Org ownerUtilisation and billable share—

9. Events​

EventConsumers
tsm.timesheet.submittedNTF (workflow)
tsm.timesheet.approved, tsm.timesheet.rejectedNTF, RPT
tsm.defaulter.detectedNTF
tsm.period.lockedRPT, billing export

Consumed: att.day.computed (cap revalidation warnings), org.account.updated, ext.lwd.reached (end memberships).

10. API surface​

ResourceMain operations
/v1/tsm/projects and /:id/membersCRUD
/v1/tsm/tasksCRUD
/v1/tsm/timesheetsGET by week, PUT entries, POST /:id/submit, POST /:id/recall
/v1/tsm/defaultersGET, POST /notify
/v1/tsm/period-locksPOST, POST /:id/reopen

Detailed in API endpoints.

11. Permissions​

PermissionScopesDefault roles
tsm.timesheet.submitSELFemployee
tsm.timesheet.approveown projectsproject manager (resolver)
tsm.project.manageORGhr_admin or a delegated project admin
tsm.task.manageown projectsproject manager
tsm.period.lockORGhr_admin
tsm.report.exportown projects, ORGproject manager, org_owner

12. Reports​

ReportContentsReference
Project summaryClient, project, manager, estimated days, worked hours, status[Observed] §21.8
Effort variancePlanned vs actual hours and dates, variance %[Observed] §21.8
Timesheet summaryHours by employee, project, week[Observed] §10
DefaultersMissing weeks by employee[Observed] §10
Utilisation and billable shareBillable hours over available hours[Proposed]
BenchUnallocated employees[Observed] §10

13. Release and priority​

CapabilityReleaseMoSCoW
Projects, tasks, team, weekly entry, approvalsR3Must
Attendance capR3Must
Defaulters and nudgesR3Should
Billable flags and rates exportR3Should
Period lockR3Should
Effort variance and benchR3Should

14. Open questions​

  1. Should approved billable hours export to accounting (Tally, Zoho Books) as invoice lines? Proposed as a CSV export only.
  2. Do we allow timesheets for employees without attendance (consultants)? If so, the cap must be off for their employment type.