Skip to content

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

Shwo correct user when rendering budget

Oliver Günther33df972924df
diff --git a/modules/budgets/app/components/budgets/actual_labor_budget_items_component.rb b/modules/budgets/app/components/budgets/actual_labor_budget_items_component.rb
index 64af4e48cdb..ae81f9bf830 100644
--- a/modules/budgets/app/components/budgets/actual_labor_budget_items_component.rb
+++ b/modules/budgets/app/components/budgets/actual_labor_budget_items_component.rb
@@ -28,7 +28,7 @@
# See COPYRIGHT and LICENSE files for more details.
# ++
-class Budgets::ActualLaborBudgetItemsComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent
+class Budgets::ActualLaborBudgetItemsComponent < ApplicationComponent
options :budget, :project
def by_work_package_and_time_entry
@@ -58,7 +58,7 @@ class Budgets::ActualLaborBudgetItemsComponent < ApplicationComponent # rubocop:
end
def entry_user(entry)
- entry.user.name
+ helpers.avatar(entry.principal, hide_name: false, size: :mini)
end
def entry_costs(entry)
diff --git a/modules/budgets/app/components/budgets/planned_labor_budget_items_component.rb b/modules/budgets/app/components/budgets/planned_labor_budget_items_component.rb
index 99ac0cc1044..c154bbd7c64 100644
--- a/modules/budgets/app/components/budgets/planned_labor_budget_items_component.rb
+++ b/modules/budgets/app/components/budgets/planned_labor_budget_items_component.rb
@@ -28,7 +28,7 @@
# See COPYRIGHT and LICENSE files for more details.
# ++
-class Budgets::PlannedLaborBudgetItemsComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent
+class Budgets::PlannedLaborBudgetItemsComponent < ApplicationComponent
options :budget, :project
def item_hours(item)
@@ -36,7 +36,7 @@ class Budgets::PlannedLaborBudgetItemsComponent < ApplicationComponent # rubocop
end
def item_user(item)
- item.user.name
+ helpers.avatar(item.principal, hide_name: false, size: :mini)
end
def item_comments(item)