Skip to content
Seed timesheet pattern (test)

Seed timesheet pattern (test)

Repeats an opening week forward across a date range of up to two years, so a settlement rule can be validated before go-live — for one employee, a unit, or everyone. It can also approve the periods it seeds, so a whole setup can be checked end to end. Test workspaces only.

Why it exists

A workspace configured in September has exactly one approval period: September. There is no Q1 and no Q2, so there is no settlement chain to look at — and periods can never be created in the past, because each one opens on the previous one’s closing balance.

This job goes the other way. Enter one representative week — on the workspace start date or any later week — and let the job repeat it forward from there. Every period it creates is the newest one, so the chain is built in the order it would really have happened.

This is a simulation tool. It only appears on workspaces marked as a test workspace under Admin › Workspace, and it never runs on a schedule. It is not available on a customer workspace.

Before you run it

  1. Configure the rules you want to validate — the settlement policy, the time bank accounts, the employment terms with timesheet approval switched on.
  2. Make sure the holiday calendar covers the months you are about to seed. Days it does not cover are seeded as ordinary working days.
  3. Give the employee something to auto-fill onto — a default activity or a percentage allocation on their activity list. Switching the auto-fill on in the work time policy is not enough on its own; without a target the job stops rather than filling a year of blank days.
  4. As that employee, enter your representative week through the normal timesheet. Real entries on real activities. Start it on the workspace start date, or anywhere you like and tell the job where with Start date.

Give the week some shape. A week of exact norm time produces a delta of zero in every period, so no cap is ever reached and nothing expires — the seeded year would prove nothing. Register over norm in some weeks and under in others.

The pattern

The pattern is what you typed, not something you configure. The job reads whole weeks from the week the start date falls in and repeats them forward to the end date. Leave the start date empty and it starts where the workspace does — or where the employee’s employment starts if that is later, since nothing can be registered before either:

Pattern weeksWhat repeats
1A weekly pattern
2A fortnightly rotation
4A 4-week rotation — an on-call or standby cycle
EmptyNothing: the registrations stand as they are — see Testing a whole setup

A week here runs Monday to Sunday, so the pattern is the same rotation whatever weekday the range starts on. Weekdays are kept: a Tuesday in the pattern is always copied to a Tuesday.

Options

OptionMeaning
EmployeeSeed this one employee.
Org unitSeed every employee in this unit and its sub-units.
All employeesSeed every employee in the workspace.
Start dateWhere the range starts. Leave it empty to start at the workspace start date, or the employment start if that is later. A date before either is moved up to it.
End dateWhere the range ends. Leave it empty to end today. Rounded outwards so every approval period the range touches is seeded end to end. At most 24 months after the start date.
Pattern weeksHow many weeks make up the pattern, 1–8. Leave it empty to fill nothing: the job only works on the periods the range touches, as they stand — see Testing a whole setup.
Overwrite existing time registrationsReplaces work time already on a target day. Off by default.
Auto-approve statementsSubmits and approves every seeded period, oldest first, on behalf of the employee and their manager. Off by default.
Book accrualsBooks each employee’s accruals — vacation, care days and the other accruing time off — and their expiries, as the nightly accrual runs would have. With Auto-approve, period by period: each period’s just before it is approved, then the rest through today. Off by default.
Book accruals from the startWith Book accruals: books them from each employee’s first accrual even when the workspace says they were booked further on. For test data imported with its accrual cursors set to the import day, so the import itself books none. Off by default.

Choose exactly one of Employee, Org unit and All employees. Each employee is seeded on their own — their own pattern, employment terms and periods. With a unit or all employees, an employee who can’t be seeded (no employment terms with timesheet approval, an empty pattern window, …) is skipped and listed with the reason, and the others are seeded; with a single employee the run stops instead.

What the job does to each day

Working through the seeded range, day by day:

  1. A public holiday is left untouched.
  2. A day carrying time off is left untouched — a planned vacation in month 7 is kept as it is.
  3. A day that already carries work time is left alone, unless you ticked Overwrite.
  4. Otherwise the matching day of the pattern is copied across: registrations and check-ins/check-outs alike, at the same times of day.
  5. A day the pattern leaves blank gets its expected norm. On a weekend or a holiday that is zero, so those days stay empty.

Then the job evaluates allowances and overtime on every day of the periods it covers — the copied days, and days that were already there, such as registrations brought in by an import, which are otherwise not evaluated until the nightly run. Finally, for each approval period it covered, it creates the period and brings it to ready.

