Content
Extends work packages behavior
Added by Jose Luc Voltaire about 7 years ago
Hello,
I would like to extends/override work packages behavior for estimated time.
Now, when you enter an estimated time for a work package, then add child work packages, the parent estimated time is lost in favor of the sum of the children estimated time.
In my workflow, the top-level work packages are estimated and the child work packages are added as the work goes. Therefore i cannot track the spent time against the estimated time as the value is not available any longer.
I would like to add a new field (original_estimated_time) which will be set when the parent work package estimated time is set and to display this value in the work package list column.
That way it will be easy to compare to the spent time and the sum of the children estimated time (if set) to this original_estimated_time value.
Although I am new to Ruby development, I took a look to the work package model (7.3.2) and the openproject-proto_plugin repository but I didn’t find out how to properply extends/override a core class behavior.
I also notice that the location of the code responsible for updating the ancestors estimated time has moved between the 7.3.2 tag and dev branch from work packages model to work packages service.
I am looking for advices/tips/leads about how to do this through a plugin.
Thank you.
Replies (1)
Hi, Jose Luc,
Have you considered Custom Field for this purpose? From your description I understand you want just to enter it and show in the grid. CFs are exactly for this purpose. And it is much more simpler solution than writing a plugin.