BoldDesk®Customer service software with ticketing, live chat & omnichannel support, starting at $99/mo for unlimited agents. Try for free!
Hi,
I have Gantt task with the StartDate & EndDate property set from it's segments, see the following code below:
var segments = (await repository.GetWorkingCalendarsAsync(plant.PlantCode)).Select((e, sidx) =>
{
return new ProductionOrderGanttSegmentModel
{
SegmentId = segmentId++,
TaskId = taskId,
PlantId = plant.PlantCode,
SegmentStartDate = e.Date,
SegmentDuration = e.Hours!.ToString(),
SegmentEndDate = e.Date.AddHours(e.Hours.Value),
};
}).ToList();
gantt.Add(new ProductionOrderGanttModel
{
TaskId = taskId,
Plant = plant,
TimeSegments = segments,
StartDate = segments.OrderBy(e => e.SegmentStartDate)?.First().SegmentStartDate,
EndDate = segments.OrderByDescending(e => e.SegmentEndDate)?.First().SegmentEndDate,
});
Move to the Page.razor, when I set
<SfGantt Data source="@gantt">
The task's timeline EndDate is correct --> 1/2/2025 04:00 PM
but if the last segment's EndDate become incorrect if I apply the segment into SfGantt like the following code below:
<SfGantt Data source="@gantt">
<GanttSegmentFields DataSource="@segments">
<SfGantt>
Problem details:
What is the causes of the issue? How to solve this?
Thank you for anyone who helped.
Hi Muhammad,
Greetings from Syncfusion
Support,
Before proceeding, we kindly request you to share more information to help us identify the cause of the issue. We request you to share more information to achieve your requirement. Kindly share the details below.
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/FetchData-1761225562.zip
Once we receive this
information, we will be better equipped to identify the root cause of the issue
and provide you with the necessary assistance.
Regards,
Ajithkumar G
Hi Ajithkumar,
Thank you for your response.
Here I attach the complete codes related to the Gantt Chart (not complete codes of whole project). The zip file containing:
#DataSource from Enumerable values
Complete codes/Gantt_DataSource.csv
Complete codes/GanttSegments_DataSource.csv
#Razor component for the UI
Complete codes/
Index.razor
#Back code
Complete codes/ProductionOrderViewModel.cs
Complete codes/ProductionOrderGanttModel.cs
Complete codes/ProductionOrderGanttSegmentModel.cs
#Screen recording
The issue is triggered directly after page loading (no additional steps)
#Package version
Syncfusion.Blazor 27.2.2
Syncfusion.Blazor.Themes 27.2.2
I attaches the zip files containing the mentioned data above, let me know if you still need something else.
Regards,
Irwan
Here is the steps to reproduce the issue:
Hi Muhammad,
We have ensured that the shared Excel file,
based on the first record and segment, renders the same data on our end, and
the issue has not been replicated. Therefore, we need to check the overall
dataSource in the Gantt chart. We need to convert the CSV file to a dataSource,
then validate it. We will ensure everything is in order and share the details
on Nov 27, 2024.
Regards,
Ajithkumar G
We have identified the reported behavior as an issue on our end and have logged it as “Issue with incorrect segment duration and end date in Gantt Dialog” We sincerely appreciate your effort in reporting this issue and helping us enhance our product.
Regards,
Vignesh Sivalingam
Hi
Muhammad,
We are glad to announce that our Essential Studio® 2024 Volume 4 Main
Release v28.1.33 is rolled out and is available for download under the
following link.
https://www.syncfusion.com/forums/195512/essential-studio-2024-volume-4-main-release-v28-1-33-is-available-for-download
The fix for the issue “Issue with
incorrect segment duration and end date in grid end” has been rolled out in our
Volume 4 Main Release v28.1.33. So upgrade to our latest version to resolve the
problem.
Sample link and dataSource as attached zip file.
Root cause: The task end date update is not handled after calculating the
segment using the UpdateSegmentCollection() method.
Release notes: https://blazor.syncfusion.com/documentation/release-notes/28.1.33?type=all#gantt-chart
We thank you for your support and appreciate your patience in waiting for this
release. Please get in touch with us if you would require any further
assistance.
Regards,
Ajithkumar G
Hello Team,
Thank you for your help, I'm very appreciates that. I will check the new release.
Best Regards,
Muhammad
Hi Dev,
You’re welcome! I’m glad it helped. If you need any more assistance, feel free to ask.
Regards,
Kalpana.