Our state of the art Gantt chart


Post by mrefaat »

For project durations exceeding 1 year, the Gantt chart throws an error indicating that the startDate is greater than the endDate.
you have access to the org, you can use the "Project More Than 1 Year" Project

Attachments
screenshot for the error
screenshot for the error
startdate.PNG (127.47 KiB) Viewed 302 times

Post by alex.l »

Hi,

you have access to the org, you can use the "Project More Than 1 Year" Project

Not sure what did you mean. Access to what org?
I tested in our demo, don't see such problem. Make sure you used latest released version.

All the best,
Alex


Post by alex.l »

Please post exact data JSON you used, so I will be able to repro that.
I believe it shouldn't be related to Salesforce. Try to use same data in vanilla, or we can do it ourselves, but we need data JSON.

All the best,
Alex


Post by Maxim Gorkovsky »

Hello.
I tried this in your salesforce organization, and I cannot see the issue there. I see project gets instantiated with 2-day duration and all tasks have the same duration. Could you please check if you see the issue still? Maybe some data was changed?


Post by mrefaat »

Hi Max,
This is the project link:
https://klenka5-dev-ed.develop.lightning.force.com/lightning/r/cwproject360__Project__c/a01d20000055Oq4AAE/view

Start: 8/8/2024
Finish : 8/10/2025

If you opened the console , you will see these errors

Uncaught (in promise) Error: Negative duration at t0.setEndDate (eval at <anonymous> (eval at <anonymous> (

startDate > endDate for TimeSpan record with id: _generatedTimeSpan_1e125d4b-7834-4a18-a820-7a4c24bab8c7


Post by Maxim Gorkovsky »

I do not see these errors. Tried reloading with the console opened. Does this error gets logged every time on every page reload or opening gantt window? What time zone do you use? Are we sure salesforce org works the same for the account we use to access your org?


Post by mrefaat »

The issue shows every time i open the Gantt window.
My Time zone is Cairo Local Time (CLT GMT +3)
I'm using the same account you are using.

You need to click on Schedule Tasks to open the Gantt and wait until it loads then it will show the errors in the console


Post by Maxim Gorkovsky »

Reproduced, ticket opened here: https://github.com/bryntum/support/issues/9798 Thank you for report.

Solution to this problem is to specify intervals more consistently:

{
        "id": "general",
        "name": "General",
        // this marks all intervals as non working by default so you can specify shorter working intervals
        "unspecifiedTimeIsWorking": false,
        "intervals": [
          {
            "isWorking": true,
            "recurrentEndDate": "on Sun at 17:00",
            "recurrentStartDate": "on Sun at 08:00"
          },
          {
            "isWorking": true,
            "recurrentEndDate": "on Mon at 17:00",
            "recurrentStartDate": "on Mon at 08:00"
          },
          {
            "isWorking": true,
            "recurrentEndDate": "on Tue at 17:00",
            "recurrentStartDate": "on Tue at 08:00"
          },
          {
            "isWorking": true,
            "recurrentEndDate": "on Wed at 17:00",
            "recurrentStartDate": "on Wed at 08:00"
          },
          {
            "isWorking": true,
            "recurrentEndDate": "on Thu at 17:00",
            "recurrentStartDate": "on Thu at 08:00"
          },
          {
            "isWorking": false,
            "startDate": "2024-08-31",
            "endDate": "2024-09-01"
          }
        ]
      }

https://bryntum.com/products/gantt/docs/api/Gantt/model/CalendarModel#field-unspecifiedTimeIsWorking


Post by mrefaat »

Thanks a lot this solved the problem. we can close the ticket


Post Reply