Content
View differences
Updated by Jens Ulferts about 6 years ago
**Situation**
* Feature duplication in view “Time sheet” and “Cost reporting”.
**Objectives**
* Reduce maintenance effort for documentation and translation
* Reduce the amount of code we need to maintain (e.g. for accessibility problems we have in both views)
**Open**
* Do we automatically activate the cost reporting module (possibly renamed) whenever the "time tracking" module is activated? This would ensure a valid target to see logged time e.g. when following a link on the work package page. Alternatively, we could disable the link or have it point to the global reporting page. Another approach is to use the widget from the overview page to display the logged time on hover.
**Acceptance criteria (to be discussed)**
* Remove [ReportsController](https://github.com/opf/openproject/blob/dev/app/controllers/time_entries/reports_controller.rb)
* Remove [TimelogController#index](https://github.com/opf/openproject/blob/dev/app/controllers/timelog_controller.rb#L48). Together with #32126, the controller should be removable completely.
* Probably remove [TimelogHelper](https://github.com/opf/openproject/blob/dev/app/helpers/timelog_helper.rb). There might be methods in there that we need to salvage.
* Remove tests from spec and spec\_legacy.
* Remove i18n keys
* Remove actions from permissions
* Remove [both menu entries for time logging](https://github.com/opf/openproject/blob/dev/config/initializers/menus.rb). Remove [hiding of menu entries functionality](https://github.com/opf/openproject/blob/dev/modules/reporting/lib/open_project/reporting/engine.rb#L84-L89) for the now removed menu entries.
* Remove [TimelogControllerPatch](https://github.com/opf/openproject/blob/dev/modules/reporting/lib/open_project/reporting/patches/timelog_controller_patch.rb) from reporting
* Rename "Cost reports" throughout the application (e.g. the module name) #31728 #31728
* Remove dysfunctional code of the [WorkPackageCostlogController](https://github.com/opf/openproject/blob/dev/modules/reporting/app/controllers/work_package_costlog_controller.rb) as well as the routes and additions to the permission.
* Create aspects folder (similar to modules). Aspects are chunks of code that handle concerns appearing repeatedly within the application (e.g. scheduling, assignable).
* Add a time\_logging aspect (Aggregate existing, time logging focused code in here). It might also become a module as it also has user facing parts e.g. the API and front end.
* Add a cost\_logging aspect (Aggregate existing code, cost logging focused code in here)
* TBD: add budgets aspect (might not be necessary but without the code is more intertwined on the module level)
* Move code extending members (mostly rates) to members
* Move [logged time/costs eager loading patch](https://github.com/opf/openproject/blob/dev/modules/costs/lib/open_project/costs/patches/work_package_eager_loading_patch.rb) from costs to work package proper. Avoid removing time\_entries join in the patch which is added in other eager loading.
* Remove code made superfluous by #32126
* Remove code for [TimelogController#create, TimelogController#update, TimelogController#destroy](https://github.com/opf/openproject/blob/dev/app/controllers/timelog_controller.rb#L103-L155),
* remove associated routes
* remove specs
* remove i18n keys
* remove actions from permissions
* Feature duplication in view “Time sheet” and “Cost reporting”.
**Objectives**
* Reduce maintenance effort for documentation and translation
* Reduce the amount of code we need to maintain (e.g. for accessibility problems we have in both views)
**Open**
* Do we automatically activate the cost reporting module (possibly renamed) whenever the "time tracking" module is activated? This would ensure a valid target to see logged time e.g. when following a link on the work package page. Alternatively, we could disable the link or have it point to the global reporting page. Another approach is to use the widget from the overview page to display the logged time on hover.
**Acceptance criteria (to be discussed)**
* Remove [ReportsController](https://github.com/opf/openproject/blob/dev/app/controllers/time_entries/reports_controller.rb)
* Remove [TimelogController#index](https://github.com/opf/openproject/blob/dev/app/controllers/timelog_controller.rb#L48). Together with #32126, the controller should be removable completely.
* Probably remove [TimelogHelper](https://github.com/opf/openproject/blob/dev/app/helpers/timelog_helper.rb). There might be methods in there that we need to salvage.
* Remove tests from spec and spec\_legacy.
* Remove i18n keys
* Remove actions from permissions
* Remove [both menu entries for time logging](https://github.com/opf/openproject/blob/dev/config/initializers/menus.rb). Remove [hiding of menu entries functionality](https://github.com/opf/openproject/blob/dev/modules/reporting/lib/open_project/reporting/engine.rb#L84-L89) for the now removed menu entries.
* Remove [TimelogControllerPatch](https://github.com/opf/openproject/blob/dev/modules/reporting/lib/open_project/reporting/patches/timelog_controller_patch.rb) from reporting
* Rename "Cost reports" throughout the application (e.g. the module name) #31728
* Remove dysfunctional code of the [WorkPackageCostlogController](https://github.com/opf/openproject/blob/dev/modules/reporting/app/controllers/work_package_costlog_controller.rb) as well as the routes and additions to the permission.
* Create aspects folder (similar to modules). Aspects are chunks of code that handle concerns appearing repeatedly within the application (e.g. scheduling, assignable).
* Add a time\_logging aspect (Aggregate existing, time logging focused code in here). It might also become a module as it also has user facing parts e.g. the API and front end.
* Add a cost\_logging aspect (Aggregate existing code, cost logging focused code in here)
* TBD: add budgets aspect (might not be necessary but without the code is more intertwined on the module level)
* Move code extending members (mostly rates) to members
* Move [logged time/costs eager loading patch](https://github.com/opf/openproject/blob/dev/modules/costs/lib/open_project/costs/patches/work_package_eager_loading_patch.rb) from costs to work package proper. Avoid removing time\_entries join in the patch which is added in other eager loading.
* Remove code made superfluous by #32126
* Remove code for [TimelogController#create, TimelogController#update, TimelogController#destroy](https://github.com/opf/openproject/blob/dev/app/controllers/timelog_controller.rb#L103-L155),
* remove associated routes
* remove specs
* remove i18n keys
* remove actions from permissions