Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: base Roster Management #1760

Merged
merged 137 commits into from
Aug 29, 2024
Merged

Conversation

krantheman
Copy link
Collaborator

@krantheman krantheman commented May 8, 2024

Roster Management

Extension of the current shift management feature to a full-fledged roster management system.

Documentation: https://docs.frappe.io/hr/roster

Features

Calendar View

Details

Visualization of Employee - Shift, Leave, and Holiday mapping in an Employee vs Day of the Month representation.

image

Search and Filtering

Details
  • Employee Multi Search
  • Filtering Based on Company, Department, Branch, Designation, and Shift Type

image

Shift Creation

Details

The roster allows for two types of shifts to be created.

Regular Shifts

Creating a regular shift results in the creation of a single Shift Assignment. Shifts spanning a week or less are automatically created as regular. For shifts spanning over a week, the user will have to select all days from the Repeat On Days field, under Schedule Settings, to ensure that a regular shift is created.

image

Repeating/Scheduled Shifts

The user has the option to turn shifts spanning over a week into repeating shifts. This can be done by selecting specific days from the Repeat On Days field and setting the Frequency field—which represents the frequency of repetition. Doing so will create a Shift Assignment Schedule with the selected details.

image

Shift Assignment Schedule is a new DocType that can be used for creating repeating shifts automatically. Apart from Shift Details, Repeat On Days, and Frequency, this DocType also has an Enabled field, which needs to be selected to continue creating shifts automatically, and a Create Shifts After field, which is the date after which shifts will be created. When enabled, shifts will be automatically created via a background job for 90 days following the Create Shifts After date, if that date lies before or on the day of the job running.

image

While creating repeating shifts using the roster, there can be three scenarios:-

  • Shift spanning below 90 days: Shift Assignments are created immediately, and the Shift Assignment Schedule is not enabled.
  • Shift with End Date, spanning over 90 days: Creation of Shift Assignments is enqueued, and the Shift Assignment Schedule is not enabled.
  • Shift without End Date: Shift Assignments for 90 days are created immediately, and the Shift Assignment Schedule is enabled.

If Allow Multiple Shift Assignments for Same Date under HR Settings is enabled, multiple shifts can be created on a single day, provided that their timings do not overlap.

Shift Update

Details

End Date and Status fields of submitted Shift Assignments can be updated using the roster.

image

Shift Deletion

Details

Clicking on the Delete button presents the user with three options:-

  • Shift for [Date]: Deletes the shift only on that date. This is done by updating the Shift Assignment and creating another one if needed.
  • All Consecutive Shifts: Deletes the Shift Assignment altogether.
  • Shift Assignment Schedule: Deletes the Shift Assignment Schedule and all the Shift Assignments associated with it.

image

None of these actions can be performed if there are Employee Checkin or Attendance records linked with the Shift Assignment at hand.

Shift Moving

Details

Shifts can be dragged and dropped to move them. Dropping a shift on another one will swap it with that.

Shift.Moving.mov

@mohsinalimat
Copy link
Contributor

mohsinalimat commented May 8, 2024

This is really good features. I am waiting from since version-13.

Thanks frappe team and specially @krantheman @ruchamahabal

@mohsinalimat
Copy link
Contributor

mohsinalimat commented May 9, 2024

@krantheman @ruchamahabal

When this feature ready for version 15?

@mohsinalimat
Copy link
Contributor

When this feature ready for version 15?

Copy link
Member

@ruchamahabal ruchamahabal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending stuff to be covered separately

  • Documentation
  • Test cases for backend operations (auto creation of schedules, etc.)
  • Update favicon for roster workspace

@ruchamahabal ruchamahabal merged commit 8b1a5e6 into frappe:develop Aug 29, 2024
6 of 7 checks passed
ruchamahabal added a commit that referenced this pull request Aug 30, 2024
…1760

feat: base Roster Management (backport #1760)
@krantheman krantheman deleted the init-roster branch September 9, 2024 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants