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

[#58160] show lifecycle dates in row

Tobias Dillmanna22cf911250b
diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rb
index cc8ad40c0da..21dfb448cab 100644
--- a/app/components/projects/row_component.rb
+++ b/app/components/projects/row_component.rb
@@ -101,8 +101,14 @@ module Projects
# FIXME: make this efficient
ls = Project::LifeCycleStep.find_by(id: column.life_cycle_step.id, project:)
- # FIXME: we are interested in the start/end date to display values here instead of the name
- ls&.definition&.name
+
+ return nil if ls.blank?
+
+ if ls.end_date
+ "#{helpers.format_date(ls.start_date)} - #{helpers.format_date(ls.end_date)}"
+ else
+ helpers.format_date ls.start_date.to_s
+ end
end
def created_at