Our state of the art Gantt chart


Post by kamran812 »

Start Date is not updating at all not on drag task, taskEditor or cellEdit. Everything else (other fields like endDate, name, duration etc.) is working fine and updating when we change. We want StartDate to behave like that by default Start data on and Gantt task should be what we assign. Manually Scheduling all the tasks individually in Gantt view on dataReady function is not at all an option.
We want something on the on-owner (Gantt level), so that start date is not fixed to the project Start date and can have different start dates.

Please check the screen shots on Gantt level the start date is same and fixed and on our list view we have different start dates.

Thank you, waiting for reply.

Attachments
Screenshot 2022-11-17 113750.png
Screenshot 2022-11-17 113750.png (16.12 KiB) Viewed 424 times
Screenshot 2022-11-17 113623.png
Screenshot 2022-11-17 113623.png (72.91 KiB) Viewed 424 times
Screenshot 2022-11-17 113536.png
Screenshot 2022-11-17 113536.png (25.69 KiB) Viewed 424 times

Post by alex.l »

HI kamran812,

Here is a full guide about scheduling process https://bryntum.com/docs/gantt/guide/engine/gantt_events_scheduling
By default, the project is Forward Scheduled https://bryntum.com/docs/gantt/guide/engine/gantt_events_scheduling#forward-scheduled-project
This means tasks are scheduled to start as soon as possible included its constraints.
From docs:

In a forward scheduled project (default), the Gantt engine schedules events as soon as possible (ASAP). For such projects, the start date is mandatory and sets an implicit Start no earlier than constraint (see constraint details in below chapters) inherited by all events. This means any event having no restrictions will fall back to that date.

So, you need a reason why automatic Scheduling Engine shouldn't start event as soon as possible.
Try to apply constraint to your tasks https://bryntum.com/docs/gantt/api/Gantt/model/TaskModel#field-constraintType
https://bryntum.com/docs/gantt/guide/engine/gantt_events_scheduling#event-constraint-effect-on-the-scheduling

All the best,
Alex


Post by kamran812 »

Thank you for the reply Alex.

I get the whole point thank you for explaining.
I see we have constraintType and constraintDate at which our startDate (by default forward scheduling) depends. So at this level we want to have constraintType value set to null, which means there is no constraint present in the whole Gantt view for every individual task. So can you please let me know where I have to set this constraintType to have a value of null or simply we don't have any constraintType value and constraintDate now.

But one thing, keeping in mind that we want the tasks to be dependent on if we have dependencies and they change there start or end date according to the dependencies type eg start to finish, finish to start etc.


Post by kamran812 »

Waiting for the reply
Thank you


Post by alex.l »

Just leave these fields empty for your tasks in data.
https://bryntum.com/docs/gantt/api/Gantt/model/TaskModel#field-constraintDate
https://bryntum.com/docs/gantt/api/Gantt/model/TaskModel#field-constraintType

It also possible to change these values using TaskEditor. See Advanced tab.

All the best,
Alex


Post by kamran812 »

We don't have constrainType and constraintDate fields in our database. We want to set constraintType to empty or null on initial load or when the Gantt instance is made, when we map our data (Array of Object) coming from DB to the Bryntum Gantt.

Yes changing the values and set it to empty can work if we change the date through taskeditor or cellEdit or dragDrop property, but this will not fulfill our purpose because when we refresh the page it goes back to the same, and start dates would be same as the project date (all set to the same constraintDate).

I see in the docs a setConstraint(constraintType, constraintDate) property can this be useful in our case if yes then how and where to use this function?

Thank you


Post by kamran812 »

Please help me with this.

Thank you


Post by alex.l »

Sorry, I cannot get what you try to achieve.
Could you please describe why do you need to clear these fields if it's already empty and how do you want to keep custom startDate for tasks then? We have 2 options: manuallyScheduled and constraints. Scheduling Engine should have a reason why startDate should be different and it cannot be scheduled as soon as possible. You need to give that reason.

All the best,
Alex


Post by kamran812 »

Hi Alex,
By default the start date of all the tasks is set to the project start date which is same for every task as I mentioned above. I have set manuallyScheduled to true for every task now the start date is according to the start date which is set in DB (every task has its own start and end date).
This resolves our start date issue but now if we add dependencies the start or end date of particular tasks are not changing according to dependency.
The reason is that we need the tasks to have there own start and end date regardless of any constraint and we want automatically scheduled behavior as well (on dependency add remove dates should change)


Post by alex.l »

we need the tasks to have there own start and end date regardless of any constraint and we want automatically scheduled behavior as well

I am afraid there are 2 options:

  1. scheduling enabled
  2. scheduling disabled

If it's enabled, tasks will be scheduled according to project's direction, asap by default.
If you set manuallyScheduled: true, that task won't be scheduled.
If you set constraints, let's say, "start not earlier than", it may help you with your situation.

You could also try to do some custom logic - disable manuallyScheduled flag after some events/updates.

But the Scheduling Engine should have a reason why startDate should be different and cannot be scheduled as soon as possible. You need to provide that reason.

All the best,
Alex


Post Reply