Hi guys,
I have an issue that is happening when i delete a task that is linked to another task. I am running in REST mode with .NET on the server side - When i debug, and step through the code I hit this first:
[HttpDelete]
[Route("gantt/task/{id}")] // must be <BaseURL>/task/{id} to work with gantt
public ActionResult DeleteGanttTask(int id)
{
try
{
_ganttBl.DeleteTask(id);
var response = new {action = "deleted", sid = $"{id}", tid = $"{id}"};
return Json(response);
}
catch (Exception ex)
{
_log.Error(ex);
var response = new {action = "error", sid = $"{id}", tid = $"{id}", details = ex.Message};
return Json(response);
}
THEN it hits this:
[HttpDelete]
[Route("gantt/link/{id}")] // must be <BaseURL>/link/{id} to work with gantt
public ActionResult DeleteGanttLink(int id)
{
try
{
_ganttBl.DeleteLink(id);
var response = new {action = "deleted", sid = $"{id}", tid = $"{id}"};
return Json(response);
}
catch (Exception ex)
{
_log.Error(ex);
var response = new {action = "error", sid = $"{id}", tid = $"{id}", details = ex.Message};
return Json(response);
}
}
The issue comes when it steps to the DeleteGanttLink, it is trying to delete a link that no longer exists. Which throws an alert “undefined”… did something change? We are running 4.1.9 Professional - The code works fine when just trying to delete a link, but this is not efficient for users who need to delete a large amount of tasks. Any ideas? I can provide more code, but can’t reproduce in a snippet.