Hi everyone,
I'm using Bryntum Gantt inside a Next.js API route to process and return scheduled data. Here's how I set up the scheduling:
const project = new ProjectModel({
tasksData: tasks,
dependenciesData: relations,
});
await project.commitAsync();
const scheduledTasks = project.taskStore.toJSON();
const scheduledDependencies = project.dependencyStore.toJSON();
res.status(200).json({ tasksData: scheduledTasks, dependenciesData: scheduledDependencies });
This works fine and returns the fully scheduled tasks and dependencies.
Problem: How to Get Only the Affected (Changed) Tasks?
I need to track only the tasks or dependencies that were changed by the scheduling engine. Here’s what I have tried:
Checking project.changes → Always returns null.
Using the change event listener → It fires, but I get all tasks, not just the ones that changed.
Using onChange on ProjectModel → Same issue; it returns everything instead of just the affected records.
What I Need:
- I’m looking for a reliable way to get only the affected (modified) tasks after scheduling.
- How can I efficiently detect tasks whose start or end date changed after scheduling?
- Is there a built-in method to compare the original data vs. the scheduled data without manually iterating?
Any guidance would be greatly appreciated! Thanks in advance.