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
fix: move status discovery into a class method of Meeting::Statuses
as-op862dc573b620
diff --git a/modules/meeting/app/constants/meetings/statuses.rb b/modules/meeting/app/constants/meetings/statuses.rbindex 4391489a8c0..57c587f0567 100644--- a/modules/meeting/app/constants/meetings/statuses.rb+++ b/modules/meeting/app/constants/meetings/statuses.rb@@ -41,5 +41,9 @@ module MeetingsIN_PROGRESS,CLOSED].freeze++ def self.find_by_id(id)+ AVAILABLE.find { |status| status.id == id }+ endendenddiff --git a/modules/meeting/app/workers/meetings/pdf/page_head.rb b/modules/meeting/app/workers/meetings/pdf/page_head.rbindex 3d771725c26..b61c84de16e 100644--- a/modules/meeting/app/workers/meetings/pdf/page_head.rb+++ b/modules/meeting/app/workers/meetings/pdf/page_head.rb@@ -79,11 +79,8 @@ module Meetings::PDFenddef meetings_state_color- state_color = Meetings::Statuses::AVAILABLE.find { |it| it.id == meeting.state }- return state_color.color if state_color-- # Fallback to the default color if the state is not found- Meetings::Statuses::OPEN.color+ status = Meetings::Statuses.find_by_id(meeting.state)+ (status || Meetings::Statuses::OPEN).colorenddef meeting_title