OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Set logged_by only if not present in args
Oliver Günthere865bd9c6ef2
diff --git a/modules/costs/app/services/time_entries/set_attributes_service.rb b/modules/costs/app/services/time_entries/set_attributes_service.rbindex 6ef416c27b7..0d787b8d6f3 100644--- a/modules/costs/app/services/time_entries/set_attributes_service.rb+++ b/modules/costs/app/services/time_entries/set_attributes_service.rb@@ -38,14 +38,14 @@ module TimeEntriesif no_project_or_context_changed?model.project = model.work_package&.projectend-- set_logged_by unless model.user_changed?end- def set_default_attributes(*)+ def set_default_attributes(attributes)set_default_userset_default_activityset_default_hours++ set_logged_by unless attributes[:logged_by]enddef set_logged_by