Page 1 of 1

[REACT] I have some questions about the demo example?

Posted: Tue Apr 20, 2021 5:34 am
by vivianus

For demo: https://bryntum.com/examples/gantt/baselines/,I have some questions,please help me!

1、

903FF4C8-8784-481b-A29F-C5A40C893912.png
903FF4C8-8784-481b-A29F-C5A40C893912.png (21.66 KiB) Viewed 820 times
DateHelper.formatDelta(task.startDate - baseline.startDate)

Why is the actual task duration of baseline1 9 days? And how is the delay start calculated? The baseline1 startDate is January 13, and the task startDate is January 14. It should 1 days in advance. Why is it delayed?

2、

2C47C6EB-D87A-4102-BA6A-56845A950CB2.png
2C47C6EB-D87A-4102-BA6A-56845A950CB2.png (13.64 KiB) Viewed 820 times
275FAA93-0CD0-42cb-8967-B8DD65FC3BF7.png
275FAA93-0CD0-42cb-8967-B8DD65FC3BF7.png (37.32 KiB) Viewed 820 times
DateHelper.formatDelta(task.durationMS - baseline.durationMS)

The task duration is 15 days and the baseline duration is 17 days. Why is the overrun 15 days? Isn't it 2 days? Why can't I understand the literal meaning of delay and overrun?


Re: [REACT] I have some questions about the demo example?

Posted: Tue Apr 20, 2021 5:42 am
by vivianus

3、

11DDE6F4-0BFD-4592-8DCC-FE7B3FC5AAEB.png
11DDE6F4-0BFD-4592-8DCC-FE7B3FC5AAEB.png (22.12 KiB) Viewed 819 times

Why is task duration 7 days? Isn't it 9 or 10?


Re: [REACT] I have some questions about the demo example?

Posted: Tue Apr 20, 2021 9:05 am
by arcady
vivianus wrote: Tue Apr 20, 2021 5:34 am

Why is the actual task duration of baseline1 9 days? And how is the delay start calculated? The baseline1 startDate is January 13, and the task startDate is January 14. It should 1 days in advance. Why is it delayed?

Let's open the dataset the demo uses (examples/_datasets/launch-saas.json file):

  {
    "id": 1,
    "name": "Setup web server",
    "percentDone": 50,
    "duration": 10,
    "startDate": "2019-01-14",
    ...
    "baselines": [
      {
        "startDate": "2019-01-13T23:00:00",
        "endDate": "2019-01-22T23:00:00"
      },
      {
        "startDate": "2019-01-13T23:00:00",
        "endDate": "2019-01-22T23:00:00"
      },
      {
        "startDate": "2019-01-13T23:00:00",
        "endDate": "2019-01-22T23:00:00"
      }
    ]

alternatively you can check the task data in your browser console

// check task start date
gantt.taskStore.getById(1).startDate
// check 1st baseline start date
gantt.taskStore.getById(1).baselines.first.startDate

1) 9 days in that demo is calculated as endDate ("2019-01-22T23:00:00") minus startDate ("2019-01-13T23:00:00") which gives 9 days.
2) delay is calculated as difference between the task startDate and the baseline startDate ..as you already posted actually:

DateHelper.formatDelta(task.startDate - baseline.startDate)

3) it's delayed as you can see in the data the tasks starts 1 hour later that it was planned in the baseline ("2019-01-14" - "2019-01-13T23:00:00" = 1 hour)

vivianus wrote: Tue Apr 20, 2021 5:34 am

The task duration is 15 days and the baseline duration is 17 days. Why is the overrun 15 days? Isn't it 2 days? Why can't I understand the literal meaning of delay and overrun?

It's a bug. I've made a ticket for it: https://github.com/bryntum/support/issues/2702
Thank you for the feedback!


Re: [REACT] I have some questions about the demo example?

Posted: Tue Apr 20, 2021 9:08 am
by arcady
vivianus wrote: Tue Apr 20, 2021 5:42 am

Why is task duration 7 days? Isn't it 9 or 10?

It should be 7d since it takes non working time into account ..but it doesn't do that for baselines which is also a bug. I've mentioned that in the ticket I've made.


Re: [REACT] I have some questions about the demo example?

Posted: Tue Apr 20, 2021 10:07 am
by vivianus
8DB500FD-DED1-4151-B876-1AD4A5651EAE.png
8DB500FD-DED1-4151-B876-1AD4A5651EAE.png (25.07 KiB) Viewed 807 times

I always thought that task (the line indicated by the arrow in the picture) is the progress of the task plan, while baseline is the progress of the actual situation of the task. According to what you mean, the startDate of a task is greater than the startDate of the baseline, which means delayed start. I think it means early start. Now it seems that I am wrong. Do you take task (the line indicated by the arrow in the picture) as the actual progress?


Re: [REACT] I have some questions about the demo example?

Posted: Tue Apr 20, 2021 1:59 pm
by arcady

Yes according to the code I see in the demo a baseline start/end dates is treated as planned ones and corresponding task start/end as actual ones.
But it's just the demo code and you are free to treat baselines the way you want since they don't really take part in the scheduling process. So they are pure visual pieces of data and you can treat them as you want.


Re: [REACT] I have some questions about the demo example?

Posted: Wed Apr 21, 2021 8:05 am
by vivianus

Thank you for your answer