Hint using timeline or calendar view to tracking the plan vs actual in shifts management

Here’s an plan which I assigned 2 shifts for 2 employee. Example Date 23/10/2024: Employee 1 ‘ll work from 7am → 7pm & Employee 2’ ll work from 10 am → 10 pm

In real life, Employee 2 can swap shift with Employee 1, so Employee’ll change to work from 10am → 10pm and employee 1’ ll change 7am → 7pm
How should I using timeline or calendar to see this difference between plan vs actual ?

For more complex use case, On date 23/10/2024 Employee 1 have planned shift from 7am → 7pm, but in actual: Employee 2 take 7am → 10am, Employee 3 take from 10 am → 2pm, and then Employee 1 actual work from 2pm → 7pm …

I dont wanna break into 2 view: plan and actual shifts, I need it’s overlap to see overall. How should i use timeline view to have an overview for this ?

Have you considered using the ‘Add secondary dates’ options in timeline view?
image

You could have a date time range field for ‘actual hours worked’

the problem’s not come from time fields only Chris
You can see in this example “On date 23/10/2024 Employee 1 have planned shift from 7am → 7pm, but in actual: Employee 2 take 7am → 10am, Employee 3 take from 10 am → 2pm, and then Employee 1 actual work from 2pm → 7pm …”
1 orginal date range can split into 3 parts ⇄ 3 date range with different people field assigned

How about this:
you use the primary date fields to show actual hours worked and the secondary date fields to show the planned ones.
For people who were not planned to work, but did, the secondary field can be empty.

In most cases, the date fields will be the same (perhaps you need an automation to copy the secondary field values to the primary by default).

You can modify peoples field values manually if needed, and you can create new extraordinary entities to cover the case where people take on an extra unplanned shift.

1 Like

Wow, clever suggestion as always, Chris
You’re right, most cases actual = planned, but What condition should I use for this automation “you need an automation to copy the secondary field values to the primary by default”

In this thing, You mean from 1 orginal entity with daterange (planned shift) I can break into 3 entities with different date-range and employee right, so I need to self-auto relation in this database ?

other things, current Shift timing 's formula type, How should I convert to Date type to selectable for those new extraordinary entities ?

Why not trigger when the secondary field gets updated?

1 Like

In this thing, You mean from 1 orginal entity with daterange (planned shift) I can break into 3 entities with different date-range and employee right, so I need to self-auto relation in this database ?

other things, current Shift timing 's formula type, How should I convert to Date type to selectable for those new extraordinary entities ?

Not sure I’m doing right, how can I break 1 planned entity to 3 actual entities for 3 employee ?
I just can get 1 actual only like this


I don’t think you need any new relations.
I was just thinking that if you had 1 entity to begin with, e.g.

  • Employee A - planned 05-17, actual 05-17
    you would end up with three entities
  • Employee A - planned 05-17, actual 05-09
  • Employee B - planned xx-xx, actual 09-12
  • Employee C - planned xx-xx, actual 12-17

xx means null

It would look something like this

If you create an ‘extraordinary’ Shift entity manually, there will be no Shift pattern, and the formula for calculating the planned Shift timing will be empty if there is no assigned Shift pattern.

(on the above image, there are no secondary dates for the time that Chris and Mary worked)

Just to emphasise:

this thing 's really make me confused. If not a self-relations, it’s really hard to determine which actual belongs to main entity
Can any have solution with relation for this in an overlap way (1 row planed and 3 actual in 1 way)
Employee A - planned 05 → 17, actual 05 → 17

  • Sub Employee A - planned xx-xx, actual 05 → 09
  • Sub Employee B - planned xx-xx, actual 09 → 12
  • Sub Employee C - planned xx-xx, actual 12 → 17

I just tried for non self-relation example


You can see the employee 9 have planned shift from 10:00 → 22:00, and below’re actual blocks:

  • the Employee 1 took from 10:00 → 13:00
  • the Employee 9 only take from 13:00 → 18:00
  • the Employee 8 take from 18:00 → 21:00 only
  • and still missing employee for time block from 21:00 → 22:00 (compared to planned)

If those blocks cant overlaps in 1 row, it’s really hard to determine the last actual missing time-block (21:00 → 22:00)

In your example image, it looks like Employee 8 had a planned shift (07-19) but ended up working for 3 hours of Employee 9’s shift.
Maybe Employee 8 should have two entities (like Employee 1 does)?

Anyway, that’s not the point.

It is not possible to have in one row all the various periods that were actually worked if you want lanes per employee - these three entities have to live in different lanes.
Also, the secondary date range will act as a blocker to prevent other entities occupying the same space.

TBH, the simplest thing to do may be to add a checkbox formula which is true if actual != planned and then colour code on the timeline for visibility. So at least you will see deviations clearly.

If you’re trying to find a smart way to automatically identify when a planned shift is not totally covered (like in your example) then yes, you would need to find a way of linking the extraordinary shifts to the planned one, and maybe do some clever formula to find out where any gaps are, but I don’t think it will be easy.

1 Like

Seem I need to re-think about this color code suggestion, Thank you Chris as always!