Hi team,
While pushing the dependencies from process model to project, bryntum gives a alert For invalid dependencies as below. How we can disable this pop and mark those dependencies as inactive dependencies automatically.
Thank you,
Swapna
Hi team,
While pushing the dependencies from process model to project, bryntum gives a alert For invalid dependencies as below. How we can disable this pop and mark those dependencies as inactive dependencies automatically.
Thank you,
Swapna
You can prepare your data and set active field of the dependency you want to deactivate to false
.
Yes you can disable the popup but you still will have to fix conflicts.
Disabling the popup: https://www.bryntum.com/products/gantt/docs/api/Gantt/view/Gantt#config-displaySchedulingIssueResolutionPopup
Events triggered when a conflict/cycle is detected:
https://www.bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-schedulingConflict
https://www.bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-cycle
So you will have to listen to the events and resolve found issues.
An example of a cycle handling listener:
project.on('cycle', ({ schedulingIssue, continueWithResolutionResult }) => {
// related tasks
schedulingIssue.getEvents()
// related dependencies
schedulingIssue.getDependencies()
// suggested resolutions
const resolutions = schedulingIssue.getResolutions()
// use the very first resolution of suggested
resolutions[0].resolve()
// continue transaction
continueWithResolutionResult('Resume')
})
Thanks for your reply. But i am not getting exactly. where i need appy this event. I am providing my code snippet. please suggest me.
Hi,
I need to reopen this ticket. One of our gantt implementions has the logic to automatically resolve scheduling cycle dependencies then hide the scheduling popup window. When doing testing, this code is throwing error. How can we resolve this issue?
cycle: ({
schedulingIssue,
continueWithResolutionResult,
}: {
schedulingIssue: any;
continueWithResolutionResult: any;
}) => {
const resolutions = schedulingIssue.getResolutions();
// use the second resolution of suggested for inActivation
resolutions[1].resolve();
continueWithResolutionResult('Resume');
schedulingIssue.collapse();
},
Error:
Cannot read properties of undefined (reading 'remove')
TypeError: Cannot read properties of undefined (reading 'remove')
at RemoveDependencyCycleEffectResolution.resolve (http://localhost:3001/static/js/bundle.js:193664:16)
at ProjectModel3.cycle (http://localhost:3001/main.916e98d5012817e95c87.hot-update.js:114:26)
at ProjectModel3.trigger (http://localhost:3001/static/js/bundle.js:11843:34)
at http://localhost:3001/static/js/bundle.js:193914:16
at new Promise (<anonymous>)
at ProjectModel3.onSchedulingIssueCall (http://localhost:3001/static/js/bundle.js:193913:16)
at ProjectModel3.onCycleSchedulingIssue (http://localhost:3001/static/js/bundle.js:193920:19)
at [CycleSymbol] (http://localhost:3001/static/js/bundle.js:193640:27)
at EngineTransaction.yieldAsync (http://localhost:3001/static/js/bundle.js:175076:38)
at EngineTransaction.readAsync (http://localhost:3001/static/js/bundle.js:175087:58)
Attached testable code.
Hello,
resolve
method has an argument - the dependency it should remove. So change your code respectively to pass there a dependency and it'll start working.schedulingIssuse
has no collapse
method
schedulingIssue.collapse();
Best regards,
Arcady