Using your aggregate demo change the project model to:
project = new ProjectModel({
taskModelClass : MyTaskModel,
autoSync: true,
transport : {
load : {
url : '../_datasets/launch-saas.json'
},
sync: {
url : '../_datasets/launch-saas.json'
}
},
// This config enables response validation and dumping of found errors to the browser console.
// It's meant to be used as a development stage helper only so please set it to false for production systems.
validateResponse : true
})
Change a cost of a leaf node. Notice it does not send a sync request for any of the parent nodes. This is a current critical issue for us. Is there a quick fix for this?
That is getting me closer. When I edit a field it works. I have a more advanced case. The data is sent to the server it runs a calculation and then returns that calculation for that column. It then sets the column via the sync code and does a roll up. This still does not trigger an new update for the rolled up summary task.
I have a set up similar to your aggregate demo. Except the cost column is read only and is calculated on the server. You fill out effort and duration and when it saves it calculates cost and returns it. When it gets returned it then rolls up to the summary items. When it rolls up to the summary items it should submit a new sync request to update the summary items. The override only seems to account for manually updating the column. Is there another override I need to make this work
Do you have all fields you expect to be updated in your data model? How do you update data for that summary items, throw record update? Why do you need to store it on the server if they may be calculated?
Yes all fields are in the model. Here is an example
Start with effort at 0 which makes cost 0
Name Effort Cost
Task 1 0 0
Task 2 0 0
Then set Effort on Task 2 to 40
Name Effort Cost
Task 1 40 0
Task 2 40 0
40 gets set for effort on task 2 and task 1 via sync
Cost gets returned for task 2
Name Effort Cost
Task 1 40 0
Task 2 40 500
Cost rolls up to summary
Name Effort Cost
Task 1 40 500
Task 2 40 500
However at this point Task 1 cost does not get submitted back to the server in a sync to be saved. So in the database Task 1 has a cost of 0 which is incorrect. Now if I make cost just an editable field and enter 500 on task 1 it works, just not when the sync updates that field.
I have 1 more issue related to this. Say you have
Task1 10
---Task2 5
---Task3 5
the fix works if I change Task 3 value, Task1 then syncs. However if you just delete Task3 the total for Task1 goes to 5 but it doesnt sync the change for that task. It only syncs the removal of task3.