TaskSchedulingMode and predecessors issue

Hello, there have some issues need your help.

//#1

I found when the taskSchedulingMode property was set as auto Conditioning mode, this just check the subtasks.

When I drag subtask's start date before this parent's end date and they have FS relationship, that situation is allowed

But when the parent's auto scheduling event, the subtask will be checked and go back to the FS relationship should be.

//#2

And the Offset days will not be updated from task drag at Gantt UI.

If two tasks have FS relationship, I can drag the subtask's start date after the parent's end date and add interval days.

I checked the task args's data, the predecessors property is not changed still "ID + FS".

It can also go back the real args's data position when the parent's auto ordination.

// # 3

Finally, at this demo code:

https://www.syncfusion.com/kb/8005/render-gantt-with-entity-framework

The predecessors relationship set from Gantt UI (not the task detail dialog) will not go in the updateModifiedGanttRecords function.

The ActionComplete's args.requestType is "validatePredecessor" when the line focus on task, and when the relationship set success it will has "drawConnectorLine" requestType.


Thanks your help

Best regards

3 Replies

SR Suriyaprasanth Ravikumar Syncfusion Team November 1, 2017 11:50 AM UTC

Hi Jacob, 
 
Please find the response below. 
 
Query1: When the parent's auto scheduling event, the subtask will be checked and go back to the FS relationship? 
Query2: If two tasks have FS relationship, I can drag the subtask's start date after the parent's end date and add interval days, the predecessors property is not changed still "ID + FS". 
Answer: We have analyzed your query, were the reported issues are actual behavior of the Gantt control. In order to validate the predecessor link on task bar editing action you can use the predecessor validation dialog support. By using this support you can able to maintain the task position as per your requirement, When the predecessor validation breaks on task edit action predecessor validation dialog will be rendered with below options.  
  • Cancel, Keep the existing link
  • Remove the link and move the task start date to edited date.
  • Move the task start date to edited date and keep the link.
Refer this link to know more details about predecessor validation dialog.  
Please refer following code snippet to enable predecessor validation dialog,  
  
@(Html.EJ().Gantt("Gantt") 
    //... 
    .ClientSideEvents(cl => { 
        cl.ActionBegin("ActionBegin"); 
    }) 
) 
 
<script> 
      function ActionBegin(args) { 
           if (args.requestType == "validateLinkedTask") { 
                args.validateMode.preserveLinkWithEditing = false; 
            } 
      } 
</script> 

Query3: The predecessors relationship set from Gantt UI (not the task detail dialog) will not go in the updateModifiedGanttRecords function. 
Answer: We regret for the inconvenience caused, we can update the modified records on predecessor draw action by using “actionComplete” event with requestType as “drawConnectorLine”. 
Please find the code snippet for this. 
[CSHTML] 
 
function ActionComplete(args) {             
            //To update on indent,outdent, taskbar editing and predecessor drawn action 
            if (args.requestType == "indent" || args.requestType == "outdent" || args.requestType == "recordUpdate" || (args.requestType === 'save' && args.modifiedRecord) || args.requestType == "drawConnectorLine") { 
                var ganttRec = []; 
                // Dialog Editing 
                if (args.requestType == "save") 
                    ganttRec.push(args.modifiedRecord); 
                else if (args.requestType == "drawConnectorLine") 
                    ganttRec.push(args.currentRecord); 
                else 
                    ganttRec.push(args.data); // Cell Editing 
                if (args.updatedRecords && args.updatedRecords.length) 
                    ganttRec = ganttRec.concat(args.updatedRecords); 
                 updateModifiedGanttRecords(ganttRec);              
            } 
          //.. 
} 
 
We have updated this Knowledge base documentation, please find the updated documentation link below. 
 
Please let us know if you need any other assistance.  
 
Thanks, 
Suriyaprasanth R. 



JA Jacob November 2, 2017 06:24 AM UTC

Hello, Suriyaprasanth

Thanks the Link about predecessor explained so clearly I ignored my fault, but there still some issues be found when I try it.

If I drag subtask's start date before the parent's end date with FS relationship, no matter how I choose the subtask's date has been changed.

The chooses of "closebutton", "cancelbutton", and "OK button with select 'Cancel, Keep the existing link' " will have the same result in the Validate Editing dialog.

The task's date will not cancel this operation, it will keep the existing link but just put the date at the parent behind in order to keep the changed task date, so in fact the changed task date will not be cancel.

And I found if click the "closebutton" in the Validate Editing dialog, the updateModifiedGanttRecords function is called many times, depending on the Gantt UI be edited times.

For the Query2, I found even I choice: "Move the task start date to edited date and keep the link." The Predecessors of Task Information dialog about Offset still "0 days", not be updated.

Thank you,

Best regards



SR Suriyaprasanth Ravikumar Syncfusion Team November 3, 2017 11:06 AM UTC

Hi Jacob, 
 
We have analyzed your reported issues, please find the response below. 
 
Query1: If I drag subtask's start date before the parent's end date with FS relationship, no matter how I choose the subtask's date has been changed. 
Answer: We have analyzed your reported issue and founded issue in “actionComplete” event. This event was triggered with edited data even after cancel the taskbar edit action through the predecessor validate dialog. 
Hence we have logged a bug report as “Incorrect data on actioncomplete event on predecessor validation dialog cancel action”. It will be fixed and included in our upcoming Volume 4, 2017  SP-1 release which will be expected to out at end of November 2017. 
 
Query2:  I found if click the "closebutton" in the Validate Editing dialog, the “updateModifiedGanttRecords” function is called many times, depending on the Gantt UI be edited times. 
Answer: In Gantt the “actionComplete” event get triggered while perform taskbar editing action with all updated records like parent records and predecessor linked tasks. 
When we click the close button in the validation dialog the edited records are refreshed with the previous values. Hence “actionComplete” event get trigged with all records which are modified on editing action due to this “updateModifiedGanttRecords” method called multiple times. 
 
Query3: "Move the task start date to edited date and keep the link." The Predecessors of Task Information dialog about Offset still "0 days", not be updated. 
Answer: We have implemented the predecessor calculation and validation based on the MS-Project. Currently, We had support to set/change predecessor offset value through cellEditing and dialog editing options only, we have not perform any offset calculation on taskbar drag action.  
 
Please let us know if require further assistance on this. 
 
Thanks, 
Suriyaprasanth R. 


Loader.
Up arrow icon