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 more enum definitions from deprecated syntax
Klaus Zandersa1494be3e011
diff --git a/app/models/notification.rb b/app/models/notification.rbindex fdb4dad1293..c0e5f7a0e2e 100644--- a/app/models/notification.rb+++ b/app/models/notification.rb@@ -43,7 +43,7 @@ class Notification < ApplicationRecordshared: 12}.freeze- enum :reason, REASONS, _prefix: true+ enum :reason, REASONS, prefix: truebelongs_to :recipient, class_name: "User"belongs_to :actor, class_name: "User"diff --git a/modules/github_integration/app/models/github_pull_request.rb b/modules/github_integration/app/models/github_pull_request.rbindex 3a930a00ac3..b36d682e89d 100644--- a/modules/github_integration/app/models/github_pull_request.rb+++ b/modules/github_integration/app/models/github_pull_request.rb@@ -35,7 +35,7 @@ class GithubPullRequest < ApplicationRecordbelongs_to :github_user, optional: truebelongs_to :merged_by, optional: true, class_name: "GithubUser"- enum state: {+ enum :state, {open: "open",closed: "closed",deployed: "deployed"diff --git a/modules/meeting/app/models/meeting.rb b/modules/meeting/app/models/meeting.rbindex 27697a97fc5..0023ff26045 100644--- a/modules/meeting/app/models/meeting.rb+++ b/modules/meeting/app/models/meeting.rb@@ -105,7 +105,7 @@ class Meeting < ApplicationRecordafter_initialize :set_initial_valuesafter_update :send_rescheduling_mail, if: -> { saved_change_to_start_time? || saved_change_to_duration? }- enum state: {+ enum :state, {open: 0, # 0 -> default, leave values for future states between open and closedclosed: 5}diff --git a/modules/meeting/app/models/meeting_agenda_item.rb b/modules/meeting/app/models/meeting_agenda_item.rbindex e38e27eded7..64e30a5cf68 100644--- a/modules/meeting/app/models/meeting_agenda_item.rb+++ b/modules/meeting/app/models/meeting_agenda_item.rb@@ -33,7 +33,7 @@ class MeetingAgendaItem < ApplicationRecordwork_package: 1}.freeze- enum item_type: ITEM_TYPES+ enum :item_type, ITEM_TYPESbelongs_to :meeting, class_name: "StructuredMeeting"belongs_to :meeting_section, optional: falsediff --git a/modules/storages/app/models/storages/project_storage.rb b/modules/storages/app/models/storages/project_storage.rbindex 5eee6413f30..37d592bf034 100644--- a/modules/storages/app/models/storages/project_storage.rb+++ b/modules/storages/app/models/storages/project_storage.rb@@ -43,11 +43,11 @@ module Storages# There should be only one ProjectStorage per project and storage.validates :project, uniqueness: { scope: :storage }- enum project_folder_mode: {+ enum :project_folder_mode, {inactive: "inactive",manual: "manual",automatic: "automatic"- }.freeze, _prefix: "project_folder"+ }, prefix: "project_folder"scope :automatic, -> { where(project_folder_mode: "automatic") }scope :active, -> { joins(:project).where(project: { active: true }) }diff --git a/modules/storages/app/models/storages/storage.rb b/modules/storages/app/models/storages/storage.rbindex a154bbebe32..d84fd3237b7 100644--- a/modules/storages/app/models/storages/storage.rb+++ b/modules/storages/app/models/storages/storage.rb@@ -85,11 +85,11 @@ module Storagesscope :in_project, ->(project_id) { joins(project_storages: :project).where(project_storages: { project_id: }) }- enum health_status: {+ enum :health_status, {pending: "pending",healthy: "healthy",unhealthy: "unhealthy"- }.freeze, _prefix: :health+ }, prefix: :healthdef self.shorten_provider_type(provider_type)case /Storages::(?'provider_name'.*)Storage/.match(provider_type)