support icon indicating copy to clipboard operation
support copied to clipboard

Dependency being set to inactive on undo

Open taauntik opened this issue 11 months ago • 2 comments

Forum post

Hi Team,

We have overridden Bryntum TaskDrag to be able to support a case where successor can be dragged to a start date before the predecessors end date We have done the following-

set the dependencies to inactive calculate startdate and end date and set the lag set the dependencies back to active

   taskRecord.incomingDeps.forEach((dep) => {
        dep.active = false;
      });

const
        newStartDate = taskRecord.run('calculateStartDate'),
        newEndDate   = taskRecord.run('calculateEndDate');
        
        //calculate lag and set it
 taskRecord.incomingDeps.forEach((dep) => {
		dep.setLag(-1);
});

   taskRecord?.incomingDeps.forEach((dep) => {
        dep.active = true;
      });

This along with the allowNonWorkingTimeSNET flag will allow me to have a successor with start date earlier than predecessors end date.

now when i undo this action the depndency start date,end date gets undone but the dependency becomes inact9ve

This used to work prior to our revision adoption but now once the checkout to a previous revision happens dependency active state is not set properly

What is the correct way of doing this? should we not be setting active state of dependency to false?

To recreate- Paste the content of the attached file to the editor in https://bryntum.com/products/gantt/examples/realtime-updates/

Also attached is a video of recreation

https://github.com/user-attachments/assets/23942c4e-62fc-4d56-a586-bdf39f79d4b0

Use the code below to reproduce Revision_ex.txt

taauntik avatar Apr 09 '25 14:04 taauntik

Not reproducible when using the user's override for task drag in the plain advanced example (seems to be "revisions"-specific).

canonic-epicure avatar Apr 15 '25 07:04 canonic-epicure

Yes we need to use Revisions example We use revisions and we faced this issue only after moving to revisions

to recreate we need to use Revisions example of bryntum

sbelmannu avatar Apr 25 '25 06:04 sbelmannu

Hi @bmblb Any update on this issue?

varprak avatar May 06 '25 07:05 varprak

@varprak Hello. PR is is being reviewed at the moment. We're almost there

bmblb avatar May 28 '25 09:05 bmblb