Closed bennopj closed 2 years ago
Hi,
You should create a computed project custom field, with this code:
TimeEntry.where(:project => self.project.id ).sum(:hours).to_f
You should create an ISSUE custom workflow to save the project to update project custom_field:
AFTER SAVE
self.project.save unless project.nil?
I hope it helps!
Hi, the "after save" code snippet works properly when including the time entry on issue edit page, but not if the user inputs the time through the log time form.
Hi,
Create a TimeEntry type custom workflow and add the same code this new flow.
Worked perfectly. Thanks a lot for your help, @AirTibu !
Hi @tibillys, did you manage to solve that? Trying to do the same but struggling.
I have a calculated customer field in project that sums the Time Entries (of everything below that project). But in order to update this field i must go to project settings and just press save.
So i was thinking that i could use your plugin in order to save the project after a time entry.
_Originally posted by @tibillys in https://github.com/anteo/redmine_custom_workflows/issues/154#issuecomment-582270864_