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] apply the correct color to life cycle header icons

Tobias Dillmannbf6ef1a9f013
diff --git a/app/models/queries/projects/selects/life_cycle_step.rb b/app/models/queries/projects/selects/life_cycle_step.rb
index 6143283809b..3f9a405cbbe 100644
--- a/app/models/queries/projects/selects/life_cycle_step.rb
+++ b/app/models/queries/projects/selects/life_cycle_step.rb
@@ -59,10 +59,19 @@ class Queries::Projects::Selects::LifeCycleStep < Queries::Selects::Base
end
def action_menu_header(button)
+ # Show the proper icon for the definition with the correct color.
icon = life_cycle_step.is_a?(Project::StageDefinition) ? :"git-commit" : :diamond
- button.with_leading_visual_icon(icon:)
+ button.with_leading_visual_icon(icon:, classes: helpers.hl_inline_class("life_cycle_step_definition", life_cycle_step))
+
+ # As all other action menu headers, we will show an action icon and the caption:
button.with_trailing_action_icon(icon: :"triangle-down")
caption.to_s
end
+
+ private
+
+ def helpers
+ @helpers ||= Object.new.extend(ColorsHelper)
+ end
end