Submitting and approving stays with you unless you switch on Auto-approve statements — working through the periods yourself is often the point of the exercise: watch the balance chain from each period’s close into the next one’s open. With Auto-approve on, the job submits and approves each period in order, so settlement runs and the next period opens on the settled balance. It stops at a period that can’t be submitted (a blocking violation, or an earlier period still open) and reports where.

After the last approval, the next period is ready. On a test workspace, approving a period — with Auto-approve or by hand — opens the employee’s next period as ready straight away, so you can carry on submitting and approving into the months ahead, through the end of the year if you need to. With Auto-approve the job also leaves the current period — the one the run date falls in — ready when it lies after the seeded range. You can also submit a period before it is ready, without waiting for its last working day. None of this happens on a workspace that isn’t marked as a test workspace.

Overwrite only affects work time. Time off and public holidays are handled before it is ever checked, so no setting of that switch can erase planned time off. It also does not unlock a period you have already submitted or approved.

Reading the run results

FieldMeaning
source_windowThe days the pattern was read from
resolved_spanThe days actually seeded, after rounding out to whole periods
days_writtenDays that received registrations
days_skippedDays left alone, by reason: holiday, leave, has_data, locked
days_erasedRegistrations removed by Overwrite
days_reconciledDays whose allowances or overtime changed when they were evaluated
periods_readyPeriods created and brought to ready
periods_skippedPeriods left alone — already ready, or already submitted or approved
periods_approvedPeriods submitted and approved (with Auto-approve)
accruals_booked, expirations_bookedAccruals and expiries booked (with Book accruals)
payouts_requested, transfers_agreedPayouts requested and vacation transfers agreed on the submits
current_period_readyThe current period, left ready after the seeded range (with Auto-approve, in per_employee)
employees, employees_skippedHow many employees were seeded, and how many were skipped
per_employeeThe same counts for each employee, with the reason an employee was skipped or where their approvals stopped

With several employees the counts are totals across all of them.

Check days_skipped.holiday against the holidays you expect in the seeded year. A count of zero over twelve months means the holiday calendar does not reach that far.

Testing a whole setup

To check that a configuration computes the right numbers, bring in test employees with a whole period of registrations — through an import, or by typing them — and run the job with:

  • All employees (or the unit you are testing),
  • Start date on the first day of the first period and End date on the last day of the last one,
  • Pattern weeks empty, so nothing is filled: the registrations stand as you entered them, and a day you left empty stays empty,
  • Auto-approve statements on.

The job evaluates the allowances, approves the periods and runs the settlement, so the statements show the final balances, ready to compare with what the rules say. The implementation team runs this from a script with the workspace’s API key.

To test a holiday year, add Book accruals on the first run, so each period is approved with its accruals and December before the new year’s expiry, as it would be live. Through the API the same run can carry what employees enter when they submit:

  • payouts — [{"employee_id", "period_start", "minutes", "account_id"?}], a payout requested on that period’s submit;
  • transfers — [{"employee_id", "period_start", "account_id", "days"}], the vacation days agreed on that period’s submit to move to the next holiday year (the fifth week, on December’s statement). A transfer the statement doesn’t offer stops the run.

A range longer than 24 months takes two runs, one after the other: the second one seeds periods the first left ready, norms included.

Running it again

Running the job a second time with the same options changes nothing: days that already carry data are skipped, and periods that already exist are not recreated. To reshape the year, change the pattern week and re-run with Overwrite on.

Troubleshooting

IssueSolution
The job is not in the listThe workspace is not marked as a test workspace
“no registrations between …”The pattern window is empty — enter the week first, or point the start date at the week you did enter
“months is no longer an option”The date range replaced Months: give a start date and an end date instead
“nothing to register norm time on”The activity list has no default activity and no percentage allocation — set one. Having the auto-fill plugin switched on in the work time policy does not by itself give it a target
“do not enable timesheet approval”Switch timesheet approval on in the employee’s employment terms
“exactly one of employee_id, org_unit_id or all_employees”Choose one scope: an employee, an org unit, or All employees
An employee was skippedper_employee gives the reason — the same messages as in this table
Approvals stopped at a periodper_employee names the period and why: a blocking violation (such as a working day with no registration), or an earlier period that isn’t approved yet
Every period’s delta is the full worked timeThe seeded days have no expected norm — check the employment terms cover the seeded year
Holidays were seeded as working daysThe holiday calendar does not cover those months
A period was skippedIt was already submitted or approved; reopen it first if you meant to reseed it