Our state of the art Gantt chart


Post by Gowtham »

Hi,
Our startDate and endDate columns are datetimefield. The taskbars are changing to milestone on Saturdays and Sundays.
for example:

MicrosoftTeams-image (18).png
MicrosoftTeams-image (18).png (62 KiB) Viewed 768 times

Consider the task 00567065 (in image attached above) it starts from 2021-07-02 22:47:16 which falls on a Friday and the end date of the task is 2021-07-03 03:47:16 .Since the end date falls on Saturday, instead of pushing the date to Monday the end date recalculates to 2021-07-03 00:00:00 , and rest of the below tasks considers this as their start date due to dependency (the milestones seen below in the image ) .
I have also attached the JSON data for the above tasks. We are unable to find the cause of this behaviour . What is the solution for this ?

Attachments
sample.json
(1.63 KiB) Downloaded 47 times

Post by arcady »

    {
      "endDate": "2021-07-03 03:47:16",
      "id": "105654",
      "name": "00567065",
      "startDate": "2021-07-02 22:47:16",
      "constraintType": "startnoearlierthan",
      "constraintDate": "2021-07-02 22:47:16"
    },

The reason is the Engine calculates the task duration based on the provided start & end dates. Since duration is amount of working time between start and end dates it's calculated as time between 2021-07-02 22:47:16 and 2021-07-03 00:00:00 (the moment where weekend starts).
If the date matched non working periods such things would not happen.

You can also provide duration values for your tasks. Then the task would recalculate its end date to finish after the weekend respectively.


Post by Gowtham »

Is giving duration is mandatory ?


Post by arcady »

No. It's not mandatory. If not provided duration is calculated by the Engine as it happens in your case.


Post by Gowtham »

Is there any option we can remove the weekends (Saturday and Sundays) not only the highlighting but also the weekend calculations. We don't require weekends, because all days are working. we tried removing weekend highlights but still the task is displayed as milestone.

I tried these 3 things, but still it is coming as milestone
1) removing weekend highlights
2) removing weekend intervals
3) Given Saturday and Sunday as recurring intervals as isWorking:true


Post by alex.l »

Hi Gowtham,

Here is the guide: https://bryntum.com/docs/gantt/#Gantt/guides/basics/calendars.md

And fast example I did using our advanced demo:

  "project" : {
    "calendar"     : "general",
    "startDate"    : "2019-01-14",
    "hoursPerDay"  : 8,
    "daysPerWeek"  : 7
  },
  "calendars" : {
    "rows" : [
      {
        "id"        : "general",
        "unspecifiedTimeIsWorking" : false,
        "name"      : "General",
        "intervals" : [
          {
            "recurrentStartDate" : "at 08:00",
            "recurrentEndDate"   : "at 12:00",
            "isWorking"          : true
          },
          {
            "recurrentStartDate" : "at 13:00",
            "recurrentEndDate"   : "at 17:00",
            "isWorking"          : true
          }
        ],
[....]

Please provide your configuration, we will take a look what's wrong.

All the best,
Alex


Post by Gowtham »

Hi Alex,
As you said we tried setting calendar data , it worked at project level and now weekends are considered as working days .
We have Resource histogram and scheduler pro as partner to the Gantt . In Resource histogram the weekends are still considered as non- working days . I have attached the image below .

MicrosoftTeams-image (20).png
MicrosoftTeams-image (20).png (86.98 KiB) Viewed 674 times

As you can see in the above image the weekends in gantt are working whereas in Resource histogram are non-working.
We have also attached the json below

Attachments
calendar.json
(1.83 KiB) Downloaded 51 times

Post by arcady »

The resources use their own calendars considering how the histogram shows their allocation. Adjust the calendars intervals as well so they would treat weekends as working.

Which calendars of the provided is your project one? Standard or General?

Your provided General calendar defines only weekends as working time.
There are 3 intervals:

            {
                "recurrentStartDate": "on Sun at 0:00",
                "recurrentEndDate": "on Sat at 23:59",
                "isWorking": true
            },
            {
                "recurrentStartDate": "every weekend at 0:00",
                "recurrentEndDate": "every weekend at 23:59",
                "isWorking": true
            },
            {
                ...
                "recurrentStartDate": "on Sat at 0:00",
                "recurrentEndDate": "on Mon at 0:00",
                "isWorking": true,
                "name": "w"
            }

1st intervals says to start working period on Saturday at 00:00 and finish at 23:59 (which BTW makes 1 minute in every Saturday non-working)
2nd interval says to start working period on Saturday or Sunday at 00:00 and finish at 23:59 - so builds Sat 00:00 - 23:59 and Sun 00:00 - 23:59 working intervals for each weekend which actually covers 1st interval making its definition meaningless
3rd interval says to start working period on Saturday at 00:00 and finish at 00:00 on Monday so that interval covers both 1st and 2nd one making both of them not needed.


Post by Gowtham »

Hi,
We are using general calendars for project .
Tried using the recurrent date interval as

{
                ...
                "recurrentStartDate": "on Sat at 0:00",
                "recurrentEndDate": "on Mon at 0:00",
                "isWorking": true,
                "name": "w"
            }

but the result was weekdays turned to non-working and weekends to working days . As you can see in the below image

MicrosoftTeams-image (21).png
MicrosoftTeams-image (21).png (138.24 KiB) Viewed 657 times

We have given Standard Calendar as children to the General Calendar, So now how can we set the weekends of the resource calendar as working . We have attached json , what change should be added in this json

Attachments
calendar (1).json
(1.16 KiB) Downloaded 49 times

Post by arcady »

Ah sorry my mistake your first interval actually started on Sun 00:00 and finished on Saturday 23:59 which meant it made all week working. :)
Anyway if you want all the time to be working it can be done easier:

{
    "name": "General",
    "id": "general",
    "unspecifiedTimeIsWorking": true
},

Still what about your resources? which calendar do they use?


Post Reply