Our pure JavaScript Scheduler component


Post by striker »

This image is explaining expectation with results:

problem.png
problem.png (53.79 KiB) Viewed 862 times

As you can see, Task #3190 should stay not changed, because initial startDate & endDate is not in non working time on this resource. (so endDate should not be changed)
All tasks are scheduled manually.

This is very critical problem in my company, because we are working without multi tasks in resource at same time.

I tried to handle this by update or change event in eventStore, but without success.
After rendering non working time - gantt is modifying endDate of that event.

problem2.png
problem2.png (33.72 KiB) Viewed 862 times

I prepared test case with this example:

test-case.zip
(153.78 KiB) Downloaded 77 times

Hope for fast help!


Post by arcady »

Event also has duration and the resource calendar defines periods that the duration can be allocated in.

So the project loads Task #3190 starting 2021-08-06T08:17:51.570Z and finishing 2021-08-11T00:50:51.570Z. Then the scheduling engine calculates the task duration (it gets 4.689583333333333 days as far as I see).

After that your test case loads calendars which causes the dependent tasks rescheduling ..and one of the resource #19 new non-working intervals occurs in the middle of #3190 task. The task duration is 4.689583333333333 days so it recalculates its end date respectively.

Why do you load calendars separately after other data is loaded?


Post by striker »

Because it's separate service which is refreshing calendars every some time. This service is started after gantt rendered successfully events.

.. . and while working on gantt, calendars can change. So it will be same situation like in this example. If I will update calendar and change intervals with working dates, it will change my events which are passed through the non time ranges. It shouldn't.

Maybe some option for updating calendarManagerStore to not rescheduling that events after update?

Currently my workaround is super badly... I'm reupdating tasks after load calendars. It makes very weird animation. It should not look like this.


Post by arcady »

I'm not really following what you need calendars for. Just for highlighting non-working time?
The scheduling is consistent out of the box. And in the current implementation the one cannot just put a non-working interval in the middle of an event and expect it stays intact.

I don't clearly see your requirements but it looks like you need to implement your own custom scheduling rules. So event start/end/duration (and probably some other attributes) will be calculated the way you need.


Post by arcady »

And anyway if loading data part by part you'll see some changes/animations ..because system react on new data coming.


Post by striker »

"I'm not really following what you need calendars for. Just for highlighting non-working time?"
Something similar. We are using scheduler to showing events which are scheduled in our backend, so in every drag&drop operation we are calculating events and refreshing events start&end date in backend. We just showing results of that in Scheduler.


Post by arcady »

Ok if you want highlighting only and don't need any scheduling effect from the calendars then you could use TimeRanges feature instead.
Just don't load calendars to the calendar manager store but add records to the feature store instead.

BTW We have a ticket for disabling scheduling calculations: https://github.com/bryntum/support/issues/2327
This will allow to completely disable start/end/duration calculations. That looks close to what you want.
There is some progress on the ticket and we hope to wrap it up in September.


Post by striker »

"This will allow to completely disable start/end/duration calculations. That looks close to what you want."
This is exactly what we want.

So for this time I need to do this with TimeRanges workaround... Anyway, thanks for help. We will wait.


Post by mats »

Try downloading it again now?


Post Reply