Shifts Overview

A shift represents when someone is scheduled to work.

Attributes:

  • id (int) - A unique identifier
  • role_id (int) - Maps the relationship between a shift and its role
  • user_id (int) - The user who the shift is assigned to
  • start (Iso8601 datetime) - Determines when the shift starts, in UTC
  • stop (Iso8601 datetime) - Determines when the shift ends, in UTC
  • published (boolean) - Determines whether workers can see the shift in My Schedules
  • description (string) - A string that allows additional custom information to be included with the shift

Notes:

  • The start and end times are stored in UTC in the Staffjoy database, and all queries to search the database need datetime values to be in UTC as well.
  • Shifts are allowed to be up to 23 hours long.
  • Unassigned shifts have a user_id of 0.
  • A user is not allowed to be assigned to a shift if it overlaps with another shift he is assigned to
  • Shifts are specific to roles, and only workers in that role can be assigned to them