Hello!
When modifying the allocation values of tasks in the resource diagram, the current data saving logic (splitting of allocation data) results in allocation data that is not easy for the backend to perform statistical analysis on. So, I was wondering if there is a way to override the save logic?
Here are examples of the data issues generated when modifying allocation data:
When I have the initial allocation data for a task:
{
"id": "ass01",
"start_date": "2024-06-24",
"end_date": "2024-06-29",
"duration": 5,
"delay": 0,
"value": 8,
"resource_id": "6",
"mode": "default"
}
Modification Method 1: First modify the allocation value of the last day of the task (2024-06-28) from 8 to 5 in the resource diagram. This will generate the following allocation data:
{
"id": "ass01",
"start_date": "2024-06-24",
"end_date": "2024-06-28",
"duration": 4,
"delay": 0,
"value": 8,
"resource_id": "6",
"mode": "fixedDuration"
}
{
"id": "ass02",
"start_date": "2024-06-28",
"end_date": "2024-06-29",
"duration": 1,
"delay": 4,
"value": 5,
"resource_id": "6",
"mode": "fixedDuration"
}
Modification Method 2: First modify the allocation values of the task on any day except the last day (except 2024-06-28) in the resource diagram. For example, change the value on 2024-06-27 from 8 to 5. This will generate the following allocation data:
{
"id": "ass01",
"start_date": "2024-06-24",
"end_date": "2024-06-27",
"duration": 3,
"delay": 0,
"value": 8,
"resource_id": "6",
"mode": "fixedDuration"
}
{
"id": "ass02",
"start_date": "2024-06-27",
"end_date": "2024-06-28",
"duration": 1,
"delay": 3,
"value": 8,
"resource_id": "6",
"mode": "fixedDuration"
}
{
"id": "ass03",
"start_date": "2024-06-28",
"end_date": "2024-06-29",
"duration": 1,
"delay": 4,
"value": 8,
"resource_id": "6",
"mode": "default"
}
There is no problem with the data generated by these two modification methods for now. However, note that in Method 1, the last allocation data has the mode “fixedDuration,” while in Method 2, the last allocation data has the mode “default.”
Next, perform modification operations on the two methods separately, such as reducing the task duration by 3 days (leaving only 2 days of task duration) by modifying the task duration in the grid or by dragging the task bar.
In Modification Method 1, there is no change in the task allocation data (no allocation data update request is sent to the backend).
In Modification Method 2, only the duration of the allocation data with id=ass03 is reduced by 3 days (an update request for the data with id=ass03 is sent to the backend), generating the following data:
{
"id": "ass01",
"start_date": "2024-06-24",
"end_date": "2024-06-27",
"duration": 3,
"delay": 0,
"value": 8,
"resource_id": "6",
"mode": "fixedDuration"
}
{
"id": "ass02",
"start_date": "2024-06-27",
"end_date": "2024-06-28",
"duration": 1,
"delay": 3,
"value": 8,
"resource_id": "6",
"mode": "fixedDuration"
}
{
"id": "ass03",
"start_date": "2024-06-28",
"end_date": "2024-06-29",
"duration": -2,
"delay": 4,
"value": 8,
"resource_id": "6",
"mode": "default"
}
The generated data can be parsed and displayed normally in the Gantt chart and resource diagram. However, such data makes it complex for the backend to analyze a specific resource for a task.
How can we modify the task duration to generate fewer allocation data, for example:
{
"id": "ass01",
"start_date": "2024-06-24",
"end_date": "2024-06-26",
"duration": 2,
"delay": 0,
"value": 8,
"resource_id": "6",
"mode": "default"
}