anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
182 stars 72 forks source link

Is it possible to reload a children sub task until main task (grandparent or root issues)? #179

Closed ashrafalzyoud closed 4 years ago

ashrafalzyoud commented 4 years ago

2323 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)

ashrafalzyoud commented 4 years ago

@AirTibu @picman if u can help

AirTibu commented 4 years ago

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.

ashrafalzyoud commented 4 years ago

@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

AirTibu commented 4 years ago

Hi,

Ok, could you please provide me the information in this structure:

Tender tracker:

Next tracker Next tracker And soon...

ashrafalzyoud commented 4 years ago

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

ashrafalzyoud commented 4 years ago

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

ashrafalzyoud commented 4 years ago

@AirTibu any feedback

AirTibu commented 4 years ago

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.

ashrafalzyoud commented 4 years ago

before save or after save

ashrafalzyoud commented 4 years ago

Perfect perfect perfect 👏👏👏👏

AirTibu commented 4 years ago

After save

ashrafalzyoud commented 4 years ago

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

AirTibu commented 4 years ago

Hi,

It has effect only on parents and not on all issues in tracker. See the below scenarios:

image

image

image

image

I hope its help!

ashrafalzyoud commented 4 years ago

thx for you brother perfect this what i want