Closed ashrafalzyoud closed 4 years ago
@AirTibu @picman if u can help
Hi,
Most probably there are some connection between levels, maybe you use some data for calculation, that's the reason why you want to recalculate all the levels.
Maybe the best way would be, if you add a code, which is running only on the lowest level and it's update all parent's fields step by step.
Could you please share with me what you want to update (recalculate) in the 'Tender', 'The electronic wallet', 'company' trackers?
Is it a custom field? If yes, what is the custom_field_id and what kind of data should be there? Is it standard field, like start_date, due_date, subject, assignee, etc? If yes, then please explain what you want on update on it.
@AirTibu in my case its (custom field ) not standard field connection between levels and the type of custom field its ( integer and float) numbers need update
as example cfs[10],cfs[11] integar cfs[12],cfs[13] float
and parent's field take computed value from child field because that i need code to reload issues to upper when im save the (bill) the user edit the issues until the tender manually
Hi,
Ok, could you please provide me the information in this structure:
Tender tracker:
What is the tracker id?
Which custom field is calculated? I need the custom field id
what is the exact calculation in the calculated field?
Next tracker Next tracker And soon...
as example Tracker ( TENDER ) tracker id =1 cfs[1]= float cfs[2]= float cfs[3]= float Tracker (The electronic wallet) tracker id =2 cfs[4]= float cfs[5]= float cfs[6]= float Tracker (company) tracker id =3 cfs[7]= float cfs[8]= float cfs[9]= float
what is the exact calculation in the calculated field? im using computed_custom_field plugin and there Calculations related to payments, allocations, assignments and financial savings from bill to company to The electronic wallet to Tenders thats why i need reload the subtasks to upper grand task to effect to tender issiue
like eaxmple Traker bill (1) cfs[10] = 100$ ,Traker bill (2) cfs[10] = 100$ Traker company (1) cfs[9] = total cfs[10] =200$ Tracker wallet (1) cfs[6] =total companys[cf9]- 1000$ Tracker Tender cfs[3]= result cfs[6] + 5000$ there many calcauations just need reload issiues or update cfs in each issiues
@AirTibu any feedback
Hi,
Honestly speaking I have no better idea, just this one:
if self.tracker_id == YOUR_BILL_TRACKER_ID
self.parent.save
self.parent.parent.save
self.root.save
end
Replace the "YOUR_BILL_TRACKER_ID" with your tracker_id number.
before save or after save
Perfect perfect perfect 👏👏👏👏
After save
Just to confirm because this formula take time its just only effect for (task 1,task2,task3,task4) --> self.tracker_id or in all tasks in same tracker (id) in same projects
Hi,
It has effect only on parents and not on all issues in tracker. See the below scenarios:
I hope its help!
thx for you brother perfect this what i want
i need when i edit the last children (bill)#5530 and save it,the all subtasks and main task only reloads (#4812,#3664,#3638) becuase im reload it manulay to recalculate its. this mean if possible when im edit last subtask after save it reload main task and subtasks upper( grandparent or root issues)