Premium support for our pure JavaScript UI components


Post by allwd »

Hello,
I've encountered a very strange issue with preset duration in tasksData. When having tasksData the same as in the demo code below, the tasks rendered on Gantt differ slightly after calling propagate on the project.

The results are as described in name of each task. Generally the issue is with tasks that have duration preset in data(e.g. in our case, we have been calculating duration mostly by subtracting startDate from endDate). There was an issue where a task had 30 day duration, starting at 1st October and finishing at 31st October. When hovering over it though, the tooltip displayed that it ends at 30th October. In the console, more specifically, the endDate was 2020-10-30 23:00:00 CEST.

I've used simple demo(to be honest, any kind of demo should have the same result), removed everything from launch-saas and only injected tasksData from below and called propagate. When playing around with it, I've noticed that the breaking point for this use case is 25th of October. As you can see below:
id 12 has duration 25 and endDate 26th October,
id 13 has duration 24 and endDate 25th October

When hovering over both tasks, they both have 25th October as their endDates.

{
    "project" : {
        "calendar"  : "general",
        "startDate" : "2019-10-01"
    },
    "tasks" : {
        "rows" : [
            {
                "id": 1000,
                "name": "Group",
                "isGroup": true,
                "expanded": true,
                "children": [
                    {
                        "id": 1,
                        "name": "Group 2",
                        "isGroup": true,
                        "expanded": true,
                        "children": [
                            {
                                "id": 11,
                                "name": "Works correctly",
                                "startDate": "2020-10-01",
                                "manuallyScheduled": true,
                                "isGroup": false,
                                "color": "teal",
                                "endDate": "2020-10-31"
                            },
                            {
                                "id": 12,
                                "name": "endDate is 2020-10-30 23:00:00 - Incorrect(preset duration 30 changes endDate)",
                                "startDate": "2020-10-01",
                                "isGroup": false,
                                "duration": 25,
                                "manuallyScheduled": true,
                                "endDate": "2020-10-26"
                            },
                            {
                                "id": 13,
                                "name": "rendered endDate is the same as above, whereas preset endDate is different",
                                "startDate": "2020-10-01",
                                "isGroup": false,
                                "duration": 24,
                                "manuallyScheduled": true,
                                "endDate": "2020-10-25"
                            },
                            {
                                "id": 14,
                                "name": "endDate is 2020-10-21 00:00:00 - Correct(duration is not a problem, calculated duration is 20)",
                                "startDate": "2020-10-01",
                                "isGroup": false,
                                "manuallyScheduled": true,
                                "endDate": "2020-10-21"
                            }
                        ],
                        "endDate": "2020-10-31"
                    }
                ],
                "endDate": "2020-10-31"
            }
        ]
    }
}


Post by alex.l »

Hi allwd,

Thanks for the report! This a known bug with DST that we will definitely fix. Here is a link to track the status: https://github.com/bryntum/support/issues/1432

All best,
Alex

All the best,
Alex


Post Reply