We are very appealed to the look and feel of event buffers ("travel times"). However we figured that they are not respected during event scheduling. Is there a flag or a configuration which changes this? What we try to do is add an offset (e.g. 45 minutes) to an event, that does NOT respect the working time calendar assigned to the event, but still influences scheduling when connected to a different event.
How it currently is:
Screenshot 2023-01-27 at 09.53.27.png (17.31 KiB) Viewed 193 times
What we need:
Screenshot 2023-01-27 at 09.57.37.png (18.5 KiB) Viewed 193 times
You can implement this on the application level in the meantime:
// override the standard event model class
class MyEvent extends EventModel {
// override method calculating event constraining intervals
* calculateEarlyStartDateConstraintIntervals() {
const intervals = yield * super.calculateEarlyStartDateConstraintIntervals();
const preamble = this.preamble.milliseconds;
for (const interval of intervals) {
// if that an interval built by a dependency
if (interval.owner.isDependencyModel) {
// adjust the interval data by the event preamble (and the predecessor postamble) field value
interval.startDate = new Date(
interval.startDate.getTime() + preamble + interval.owner.fromEvent.postamble.milliseconds
);
}
}
return intervals;
}
// there is also a similar calculateEarlyEndDateConstraintIntervals method that needs to be overridden too
// if you want the logic to also cover Finish-To-Finish and Start-To-Finish dependencies
}
// tell scheduler we use our custom model
const scheduler = new SchedulerPro({
project : {
eventModelClass : MyEvent,
...