Our state of the art Gantt chart


Post by awakeb1 »

Hi team,

My samle code has 2 calendar:

  • Calendar 1 is General. It has 8 hours per day, 5 working days per week from Monday to Friday and 2 days off are Saturday and Sunday

  • Calendar 2 is Factory Worker. It has 8 hours per day, 6 working days per week from Monday to Saturday and 1 day off is Sunday

Below is my code:

{
    "project": {
        "calendar": 3,
        "hoursPerDay": 8,
        "daysPerWeek": 5,
        "daysPerMonth": 20
    },
    "calendars": {
        "rows": [
            {
                "Id": 3,
                "Name": "General",
                "DaysPerMonth": 20,
                "DaysPerWeek": 5,
                "HoursPerDay": 8,
                "IsCompanyCalendar": true,
                "Parent": null,
                "Intervals": [
                    {
                        "Id": 1,
                        "RecurrentStartDate": "on Saturday at 00:00",
                        "RecurrentEndDate": "on Monday at 00:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": false,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 2,
                        "RecurrentStartDate": "every weekday at 12:00",
                        "RecurrentEndDate": "every weekday at 13:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": false,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 3,
                        "RecurrentStartDate": "every weekday at 17:00",
                        "RecurrentEndDate": "every weekday at 08:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": false,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    }
                ],
                "leaf": true,
                "children": null,
                "ChildrenRaw": [],
                "Tasks": [],
                "Resources": [],
                "ParentId": null,
                "PhantomParentIdForSessionTemp": null,
                "PhantomIdForSessionTemp": null
            },
            {
                "Id": 2,
                "Name": "Factory Worker",
                "DaysPerMonth": 24,
                "DaysPerWeek": 6,
                "HoursPerDay": 8,
                "IsCompanyCalendar": false,
                "Parent": null,
                "Intervals": [
                    {
                        "Id": 4,
                        "RecurrentStartDate": "on Monday at 08:00",
                        "RecurrentEndDate": "on Monday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 5,
                        "RecurrentStartDate": "on Monday at 13:00",
                        "RecurrentEndDate": "on Monday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 6,
                        "RecurrentStartDate": "on Tuesday at 08:00",
                        "RecurrentEndDate": "on Tuesday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 7,
                        "RecurrentStartDate": "on Tuesday at 13:00",
                        "RecurrentEndDate": "on Tuesday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 8,
                        "RecurrentStartDate": "on Wednesday at 08:00",
                        "RecurrentEndDate": "on Wednesday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 9,
                        "RecurrentStartDate": "on Wednesday at 13:00",
                        "RecurrentEndDate": "on Wednesday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 10,
                        "RecurrentStartDate": "on Thursday at 08:00",
                        "RecurrentEndDate": "on Thursday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 11,
                        "RecurrentStartDate": "on Thursday at 13:00",
                        "RecurrentEndDate": "on Thursday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 12,
                        "RecurrentStartDate": "on Friday at 08:00",
                        "RecurrentEndDate": "on Friday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 13,
                        "RecurrentStartDate": "on Friday at 13:00",
                        "RecurrentEndDate": "on Friday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 14,
                        "RecurrentStartDate": "on Saturday at 08:00",
                        "RecurrentEndDate": "on Saturday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 15,
                        "RecurrentStartDate": "on Saturday at 13:00",
                        "RecurrentEndDate": "on Saturday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    }
                ],
                "leaf": true,
                "children": null,
                "ChildrenRaw": [],
                "Tasks": [],
                "Resources": [],
                "ParentId": null,
                "PhantomParentIdForSessionTemp": null,
                "PhantomIdForSessionTemp": null
            }
        ]
    },
    "resources": {
        "rows": [],
        "total": 0
    },
    "tasks": {
        "rows": [
            {
                "Name": "Root",
                "StartDate": "2021-10-04",
                "EndDate": "2021-10-11",
                "Duration": 6,
                "DurationUnit": "day",
                "PercentDone": 0,
                "SchedulingMode": "Normal",
                "BaselineStartDate": null,
                "BaselineEndDate": null,
                "BaselinePercentDone": null,
                "Cls": "",
                "expanded": true,
                "Effort": 16,
                "EffortUnit": "hour",
                "Note": null,
                "ConstraintType": "startnoearlierthan",
                "ConstraintDate": "2021-10-04",
                "ManuallyScheduled": false,
                "Draggable": true,
                "Resizable": true,
                "Rollup": false,
                "ShowInTimeline": false,
                "Color": null,
                "DeadlineDate": null,
                "index": null,
                "Code": "TASK.00001",
                "ProjectID": 90,
                "ActualDuration": null,
                "Baseline1StartDate": null,
                "Baseline1EndDate": null,
                "ActualStartDate": null,
                "ActualFinishDate": null,
                "CompletedPercentage": 0,
                "ActualEffortHours": 0,
                "Id": 4382,
                "Baselines": null,
                "CalendarId": null,
                "leaf": false,
                "children": [
                    {
                        "Name": "Task 1",
                        "StartDate": "2021-10-04",
                        "EndDate": "2021-10-07",
                        "Duration": 4,
                        "DurationUnit": "day",
                        "PercentDone": 0,
                        "SchedulingMode": "Normal",
                        "BaselineStartDate": null,
                        "BaselineEndDate": null,
                        "BaselinePercentDone": null,
                        "Cls": "",
                        "expanded": false,
                        "Effort": 8,
                        "EffortUnit": "hour",
                        "Note": null,
                        "ConstraintType": "startnoearlierthan",
                        "ConstraintDate": "2021-10-04",
                        "ManuallyScheduled": false,
                        "Draggable": true,
                        "Resizable": true,
                        "Rollup": false,
                        "ShowInTimeline": false,
                        "Color": null,
                        "DeadlineDate": null,
                        "index": null,
                        "Code": "TASK.00002",
                        "ProjectID": 90,
                        "ActualDuration": null,
                        "Baseline1StartDate": null,
                        "Baseline1EndDate": null,
                        "ActualStartDate": null,
                        "ActualFinishDate": null,
                        "CompletedPercentage": 0,
                        "ActualEffortHours": 0,
                        "Id": 4383,
                        "Baselines": null,
                        "CalendarId": null,
                        "leaf": true,
                        "children": null,
                        "TaskTemplateId": 0,
                        "OriginalID": null,
                        "InVisible": false,
                        "IsDetailTask": null,
                        "FromViewCRChanges": false,
                        "ChildrenRaw": [],
                        "Parent": null,
                        "ParentId": "4382",
                        "PhantomParentIdForSessionTemp": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Name": "Task 2",
                        "StartDate": "2021-10-04",
                        "EndDate": "2021-10-11",
                        "Duration": 6,
                        "DurationUnit": "day",
                        "PercentDone": 0,
                        "SchedulingMode": "Normal",
                        "BaselineStartDate": null,
                        "BaselineEndDate": null,
                        "BaselinePercentDone": null,
                        "Cls": "",
                        "expanded": false,
                        "Effort": 8,
                        "EffortUnit": "hour",
                        "Note": null,
                        "ConstraintType": "startnoearlierthan",
                        "ConstraintDate": "2021-10-04",
                        "ManuallyScheduled": false,
                        "Draggable": true,
                        "Resizable": true,
                        "Rollup": false,
                        "ShowInTimeline": false,
                        "Color": null,
                        "DeadlineDate": null,
                        "index": null,
                        "Code": "TASK.00003",
                        "ProjectID": 90,
                        "ActualDuration": null,
                        "Baseline1StartDate": null,
                        "Baseline1EndDate": null,
                        "ActualStartDate": null,
                        "ActualFinishDate": null,
                        "CompletedPercentage": 0,
                        "ActualEffortHours": 0,
                        "Id": 4384,
                        "Baselines": null,
                        "CalendarId": null,
                        "leaf": true,
                        "children": null,
                        "TaskTemplateId": 0,
                        "OriginalID": null,
                        "InVisible": false,
                        "IsDetailTask": null,
                        "FromViewCRChanges": false,
                        "ChildrenRaw": [],
                        "Parent": null,
                        "ParentId": "4382",
                        "PhantomParentIdForSessionTemp": null,
                        "PhantomIdForSessionTemp": null
                    }
                ],
                "TaskTemplateId": 0,
                "OriginalID": null,
                "InVisible": false,
                "IsDetailTask": null,
                "FromViewCRChanges": false,
                "ChildrenRaw": [
                    {
                        "Name": "Task 1",
                        "StartDate": "2021-10-04",
                        "EndDate": "2021-10-07",
                        "Duration": 4,
                        "DurationUnit": "day",
                        "PercentDone": 0,
                        "SchedulingMode": "Normal",
                        "BaselineStartDate": null,
                        "BaselineEndDate": null,
                        "BaselinePercentDone": null,
                        "Cls": "",
                        "expanded": false,
                        "Effort": 8,
                        "EffortUnit": "hour",
                        "Note": null,
                        "ConstraintType": "startnoearlierthan",
                        "ConstraintDate": "2021-10-04",
                        "ManuallyScheduled": false,
                        "Draggable": true,
                        "Resizable": true,
                        "Rollup": false,
                        "ShowInTimeline": false,
                        "Color": null,
                        "DeadlineDate": null,
                        "index": null,
                        "Code": "TASK.00002",
                        "ProjectID": 90,
                        "ActualDuration": null,
                        "Baseline1StartDate": null,
                        "Baseline1EndDate": null,
                        "ActualStartDate": null,
                        "ActualFinishDate": null,
                        "CompletedPercentage": 0,
                        "ActualEffortHours": 0,
                        "Id": 4383,
                        "Baselines": null,
                        "CalendarId": null,
                        "leaf": true,
                        "children": null,
                        "TaskTemplateId": 0,
                        "OriginalID": null,
                        "InVisible": false,
                        "IsDetailTask": null,
                        "FromViewCRChanges": false,
                        "ChildrenRaw": [],
                        "Parent": null,
                        "ParentId": "4382",
                        "PhantomParentIdForSessionTemp": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Name": "Task 2",
                        "StartDate": "2021-10-04",
                        "EndDate": "2021-10-11",
                        "Duration": 6,
                        "DurationUnit": "day",
                        "PercentDone": 0,
                        "SchedulingMode": "Normal",
                        "BaselineStartDate": null,
                        "BaselineEndDate": null,
                        "BaselinePercentDone": null,
                        "Cls": "",
                        "expanded": false,
                        "Effort": 8,
                        "EffortUnit": "hour",
                        "Note": null,
                        "ConstraintType": "startnoearlierthan",
                        "ConstraintDate": "2021-10-04",
                        "ManuallyScheduled": false,
                        "Draggable": true,
                        "Resizable": true,
                        "Rollup": false,
                        "ShowInTimeline": false,
                        "Color": null,
                        "DeadlineDate": null,
                        "index": null,
                        "Code": "TASK.00003",
                        "ProjectID": 90,
                        "ActualDuration": null,
                        "Baseline1StartDate": null,
                        "Baseline1EndDate": null,
                        "ActualStartDate": null,
                        "ActualFinishDate": null,
                        "CompletedPercentage": 0,
                        "ActualEffortHours": 0,
                        "Id": 4384,
                        "Baselines": null,
                        "CalendarId": null,
                        "leaf": true,
                        "children": null,
                        "TaskTemplateId": 0,
                        "OriginalID": null,
                        "InVisible": false,
                        "IsDetailTask": null,
                        "FromViewCRChanges": false,
                        "ChildrenRaw": [],
                        "Parent": null,
                        "ParentId": "4382",
                        "PhantomParentIdForSessionTemp": null,
                        "PhantomIdForSessionTemp": null
                    }
                ],
                "Parent": null,
                "ParentId": null,
                "PhantomParentIdForSessionTemp": null,
                "PhantomIdForSessionTemp": null
            }
        ]
    },
    "assignments": {
        "rows": [],
        "total": 0
    },
    "dependencies": {
        "rows": [],
        "total": 0
    },
    "revision": 7985,
    "success": true,
    "requestId": 16324569543240
}

Current Task 2 has Start Date: Monday Oct 4 2021, Finish Date: Monday Oct 11 2021, Duration: 6 days

I update calendar of Task 2 to Factory Worker it change Finish Date to Wednesday Oct 6 2021.
My expectation is Task 2 will select Oct 9 2021 when I update calendar to Factory Worker because Factory Worker calendar has 6 working days per week from Monday to Saturday.

Please help me check with the code above. Do my calendars configure right or wrong?
Please help me fix with the code above.

Thanks


Post by alex.l »

Looks like you missed https://bryntum.com/docs/scheduler-pro/#SchedulerPro/model/CalendarModel#field-unspecifiedTimeIsWorking set to "false" in your "Factory Worker" calendar.

All the best,
Alex


Post by awakeb1 »

Hi,

As you suggested above, I set unspecifiedTimeIsWorking for calendar "General" to "true" and calendar "Factory Worker" to "false".

{
    "project": {
        "calendar": 3,
        "hoursPerDay": 8,
        "daysPerWeek": 5,
        "daysPerMonth": 20
    },
    "calendars": {
        "rows": [
            {
                "Id": 3,
                "Name": "General",
                "DaysPerMonth": 20,
                "DaysPerWeek": 5,
                "HoursPerDay": 8,
                "IsCompanyCalendar": true,
                "unspecifiedTimeIsWorking": true,
                "Parent": null,
                "Intervals": [
                    {
                        "Id": 1,
                        "RecurrentStartDate": "on Saturday at 00:00",
                        "RecurrentEndDate": "on Monday at 00:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": false,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 2,
                        "RecurrentStartDate": "every weekday at 12:00",
                        "RecurrentEndDate": "every weekday at 13:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": false,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 3,
                        "RecurrentStartDate": "every weekday at 17:00",
                        "RecurrentEndDate": "every weekday at 08:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": false,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    }
                ],
                "leaf": true,
                "children": null,
                "ChildrenRaw": [],
                "Tasks": [],
                "Resources": [],
                "ParentId": null,
                "PhantomParentIdForSessionTemp": null,
                "PhantomIdForSessionTemp": null
            },
            {
                "Id": 2,
                "Name": "Factory Worker",
                "DaysPerMonth": 24,
                "DaysPerWeek": 6,
                "HoursPerDay": 8,
                "IsCompanyCalendar": false,
                "unspecifiedTimeIsWorking": false,
                "Parent": null,
                "Intervals": [
                    {
                        "Id": 4,
                        "RecurrentStartDate": "on Monday at 08:00",
                        "RecurrentEndDate": "on Monday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 5,
                        "RecurrentStartDate": "on Monday at 13:00",
                        "RecurrentEndDate": "on Monday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 6,
                        "RecurrentStartDate": "on Tuesday at 08:00",
                        "RecurrentEndDate": "on Tuesday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 7,
                        "RecurrentStartDate": "on Tuesday at 13:00",
                        "RecurrentEndDate": "on Tuesday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 8,
                        "RecurrentStartDate": "on Wednesday at 08:00",
                        "RecurrentEndDate": "on Wednesday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 9,
                        "RecurrentStartDate": "on Wednesday at 13:00",
                        "RecurrentEndDate": "on Wednesday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 10,
                        "RecurrentStartDate": "on Thursday at 08:00",
                        "RecurrentEndDate": "on Thursday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 11,
                        "RecurrentStartDate": "on Thursday at 13:00",
                        "RecurrentEndDate": "on Thursday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 12,
                        "RecurrentStartDate": "on Friday at 08:00",
                        "RecurrentEndDate": "on Friday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 13,
                        "RecurrentStartDate": "on Friday at 13:00",
                        "RecurrentEndDate": "on Friday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 14,
                        "RecurrentStartDate": "on Saturday at 08:00",
                        "RecurrentEndDate": "on Saturday at 12:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Id": 15,
                        "RecurrentStartDate": "on Saturday at 13:00",
                        "RecurrentEndDate": "on Saturday at 17:00",
                        "StartDate": null,
                        "EndDate": null,
                        "IsWorking": true,
                        "Cls": null,
                        "PhantomIdForSessionTemp": null
                    }
                ],
                "leaf": true,
                "children": null,
                "ChildrenRaw": [],
                "Tasks": [],
                "Resources": [],
                "ParentId": null,
                "PhantomParentIdForSessionTemp": null,
                "PhantomIdForSessionTemp": null
            }
        ]
    },
    "resources": {
        "rows": [],
        "total": 0
    },
    "tasks": {
        "rows": [
            {
                "Name": "Root",
                "StartDate": "2021-10-04",
                "EndDate": "2021-10-11",
                "Duration": 6,
                "DurationUnit": "day",
                "PercentDone": 0,
                "SchedulingMode": "Normal",
                "BaselineStartDate": null,
                "BaselineEndDate": null,
                "BaselinePercentDone": null,
                "Cls": "",
                "expanded": true,
                "Effort": 16,
                "EffortUnit": "hour",
                "Note": null,
                "ConstraintType": "startnoearlierthan",
                "ConstraintDate": "2021-10-04",
                "ManuallyScheduled": false,
                "Draggable": true,
                "Resizable": true,
                "Rollup": false,
                "ShowInTimeline": false,
                "Color": null,
                "DeadlineDate": null,
                "index": null,
                "Code": "TASK.00001",
                "ProjectID": 90,
                "ActualDuration": null,
                "Baseline1StartDate": null,
                "Baseline1EndDate": null,
                "ActualStartDate": null,
                "ActualFinishDate": null,
                "CompletedPercentage": 0,
                "ActualEffortHours": 0,
                "Id": 4382,
                "Baselines": null,
                "CalendarId": null,
                "leaf": false,
                "children": [
                    {
                        "Name": "Task 1",
                        "StartDate": "2021-10-04",
                        "EndDate": "2021-10-07",
                        "Duration": 4,
                        "DurationUnit": "day",
                        "PercentDone": 0,
                        "SchedulingMode": "Normal",
                        "BaselineStartDate": null,
                        "BaselineEndDate": null,
                        "BaselinePercentDone": null,
                        "Cls": "",
                        "expanded": false,
                        "Effort": 8,
                        "EffortUnit": "hour",
                        "Note": null,
                        "ConstraintType": "startnoearlierthan",
                        "ConstraintDate": "2021-10-04",
                        "ManuallyScheduled": false,
                        "Draggable": true,
                        "Resizable": true,
                        "Rollup": false,
                        "ShowInTimeline": false,
                        "Color": null,
                        "DeadlineDate": null,
                        "index": null,
                        "Code": "TASK.00002",
                        "ProjectID": 90,
                        "ActualDuration": null,
                        "Baseline1StartDate": null,
                        "Baseline1EndDate": null,
                        "ActualStartDate": null,
                        "ActualFinishDate": null,
                        "CompletedPercentage": 0,
                        "ActualEffortHours": 0,
                        "Id": 4383,
                        "Baselines": null,
                        "CalendarId": null,
                        "leaf": true,
                        "children": null,
                        "TaskTemplateId": 0,
                        "OriginalID": null,
                        "InVisible": false,
                        "IsDetailTask": null,
                        "FromViewCRChanges": false,
                        "ChildrenRaw": [],
                        "Parent": null,
                        "ParentId": "4382",
                        "PhantomParentIdForSessionTemp": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Name": "Task 2",
                        "StartDate": "2021-10-04",
                        "EndDate": "2021-10-11",
                        "Duration": 6,
                        "DurationUnit": "day",
                        "PercentDone": 0,
                        "SchedulingMode": "Normal",
                        "BaselineStartDate": null,
                        "BaselineEndDate": null,
                        "BaselinePercentDone": null,
                        "Cls": "",
                        "expanded": false,
                        "Effort": 8,
                        "EffortUnit": "hour",
                        "Note": null,
                        "ConstraintType": "startnoearlierthan",
                        "ConstraintDate": "2021-10-04",
                        "ManuallyScheduled": false,
                        "Draggable": true,
                        "Resizable": true,
                        "Rollup": false,
                        "ShowInTimeline": false,
                        "Color": null,
                        "DeadlineDate": null,
                        "index": null,
                        "Code": "TASK.00003",
                        "ProjectID": 90,
                        "ActualDuration": null,
                        "Baseline1StartDate": null,
                        "Baseline1EndDate": null,
                        "ActualStartDate": null,
                        "ActualFinishDate": null,
                        "CompletedPercentage": 0,
                        "ActualEffortHours": 0,
                        "Id": 4384,
                        "Baselines": null,
                        "CalendarId": null,
                        "leaf": true,
                        "children": null,
                        "TaskTemplateId": 0,
                        "OriginalID": null,
                        "InVisible": false,
                        "IsDetailTask": null,
                        "FromViewCRChanges": false,
                        "ChildrenRaw": [],
                        "Parent": null,
                        "ParentId": "4382",
                        "PhantomParentIdForSessionTemp": null,
                        "PhantomIdForSessionTemp": null
                    }
                ],
                "TaskTemplateId": 0,
                "OriginalID": null,
                "InVisible": false,
                "IsDetailTask": null,
                "FromViewCRChanges": false,
                "ChildrenRaw": [
                    {
                        "Name": "Task 1",
                        "StartDate": "2021-10-04",
                        "EndDate": "2021-10-07",
                        "Duration": 4,
                        "DurationUnit": "day",
                        "PercentDone": 0,
                        "SchedulingMode": "Normal",
                        "BaselineStartDate": null,
                        "BaselineEndDate": null,
                        "BaselinePercentDone": null,
                        "Cls": "",
                        "expanded": false,
                        "Effort": 8,
                        "EffortUnit": "hour",
                        "Note": null,
                        "ConstraintType": "startnoearlierthan",
                        "ConstraintDate": "2021-10-04",
                        "ManuallyScheduled": false,
                        "Draggable": true,
                        "Resizable": true,
                        "Rollup": false,
                        "ShowInTimeline": false,
                        "Color": null,
                        "DeadlineDate": null,
                        "index": null,
                        "Code": "TASK.00002",
                        "ProjectID": 90,
                        "ActualDuration": null,
                        "Baseline1StartDate": null,
                        "Baseline1EndDate": null,
                        "ActualStartDate": null,
                        "ActualFinishDate": null,
                        "CompletedPercentage": 0,
                        "ActualEffortHours": 0,
                        "Id": 4383,
                        "Baselines": null,
                        "CalendarId": null,
                        "leaf": true,
                        "children": null,
                        "TaskTemplateId": 0,
                        "OriginalID": null,
                        "InVisible": false,
                        "IsDetailTask": null,
                        "FromViewCRChanges": false,
                        "ChildrenRaw": [],
                        "Parent": null,
                        "ParentId": "4382",
                        "PhantomParentIdForSessionTemp": null,
                        "PhantomIdForSessionTemp": null
                    },
                    {
                        "Name": "Task 2",
                        "StartDate": "2021-10-04",
                        "EndDate": "2021-10-11",
                        "Duration": 6,
                        "DurationUnit": "day",
                        "PercentDone": 0,
                        "SchedulingMode": "Normal",
                        "BaselineStartDate": null,
                        "BaselineEndDate": null,
                        "BaselinePercentDone": null,
                        "Cls": "",
                        "expanded": false,
                        "Effort": 8,
                        "EffortUnit": "hour",
                        "Note": null,
                        "ConstraintType": "startnoearlierthan",
                        "ConstraintDate": "2021-10-04",
                        "ManuallyScheduled": false,
                        "Draggable": true,
                        "Resizable": true,
                        "Rollup": false,
                        "ShowInTimeline": false,
                        "Color": null,
                        "DeadlineDate": null,
                        "index": null,
                        "Code": "TASK.00003",
                        "ProjectID": 90,
                        "ActualDuration": null,
                        "Baseline1StartDate": null,
                        "Baseline1EndDate": null,
                        "ActualStartDate": null,
                        "ActualFinishDate": null,
                        "CompletedPercentage": 0,
                        "ActualEffortHours": 0,
                        "Id": 4384,
                        "Baselines": null,
                        "CalendarId": null,
                        "leaf": true,
                        "children": null,
                        "TaskTemplateId": 0,
                        "OriginalID": null,
                        "InVisible": false,
                        "IsDetailTask": null,
                        "FromViewCRChanges": false,
                        "ChildrenRaw": [],
                        "Parent": null,
                        "ParentId": "4382",
                        "PhantomParentIdForSessionTemp": null,
                        "PhantomIdForSessionTemp": null
                    }
                ],
                "Parent": null,
                "ParentId": null,
                "PhantomParentIdForSessionTemp": null,
                "PhantomIdForSessionTemp": null
            }
        ]
    },
    "assignments": {
        "rows": [],
        "total": 0
    },
    "dependencies": {
        "rows": [],
        "total": 0
    },
    "revision": 7985,
    "success": true,
    "requestId": 16324701330770
}

I got error when update calendar column to "Factory Worker".

error when update calendar to Factory Worker.PNG
error when update calendar to Factory Worker.PNG (20.59 KiB) Viewed 537 times

I have no idea, please help.

Thanks.


Post by alex.l »

Are you sure you used correct format for the names of your fields? I see PascalCase in all field besides that one.
I checked it in our advanced example (but I was need to convert all your data to camelCase), and it works well to me.
If it didn't help, I need a runnable test case to check the cause, or try yourself to reproduce it in our examples.

Attachments
Screenshot 2021-09-24 at 11.06.21.png
Screenshot 2021-09-24 at 11.06.21.png (176.41 KiB) Viewed 536 times

All the best,
Alex


Post by awakeb1 »

Hi Alex,

Thanks for quick reply. I am working on .net core, and all models here they were copied from bryntum sample project. Mostly models in example asp.net core are PascalCase.

Do I need to change to camelCase of all models as assignments, calendars, dependencies, project, resources and tasks or I only need to change for calendars?

Thanks


Post by alex.l »

Yes, I see. I just said please use a consistent format. Try to rename "unspecifiedTimeIsWorking" to "UnspecifiedTimeIsWorking", and if it didn't help, try to upgrade the Gantt version (if applicable), and make/attach a test case to us to reproduce the problem and we'll be able to help you out!

Which version of Gantt do you use?

All the best,
Alex


Post by awakeb1 »

I used Bryntum Gannt 4.2.5
Could you please share the code that you convert to camelCase?


Post by alex.l »

You can check how it works if you replace examples/_datasets/launch-saas.json content to the attached data and open advanced example locally. (examples/advanced/)

{
  "project": {
      "calendar": 3,
      "hoursPerDay": 8,
      "daysPerWeek": 5,
      "daysPerMonth": 20
  },
  "calendars": {
      "rows": [
          {
              "id": 3,
              "name": "General",
              "daysPerMonth": 20,
              "daysPerWeek": 5,
              "hoursPerDay": 8,
              "unspecifiedTimeIsWorking" : true,
              "isCompanyCalendar": true,
              "Parent": null,
              "intervals": [
                  {
                      "id": 1,
                      "recurrentStartDate": "on Saturday at 00:00",
                      "recurrentEndDate": "on Monday at 00:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": false,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 2,
                      "recurrentStartDate": "every weekday at 12:00",
                      "recurrentEndDate": "every weekday at 13:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": false,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 3,
                      "recurrentStartDate": "every weekday at 17:00",
                      "recurrentEndDate": "every weekday at 08:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": false,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  }
              ],
              "leaf": true,
              "children": null,
              "ChildrenRaw": [],
              "Tasks": [],
              "Resources": [],
              "Parentid": null,
              "PhantomParentidForSessionTemp": null,
              "PhantomidForSessionTemp": null
          },
          {
              "id": 2,
              "name": "Factory Worker",
              "daysPerMonth": 24,
              "unspecifiedTimeIsWorking" : false,
              "daysPerWeek": 6,
              "hoursPerDay": 8,
              "isCompanyCalendar": false,
              "Parent": null,
              "intervals": [
                  {
                      "id": 4,
                      "recurrentStartDate": "on Monday at 08:00",
                      "recurrentEndDate": "on Monday at 12:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 5,
                      "recurrentStartDate": "on Monday at 13:00",
                      "recurrentEndDate": "on Monday at 17:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 6,
                      "recurrentStartDate": "on Tuesday at 08:00",
                      "recurrentEndDate": "on Tuesday at 12:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 7,
                      "recurrentStartDate": "on Tuesday at 13:00",
                      "recurrentEndDate": "on Tuesday at 17:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 8,
                      "recurrentStartDate": "on Wednesday at 08:00",
                      "recurrentEndDate": "on Wednesday at 12:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 9,
                      "recurrentStartDate": "on Wednesday at 13:00",
                      "recurrentEndDate": "on Wednesday at 17:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 10,
                      "recurrentStartDate": "on Thursday at 08:00",
                      "recurrentEndDate": "on Thursday at 12:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 11,
                      "recurrentStartDate": "on Thursday at 13:00",
                      "recurrentEndDate": "on Thursday at 17:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 12,
                      "recurrentStartDate": "on Friday at 08:00",
                      "recurrentEndDate": "on Friday at 12:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 13,
                      "recurrentStartDate": "on Friday at 13:00",
                      "recurrentEndDate": "on Friday at 17:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 14,
                      "recurrentStartDate": "on Saturday at 08:00",
                      "recurrentEndDate": "on Saturday at 12:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "id": 15,
                      "recurrentStartDate": "on Saturday at 13:00",
                      "recurrentEndDate": "on Saturday at 17:00",
                      "startDate": null,
                      "endDate": null,
                      "isWorking": true,
                      "Cls": null,
                      "PhantomidForSessionTemp": null
                  }
              ],
              "leaf": true,
              "children": null,
              "ChildrenRaw": [],
              "Tasks": [],
              "Resources": [],
              "Parentid": null,
              "PhantomParentidForSessionTemp": null,
              "PhantomidForSessionTemp": null
          }
      ]
  },
  "resources": {
      "rows": [],
      "total": 0
  },
  "tasks": {
      "rows": [
          {
              "name": "Root",
              "startDate": "2021-10-04",
              "endDate": "2021-10-11",
              "duration": 6,
              "durationUnit": "day",
              "PercentDone": 0,
              "schedulingMode": "Normal",
              "baselineStartDate": null,
              "baselineEndDate": null,
              "baselinePercentDone": null,
              "Cls": "",
              "expanded": true,
              "effort": 16,
              "effortUnit": "hour",
              "Note": null,
              "constraintType": "startnoearlierthan",
              "constraintDate": "2021-10-04",
              "ManuallyScheduled": false,
              "Draggable": true,
              "Resizable": true,
              "Rollup": false,
              "ShowInTimeline": false,
              "Color": null,
              "DeadlineDate": null,
              "index": null,
              "Code": "TASK.00001",
              "Projectid": 90,
              "ActualDuration": null,
              "baseline1StartDate": null,
              "baseline1EndDate": null,
              "ActualStartDate": null,
              "ActualFinishDate": null,
              "CompletedPercentage": 0,
              "ActualEffortHours": 0,
              "id": 4382,
              "baselines": null,
              "Calendarid": null,
              "leaf": false,
              "children": [
                  {
                      "name": "Task 1",
                      "startDate": "2021-10-04",
                      "endDate": "2021-10-07",
                      "duration": 4,
                      "durationUnit": "day",
                      "PercentDone": 0,
                      "schedulingMode": "Normal",
                      "baselineStartDate": null,
                      "baselineEndDate": null,
                      "baselinePercentDone": null,
                      "Cls": "",
                      "expanded": false,
                      "effort": 8,
                      "effortUnit": "hour",
                      "Note": null,
                      "constraintType": "startnoearlierthan",
                      "constraintDate": "2021-10-04",
                      "ManuallyScheduled": false,
                      "Draggable": true,
                      "Resizable": true,
                      "Rollup": false,
                      "ShowInTimeline": false,
                      "Color": null,
                      "DeadlineDate": null,
                      "index": null,
                      "Code": "TASK.00002",
                      "Projectid": 90,
                      "ActualDuration": null,
                      "baseline1StartDate": null,
                      "baseline1EndDate": null,
                      "ActualStartDate": null,
                      "ActualFinishDate": null,
                      "CompletedPercentage": 0,
                      "ActualEffortHours": 0,
                      "id": 4383,
                      "baselines": null,
                      "Calendarid": null,
                      "leaf": true,
                      "children": null,
                      "TaskTemplateid": 0,
                      "Originalid": null,
                      "InVisible": false,
                      "isDetailTask": null,
                      "FromViewCRChanges": false,
                      "ChildrenRaw": [],
                      "Parent": null,
                      "Parentid": "4382",
                      "PhantomParentidForSessionTemp": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "name": "Task 2",
                      "startDate": "2021-10-04",
                      "endDate": "2021-10-11",
                      "duration": 6,
                      "durationUnit": "day",
                      "PercentDone": 0,
                      "schedulingMode": "Normal",
                      "baselineStartDate": null,
                      "baselineEndDate": null,
                      "baselinePercentDone": null,
                      "Cls": "",
                      "expanded": false,
                      "effort": 8,
                      "effortUnit": "hour",
                      "Note": null,
                      "constraintType": "startnoearlierthan",
                      "constraintDate": "2021-10-04",
                      "ManuallyScheduled": false,
                      "Draggable": true,
                      "Resizable": true,
                      "Rollup": false,
                      "ShowInTimeline": false,
                      "Color": null,
                      "DeadlineDate": null,
                      "index": null,
                      "Code": "TASK.00003",
                      "Projectid": 90,
                      "ActualDuration": null,
                      "baseline1StartDate": null,
                      "baseline1EndDate": null,
                      "ActualStartDate": null,
                      "ActualFinishDate": null,
                      "CompletedPercentage": 0,
                      "ActualEffortHours": 0,
                      "id": 4384,
                      "baselines": null,
                      "Calendarid": null,
                      "leaf": true,
                      "children": null,
                      "TaskTemplateid": 0,
                      "Originalid": null,
                      "InVisible": false,
                      "isDetailTask": null,
                      "FromViewCRChanges": false,
                      "ChildrenRaw": [],
                      "Parent": null,
                      "Parentid": "4382",
                      "PhantomParentidForSessionTemp": null,
                      "PhantomidForSessionTemp": null
                  }
              ],
              "TaskTemplateid": 0,
              "Originalid": null,
              "InVisible": false,
              "isDetailTask": null,
              "FromViewCRChanges": false,
              "ChildrenRaw": [
                  {
                      "name": "Task 1",
                      "startDate": "2021-10-04",
                      "endDate": "2021-10-07",
                      "duration": 4,
                      "durationUnit": "day",
                      "PercentDone": 0,
                      "schedulingMode": "Normal",
                      "baselineStartDate": null,
                      "baselineEndDate": null,
                      "baselinePercentDone": null,
                      "Cls": "",
                      "expanded": false,
                      "effort": 8,
                      "effortUnit": "hour",
                      "Note": null,
                      "constraintType": "startnoearlierthan",
                      "constraintDate": "2021-10-04",
                      "ManuallyScheduled": false,
                      "Draggable": true,
                      "Resizable": true,
                      "Rollup": false,
                      "ShowInTimeline": false,
                      "Color": null,
                      "DeadlineDate": null,
                      "index": null,
                      "Code": "TASK.00002",
                      "Projectid": 90,
                      "ActualDuration": null,
                      "baseline1StartDate": null,
                      "baseline1EndDate": null,
                      "ActualStartDate": null,
                      "ActualFinishDate": null,
                      "CompletedPercentage": 0,
                      "ActualEffortHours": 0,
                      "id": 4383,
                      "baselines": null,
                      "Calendarid": null,
                      "leaf": true,
                      "children": null,
                      "TaskTemplateid": 0,
                      "Originalid": null,
                      "InVisible": false,
                      "isDetailTask": null,
                      "FromViewCRChanges": false,
                      "ChildrenRaw": [],
                      "Parent": null,
                      "Parentid": "4382",
                      "PhantomParentidForSessionTemp": null,
                      "PhantomidForSessionTemp": null
                  },
                  {
                      "name": "Task 2",
                      "startDate": "2021-10-04",
                      "endDate": "2021-10-11",
                      "duration": 6,
                      "durationUnit": "day",
                      "PercentDone": 0,
                      "schedulingMode": "Normal",
                      "baselineStartDate": null,
                      "baselineEndDate": null,
                      "baselinePercentDone": null,
                      "Cls": "",
                      "expanded": false,
                      "effort": 8,
                      "effortUnit": "hour",
                      "Note": null,
                      "constraintType": "startnoearlierthan",
                      "constraintDate": "2021-10-04",
                      "ManuallyScheduled": false,
                      "Draggable": true,
                      "Resizable": true,
                      "Rollup": false,
                      "ShowInTimeline": false,
                      "Color": null,
                      "DeadlineDate": null,
                      "index": null,
                      "Code": "TASK.00003",
                      "Projectid": 90,
                      "ActualDuration": null,
                      "baseline1StartDate": null,
                      "baseline1EndDate": null,
                      "ActualStartDate": null,
                      "ActualFinishDate": null,
                      "CompletedPercentage": 0,
                      "ActualEffortHours": 0,
                      "id": 4384,
                      "baselines": null,
                      "Calendarid": null,
                      "leaf": true,
                      "children": null,
                      "TaskTemplateid": 0,
                      "Originalid": null,
                      "InVisible": false,
                      "isDetailTask": null,
                      "FromViewCRChanges": false,
                      "ChildrenRaw": [],
                      "Parent": null,
                      "Parentid": "4382",
                      "PhantomParentidForSessionTemp": null,
                      "PhantomidForSessionTemp": null
                  }
              ],
              "Parent": null,
              "Parentid": null,
              "PhantomParentidForSessionTemp": null,
              "PhantomidForSessionTemp": null
          }
      ]
  },
  "assignments": {
      "rows": [],
      "total": 0
  },
  "dependencies": {
      "rows": [],
      "total": 0
  },
  "revision": 7985,
  "success": true,
  "requestid": 16324569543240
}

All the best,
Alex


Post by awakeb1 »

Thank for your information.
Regarding to PascalCase in all models have mapping camelCalse and PascalCase. So I think it is not an issue. Example for calendar model:

calendar.PNG
calendar.PNG (29.56 KiB) Viewed 531 times

I got this error when change calendar to Factory Worker

error when update calendar to Factory Worker.PNG
error when update calendar to Factory Worker.PNG (20.59 KiB) Viewed 531 times

Do you have any idea to resolve this issue or suggest me how it's happened?

Thanks


Post by alex.l »

As I said before, I cannot reproduce this issue, all works well with your data in our examples. Screenshot of the error is not enough to fix the problem here.
Please attach a runnable test case to be able to go forward in our investigation or try to reproduce it in our examples and provide steps to reproduce it.

Thank you!

All the best,
Alex


Post Reply