Page 1 of 1

Tasks working time/dates

Posted: Tue May 23, 2023 3:22 pm
by maxivalenzano

Hi,

I have the following business requirement. I have tasks/events that might span over many days, assigned to resources with calendars that have non-working intervals. These tasks consume and generate stock material. So I need to determine how much stock will be consumed and generated during certain time periods (for example, during each day, assuming the tasks span over several days).
To do so, is there a easy way to determine either the task subintervals dates (when it stops for a non-working period and then resumes work) or the active time of task over a period (like hours worked during Monday)?
Any other ideas?

Thanks


Re: Tasks working time/dates

Posted: Wed May 24, 2023 6:58 pm
by alex.l

Hi,

There is a method https://bryntum.com/products/gantt/docs/engine/classes/_lib_engine_quark_model_abstractcalendarmixin_.abstractcalendarmixin.html#getnonworkingtimeranges
that returns non-working time ranges in date range if exists for required calendar. I hope it helps you here.

gantt.project.calendar.getNonWorkingTimeRanges(startDate, endDate);

Re: Tasks working time/dates

Posted: Thu May 25, 2023 6:14 pm
by maxivalenzano

Thanks for the reply, I can make it work with this.

best regards