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 rubocop issues
Klaus Zanders3f20102c7be7
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rbindex 2823f88bb3b..7e518aa26ae 100644--- a/app/controllers/projects_controller.rb+++ b/app/controllers/projects_controller.rb@@ -53,7 +53,7 @@ class ProjectsController < ApplicationController:projectsend- def index # rubocop:disable Format/AbcSize+ def index # rubocop:disable Metrics/AbcSizerespond_to do |format|format.html doflash.now[:error] = @query.errors.full_messages if @query.errors.any?diff --git a/app/models/attachment.rb b/app/models/attachment.rbindex b1d7ae1942c..2b962ae3107 100644--- a/app/models/attachment.rb+++ b/app/models/attachment.rb@@ -29,13 +29,13 @@require "digest/md5"class Attachment < ApplicationRecord- enum status: {+ enum :status, {uploaded: 0,prepared: 1,scanned: 2,quarantined: 3,rescan: 4- }.freeze, _prefix: true+ }, prefix: truebelongs_to :container, polymorphic: truebelongs_to :author, class_name: "User"diff --git a/app/models/ldap_auth_source.rb b/app/models/ldap_auth_source.rbindex d6cd746c2ac..3a7b2ccce40 100644--- a/app/models/ldap_auth_source.rb+++ b/app/models/ldap_auth_source.rb@@ -46,11 +46,11 @@ class LdapAuthSource < ApplicationRecordprepend ::Mixins::UniqueFinder- enum tls_mode: {+ enum :tls_mode, {plain_ldap: 0,simple_tls: 1,start_tls: 2- }.freeze, _default: :start_tls+ }, default: :start_tlsvalidates :tls_mode, inclusion: { in: tls_modes.keys }validates :host, :port, :attr_login, presence: truediff --git a/app/models/notification.rb b/app/models/notification.rbindex 65dff4c23ab..fdb4dad1293 100644--- a/app/models/notification.rb+++ b/app/models/notification.rb@@ -43,8 +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/app/models/principal.rb b/app/models/principal.rbindex 20a0b51e10a..e8d1a444872 100644--- a/app/models/principal.rb+++ b/app/models/principal.rb@@ -31,12 +31,12 @@ class Principal < ApplicationRecord# Account statuses# Disables enum scopes to include not_builtin (cf. Principals::Scopes::Status)- enum status: {+ enum :status, {active: 1,registered: 2,locked: 3,invited: 4- }.freeze, _scopes: false+ }, scopes: falseself.table_name = "#{table_name_prefix}users#{table_name_suffix}"diff --git a/app/models/project.rb b/app/models/project.rbindex cb377c6b5ad..f2078192f3c 100644--- a/app/models/project.rb+++ b/app/models/project.rb@@ -174,7 +174,7 @@ class Project < ApplicationRecordscopes :activated_time_activity,:visible_with_activated_time_activity- enum status_code: {+ enum :status_code, {on_track: 0,at_risk: 1,off_track: 2,diff --git a/app/models/query/timelines.rb b/app/models/query/timelines.rbindex 6b445283418..00076b708f9 100644--- a/app/models/query/timelines.rb+++ b/app/models/query/timelines.rb@@ -30,7 +30,7 @@ module Query::Timelinesextend ActiveSupport::Concernincluded do- enum timeline_zoom_level: { days: 0, weeks: 1, months: 2, quarters: 3, years: 4, auto: 5 }+ enum :timeline_zoom_level, { days: 0, weeks: 1, months: 2, quarters: 3, years: 4, auto: 5 }validates :timeline_zoom_level, inclusion: { in: timeline_zoom_levels.keys }serialize :timeline_labels, type: Hash