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] rename method

Tobias Dillmannfdb32f176c69
diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rb
index b6c2f49a432..67cb4292198 100644
--- a/app/components/projects/row_component.rb
+++ b/app/components/projects/row_component.rb
@@ -100,7 +100,7 @@ module Projects
def life_cycle_step_column(column)
return nil unless user_can_view_project?
- life_cycle_step = project_life_cycle_step_by_definition(column.life_cycle, project)
+ life_cycle_step = project_life_cycle_step_by_definition(column.life_cycle_step_definition, project)
return nil if life_cycle_step.blank?
diff --git a/app/models/queries/projects/selects/life_cycle_step.rb b/app/models/queries/projects/selects/life_cycle_step.rb
index 028b9ad72c0..47d91507e7d 100644
--- a/app/models/queries/projects/selects/life_cycle_step.rb
+++ b/app/models/queries/projects/selects/life_cycle_step.rb
@@ -44,32 +44,32 @@ class Queries::Projects::Selects::LifeCycleStep < Queries::Selects::Base
end
def caption
- life_cycle.name
+ life_cycle_step_definition.name
end
- def life_cycle
- return @life_cycle if defined?(@life_cycle)
+ def life_cycle_step_definition
+ return @life_cycle_step_definition if defined?(@life_cycle_step_definition)
- @life_cycle = Project::LifeCycleStepDefinition
- .find_by(id: attribute[KEY, 1])
+ @life_cycle_step_definition = Project::LifeCycleStepDefinition
+ .find_by(id: attribute[KEY, 1])
end
def available?
- life_cycle.present?
+ life_cycle_step_definition.present?
end
def action_menu_header(button)
# Show the proper icon for the definition with the correct color.
- icon = case life_cycle
+ icon = case life_cycle_step_definition
when Project::StageDefinition
:"git-commit"
when Project::GateDefinition
:diamond
else
- raise "Unknown life cycle definition for: #{life_cycle}"
+ raise "Unknown life cycle definition for: #{life_cycle_step_definition}"
end
- classes = helpers.hl_inline_class("life_cycle_step_definition", life_cycle)
+ classes = helpers.hl_inline_class("life_cycle_step_definition", life_cycle_step_definition)
button.with_leading_visual_icon(icon:, classes:)
# As all other action menu headers, we will show an action icon and the caption: