Planning

Shifts and resources

MarketplacePeople and projectsVersion 0.1.0manifest

What it is for ​

Plan shifts for employees from reusable templates. A shift with nobody assigned is an open shift; the workflow runs from open through published to confirmed by the employee.

What the package does and does not do ​

Shifts for employees, with roles and reusable templates. A shift has a day and a start and end in minutes since midnight (0 to 1439; 540 is 09:00). A shift with no employee is an open shift. Workflow: open, published, confirmed by the employee. Needs the Human Resources package.

Models ​

planning_role ​

A role a shift is planned for, for example cashier or electrician

Read group: planning.user. Write group: planning.manager.

FieldKindData classPersonal dataGroupAgents seeDescription
nametextnonenoplanning.userin clearRole name
notelongtextnonenoplanning.userin clearWhat the role involves

planning_template ​

A reusable shift pattern to copy into shifts

Read group: planning.user. Write group: planning.manager.

FieldKindData classPersonal dataGroupAgents seeDescription
nametextnonenoplanning.userin clearTemplate name, for example Morning shift
role_idref → planning_rolenonenoplanning.userin clearThe role the template is for
start_minutenumbernonenoplanning.userin clearStart in minutes since midnight (540 is 09:00)
end_minutenumbernonenoplanning.userin clearEnd in minutes since midnight (1020 is 17:00)

planning_shift ​

A slot of work on one day for one role, optionally assigned to an employee

Read group: planning.user. Write group: planning.manager.

FieldKindData classPersonal dataGroupAgents seeDescription
nametextnonenoplanning.userin clearShort title, for example Opening shift
role_idref → planning_rolenonenoplanning.userin clearThe role needed
employee_idref → hr_employeeinternalyesplanning.usermaskedEmployee the shift is assigned to; empty for an open shift
work_datedatenonenoplanning.userin clearDay of the shift (YYYY-MM-DD)
start_minutenumbernonenoplanning.userin clearStart in minutes since midnight, 0 to 1439 (540 is 09:00)
end_minutenumbernonenoplanning.userin clearEnd in minutes since midnight, 0 to 1439 (1020 is 17:00)
notelongtextnonenoplanning.userin clearInstructions for whoever works the shift
stateselect (open, published, confirmed)nonenoplanning.userin clearShift status: open, published, confirmed

Workflows ​

planning_shift ​

ActionMovesWho may run itApproval
planning_shift.publishstate: open → publishedplanning.managerno
planning_shift.unpublishstate: published → openplanning.managerno
planning_shift.confirmstate: published → confirmedplanning.managerno

Permission groups ​

Groups used by this app:

  • planning.manager
  • planning.user

Approval steps ​

No step in this app needs an approval, apart from deleting records.

What agents can and cannot do ​

An agent can read, search, create and update records of this app, and run the actions that need no approval, within the permission groups of its token.

It can only propose these steps, and a person must approve them: planning_role.delete, planning_template.delete, planning_shift.delete.

Personal data is masked as placeholder tokens: planning_shift.employee_id.

Dependencies ​

  • hr

Install ​

Install it from the Customize app (Marketplace), or from the command line:

bash
obop modules install-from planning

Needs a database and administrator rights.

Build your own ​

The module guide shows how apps like this one are written