The goal here is that we want weeks that don't belong to a particular interval to be set to 0 hours available rather than currently undefined intervals, the users are set to working the whole day.
We have intervals that cover an employee's week. So for any week not scheduled, we'd like to not have them available at all.
Is this possible?
I've seen: "unspecifiedTimeIsWorking": false, yet it seems to break the resource histogram.
{
"calendarsData": [
{
"id": "general",
"name": "General",
"intervals": [],
"expanded": true,
"children": [
{
"id": "sdrc-2",
"name": "Q's Calendar",
"intervals": [
{
"recurrentStartDate": "every weekday at 22:00 on the 10th through 16th day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 10th through 16th day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 3rd through 9th day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 3rd through 9th day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 17th through 23rd day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 17th through 23rd day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 24th through 30th day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 24th through 30th day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 31st through 6th day of November in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 31st through 6th day of November in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 7th through 13th day of November in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 7th through 13th day of November in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 14th through 20th day of November in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 14th through 20th day of November in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 26th through 2nd day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 26th through 2nd day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 3rd through 9th day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 3rd through 9th day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 10th through 16th day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 10th through 16th day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 17th through 23rd day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 17th through 23rd day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 24th through 30th day of October in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 24th through 30th day of October in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 31st through 6th day of November in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 31st through 6th day of November in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 7th through 13th day of November in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 7th through 13th day of November in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 14th through 20th day of November in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 14th through 20th day of November in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 21st through 27th day of November in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 21st through 27th day of November in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 28th through 4th day of December in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 28th through 4th day of December in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 5th through 11th day of December in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 5th through 11th day of December in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 12th through 18th day of December in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 12th through 18th day of December in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 19th through 25th day of December in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 19th through 25th day of December in 2021",
"isWorking": false
}
]
},
{
"id": "erc-299",
"name": "H, D's Calendar",
"intervals": [
{
"recurrentStartDate": "every weekday at 22:00 on the 23rd through 29th day of January in 2022",
"recurrentEndDate": "every weekday at 6:00 on the 23rd through 29th day of January in 2022",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 30th through 5th day of February in 2022",
"recurrentEndDate": "every weekday at 6:00 on the 30th through 5th day of February in 2022",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 6th through 12th day of February in 2022",
"recurrentEndDate": "every weekday at 6:00 on the 6th through 12th day of February in 2022",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 13th through 19th day of February in 2022",
"recurrentEndDate": "every weekday at 6:00 on the 13th through 19th day of February in 2022",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 8th through 14th day of August in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 8th through 14th day of August in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 15th through 21st day of August in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 15th through 21st day of August in 2021",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 22:00 on the 22nd through 28th day of August in 2021",
"recurrentEndDate": "every weekday at 6:00 on the 22nd through 28th day of August in 2021",
"isWorking": false
}
]
}
]
}
]
}
Should do the trick. Just make sure you use that for all calendars then. Otherwise it might give you unexpected results combined w/ calendars parent-child inheritance.
And of course if you make all time range non-working by default your intervals should define working time isWorking : true.
If you face some issues w/ the histogram when defining calendars this way please provide more details how we can reproduce them.
Whenever I add that on any of the calendars the app returns the errors:
Uncaught Error: Unknown identifier ClassDefEx-p-33.$.assigned
at throwUnknownIdentifier (gantt.umd.js9)
at EngineTransaction.get (Transaction.js:149:13)
at EngineReplica.get (Graph.js:390:9)
at TemplateClass.getFromGraph (ModelFieldAtom.js:68:46)
at ClassDefEx.get (Entity.js:159:13)
at ClassDefEx.get assignments (gantt.umd.js:98321:19)
at ClassDefEx.get assignments [as assignments] (TaskModel.js:796:13)
at ResourceAssignmentColumn.getRawValue (Column.js:954:9)
at Row.renderCell (Row.js:542:28)
at Row.render (Row.js:466:17)
gantt.umd.js:1376 Uncaught (in promise) Error: Unknown identifier ClassDefEx-p-33.$.assigned
at throwUnknownIdentifier (gantt.umd.js9)
at EngineTransaction.get (Transaction.js:149:13)
at EngineReplica.get (Graph.js:390:9)
at TemplateClass.getFromGraph (ModelFieldAtom.js:68:46)
at ClassDefEx.get (Entity.js:159:13)
at ClassDefEx.get assignments (gantt.umd.js:98321:19)
at ClassDefEx.get assignments [as assignments] (TaskModel.js:796:13)
at ResourceAssignmentColumn.getRawValue (Column.js:954:9)
at Row.renderCell (Row.js:542:28)
at Row.render (Row.js:466:17)
gantt.umd.js:1376 Uncaught Error: Unknown identifier ClassDefEx-t-267.$.assigned
at throwUnknownIdentifier (gantt.umd.js9)
at EngineTransaction.get (Transaction.js:149:13)
at EngineReplica.get (Graph.js:390:9)
at TemplateClass.getFromGraph (ModelFieldAtom.js:68:46)
at ClassDefEx.get (Entity.js:159:13)
at ClassDefEx.get assignments (gantt.umd.js:98321:19)
at ClassDefEx.get assignments [as assignments] (TaskModel.js:796:13)
at ResourceAssignmentColumn.getRawValue (Column.js:954:9)
at Row.renderCell (Row.js:542:28)
at Row.render (Row.js:466:17)
gantt.umd.js:1376 Uncaught Error: Unknown identifier ClassDefEx-p-33.$.assigned
at throwUnknownIdentifier (gantt.umd.js9)
at EngineTransaction.get (Transaction.js:149:13)
at EngineReplica.get (Graph.js:390:9)
at TemplateClass.getFromGraph (ModelFieldAtom.js:68:46)
at ClassDefEx.get (Entity.js:159:13)
at ClassDefEx.get assignments (gantt.umd.js:98321:19)
at ClassDefEx.get assignments [as assignments] (TaskModel.js:796:13)
at ResourceAssignmentColumn.getRawValue (Column.js:954:9)
at Row.renderCell (Row.js:542:28)
at Row.render (Row.js:466:17)
gantt.umd.js:1376 Uncaught Error: Unknown identifier ClassDefEx-t-202.$.assigned
at throwUnknownIdentifier (gantt.umd.js9)
at EngineTransaction.get (Transaction.js:149:13)
at EngineReplica.get (Graph.js:390:9)
at TemplateClass.getFromGraph (ModelFieldAtom.js:68:46)
at ClassDefEx.get (Entity.js:159:13)
at ClassDefEx.get assignments (gantt.umd.js:98321:19)
at ClassDefEx.get assignments [as assignments] (TaskModel.js:796:13)
at ResourceAssignmentColumn.getRawValue (Column.js:954:9)
at Row.renderCell (Row.js:542:28)
at Row.render (Row.js:466:17)
throwUnknownIdentifier @ gantt.umd.js:1376
get @ Transaction.js:149
get @ Graph.js:390
getFromGraph @ ModelFieldAtom.js:68
get @ Entity.js:159
get assignments @ gantt.umd.js:98321
get assignments @ TaskModel.js:796
getRawValue @ Column.js:954
renderCell @ Row.js:542
render @ Row.js:466
renderFromRow @ RowManager.js:790
matchRowCount @ RowManager.js:184
calculateRowCount @ RowManager.js:222
initWithHeight @ RowManager.js:123
onInternalResize @ GridElementEvents.js:666
onInternalResize @ GridBase.js:1149
functionChainRunner @ InstancePlugin.js:314
plugInto.<computed> @ InstancePlugin.js:289
onElementResize @ Widget.js:4556
onElementResize @ ResizeMonitor.js:166
I tried to use this data with our resourcehistogram example and I don't see any errors. Could you please try it yourself or provide a runnable test case to check. Maybe some extra steps/configs required to reproduce that?
Attachments
Screenshot 2022-02-01 at 17.17.12.png (285.54 KiB) Viewed 762 times
Here, unspecified time or unscheduled time, is set to working the full day. Our goal is to have this unspecified time show - Not Available. You have no errors because I commented out the two spots where I tried setting unspecifiedTimeWorking to false.
that means there is no working time at all. Tasks has no periods to be scheduled, because unspecifiedTimeIsWorking is false and there are no intervals what time is working.
If you set child calendars, as example sdrc-2 which does have intervals, the problem will be the same: all unspecified time is already not available, and after you added periods with "isWorking": false, nothing changes - there are still no time to schedule tasks.
If you use unspecifiedTimeIsWorking: false, you need to provide intervals when tasks may be scheduled. Try to update your data.