Represents an override to the employee's WorkCycle.

A workcycle is a setup object that indicates the working hours of one or several employees with a recurring pattern (weekly, monthly, etc...).

Workcycles are the basis from where employee's expected working hours are calculated. On top of it, holidays are first added,then workcycleExceptions.

WorkCycleExceptions are overrides to the workcycles. The semantics of a workcycleException is equivalent to "exceptionally, this employee is going to work a different number of hours on this given half-day". A workcycleException may set the work duration to zero, thus indicating that the employee is not expected to work on this day.

ā—Note: An employee may only have a single WorkCycleException on any given half-day (indicated by the startsAt date and the isAm boolean).

ā—Note 2: When using Timmi Timesheet, submitting a timesheet actually "locks" the theoretical working hours of the employee. This means that creating or deleting workcycleExceptions on a day that belongs to a submitted timesheet will automatically unapprove said timesheet.

A WorkCycleException must be defined in one "unit" (days, hours or time). This unit must be conform to the one of the intersecting WorkCycle for the employee and the date.

Examples:

"User #12, managed in "days" (unit: 0), will finally work on the afternoon of the 01/01/2023"

{"startsAt": "2023-01-01T12:00", "isAm": false, "duration": "12:00:00", "unit": 0}

"User #13, managed in "hours" (unit: 1), will finally work 3h30 on the morning of the 01/01/2023"

{"startsAt": "2023-01-01T00:00:00", "isAm": true, "duration": "03:30:00", "unit": 1}

"User #14, managed in "time" unit (unit: 2), will finally work between 09:00 and 12:30 on the morning of the 01/01/2023"

{"startsAt": "2023-01-01T09:00:00", "isAm": true, "duration": "03:30:00", "unit": 2}
id
integer
required

Identifier of this WorkCycleException.

Required range: x > 1
ownerId
integer
required

Identifier of the employee.

Required range: x > 1
isAm
boolean
required

A work day is divided into two half-days. Indicates whether the exception overrides the planned working hours of the first or the second half-day.

  • true: The exception overrides the first half-day (i.e. "morning").
  • false: The exception overrides the second half-day (i.e. "afternoon").
unit
enum<string>
required

An event can be set in:

  • Day: "I worked for a half day last Monday".
  • Hour: "I worked for 2 hours last Monday".
  • Time: "I worked between 10:00 AM and 12:00 AM last Monday".
Available options:
day,
hour,
time
startsAt
string
required
duration
string
required
name
string
url
string
owner
object
endsAt
string
durationInMinutes
integer
Required range: x > 0
authorId
integer

The ID of the user who created this object. Equal to zero when created by an API key.

Required range: x > 0
createdAt
string

The timestamp of the moment this object was created.

modifierId
integer

The ID of the user who last modified this object. Equal to zero when created by an API key.

Required range: x > 0
modifiedAt
string

The timestamp of the moment this object was last modified.

deletedById
integer

The ID of the user who deleted this object. Equal to zero when created by an API key.

Required range: x > 0
deletedAt
string

The timestamp of the moment this object was deleted.

Was this page helpful?