Hello,
I've been facing an issue with my Gantt chart in the application. Specifically, the issue arises after I add a new item to the chart - the Gantt chart does not refresh automatically. I've noticed that the problem does not occur when editing existing items, only when adding new ones.
I'm using ODataV4Adaptor for handling data. Below is a sample POST request I send to the server:
--batch_9043fdce-793e-404b-8fd2-c37fe53ccaef
Content-Type: multipart/mixed; boundary=changeset_e49a9bfe-bc59-44bf-a1f3-d791cdce171c
--changeset_e49a9bfe-bc59-44bf-a1f3-d791cdce171c
Content-Type: application/http
Content-Transfer-Encoding: binary
POST EmployeeRoles HTTP/1.1
Accept: application/json, text/javascript, */*; q=0.01
Content-Id: 0
Content-Type: application/json; charset=utf-8
{"RoleId":"C01","StartDate":"2023-01-09T05:00:00.000Z","EndDate":"2023-01-11T21:00:00.000Z","Id":"2","EmployeeId":1}
--changeset_e49a9bfe-bc59-44bf-a1f3-d791cdce171c--
--batch_9043fdce-793e-404b-8fd2-c37fe53ccaef--
The server responds with:
{
"responses": [
{
"id": "0",
"atomicityGroup": "a9bab786-d48c-4c9b-a332-fb3cdb899e08",
"status": 201,
"headers": {
"location": "https://******/odata/EmployeeRoles/$count?key=211",
"content-type": "application/json; odata.metadata=minimal; odata.streaming=true; charset=utf-8",
"odata-version": "4.0"
},
"body": {
"@odata.context": "https://******/odata/$metadata#EmployeeRoles/$entity",
"Id": 211,
"StartDate": "2023-01-09T06:00:00+01:00",
"EndDate": "2023-01-11T22:00:00+01:00",
"EmployeeId": 1,
"RoleId": "C01",
"Name": ""
}
}
]
}The response code is 201, which suggests that the new item has been successfully added to the database. However, despite this, the Gantt chart does not refresh automatically. There are no errors showing in the console that could help me understand what's happening.
Has anyone encountered a similar issue or can provide insight into what I could do to resolve this problem? Maybe I need to apply a refresh mechanism that I am currently unaware of?
Thank you in advance for any help!
Hi Krzysztof
Greetings from Syncfusion support.
We are unable to replicate the reported issue.Can you please replicate the issue in attached sample or please share us issue replicable sample if possible. Attached sample for your reference.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/CRUD_Sample-893983578.zip
Regards,
Lokesh
Hello Lokesh,
I attach the archive with the compressed project. Please check and let me know what I should improve.
Hi Krzysztof
We are able to replicate the issue and validated that we have not received the data which is passed from server end, so that record does not gets updated. So we will validate this further and update you within two business days June 18th 2023.
Until then we appreciate your patience.
Regards,
Lokesh
Hi Krzsztof
We have thoroughly reviewed your query and replicated the problem in the provided sample.
Upon further investigation, we identified that the record not added while using odataAdaptor is indeed an issue. To address the problem, we have logged a bug request, and the fix will be included in the upcoming patch release scheduled for August 9th , 2023. You can track the status of this bug and its resolution by visiting the feedback link provided below:
Note: To view the above feedback, kindly login into your account.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization
Regards,
Udhayakumar
Krzysztof
Thankyou for your patience
We are glad to announce that fix for the issue “Record was not added in gantt while using O data adaptor ” has been rolled out in our patch release (v22.2.7). So please upgrade to our latest version to resolve the problem.
Release Notes: https://ej2.syncfusion.com/documentation/release-notes/22.2.7/?type=all#gantt-chart
Please contact us if you require any further assistance.
Regards
Ajithkumar G
Hello and welcome,
Unfortunately, I don't think the problem has been solved. After changing package.json line 26 to: "@syncfusion/ej2-angular-gantt": "^22.2.9", nothing changed in how gantt works. After adding a new row, still the gantt view is not updated with the new row. Please re-verify.
Krzysztof
I apologize for any inconvenience this may have caused. We have reviewed your query and have been able to replicate the issue that you have reported. The issue is due to missing some use cases to check. We are currently working with high priority to ensure the fix with all possible scenarios and the fix will be included in the upcoming patch release, which is scheduled to be rolled out on August 30, 2023.
Regards,
Udhayakumar
Krzysztof
We have fixed the issue internally and provide you with the custom patch to resolve the issue, please find the instruction given below
How to use the patch:
Custom Patch : https://www.syncfusion.com/downloads/support/directtrac/general/ze/ej2-gantt-22.2.11-943001200
Note: We will include the fix in our next weekly patch release which will scheduled to be rolled out on end of September 6th 2023
Regards,
Udhayakumar
Ok, now we can say it's working, but I see that you've moved away from the batch approach to individual requests. Generally, I wouldn't have a problem with this, but I don't understand why you're sending an array with a single element instead of just one element?
Krzysztof
We have reviewed your query, but we are not sure which query you are referring to. To validate further, could you please provide us with the following information?
Regards,
Udhayakumar