[ANSWERED] all tasks loading with the same start date.

Our state of the art Gantt chart


User avatar
spodeopieter2
Posts: 42
Joined: Mon Feb 24, 2020 10:02 am
Location: South Africa

[ANSWERED] all tasks loading with the same start date.

Post by spodeopieter2 »

Good day ,
I am struggling to get data to load correctly. I am using the pdf-export reat demo. I have modified the launch-saas.json like this

Code: Select all

 "tasks": {
    "rows": [
      {
        "id": 1000,
        "name": "ABC",
        "expanded": true,
        "children": [
          {
            "id": 1,
            "name": "Section",
            "rollup": true,
            "expanded": true,
            "children": [
              {
                "name": "123",
                "rollup": true,
                "percentDone": 100,

                "startDate": "2011-01-11",
                "endDate": "2011-01-11"
              },
              {
                "name": "1234",
                "rollup": true,
                "percentDone": 100,

                "startDate": "2011-01-11",
                "endDate": "2011-01-12"
              },
              {
                "name": "12345",
                "rollup": true,
                "percentDone": 100,

                "startDate": "2011-01-12",
                "endDate": "2011-01-15"
              }
            ]
          }
        ]
      }
    ]
  },

  "dependencies": {
    "rows": []
  },
and I have modified Main.js like this:

Code: Select all

      <BryntumGantt
        ref={gantt}
        project={project}
        pdfExportFeature={{
          exportServer: "http://localhost:8080",
          // Development config
          translateURLsToAbsolute: "http://localhost:3000",
          clientURL: "http://localhost:3000",
          // For production replace with this one. See README.md for explanation
          // translateURLsToAbsolute : 'http://localhost:8080/resources/', // Trailing slash is important

          keepPathName: false,
        }}
        viewPreset="weekAndDayLetter"
        barMargin={10}
        rollupsFeature={true}
      />
and I am getting the following :
StartDateIssue.PNG
StartDateIssue.PNG (23.77 KiB) Viewed 398 times
Why is the task 12345 not starting one day after task 1234 ?

User avatar
saki
Core Developer
Core Developer
Posts: 594
Joined: Thu Mar 30, 2017 9:32 am

Re: [REACT] all tasks loading with the same start date.

Post by saki »

Because your dependencies are empty. Dependencies determine relations between tasks.

User avatar
spodeopieter2
Posts: 42
Joined: Mon Feb 24, 2020 10:02 am
Location: South Africa

Re: [REACT] all tasks loading with the same start date.

Post by spodeopieter2 »

In reality my tasks are not dependent on each other , is there another way to have them stand alone on a specific date ? or is my only option to add "fake" dependencies ?

User avatar
saki
Core Developer
Core Developer
Posts: 594
Joined: Thu Mar 30, 2017 9:32 am

Re: [REACT] all tasks loading with the same start date.

Post by saki »

I see. I have tested the following in React PDF Export demo:

Data:

Code: Select all

{
  "success": true,
  "tasks": {
    "rows": [
      {
        "id": 1000,
        "name": "ABC",
        "expanded": true,
        "children": [
          {
            "id": 1,
            "name": "Section",
            "rollup": true,
            "expanded": true,
            "children": [
              {
                "name": "123",
                "rollup": true,
                "percentDone": 100,
                
                "startDate": "2011-01-11",
                "endDate": "2011-01-11"
              },
              {
                "name": "1234",
                "rollup": true,
                "percentDone": 100,
                
                "startDate": "2011-01-11",
                "endDate": "2011-01-12"
              },
              {
                "name": "12345",
                "rollup": true,
                "percentDone": 100,
                
                "startDate": "2011-01-12",
                "endDate": "2011-01-15"
              }
            ]
          }
        ]
      }
    ]
  },
  
  "dependencies": {
    "rows": []
  }
}
and result:
Screen Shot 2020-04-07 at 09.06.36.png
Screen Shot 2020-04-07 at 09.06.36.png (81.32 KiB) Viewed 391 times
Could it be that you're pulling different data from somewhere else? Any error messages? Some changes to our demo other than data (I've changed only data for testing)?

User avatar
spodeopieter2
Posts: 42
Joined: Mon Feb 24, 2020 10:02 am
Location: South Africa

Re: [REACT] all tasks loading with the same start date.

Post by spodeopieter2 »

Good day , I did make other modifications to the demo , they are described in the first post , I just enabled the rollups feature. I also modified the calendar in the following way:

Code: Select all

  "calendars": {
    "rows": [
      {
        "id": "general",
        "name": "General",

        "intervals": [
          {
            "startDate": "2010-12-31T22:00:00.000Z",
            "endDate": "2011-01-01T22:00:00.000Z",
            "isWorking": false
          },
          {
            "startDate": "2011-01-01T22:00:00.000Z",
            "endDate": "2011-01-02T22:00:00.000Z",
            "isWorking": false
          },
          {
            "startDate": "2011-01-02T22:00:00.000Z",
            "endDate": "2011-01-03T22:00:00.000Z",
            "isWorking": false
          }//...all the way to 2020 (about 3000 records)
          ],
          "expanded" : true
       } 
    ]     
}          
          


But I have found a workaround :

Code: Select all

    
    {
                "id": 6503,
                "name": "53302",
                "startDate": "2012-01-24T22:00:00.000Z",
                "duration": 1,
                "rollup": true,
                "manuallyScheduled": true
      },

User avatar
saki
Core Developer
Core Developer
Posts: 594
Joined: Thu Mar 30, 2017 9:32 am

Re: [REACT] all tasks loading with the same start date.

Post by saki »

Better than a workaround would be to find the real reason. Try to remove your changes one-by-one to see which one causes it. If you think it could be a bug in Gantt please inform us (with the steps to reproduce) and we'll fix it.

User avatar
spodeopieter2
Posts: 42
Joined: Mon Feb 24, 2020 10:02 am
Location: South Africa

Re: [REACT] all tasks loading with the same start date.

Post by spodeopieter2 »

OK cool , I will do that , and let you guys know, I suspect it is enabling the rollup feature ,But will test it the moment I have time.

User avatar
spodeopieter2
Posts: 42
Joined: Mon Feb 24, 2020 10:02 am
Location: South Africa

Re: [REACT] all tasks loading with the same start date.

Post by spodeopieter2 »

Ok , here are my results I only modified launch-saas.json and package.json (to get it to work on windows), I will attach them.

Package.json is modified on line 10

the forum does not accept .json as a valid file format , perhaps something to change ?

perhaps this is a windows issue ?

I am using gantt-vanilla-2.1.1

Here are the results :
PDF.PNG
PDF.PNG (50.8 KiB) Viewed 385 times
Attachments
launch-saas.txt
(4.72 KiB) Downloaded 9 times

User avatar
mats
Core Developer
Core Developer
Posts: 15906
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: [REACT] all tasks loading with the same start date.

Post by mats »

the forum does not accept .json as a valid file format , perhaps something to change ?
Fixed now
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
spodeopieter2
Posts: 42
Joined: Mon Feb 24, 2020 10:02 am
Location: South Africa

Re: [REACT] all tasks loading with the same start date.

Post by spodeopieter2 »

Cool :)
launch-saas.json
(4.72 KiB) Downloaded 11 times

Post Reply