Premium support for our pure JavaScript UI components


Post by shaveta »

Hi,

For 8 hours calendar when I am setting a baseline on a load of Gantt it is showing as Milestone. I have attached the recording and data. With 24hour calendar it works well.

Please have a look and suggest what should I do to make it fix.

Thanks!!

Attachments
Screen Recording 2023-02-09 at 11.48.01 AM.mov
(24.7 MiB) Downloaded 13 times
test.json
(4.78 KiB) Downloaded 15 times

Post by arcady »

It's just the data you provide. I see you provide baseline start date equal to its end date which means it has zero duration:

            "baselines": [
              {
                "id": 67,
                "startDate": "2023-02-13",
                "endDate": "2023-02-13"
              }
            ]

That's why it's shown as a milestone.

I see that you provide the task dates in a similar way but it also has 1 day duration:

            "startDate": "2023-02-13",
            "duration": 1,
            "endDate": "2023-02-13",

The Gantt calculates task start, end and duration values to make them consistent.
In case of this task it changes end date based on the provided start date and duration.
So the task is not shown as a milestone due to the provided 1 day duration.


Post by arcady »

Considering it happens after saving the data please check that you carefully persist date values (namely make sure you do not truncate time info considering I don't see time for baseline dates).
And make sure you don't truncate time when responding data from the server.


Post by shaveta »

arcady wrote: Thu Feb 09, 2023 8:50 am

Considering it happens after saving the data please check that you carefully persist date values (namely make sure you do not truncate time info considering I don't see time for baseline dates).
And make sure you don't truncate time when responding data from the server.

yes, we have not saved time and that is where the issue happens. Got it. Thanks!!


Post by shaveta »

arcady wrote: Thu Feb 09, 2023 8:50 am

Considering it happens after saving the data please check that you carefully persist date values (namely make sure you do not truncate time info considering I don't see time for baseline dates).
And make sure you don't truncate time when responding data from the server.

For Task Start Date and End Date also we are not storing Time and it is calculated by Gantt itself based on the calendar, Can something similar should be available for baseline dates??

Do we need to pass the Date and Time to make it work?


Post by arcady »

Task dates are handled by the scheduling Engine but baselines are not (since they are not involved in scheduling really). So I'm afraid you'll have to provide full values for them.


Post Reply