Skip to content

csoc-de/shiftsnext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

507 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shifts Next

Note: This app is work in progress.

This app allows managing shifts and sync them with a specified calendar.

About this document

This document uses the terms create and assign regarding the creation of shifts and assigning them to a user. Creating and assigning are not two separate steps, so most of the time, these terms are interchangeable.

Requirements

Calendar app

This app requires the calendar app to be installed.

Nextcloud admins need to create two calendars in the calendar app:

  1. A common calendar, which the Shifts Next app uses to sync events to
  2. An absence calendar, which the Shifts Next app uses to check if a certain user is absent when assigning a shift to them
    • For the absence check to work, the absence calendar event name has to be either the user ID or the user name. Imagine a user with ID "john.doe@example.com" and name "John Doe" exists, then the event name inside the absence calendar needs to be "john.doe@example.com" or "John Doe".

Configuration

Note: needs Nextcloud admin privileges.

Navigate to Administration settings, Shifts Next, to set the configuration.

Calendar

  1. Set the previously created calendars
  2. Choose if you want to sync shifts to the personal calendar of the user, the shift was assigned to
  3. Decide whether you want to ignore the absence check for weekly shifs

Shift exchanges

Specify who needs to approve shift exchanges in order for them to be considered done. See Usage | Exchanges for more info.

Shift admins

There are certain functionalities of the app which are not available to all users, including

  • creating/modifying shift types,
  • assigning shifts to users,
  • deleting shifts and
  • approving shift exchanges (depending on the value of the shift exchanges setting).

For these functionalities you need to define shift admins per Nextcloud group. We deliberately decided against using regular Nextcloud group admins to restrict these functionalities as it might be undesirable to give users regular Nextcloud group admin privileges merely because this app requires it.

Usage

Types

Before being able to assign any shifts, you need to create shift types.

Note: Most fields cannot be edited after a shift type has been created, with the exception being Name, Color, Active, Description and the Calendar event fields.

Group

Shift types are bound to a Nextcloud group. A user needs to be a member of a shift type's group in order to get assigned a shift of that type.

Name

Choose a name to identify the shifts created from this type.

Color

Select a color to easily distinguish between multiple types.

Active

Shift types need to be marked as active in order to create shifts from them.

Description

Add a description to include more information what this type is about.

Calendar event fields

The values of these fields will be inserted into the corresponding calendar event fields when synchronizing shifts to the calendar app.

  • Description
  • Location
  • Categories

Repetition

Frequency & Interval

These two settings in conjuction with the Reference and Amount fields control when shifts are considered creatable.

For example, setting Frequency to weekly (which currently is the only option) and Interval to 2 reads as: allow shift admins to create shifts from this type every 2 weeks, relative to the reference field. See config for more info.

Weekly type

You need to define whether shifts occur on specific days of the week or span a whole week.

  • For day of week specific shifts, set Weekly type to By day
  • For whole week shifts, set Weekly type to By week
Config (Weekly by day)

Reference date & time, Time zone and Interval determine if shifts can be created in any given week. Furthermore, they also determine the earliest possible moment in time a shift can be created. On days a shift is determined to be creatable, the time part of Reference date & time is used as the start time of a shift. The end time is calculated by adding the specified Duration to the start time.

The Amount input fields set the maximum number of occurrences a shift of this type can be created on a specific day of week. Imagine a shift which occurs once on Mondays and once on Fridays, then you'd set the amount for Monday and Friday to 1 and leave the amount for the other days at 0. This would allow you to create one shift instance of this type on Mondays and Fridays each. Note that the app does not force you to actually assign all the available instances, it is just an upper limit.

Config (Weekly by week)

Reference week and Interval determine if shifts can be created for a given week. Furthermore, they also determine the earliest ISO week a shift can be created.

Amount sets the maximum number of occurrences a shift of this type can be created in a single week.

Shifts

The second row of the table, labeled Open shifts, displays all shifts determined to be creatable for the selected week. To be more precise, it actually displays shift types, because not yet assigned shifts don't actually exist: assigning a shift means creating a shift. By week shifts/types are displayed in the second column. The remaining columns to the right display By day shifts/types. The exact day column, where a shift/type is displayed in, depends on the shift's start time/the type's reference time + time zone, respectively. Note: The shift/types displayed in the By day columns are browser time zone aware. If, for example, a shift type named Foo exists, with its reference set to 2025-07-14T06:00:00+02:00[Europe/Berlin] and Monday amount set to 0 and Tuesday amount set to 1, this type will displayed in the Monday column with amount 1, if a user's browser time zone is America/Los_Angeles, because 2025-07-14T06:00:00+02:00[Europe/Berlin] translates to 2025-07-13T21:00:00-07:00[America/Los_Angeles], i.e. the reference time is on a different day.

Shifts can be assigned by clicking the 4-way arrow button of the colored boxes in the Open shifts row and then clicking into the cell of a user's row. Already assigned shifts can also be deleted or moved to another user. Assigning, moving and deleting require shift admin privileges.

Exchanges

Exchanges can be used to request swapping an already assigned shift with a shift of another user. Alternatively, they can be used to request transferring a shift to another user.

Create/request a shift exchange

The form is split into A and B.

A

Select a user (which should be yourself most of the time, except when creating an exchange for others as a shift admin), date and shift.

B

For regular exchanges, repeat the steps from A. If creating a transfer, you only need to choose a user you want to transfer shift A to.

Approve pending shift exchanges

After a shift exchange has been created, it needs to be approved by either

  • the participating users,
  • a shift admin,
  • or both (depending on the value of the shift exchanges setting).

When all required parties have approved the exchange or at least one of them rejected the exchange, the exchange will change its state to done.

Calendar sync

Whenever a shift is assigned, moved, deleted, transferred or exchanged, it will get synced to the common calendar and — depending on the administration settings — the personal calendar automatically.

Additional information

Week definition

This app always uses the ISO 8601 week numbering system, which starts on Monday and ends on Sunday, no matter the week numbering system of a user's own locale.

Software used

This app relies heavily on the new JavaScript Temporal API. As of January 14, 2026, only Firefox and Chrome ship this API in their stable browser versions, so this app uses fullcalendar/temporal-polyfill created by Adam Shaw.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages