diff --git a/.github/codeql/config.yml b/.github/codeql/config.yml new file mode 100644 index 0000000000..7a8cebbb8b --- /dev/null +++ b/.github/codeql/config.yml @@ -0,0 +1,2 @@ +paths-ignore: + - frontend/src/vendor \ No newline at end of file diff --git a/.gitignore b/.gitignore index ccb45a8b17..32109fc042 100644 --- a/.gitignore +++ b/.gitignore @@ -92,6 +92,7 @@ npm-debug.log* /.ruby-gemset /.foreman .DS_Store +*.icloud .rspec .byebug_history diff --git a/.rubocop.yml b/.rubocop.yml index 5daaacddc9..f21951faa0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -264,9 +264,6 @@ Style/EachWithObject: Style/EmptyLiteral: Enabled: false -Style/Encoding: - Enabled: false - Style/EvenOdd: Enabled: false diff --git a/Gemfile b/Gemfile index befdfc6264..bca68f4282 100644 --- a/Gemfile +++ b/Gemfile @@ -64,7 +64,7 @@ gem 'addressable', '~> 2.8.0' gem "auto_strip_attributes", "~> 2.5" # Provide timezone info for TZInfo used by AR -gem 'tzinfo-data', '~> 1.2021.1' +gem 'tzinfo-data', '~> 1.2022.1' # to generate html-diffs (e.g. for wiki comparison) gem 'htmldiff' @@ -186,12 +186,10 @@ gem 'ruby-progressbar', '~> 1.11.0', require: false gem 'mini_magick', '~> 4.11.0', require: false -# Sentry error reporting, loaded on demand -group :sentry do - gem "sentry-delayed_job", '~> 5.1.0', require: false - gem "sentry-rails", '~> 5.1.0', require: false - gem "sentry-ruby", '~> 5.1.0', require: false -end +# Sentry error reporting +gem "sentry-delayed_job", '~> 5.2.0' +gem "sentry-rails", '~> 5.2.0' +gem "sentry-ruby", '~> 5.2.0' group :test do gem 'launchy', '~> 2.5.0' @@ -287,7 +285,7 @@ group :development, :test do gem 'danger-brakeman' end -gem 'bootsnap', '~> 1.10.0', require: false +gem 'bootsnap', '~> 1.11.0', require: false # API gems gem 'grape', '~> 1.6.0' diff --git a/Gemfile.lock b/Gemfile.lock index 0538fee9e6..705ea5000f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -183,28 +183,28 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (1.1.0) - actioncable (6.1.4.6) - actionpack (= 6.1.4.6) - activesupport (= 6.1.4.6) + actioncable (6.1.5) + actionpack (= 6.1.5) + activesupport (= 6.1.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.6) - actionpack (= 6.1.4.6) - activejob (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + actionmailbox (6.1.5) + actionpack (= 6.1.5) + activejob (= 6.1.5) + activerecord (= 6.1.5) + activestorage (= 6.1.5) + activesupport (= 6.1.5) mail (>= 2.7.1) - actionmailer (6.1.4.6) - actionpack (= 6.1.4.6) - actionview (= 6.1.4.6) - activejob (= 6.1.4.6) - activesupport (= 6.1.4.6) + actionmailer (6.1.5) + actionpack (= 6.1.5) + actionview (= 6.1.5) + activejob (= 6.1.5) + activesupport (= 6.1.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.6) - actionview (= 6.1.4.6) - activesupport (= 6.1.4.6) + actionpack (6.1.5) + actionview (= 6.1.5) + activesupport (= 6.1.5) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) @@ -212,30 +212,30 @@ GEM actionpack-xml_parser (2.0.1) actionpack (>= 5.0) railties (>= 5.0) - actiontext (6.1.4.6) - actionpack (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + actiontext (6.1.5) + actionpack (= 6.1.5) + activerecord (= 6.1.5) + activestorage (= 6.1.5) + activesupport (= 6.1.5) nokogiri (>= 1.8.5) - actionview (6.1.4.6) - activesupport (= 6.1.4.6) + actionview (6.1.5) + activesupport (= 6.1.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.4.6) - activesupport (= 6.1.4.6) + activejob (6.1.5) + activesupport (= 6.1.5) globalid (>= 0.3.6) - activemodel (6.1.4.6) - activesupport (= 6.1.4.6) + activemodel (6.1.5) + activesupport (= 6.1.5) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (6.1.4.6) - activemodel (= 6.1.4.6) - activesupport (= 6.1.4.6) + activerecord (6.1.5) + activemodel (= 6.1.5) + activesupport (= 6.1.5) activerecord-import (1.3.0) activerecord (>= 4.2) activerecord-nulldb-adapter (0.8.0) @@ -246,14 +246,14 @@ GEM multi_json (~> 1.11, >= 1.11.2) rack (>= 2.0.8, < 3) railties (>= 5.2.4.1) - activestorage (6.1.4.6) - actionpack (= 6.1.4.6) - activejob (= 6.1.4.6) - activerecord (= 6.1.4.6) - activesupport (= 6.1.4.6) - marcel (~> 1.0.0) + activestorage (6.1.5) + actionpack (= 6.1.5) + activejob (= 6.1.5) + activerecord (= 6.1.5) + activesupport (= 6.1.5) + marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.6) + activesupport (6.1.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -278,8 +278,8 @@ GEM awesome_nested_set (3.5.0) activerecord (>= 4.0.0, < 7.1) aws-eventstream (1.2.0) - aws-partitions (1.560.0) - aws-sdk-core (3.127.0) + aws-partitions (1.568.0) + aws-sdk-core (3.130.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) @@ -296,11 +296,11 @@ GEM aws-sigv4 (~> 1.1) aws-sigv4 (1.4.0) aws-eventstream (~> 1, >= 1.0.2) - bcrypt (3.1.16) + bcrypt (3.1.17) bindata (2.4.10) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bootsnap (1.10.3) + bootsnap (1.11.1) msgpack (~> 1.2) brakeman (5.2.1) browser (5.3.1) @@ -348,7 +348,7 @@ GEM commonmarker (0.23.4) compare-xml (0.66) nokogiri (~> 1.8) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) cookiejar (0.3.3) cork (0.3.0) colored2 (~> 3.1) @@ -357,7 +357,7 @@ GEM crass (1.0.6) daemons (1.4.1) dalli (3.2.1) - danger (8.4.3) + danger (8.5.0) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -444,12 +444,12 @@ GEM temple erubi (1.10.0) escape_utils (1.2.1) - et-orbi (1.2.6) + et-orbi (1.2.7) tzinfo eventmachine (1.2.7) eventmachine_httpserver (0.2.1) - excon (0.91.0) - factory_bot (6.2.0) + excon (0.92.0) + factory_bot (6.2.1) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) @@ -488,10 +488,10 @@ GEM fog-core (~> 2.1) fog-json (~> 1.1) fog-xml (~> 0.1) - fog-core (2.2.4) + fog-core (2.3.0) builder excon (~> 0.71) - formatador (~> 0.2) + formatador (>= 0.2, < 2.0) mime-types fog-json (1.2.0) fog-core @@ -499,7 +499,7 @@ GEM fog-xml (0.1.4) fog-core nokogiri (>= 1.5.11, < 2.0.0) - formatador (0.3.0) + formatador (1.1.0) friendly_id (5.4.2) activerecord (>= 4.0.0) fugit (1.5.2) @@ -550,7 +550,7 @@ GEM ice_cube (0.16.4) interception (0.5) iso8601 (0.13.0) - jmespath (1.6.0) + jmespath (1.6.1) json (2.6.1) json-jwt (1.13.0) activesupport (>= 4.2) @@ -573,8 +573,8 @@ GEM launchy (2.5.0) addressable (~> 2.7) lefthook (0.7.7) - letter_opener (1.7.0) - launchy (~> 2.2) + letter_opener (1.8.1) + launchy (>= 2.2, < 3) listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) @@ -593,7 +593,7 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.14.0) + loofah (2.15.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -648,7 +648,7 @@ GEM webfinger (>= 1.0.1) openproject-token (2.2.0) activemodel - parallel (1.21.0) + parallel (1.22.0) parallel_tests (3.7.3) parallel parser (3.1.1.0) @@ -662,7 +662,7 @@ GEM hashery (~> 2.0) ruby-rc4 ttfunk - pg (1.3.3) + pg (1.3.4) plaintext (0.3.4) activesupport (> 2.2.1) nokogiri (~> 1.10, >= 1.10.4) @@ -671,7 +671,7 @@ GEM prawn (2.4.0) pdf-core (~> 0.9.0) ttfunk (~> 1.7) - prawn-markup (0.3.4) + prawn-markup (0.3.5) nokogiri prawn prawn-table @@ -731,20 +731,20 @@ GEM rack_session_access (0.2.0) builder (>= 2.0.0) rack (>= 1.0.0) - rails (6.1.4.6) - actioncable (= 6.1.4.6) - actionmailbox (= 6.1.4.6) - actionmailer (= 6.1.4.6) - actionpack (= 6.1.4.6) - actiontext (= 6.1.4.6) - actionview (= 6.1.4.6) - activejob (= 6.1.4.6) - activemodel (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + rails (6.1.5) + actioncable (= 6.1.5) + actionmailbox (= 6.1.5) + actionmailer (= 6.1.5) + actionpack (= 6.1.5) + actiontext (= 6.1.5) + actionview (= 6.1.5) + activejob (= 6.1.5) + activemodel (= 6.1.5) + activerecord (= 6.1.5) + activestorage (= 6.1.5) + activesupport (= 6.1.5) bundler (>= 1.15.0) - railties (= 6.1.4.6) + railties (= 6.1.5) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -758,11 +758,11 @@ GEM rails-i18n (7.0.3) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (6.1.4.6) - actionpack (= 6.1.4.6) - activesupport (= 6.1.4.6) + railties (6.1.5) + actionpack (= 6.1.5) + activesupport (= 6.1.5) method_source - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) rainbow (3.1.1) rake (13.0.6) @@ -773,7 +773,7 @@ GEM rchardet (1.8.0) rdoc (6.4.0) psych (>= 4.0.0) - recaptcha (5.8.1) + recaptcha (5.9.0) json redcarpet (3.5.1) regexp_parser (2.2.1) @@ -810,7 +810,7 @@ GEM rspec-mocks (3.11.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.11.0) - rspec-rails (5.1.0) + rspec-rails (5.1.1) actionpack (>= 5.2) activesupport (>= 5.2) railties (>= 5.2) @@ -821,18 +821,18 @@ GEM rspec-retry (0.6.2) rspec-core (> 3.3) rspec-support (3.11.0) - rubocop (1.25.1) + rubocop (1.26.1) parallel (~> 1.10) parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.15.1, < 2.0) + rubocop-ast (>= 1.16.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.16.0) parser (>= 3.1.1.0) - rubocop-rails (2.13.2) + rubocop-rails (2.14.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) @@ -874,16 +874,16 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2) semantic (1.6.1) - sentry-delayed_job (5.1.1) + sentry-delayed_job (5.2.1) delayed_job (>= 4.0) - sentry-ruby-core (~> 5.1.1) - sentry-rails (5.1.1) + sentry-ruby-core (~> 5.2.1) + sentry-rails (5.2.0) railties (>= 5.0) - sentry-ruby-core (~> 5.1.1) - sentry-ruby (5.1.1) + sentry-ruby-core (~> 5.2.0) + sentry-ruby (5.2.1) concurrent-ruby (~> 1.0, >= 1.0.2) - sentry-ruby-core (= 5.1.1) - sentry-ruby-core (5.1.1) + sentry-ruby-core (= 5.2.1) + sentry-ruby-core (5.2.1) concurrent-ruby shoulda-context (2.0.0) shoulda-matchers (5.1.0) @@ -919,19 +919,19 @@ GEM test-prof (1.0.7) thor (1.2.1) tilt (2.0.10) - timecop (0.9.4) + timecop (0.9.5) trailblazer-option (0.1.2) ttfunk (1.7.0) typed_dag (2.0.2) rails (>= 5.0.4) tzinfo (2.0.4) concurrent-ruby (~> 1.0) - tzinfo-data (1.2021.5) + tzinfo-data (1.2022.1) tzinfo (>= 1.0.0) uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.8) + unf_ext (0.0.8.1) unicode-display_width (2.1.0) uri_template (0.7.0) validate_email (0.1.6) @@ -983,7 +983,7 @@ DEPENDENCIES aws-sdk-core (~> 3.107) aws-sdk-s3 (~> 1.91) bcrypt (~> 3.1.6) - bootsnap (~> 1.10.0) + bootsnap (~> 1.11.0) brakeman (~> 5.2.0) browser (~> 5.3.0) budgets! @@ -1113,9 +1113,9 @@ DEPENDENCIES secure_headers (~> 6.3.0) selenium-webdriver (~> 4.0) semantic (~> 1.6.1) - sentry-delayed_job (~> 5.1.0) - sentry-rails (~> 5.1.0) - sentry-ruby (~> 5.1.0) + sentry-delayed_job (~> 5.2.0) + sentry-rails (~> 5.2.0) + sentry-ruby (~> 5.2.0) shoulda-context (~> 2.0) shoulda-matchers (~> 5.0) spring @@ -1130,7 +1130,7 @@ DEPENDENCIES test-prof (~> 1.0.0) timecop (~> 0.9.0) typed_dag (~> 2.0.2) - tzinfo-data (~> 1.2021.1) + tzinfo-data (~> 1.2022.1) warden (~> 1.2) warden-basic_auth (~> 0.2.1) webdrivers (~> 5.0.0) diff --git a/app/cells/individual_principal_base_filter_cell.rb b/app/cells/individual_principal_base_filter_cell.rb index c8d8e87710..0d7afc4c5c 100644 --- a/app/cells/individual_principal_base_filter_cell.rb +++ b/app/cells/individual_principal_base_filter_cell.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/cells/placeholder_users/placeholder_user_filter_cell.rb b/app/cells/placeholder_users/placeholder_user_filter_cell.rb index bce0fad023..df24652abf 100644 --- a/app/cells/placeholder_users/placeholder_user_filter_cell.rb +++ b/app/cells/placeholder_users/placeholder_user_filter_cell.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/cells/placeholder_users/row_cell.rb b/app/cells/placeholder_users/row_cell.rb index daa22645df..ff94052fa2 100644 --- a/app/cells/placeholder_users/row_cell.rb +++ b/app/cells/placeholder_users/row_cell.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/cells/placeholder_users/table_cell.rb b/app/cells/placeholder_users/table_cell.rb index 4efbdce8d1..2e106831ed 100644 --- a/app/cells/placeholder_users/table_cell.rb +++ b/app/cells/placeholder_users/table_cell.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/cells/user_filter_cell.rb b/app/cells/user_filter_cell.rb index 740f1e4e05..ee1e93bdf9 100644 --- a/app/cells/user_filter_cell.rb +++ b/app/cells/user_filter_cell.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/cells/users/row_cell.rb b/app/cells/users/row_cell.rb index 709555fb83..3c2da77fbf 100644 --- a/app/cells/users/row_cell.rb +++ b/app/cells/users/row_cell.rb @@ -33,6 +33,10 @@ module Users format_time user.last_login_on unless user.last_login_on.nil? end + def created_at + format_time user.created_at + end + def status full_user_status user end diff --git a/app/cells/users/user_filter_cell.rb b/app/cells/users/user_filter_cell.rb index 9ecc25f473..7f9fbf8392 100644 --- a/app/cells/users/user_filter_cell.rb +++ b/app/cells/users/user_filter_cell.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/contracts/attachments/create_contract.rb b/app/contracts/attachments/create_contract.rb index ae94dbd695..4375392869 100644 --- a/app/contracts/attachments/create_contract.rb +++ b/app/contracts/attachments/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/attachments/delete_contract.rb b/app/contracts/attachments/delete_contract.rb index 2fa81b5e69..475ba8aad4 100644 --- a/app/contracts/attachments/delete_contract.rb +++ b/app/contracts/attachments/delete_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/attachments/prepare_upload_contract.rb b/app/contracts/attachments/prepare_upload_contract.rb index 184b542698..6f3382afe1 100644 --- a/app/contracts/attachments/prepare_upload_contract.rb +++ b/app/contracts/attachments/prepare_upload_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/attachments/validate_replacements.rb b/app/contracts/attachments/validate_replacements.rb index f98910bf66..48cad9d8a2 100644 --- a/app/contracts/attachments/validate_replacements.rb +++ b/app/contracts/attachments/validate_replacements.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/attribute_help_texts/base_contract.rb b/app/contracts/attribute_help_texts/base_contract.rb index 4c71668352..f3908eb116 100644 --- a/app/contracts/attribute_help_texts/base_contract.rb +++ b/app/contracts/attribute_help_texts/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/attribute_help_texts/create_contract.rb b/app/contracts/attribute_help_texts/create_contract.rb index a9d5d3908e..4508c7ba39 100644 --- a/app/contracts/attribute_help_texts/create_contract.rb +++ b/app/contracts/attribute_help_texts/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/attribute_help_texts/update_contract.rb b/app/contracts/attribute_help_texts/update_contract.rb index 5750ba25ea..533e15537b 100644 --- a/app/contracts/attribute_help_texts/update_contract.rb +++ b/app/contracts/attribute_help_texts/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/authentication/omniauth_auth_hash_contract.rb b/app/contracts/authentication/omniauth_auth_hash_contract.rb index 6d01e91088..f6669941aa 100644 --- a/app/contracts/authentication/omniauth_auth_hash_contract.rb +++ b/app/contracts/authentication/omniauth_auth_hash_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/base_contract.rb b/app/contracts/base_contract.rb index 00e1964f10..d02e09ce66 100644 --- a/app/contracts/base_contract.rb +++ b/app/contracts/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/concerns/assignable_custom_field_values.rb b/app/contracts/concerns/assignable_custom_field_values.rb index e4e09fd81b..63e118e2f1 100644 --- a/app/contracts/concerns/assignable_custom_field_values.rb +++ b/app/contracts/concerns/assignable_custom_field_values.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/concerns/requires_admin_guard.rb b/app/contracts/concerns/requires_admin_guard.rb index cc35f3956c..96992b4e3f 100644 --- a/app/contracts/concerns/requires_admin_guard.rb +++ b/app/contracts/concerns/requires_admin_guard.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/concerns/requires_enterprise_guard.rb b/app/contracts/concerns/requires_enterprise_guard.rb index a297763bcb..653c812e5c 100644 --- a/app/contracts/concerns/requires_enterprise_guard.rb +++ b/app/contracts/concerns/requires_enterprise_guard.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/concerns/single_table_inheritance_model_contract.rb b/app/contracts/concerns/single_table_inheritance_model_contract.rb index f21862c8ca..68a8f56109 100644 --- a/app/contracts/concerns/single_table_inheritance_model_contract.rb +++ b/app/contracts/concerns/single_table_inheritance_model_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/concerns/unchanged_project.rb b/app/contracts/concerns/unchanged_project.rb index 71cdb7d7a9..0b8a4b6e29 100644 --- a/app/contracts/concerns/unchanged_project.rb +++ b/app/contracts/concerns/unchanged_project.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/custom_actions/cu_contract.rb b/app/contracts/custom_actions/cu_contract.rb index 8ba8fb2c10..d217346daf 100644 --- a/app/contracts/custom_actions/cu_contract.rb +++ b/app/contracts/custom_actions/cu_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/custom_actions/execute_contract.rb b/app/contracts/custom_actions/execute_contract.rb index 7f3c0b61e8..262bd6e338 100644 --- a/app/contracts/custom_actions/execute_contract.rb +++ b/app/contracts/custom_actions/execute_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/custom_fields/base_contract.rb b/app/contracts/custom_fields/base_contract.rb index 4bb1c0125f..d1bdb2bb23 100644 --- a/app/contracts/custom_fields/base_contract.rb +++ b/app/contracts/custom_fields/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/custom_fields/create_contract.rb b/app/contracts/custom_fields/create_contract.rb index 47ac493349..6ea1d059ca 100644 --- a/app/contracts/custom_fields/create_contract.rb +++ b/app/contracts/custom_fields/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/custom_fields/update_contract.rb b/app/contracts/custom_fields/update_contract.rb index ad9c02766e..8ee0073e56 100644 --- a/app/contracts/custom_fields/update_contract.rb +++ b/app/contracts/custom_fields/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/empty_contract.rb b/app/contracts/empty_contract.rb index 24062c0bcd..dc3218b6cd 100644 --- a/app/contracts/empty_contract.rb +++ b/app/contracts/empty_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/groups/create_contract.rb b/app/contracts/groups/create_contract.rb index 4f9801adea..4bc90a8373 100644 --- a/app/contracts/groups/create_contract.rb +++ b/app/contracts/groups/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/groups/delete_contract.rb b/app/contracts/groups/delete_contract.rb index 8d073e26bd..ef0e5d96fe 100644 --- a/app/contracts/groups/delete_contract.rb +++ b/app/contracts/groups/delete_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/groups/update_contract.rb b/app/contracts/groups/update_contract.rb index 6d51325a4e..23c241a1a4 100644 --- a/app/contracts/groups/update_contract.rb +++ b/app/contracts/groups/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/messages/base_contract.rb b/app/contracts/messages/base_contract.rb index f6980656dd..9b887de052 100644 --- a/app/contracts/messages/base_contract.rb +++ b/app/contracts/messages/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/messages/create_contract.rb b/app/contracts/messages/create_contract.rb index d163c2c917..29a77b5280 100644 --- a/app/contracts/messages/create_contract.rb +++ b/app/contracts/messages/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/messages/update_contract.rb b/app/contracts/messages/update_contract.rb index e8287b71e2..cd0e7fa887 100644 --- a/app/contracts/messages/update_contract.rb +++ b/app/contracts/messages/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/model_contract.rb b/app/contracts/model_contract.rb index a01ab1c280..05f0678e38 100644 --- a/app/contracts/model_contract.rb +++ b/app/contracts/model_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/oauth/application_contract.rb b/app/contracts/oauth/application_contract.rb index 1d59aa7b34..87c0ee6bb8 100644 --- a/app/contracts/oauth/application_contract.rb +++ b/app/contracts/oauth/application_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/params_contract.rb b/app/contracts/params_contract.rb index 18df7e2905..72076c4a3a 100644 --- a/app/contracts/params_contract.rb +++ b/app/contracts/params_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/placeholder_users/base_contract.rb b/app/contracts/placeholder_users/base_contract.rb index 767c73903f..01b9d41978 100644 --- a/app/contracts/placeholder_users/base_contract.rb +++ b/app/contracts/placeholder_users/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/placeholder_users/create_contract.rb b/app/contracts/placeholder_users/create_contract.rb index 71712ee662..c7c2965c75 100644 --- a/app/contracts/placeholder_users/create_contract.rb +++ b/app/contracts/placeholder_users/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/placeholder_users/delete_contract.rb b/app/contracts/placeholder_users/delete_contract.rb index c5038c6a03..e4ddc12be9 100644 --- a/app/contracts/placeholder_users/delete_contract.rb +++ b/app/contracts/placeholder_users/delete_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/placeholder_users/update_contract.rb b/app/contracts/placeholder_users/update_contract.rb index 4090b308f8..f21357791a 100644 --- a/app/contracts/placeholder_users/update_contract.rb +++ b/app/contracts/placeholder_users/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/projects/base_contract.rb b/app/contracts/projects/base_contract.rb index fd456f01b6..2f1d18ff83 100644 --- a/app/contracts/projects/base_contract.rb +++ b/app/contracts/projects/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/projects/delete_contract.rb b/app/contracts/projects/delete_contract.rb index d9ad66e4b3..585202062f 100644 --- a/app/contracts/projects/delete_contract.rb +++ b/app/contracts/projects/delete_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/queries/base_contract.rb b/app/contracts/queries/base_contract.rb index ae8fdcbe9b..e2ed078289 100644 --- a/app/contracts/queries/base_contract.rb +++ b/app/contracts/queries/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/queries/copy_contract.rb b/app/contracts/queries/copy_contract.rb index 6822f0d2c9..0db3e6a064 100644 --- a/app/contracts/queries/copy_contract.rb +++ b/app/contracts/queries/copy_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/queries/create_contract.rb b/app/contracts/queries/create_contract.rb index 40d6987852..f2add2e0aa 100644 --- a/app/contracts/queries/create_contract.rb +++ b/app/contracts/queries/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/queries/update_contract.rb b/app/contracts/queries/update_contract.rb index 5454ef7ec1..875487c449 100644 --- a/app/contracts/queries/update_contract.rb +++ b/app/contracts/queries/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/queries/update_form_contract.rb b/app/contracts/queries/update_form_contract.rb index 1cb153fac2..a4e61cb205 100644 --- a/app/contracts/queries/update_form_contract.rb +++ b/app/contracts/queries/update_form_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/relations/base_contract.rb b/app/contracts/relations/base_contract.rb index 0191d9a389..9324780d69 100644 --- a/app/contracts/relations/base_contract.rb +++ b/app/contracts/relations/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/relations/create_contract.rb b/app/contracts/relations/create_contract.rb index 437707a558..07f557e77b 100644 --- a/app/contracts/relations/create_contract.rb +++ b/app/contracts/relations/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/relations/delete_contract.rb b/app/contracts/relations/delete_contract.rb index f33c33d28f..da722d02ab 100644 --- a/app/contracts/relations/delete_contract.rb +++ b/app/contracts/relations/delete_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/relations/update_contract.rb b/app/contracts/relations/update_contract.rb index 6a0ba43f42..fd0a6ac9f4 100644 --- a/app/contracts/relations/update_contract.rb +++ b/app/contracts/relations/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/roles/base_contract.rb b/app/contracts/roles/base_contract.rb index 6f109215eb..199272c226 100644 --- a/app/contracts/roles/base_contract.rb +++ b/app/contracts/roles/base_contract.rb @@ -29,7 +29,6 @@ module Roles class BaseContract < ::ModelContract attribute :name - attribute :assignable validate :check_permission_prerequisites diff --git a/app/contracts/settings/update_contract.rb b/app/contracts/settings/update_contract.rb index 87b8d7a5f3..e356859cb9 100644 --- a/app/contracts/settings/update_contract.rb +++ b/app/contracts/settings/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/types/base_contract.rb b/app/contracts/types/base_contract.rb index 3facf717a3..2a210c17bc 100644 --- a/app/contracts/types/base_contract.rb +++ b/app/contracts/types/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/user_preferences/base_contract.rb b/app/contracts/user_preferences/base_contract.rb index 41ea889100..1913fb9b3a 100644 --- a/app/contracts/user_preferences/base_contract.rb +++ b/app/contracts/user_preferences/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/user_preferences/params_contract.rb b/app/contracts/user_preferences/params_contract.rb index 681b0b617a..4cfa065734 100644 --- a/app/contracts/user_preferences/params_contract.rb +++ b/app/contracts/user_preferences/params_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/user_preferences/update_contract.rb b/app/contracts/user_preferences/update_contract.rb index 0a6ac457ad..fc74ca612f 100644 --- a/app/contracts/user_preferences/update_contract.rb +++ b/app/contracts/user_preferences/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/users/base_contract.rb b/app/contracts/users/base_contract.rb index 8fb4bd9b4b..e23c1cff00 100644 --- a/app/contracts/users/base_contract.rb +++ b/app/contracts/users/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/users/create_contract.rb b/app/contracts/users/create_contract.rb index 489bd0cd05..e7eeff6208 100644 --- a/app/contracts/users/create_contract.rb +++ b/app/contracts/users/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/users/delete_contract.rb b/app/contracts/users/delete_contract.rb index 34df307748..69bb2c21e3 100644 --- a/app/contracts/users/delete_contract.rb +++ b/app/contracts/users/delete_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/users/update_contract.rb b/app/contracts/users/update_contract.rb index 95d458c323..f3556215e2 100644 --- a/app/contracts/users/update_contract.rb +++ b/app/contracts/users/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/work_packages/base_contract.rb b/app/contracts/work_packages/base_contract.rb index 5bd93663a1..ac0a98a58e 100644 --- a/app/contracts/work_packages/base_contract.rb +++ b/app/contracts/work_packages/base_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/work_packages/create_contract.rb b/app/contracts/work_packages/create_contract.rb index f962347d0a..ce675a6476 100644 --- a/app/contracts/work_packages/create_contract.rb +++ b/app/contracts/work_packages/create_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/work_packages/create_note_contract.rb b/app/contracts/work_packages/create_note_contract.rb index ac7e675485..61f34422ea 100644 --- a/app/contracts/work_packages/create_note_contract.rb +++ b/app/contracts/work_packages/create_note_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/work_packages/delete_contract.rb b/app/contracts/work_packages/delete_contract.rb index eb31dcf17d..9335f8fbd1 100644 --- a/app/contracts/work_packages/delete_contract.rb +++ b/app/contracts/work_packages/delete_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/contracts/work_packages/update_contract.rb b/app/contracts/work_packages/update_contract.rb index beb50b9c99..5bc6cfb4ae 100644 --- a/app/contracts/work_packages/update_contract.rb +++ b/app/contracts/work_packages/update_contract.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index f99d361514..fd629c1399 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb index 6994cbc42b..ac88c82d75 100644 --- a/app/controllers/activities_controller.rb +++ b/app/controllers/activities_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/backups_controller.rb b/app/controllers/admin/backups_controller.rb index 497c4bc85d..1c1de885fe 100644 --- a/app/controllers/admin/backups_controller.rb +++ b/app/controllers/admin/backups_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/api_settings_controller.rb b/app/controllers/admin/settings/api_settings_controller.rb index 1fb0d08618..ab4371803b 100644 --- a/app/controllers/admin/settings/api_settings_controller.rb +++ b/app/controllers/admin/settings/api_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/attachments_settings_controller.rb b/app/controllers/admin/settings/attachments_settings_controller.rb index 40d7331565..5c21aed299 100644 --- a/app/controllers/admin/settings/attachments_settings_controller.rb +++ b/app/controllers/admin/settings/attachments_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/authentication_settings_controller.rb b/app/controllers/admin/settings/authentication_settings_controller.rb index 1c662e8b06..522b2fa2a5 100644 --- a/app/controllers/admin/settings/authentication_settings_controller.rb +++ b/app/controllers/admin/settings/authentication_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/display_settings_controller.rb b/app/controllers/admin/settings/display_settings_controller.rb index c5242ada96..114f0a4d13 100644 --- a/app/controllers/admin/settings/display_settings_controller.rb +++ b/app/controllers/admin/settings/display_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/general_settings_controller.rb b/app/controllers/admin/settings/general_settings_controller.rb index d8e534aa31..1dd7f5a725 100644 --- a/app/controllers/admin/settings/general_settings_controller.rb +++ b/app/controllers/admin/settings/general_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/incoming_mails_settings_controller.rb b/app/controllers/admin/settings/incoming_mails_settings_controller.rb index 88d6f36bc4..2a36954238 100644 --- a/app/controllers/admin/settings/incoming_mails_settings_controller.rb +++ b/app/controllers/admin/settings/incoming_mails_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/mail_notifications_settings_controller.rb b/app/controllers/admin/settings/mail_notifications_settings_controller.rb index 305baee12f..eb8b27b69f 100644 --- a/app/controllers/admin/settings/mail_notifications_settings_controller.rb +++ b/app/controllers/admin/settings/mail_notifications_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/notifications_settings_controller.rb b/app/controllers/admin/settings/notifications_settings_controller.rb index c9de329fbf..694742c54a 100644 --- a/app/controllers/admin/settings/notifications_settings_controller.rb +++ b/app/controllers/admin/settings/notifications_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/projects_settings_controller.rb b/app/controllers/admin/settings/projects_settings_controller.rb index fa0c31e81d..cbf0e07294 100644 --- a/app/controllers/admin/settings/projects_settings_controller.rb +++ b/app/controllers/admin/settings/projects_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/repositories_settings_controller.rb b/app/controllers/admin/settings/repositories_settings_controller.rb index 04c8da87f3..6d95e33ebb 100644 --- a/app/controllers/admin/settings/repositories_settings_controller.rb +++ b/app/controllers/admin/settings/repositories_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/users_settings_controller.rb b/app/controllers/admin/settings/users_settings_controller.rb index e5a6b18a91..810d53f254 100644 --- a/app/controllers/admin/settings/users_settings_controller.rb +++ b/app/controllers/admin/settings/users_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings/work_packages_settings_controller.rb b/app/controllers/admin/settings/work_packages_settings_controller.rb index 1b7736a23b..8ea340fee5 100644 --- a/app/controllers/admin/settings/work_packages_settings_controller.rb +++ b/app/controllers/admin/settings/work_packages_settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb index 0d643416e7..3b06d5d389 100644 --- a/app/controllers/admin/settings_controller.rb +++ b/app/controllers/admin/settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 188ed48c22..b35b6afa77 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/angular_controller.rb b/app/controllers/angular_controller.rb index 36b22c061e..89fb3e5800 100644 --- a/app/controllers/angular_controller.rb +++ b/app/controllers/angular_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/api_docs_controller.rb b/app/controllers/api_docs_controller.rb index e86c277759..a6dda4b875 100644 --- a/app/controllers/api_docs_controller.rb +++ b/app/controllers/api_docs_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6c0e09624c..5606ab455e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/attribute_help_texts_controller.rb b/app/controllers/attribute_help_texts_controller.rb index d143c925eb..87672b834f 100644 --- a/app/controllers/attribute_help_texts_controller.rb +++ b/app/controllers/attribute_help_texts_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/auth_sources_controller.rb b/app/controllers/auth_sources_controller.rb index b522cc726e..811fc2a7fd 100644 --- a/app/controllers/auth_sources_controller.rb +++ b/app/controllers/auth_sources_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 892bce0134..9b72afaeea 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/colors_controller.rb b/app/controllers/colors_controller.rb index 4d9344c49e..8aa820d143 100644 --- a/app/controllers/colors_controller.rb +++ b/app/controllers/colors_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/concerns/layout.rb b/app/controllers/concerns/layout.rb index 7fb75715ac..746336d2d0 100644 --- a/app/controllers/concerns/layout.rb +++ b/app/controllers/concerns/layout.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/custom_actions_controller.rb b/app/controllers/custom_actions_controller.rb index 23a7aeac5d..3ca9b4ae05 100644 --- a/app/controllers/custom_actions_controller.rb +++ b/app/controllers/custom_actions_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 3678e0487c..195416d0b3 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/custom_styles_controller.rb b/app/controllers/custom_styles_controller.rb index 70c023b491..ce61f20a0f 100644 --- a/app/controllers/custom_styles_controller.rb +++ b/app/controllers/custom_styles_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/enumerations_controller.rb b/app/controllers/enumerations_controller.rb index b389c4ed6b..8225196ec6 100644 --- a/app/controllers/enumerations_controller.rb +++ b/app/controllers/enumerations_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 5a6e005639..01865435c1 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 45477671cb..378dd061a5 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index f654496dbd..b027f5d6be 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/highlighting_controller.rb b/app/controllers/highlighting_controller.rb index ef34323ef2..7f817d65e1 100644 --- a/app/controllers/highlighting_controller.rb +++ b/app/controllers/highlighting_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/homescreen_controller.rb b/app/controllers/homescreen_controller.rb index dabdfa1080..9cb2cee774 100644 --- a/app/controllers/homescreen_controller.rb +++ b/app/controllers/homescreen_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index 5edbcedd18..d493f95529 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/ldap_auth_sources_controller.rb b/app/controllers/ldap_auth_sources_controller.rb index eaf0ff2b26..682e5d915b 100644 --- a/app/controllers/ldap_auth_sources_controller.rb +++ b/app/controllers/ldap_auth_sources_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index 5fcdb73ad3..d90e77c578 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index e44a51c67f..1c0f36281f 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 7e26f407ee..d3563fed65 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/news/comments_controller.rb b/app/controllers/news/comments_controller.rb index 95d34eaa55..3398dde9a1 100644 --- a/app/controllers/news/comments_controller.rb +++ b/app/controllers/news/comments_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 26c15b0fb6..7380283f7b 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/oauth/applications_controller.rb b/app/controllers/oauth/applications_controller.rb index 000a4617fa..b6140f6302 100644 --- a/app/controllers/oauth/applications_controller.rb +++ b/app/controllers/oauth/applications_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/oauth/auth_base_controller.rb b/app/controllers/oauth/auth_base_controller.rb index 1947acabb4..560873907f 100644 --- a/app/controllers/oauth/auth_base_controller.rb +++ b/app/controllers/oauth/auth_base_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/oauth/grants_controller.rb b/app/controllers/oauth/grants_controller.rb index d2c1623c5e..3510fde9a5 100644 --- a/app/controllers/oauth/grants_controller.rb +++ b/app/controllers/oauth/grants_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/onboarding_controller.rb b/app/controllers/onboarding_controller.rb index 17ce52ccb9..f7cc792b1f 100644 --- a/app/controllers/onboarding_controller.rb +++ b/app/controllers/onboarding_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/placeholder_users/memberships_controller.rb b/app/controllers/placeholder_users/memberships_controller.rb index bef11f9d71..77568aa827 100644 --- a/app/controllers/placeholder_users/memberships_controller.rb +++ b/app/controllers/placeholder_users/memberships_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/controllers/placeholder_users_controller.rb b/app/controllers/placeholder_users_controller.rb index 5fe5764d3d..3eb981ff97 100644 --- a/app/controllers/placeholder_users_controller.rb +++ b/app/controllers/placeholder_users_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/controllers/projects/archive_controller.rb b/app/controllers/projects/archive_controller.rb index eca5a76176..144a7a446c 100644 --- a/app/controllers/projects/archive_controller.rb +++ b/app/controllers/projects/archive_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/identifier_controller.rb b/app/controllers/projects/identifier_controller.rb index 2932dff05c..5cc72d8766 100644 --- a/app/controllers/projects/identifier_controller.rb +++ b/app/controllers/projects/identifier_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings/categories_controller.rb b/app/controllers/projects/settings/categories_controller.rb index e9d50d748c..76bc011f38 100644 --- a/app/controllers/projects/settings/categories_controller.rb +++ b/app/controllers/projects/settings/categories_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings/custom_fields_controller.rb b/app/controllers/projects/settings/custom_fields_controller.rb index cde0fab36f..cc4e2549a9 100644 --- a/app/controllers/projects/settings/custom_fields_controller.rb +++ b/app/controllers/projects/settings/custom_fields_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings/general_controller.rb b/app/controllers/projects/settings/general_controller.rb index 130b84d76f..c1cdc7a3c6 100644 --- a/app/controllers/projects/settings/general_controller.rb +++ b/app/controllers/projects/settings/general_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings/modules_controller.rb b/app/controllers/projects/settings/modules_controller.rb index 0949783bbe..ff9d922367 100644 --- a/app/controllers/projects/settings/modules_controller.rb +++ b/app/controllers/projects/settings/modules_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb index e76b01eb6f..58d9347f98 100644 --- a/app/controllers/projects/settings/repository_controller.rb +++ b/app/controllers/projects/settings/repository_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings/storage_controller.rb b/app/controllers/projects/settings/storage_controller.rb index 6d583f0129..46c5dbaa7e 100644 --- a/app/controllers/projects/settings/storage_controller.rb +++ b/app/controllers/projects/settings/storage_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings/types_controller.rb b/app/controllers/projects/settings/types_controller.rb index 8a63f04b5a..30cc0510d0 100644 --- a/app/controllers/projects/settings/types_controller.rb +++ b/app/controllers/projects/settings/types_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings/versions_controller.rb b/app/controllers/projects/settings/versions_controller.rb index f8a971622f..f3bf823f23 100644 --- a/app/controllers/projects/settings/versions_controller.rb +++ b/app/controllers/projects/settings/versions_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/settings_controller.rb b/app/controllers/projects/settings_controller.rb index dc1f832576..7eb8c891cf 100644 --- a/app/controllers/projects/settings_controller.rb +++ b/app/controllers/projects/settings_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects/templated_controller.rb b/app/controllers/projects/templated_controller.rb index 6357a0552e..8fcae796d5 100644 --- a/app/controllers/projects/templated_controller.rb +++ b/app/controllers/projects/templated_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ae8a7789e7..73b271cebc 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 5d4022f06b..b60825438d 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 125df1c82f..16a5f3da00 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 9972b6954d..75cf61d69f 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index f6acf431a6..ebb3822fb3 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb index a8a429928a..9db52b32cd 100644 --- a/app/controllers/sys_controller.rb +++ b/app/controllers/sys_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/types_controller.rb b/app/controllers/types_controller.rb index 51b0f07caf..a381f4a0c2 100644 --- a/app/controllers/types_controller.rb +++ b/app/controllers/types_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/users/memberships_controller.rb b/app/controllers/users/memberships_controller.rb index bb32c723ed..a2a12dcb28 100644 --- a/app/controllers/users/memberships_controller.rb +++ b/app/controllers/users/memberships_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 5ec5df6fa0..6fc99fd69d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 79e7fbd3a8..5ba93f9927 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb index a16dba4abe..148d054350 100644 --- a/app/controllers/watchers_controller.rb +++ b/app/controllers/watchers_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 83900962c3..202171d3c0 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/wiki_menu_items_controller.rb b/app/controllers/wiki_menu_items_controller.rb index 9d75b518cb..954d927107 100644 --- a/app/controllers/wiki_menu_items_controller.rb +++ b/app/controllers/wiki_menu_items_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/work_packages/auto_completes_controller.rb b/app/controllers/work_packages/auto_completes_controller.rb index e5a98867b9..93a972290d 100644 --- a/app/controllers/work_packages/auto_completes_controller.rb +++ b/app/controllers/work_packages/auto_completes_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/work_packages/bulk_controller.rb b/app/controllers/work_packages/bulk_controller.rb index 41910fbff3..df7d46e586 100644 --- a/app/controllers/work_packages/bulk_controller.rb +++ b/app/controllers/work_packages/bulk_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/work_packages/flash_bulk_error.rb b/app/controllers/work_packages/flash_bulk_error.rb index c8206cb633..d59500ee9f 100644 --- a/app/controllers/work_packages/flash_bulk_error.rb +++ b/app/controllers/work_packages/flash_bulk_error.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/work_packages/moves_controller.rb b/app/controllers/work_packages/moves_controller.rb index 681b369a43..1cd45a9422 100644 --- a/app/controllers/work_packages/moves_controller.rb +++ b/app/controllers/work_packages/moves_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/work_packages/reports_controller.rb b/app/controllers/work_packages/reports_controller.rb index f971496433..c849824c89 100644 --- a/app/controllers/work_packages/reports_controller.rb +++ b/app/controllers/work_packages/reports_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/work_packages_controller.rb b/app/controllers/work_packages_controller.rb index 3b03e56a7b..616f8f66ca 100644 --- a/app/controllers/work_packages_controller.rb +++ b/app/controllers/work_packages_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 71eb2b8a24..6352bb46f8 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/accessibility_helper.rb b/app/helpers/accessibility_helper.rb index 540ba6c7bc..9e4e37b356 100644 --- a/app/helpers/accessibility_helper.rb +++ b/app/helpers/accessibility_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index aa64a0053e..3ee9dfe089 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/angular_helper.rb b/app/helpers/angular_helper.rb index be0a00394f..93457ae2c9 100644 --- a/app/helpers/angular_helper.rb +++ b/app/helpers/angular_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 31c0978f98..cc5061040e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb index 2f232d1c84..dc551a3007 100644 --- a/app/helpers/attachments_helper.rb +++ b/app/helpers/attachments_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/attribute_help_texts_helper.rb b/app/helpers/attribute_help_texts_helper.rb index a9cdf050bb..9e40ff4d18 100644 --- a/app/helpers/attribute_help_texts_helper.rb +++ b/app/helpers/attribute_help_texts_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/augmenting_helper.rb b/app/helpers/augmenting_helper.rb index a09b290245..b9d6a37e96 100644 --- a/app/helpers/augmenting_helper.rb +++ b/app/helpers/augmenting_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/authentication_stage_path_helper.rb b/app/helpers/authentication_stage_path_helper.rb index a5154338a2..af5437d535 100644 --- a/app/helpers/authentication_stage_path_helper.rb +++ b/app/helpers/authentication_stage_path_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/avatar_helper.rb b/app/helpers/avatar_helper.rb index b2ade90c9e..40dadf9c3a 100644 --- a/app/helpers/avatar_helper.rb +++ b/app/helpers/avatar_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/backup_helper.rb b/app/helpers/backup_helper.rb index bdbe46e1f2..96188c0f13 100644 --- a/app/helpers/backup_helper.rb +++ b/app/helpers/backup_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb index d1f344c52e..96a3f5885e 100644 --- a/app/helpers/breadcrumb_helper.rb +++ b/app/helpers/breadcrumb_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/calendars_helper.rb b/app/helpers/calendars_helper.rb index 479f94112e..349bf02490 100644 --- a/app/helpers/calendars_helper.rb +++ b/app/helpers/calendars_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/colors_helper.rb b/app/helpers/colors_helper.rb index 53e7946104..84c9adbb80 100644 --- a/app/helpers/colors_helper.rb +++ b/app/helpers/colors_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/content_for_helper.rb b/app/helpers/content_for_helper.rb index 51b9fcd01a..bc84cdc8bd 100644 --- a/app/helpers/content_for_helper.rb +++ b/app/helpers/content_for_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index c53496f3ab..fff0e6645b 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/custom_styles_helper.rb b/app/helpers/custom_styles_helper.rb index 6d1a7313f6..5dd9c8d09b 100644 --- a/app/helpers/custom_styles_helper.rb +++ b/app/helpers/custom_styles_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/error_message_helper.rb b/app/helpers/error_message_helper.rb index 80494d9517..98ccda7661 100644 --- a/app/helpers/error_message_helper.rb +++ b/app/helpers/error_message_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/errors_helper.rb b/app/helpers/errors_helper.rb index 70963ccbd1..380e672318 100644 --- a/app/helpers/errors_helper.rb +++ b/app/helpers/errors_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/frontend_asset_helper.rb b/app/helpers/frontend_asset_helper.rb index 6a3374482c..8ffe43dffc 100644 --- a/app/helpers/frontend_asset_helper.rb +++ b/app/helpers/frontend_asset_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 0e4ba79c4f..7ef00ec35c 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/hide_sections_helper.rb b/app/helpers/hide_sections_helper.rb index 4f4ed21a72..e721e6add4 100644 --- a/app/helpers/hide_sections_helper.rb +++ b/app/helpers/hide_sections_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/homescreen_helper.rb b/app/helpers/homescreen_helper.rb index f89ad87576..9ec35de67e 100644 --- a/app/helpers/homescreen_helper.rb +++ b/app/helpers/homescreen_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index 391a6d0b22..b80ba754ee 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/individual_principal_hooks_helper.rb b/app/helpers/individual_principal_hooks_helper.rb index 71a9747647..8a88e734f4 100644 --- a/app/helpers/individual_principal_hooks_helper.rb +++ b/app/helpers/individual_principal_hooks_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/mail_digest_helper.rb b/app/helpers/mail_digest_helper.rb index 5915252dfe..78e27cd206 100644 --- a/app/helpers/mail_digest_helper.rb +++ b/app/helpers/mail_digest_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/mail_notification_helper.rb b/app/helpers/mail_notification_helper.rb index cb9c9c9244..65b9fb5bc0 100644 --- a/app/helpers/mail_notification_helper.rb +++ b/app/helpers/mail_notification_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 6a90a5e6e3..524dbda65f 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/messages_helper.rb b/app/helpers/messages_helper.rb index 6a2dbf3401..c66fee57a1 100644 --- a/app/helpers/messages_helper.rb +++ b/app/helpers/messages_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/meta_tags_helper.rb b/app/helpers/meta_tags_helper.rb index ee5b8cc60d..f0d6dd0107 100644 --- a/app/helpers/meta_tags_helper.rb +++ b/app/helpers/meta_tags_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/no_results_helper.rb b/app/helpers/no_results_helper.rb index e355c2d06d..310537f204 100644 --- a/app/helpers/no_results_helper.rb +++ b/app/helpers/no_results_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/oauth_helper.rb b/app/helpers/oauth_helper.rb index c6bbfb8733..7143e06890 100644 --- a/app/helpers/oauth_helper.rb +++ b/app/helpers/oauth_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/omniauth_helper.rb b/app/helpers/omniauth_helper.rb index 159639074b..947c4bd32c 100644 --- a/app/helpers/omniauth_helper.rb +++ b/app/helpers/omniauth_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rb index f788fcac3d..3502f1c986 100644 --- a/app/helpers/pagination_helper.rb +++ b/app/helpers/pagination_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/password_helper.rb b/app/helpers/password_helper.rb index 51bedcf75b..fcb61232d3 100644 --- a/app/helpers/password_helper.rb +++ b/app/helpers/password_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/placeholder_users_helper.rb b/app/helpers/placeholder_users_helper.rb index 54dda2f11d..c493ca4b70 100644 --- a/app/helpers/placeholder_users_helper.rb +++ b/app/helpers/placeholder_users_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/project_status_helper.rb b/app/helpers/project_status_helper.rb index 70a1acef25..adb77802dd 100644 --- a/app/helpers/project_status_helper.rb +++ b/app/helpers/project_status_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 16fe8d02de..f1cbb1fb83 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 34c2b0e9e0..a6f2d7c45b 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/relations_helper.rb b/app/helpers/relations_helper.rb index 84d8992fa3..6420ce95a7 100644 --- a/app/helpers/relations_helper.rb +++ b/app/helpers/relations_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/removed_js_helpers_helper.rb b/app/helpers/removed_js_helpers_helper.rb index 570aa5065a..1d1c6f8610 100644 --- a/app/helpers/removed_js_helpers_helper.rb +++ b/app/helpers/removed_js_helpers_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/reorder_links_helper.rb b/app/helpers/reorder_links_helper.rb index 4980a6f423..0bb6c27ee8 100644 --- a/app/helpers/reorder_links_helper.rb +++ b/app/helpers/reorder_links_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/reports_helper.rb b/app/helpers/reports_helper.rb index 57fc8e065d..7e18c1a479 100644 --- a/app/helpers/reports_helper.rb +++ b/app/helpers/reports_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 964fa3f42c..697db19e11 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/roles_helper.rb b/app/helpers/roles_helper.rb index a85e97a5f5..500ee75ae4 100644 --- a/app/helpers/roles_helper.rb +++ b/app/helpers/roles_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 7167d16f53..06c6cea82e 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/security_badge_helper.rb b/app/helpers/security_badge_helper.rb index 1dc990f337..be9d9641ec 100644 --- a/app/helpers/security_badge_helper.rb +++ b/app/helpers/security_badge_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index 8a2bf60ec3..41e9a25163 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb index 54379e736e..63606abb86 100644 --- a/app/helpers/sort_helper.rb +++ b/app/helpers/sort_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/static_links_helper.rb b/app/helpers/static_links_helper.rb index 4800468470..7ac13ce8ab 100644 --- a/app/helpers/static_links_helper.rb +++ b/app/helpers/static_links_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/tabs_helper.rb b/app/helpers/tabs_helper.rb index e0bc68d219..5af3f6e433 100644 --- a/app/helpers/tabs_helper.rb +++ b/app/helpers/tabs_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/text_formatting_helper.rb b/app/helpers/text_formatting_helper.rb index 20662a339e..6a355b861d 100644 --- a/app/helpers/text_formatting_helper.rb +++ b/app/helpers/text_formatting_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/tooltip_helper.rb b/app/helpers/tooltip_helper.rb index f8b9529829..f28d59a348 100644 --- a/app/helpers/tooltip_helper.rb +++ b/app/helpers/tooltip_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/types_helper.rb b/app/helpers/types_helper.rb index 97a96a595a..ccac5de682 100644 --- a/app/helpers/types_helper.rb +++ b/app/helpers/types_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/user_consent_helper.rb b/app/helpers/user_consent_helper.rb index 62c082c039..f529eebc88 100644 --- a/app/helpers/user_consent_helper.rb +++ b/app/helpers/user_consent_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index ce29f8e824..2507391b5c 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/warning_bar_helper.rb b/app/helpers/warning_bar_helper.rb index 133b7b49ea..40c47fe9f8 100644 --- a/app/helpers/warning_bar_helper.rb +++ b/app/helpers/warning_bar_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 926d02c5d9..3031df9787 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb index 4f633679a3..fb48d724b5 100644 --- a/app/helpers/wiki_helper.rb +++ b/app/helpers/wiki_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/work_packages_filter_helper.rb b/app/helpers/work_packages_filter_helper.rb index 2c5bf910f5..ffbe1e7278 100644 --- a/app/helpers/work_packages_filter_helper.rb +++ b/app/helpers/work_packages_filter_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/helpers/work_packages_helper.rb b/app/helpers/work_packages_helper.rb index 5ba4ac75da..5a73156943 100644 --- a/app/helpers/work_packages_helper.rb +++ b/app/helpers/work_packages_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 8ac0894cc5..fede49e4df 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/mailers/digest_mailer.rb b/app/mailers/digest_mailer.rb index dbf2988cee..7b90726f06 100644 --- a/app/mailers/digest_mailer.rb +++ b/app/mailers/digest_mailer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/mailers/member_mailer.rb b/app/mailers/member_mailer.rb index 98c87b3858..4b6b509a75 100644 --- a/app/mailers/member_mailer.rb +++ b/app/mailers/member_mailer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/mailers/project_mailer.rb b/app/mailers/project_mailer.rb index e0ed62e1e8..6e470a2526 100644 --- a/app/mailers/project_mailer.rb +++ b/app/mailers/project_mailer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index dfebda3e50..7a8b4cfb80 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/mailers/work_package_mailer.rb b/app/mailers/work_package_mailer.rb index 5ef82dadaf..45bec188f8 100644 --- a/app/mailers/work_package_mailer.rb +++ b/app/mailers/work_package_mailer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/action.rb b/app/models/action.rb index 0d28bb31b1..9a531b9f4a 100644 --- a/app/models/action.rb +++ b/app/models/action.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/actions/scopes/default.rb b/app/models/actions/scopes/default.rb index 381ec6c2db..f4d868a1d0 100644 --- a/app/models/actions/scopes/default.rb +++ b/app/models/actions/scopes/default.rb @@ -32,12 +32,13 @@ module Actions::Scopes class_methods do def default - capabilities_sql = <<~SQL - (SELECT id, permission, global, module FROM (VALUES #{action_map}) AS t(id, permission, global, module)) actions + actions_sql = <<~SQL.squish + (SELECT id, permission, global, module, grant_to_admin + FROM (VALUES #{action_map}) AS t(id, permission, global, module, grant_to_admin)) actions SQL select('actions.*') - .from(capabilities_sql) + .from(actions_sql) end private @@ -45,18 +46,19 @@ module Actions::Scopes def action_map OpenProject::AccessControl .contract_actions_map - .map { |permission, v| map_actions(permission, v[:actions], v[:global], v[:module]) } + .map { |permission, v| map_actions(permission, **v) } .flatten .join(', ') end - def map_actions(permission, actions, global, module_name) + def map_actions(permission, actions:, global:, module_name:, grant_to_admin:) actions.map do |namespace, actions| actions.map do |action| values = [quote_string("#{action_v3_name(namespace)}/#{action}"), quote_string(permission), global, - module_name ? quote_string(module_name) : 'NULL'].join(', ') + module_name ? quote_string(module_name) : 'NULL', + grant_to_admin].join(', ') "(#{values})" end diff --git a/app/models/activities/base_activity_provider.rb b/app/models/activities/base_activity_provider.rb index 66501a110a..7f51b4ca65 100644 --- a/app/models/activities/base_activity_provider.rb +++ b/app/models/activities/base_activity_provider.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/activities/changeset_activity_provider.rb b/app/models/activities/changeset_activity_provider.rb index 48858f5915..4f4d4ff733 100644 --- a/app/models/activities/changeset_activity_provider.rb +++ b/app/models/activities/changeset_activity_provider.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/activities/fetcher.rb b/app/models/activities/fetcher.rb index 29df40c35b..51b71bb412 100644 --- a/app/models/activities/fetcher.rb +++ b/app/models/activities/fetcher.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -48,7 +46,7 @@ module Activities # Returns an array of available event types def event_types - @event_types ||= begin + @event_types ||= if @project OpenProject::Activity.available_event_types.select do |o| @project.self_and_descendants.detect do |_p| @@ -60,9 +58,8 @@ module Activities end end else - OpenProject::Activity.available_event_types + OpenProject::Activity.available_event_types.to_a end - end end # Returns an array of events for the given date range @@ -92,7 +89,7 @@ module Activities # Resets the scope to the default scope def default_scope! - @scope = OpenProject::Activity.default_event_types + @scope = OpenProject::Activity.default_event_types.to_a end def events_from_providers(from, to, limit) diff --git a/app/models/activities/message_activity_provider.rb b/app/models/activities/message_activity_provider.rb index 7ccf0a8d84..f956638e1f 100644 --- a/app/models/activities/message_activity_provider.rb +++ b/app/models/activities/message_activity_provider.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/activities/news_activity_provider.rb b/app/models/activities/news_activity_provider.rb index 494bbe8a49..4429704429 100644 --- a/app/models/activities/news_activity_provider.rb +++ b/app/models/activities/news_activity_provider.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/activities/wiki_content_activity_provider.rb b/app/models/activities/wiki_content_activity_provider.rb index 5f1ff8e82d..4ba7d53030 100644 --- a/app/models/activities/wiki_content_activity_provider.rb +++ b/app/models/activities/wiki_content_activity_provider.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/activities/work_package_activity_provider.rb b/app/models/activities/work_package_activity_provider.rb index eaaf7dc62f..92fe4f71ab 100644 --- a/app/models/activities/work_package_activity_provider.rb +++ b/app/models/activities/work_package_activity_provider.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/anonymous_user.rb b/app/models/anonymous_user.rb index a9d95a9b54..3aef1b0597 100644 --- a/app/models/anonymous_user.rb +++ b/app/models/anonymous_user.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/models/associations/groupable.rb b/app/models/associations/groupable.rb index a552c28703..9c411a4ade 100644 --- a/app/models/associations/groupable.rb +++ b/app/models/associations/groupable.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 34581acada..ba21fcc0a4 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/auth_source.rb b/app/models/auth_source.rb index 981a46a335..7b9d176f9f 100644 --- a/app/models/auth_source.rb +++ b/app/models/auth_source.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/capabilities/scopes/default.rb b/app/models/capabilities/scopes/default.rb index 322b081644..ad3a7c4f97 100644 --- a/app/models/capabilities/scopes/default.rb +++ b/app/models/capabilities/scopes/default.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -36,7 +34,7 @@ module Capabilities::Scopes # Currently, this does not reflect the behaviour present in the backend that every permission in at least one project # leads to having that permission in the global context as well. Hopefully, this is not necessary to be added. def default - capabilities_sql = <<~SQL + capabilities_sql = <<~SQL.squish ( #{default_sql_by_member} UNION @@ -53,7 +51,7 @@ module Capabilities::Scopes private def default_sql_by_member - <<~SQL + <<~SQL.squish SELECT DISTINCT actions.id "action", users.id principal_id, @@ -76,14 +74,14 @@ module Capabilities::Scopes end def default_sql_by_admin - <<~SQL + <<~SQL.squish SELECT DISTINCT actions.id "action", users.id principal_id, projects.id context_id FROM (#{Action.default.to_sql}) actions JOIN (#{Principal.visible.not_builtin.not_locked.to_sql}) users - ON "users".admin = true + ON "users".admin = true AND actions.grant_to_admin = true LEFT OUTER JOIN "projects" ON "projects".active = true AND NOT "actions".global @@ -95,7 +93,7 @@ module Capabilities::Scopes end def default_sql_by_non_member - <<~SQL + <<~SQL.squish SELECT DISTINCT actions.id "action", users.id principal_id, diff --git a/app/models/capability.rb b/app/models/capability.rb index c3380ac2ad..3635230a45 100644 --- a/app/models/capability.rb +++ b/app/models/capability.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/category.rb b/app/models/category.rb index 90ad0cb424..d0f14d1038 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/change.rb b/app/models/change.rb index b9a2410458..d1f606efbb 100644 --- a/app/models/change.rb +++ b/app/models/change.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/changeset.rb b/app/models/changeset.rb index f53a3b52c2..07e304be94 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/color.rb b/app/models/color.rb index e73172d645..20468ac790 100644 --- a/app/models/color.rb +++ b/app/models/color.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/comment.rb b/app/models/comment.rb index 82d1b208ec..c9a8aee129 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_action.rb b/app/models/custom_action.rb index ec81b31749..85af2d250c 100644 --- a/app/models/custom_action.rb +++ b/app/models/custom_action.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/assigned_to.rb b/app/models/custom_actions/actions/assigned_to.rb index 9a372c1cfd..851932b958 100644 --- a/app/models/custom_actions/actions/assigned_to.rb +++ b/app/models/custom_actions/actions/assigned_to.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/base.rb b/app/models/custom_actions/actions/base.rb index aa9a37a659..2d000d5521 100644 --- a/app/models/custom_actions/actions/base.rb +++ b/app/models/custom_actions/actions/base.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/custom_field.rb b/app/models/custom_actions/actions/custom_field.rb index 57dcee4bb1..80105f6178 100644 --- a/app/models/custom_actions/actions/custom_field.rb +++ b/app/models/custom_actions/actions/custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/date.rb b/app/models/custom_actions/actions/date.rb index 35360f37c3..c8e6f4ec89 100644 --- a/app/models/custom_actions/actions/date.rb +++ b/app/models/custom_actions/actions/date.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/done_ratio.rb b/app/models/custom_actions/actions/done_ratio.rb index 17b3c4cfda..23eb05e345 100644 --- a/app/models/custom_actions/actions/done_ratio.rb +++ b/app/models/custom_actions/actions/done_ratio.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/due_date.rb b/app/models/custom_actions/actions/due_date.rb index 1c17c147c6..ac5d1f6f0f 100644 --- a/app/models/custom_actions/actions/due_date.rb +++ b/app/models/custom_actions/actions/due_date.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/estimated_hours.rb b/app/models/custom_actions/actions/estimated_hours.rb index 4dbdce9424..18ad03c6c5 100644 --- a/app/models/custom_actions/actions/estimated_hours.rb +++ b/app/models/custom_actions/actions/estimated_hours.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/inexistent.rb b/app/models/custom_actions/actions/inexistent.rb index d7405c9106..de9c5b97ca 100644 --- a/app/models/custom_actions/actions/inexistent.rb +++ b/app/models/custom_actions/actions/inexistent.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/notify.rb b/app/models/custom_actions/actions/notify.rb index 58f3849a87..985e5e2a33 100644 --- a/app/models/custom_actions/actions/notify.rb +++ b/app/models/custom_actions/actions/notify.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/priority.rb b/app/models/custom_actions/actions/priority.rb index cde6c05749..ade204d84d 100644 --- a/app/models/custom_actions/actions/priority.rb +++ b/app/models/custom_actions/actions/priority.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/project.rb b/app/models/custom_actions/actions/project.rb index 13536846ea..eee12da34e 100644 --- a/app/models/custom_actions/actions/project.rb +++ b/app/models/custom_actions/actions/project.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/serializer.rb b/app/models/custom_actions/actions/serializer.rb index ba8445e92d..e0b81496cc 100644 --- a/app/models/custom_actions/actions/serializer.rb +++ b/app/models/custom_actions/actions/serializer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/start_date.rb b/app/models/custom_actions/actions/start_date.rb index fb9d50941c..bd60469bc7 100644 --- a/app/models/custom_actions/actions/start_date.rb +++ b/app/models/custom_actions/actions/start_date.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/status.rb b/app/models/custom_actions/actions/status.rb index a9f516c4d4..8a010c0093 100644 --- a/app/models/custom_actions/actions/status.rb +++ b/app/models/custom_actions/actions/status.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/associated.rb b/app/models/custom_actions/actions/strategies/associated.rb index c4065a054e..ea3b63ffc8 100644 --- a/app/models/custom_actions/actions/strategies/associated.rb +++ b/app/models/custom_actions/actions/strategies/associated.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/associated_custom_field.rb b/app/models/custom_actions/actions/strategies/associated_custom_field.rb index 0cdd2a3538..f5300d203d 100644 --- a/app/models/custom_actions/actions/strategies/associated_custom_field.rb +++ b/app/models/custom_actions/actions/strategies/associated_custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/custom_field.rb b/app/models/custom_actions/actions/strategies/custom_field.rb index de1c4f6a00..8c1816d9d8 100644 --- a/app/models/custom_actions/actions/strategies/custom_field.rb +++ b/app/models/custom_actions/actions/strategies/custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/date.rb b/app/models/custom_actions/actions/strategies/date.rb index d6f3478854..d8e847d09a 100644 --- a/app/models/custom_actions/actions/strategies/date.rb +++ b/app/models/custom_actions/actions/strategies/date.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/date_property.rb b/app/models/custom_actions/actions/strategies/date_property.rb index 62ad08dc8a..3016ca004f 100644 --- a/app/models/custom_actions/actions/strategies/date_property.rb +++ b/app/models/custom_actions/actions/strategies/date_property.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/float.rb b/app/models/custom_actions/actions/strategies/float.rb index 2dfcee9f8e..8f07cac191 100644 --- a/app/models/custom_actions/actions/strategies/float.rb +++ b/app/models/custom_actions/actions/strategies/float.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/integer.rb b/app/models/custom_actions/actions/strategies/integer.rb index 787b32b3ed..2fef0d256d 100644 --- a/app/models/custom_actions/actions/strategies/integer.rb +++ b/app/models/custom_actions/actions/strategies/integer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/me_associated.rb b/app/models/custom_actions/actions/strategies/me_associated.rb index c82e1373da..ad2a8d4228 100644 --- a/app/models/custom_actions/actions/strategies/me_associated.rb +++ b/app/models/custom_actions/actions/strategies/me_associated.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/string.rb b/app/models/custom_actions/actions/strategies/string.rb index 1bdd09d290..c65932ad2d 100644 --- a/app/models/custom_actions/actions/strategies/string.rb +++ b/app/models/custom_actions/actions/strategies/string.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/text.rb b/app/models/custom_actions/actions/strategies/text.rb index 2e8d8cf2b1..deb3b02924 100644 --- a/app/models/custom_actions/actions/strategies/text.rb +++ b/app/models/custom_actions/actions/strategies/text.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/strategies/user_custom_field.rb b/app/models/custom_actions/actions/strategies/user_custom_field.rb index 2ffc8f5bf6..303793fc34 100644 --- a/app/models/custom_actions/actions/strategies/user_custom_field.rb +++ b/app/models/custom_actions/actions/strategies/user_custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/actions/type.rb b/app/models/custom_actions/actions/type.rb index 044cbb27e2..9bb336657c 100644 --- a/app/models/custom_actions/actions/type.rb +++ b/app/models/custom_actions/actions/type.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/conditions/base.rb b/app/models/custom_actions/conditions/base.rb index ff5ee3ca2b..2024df7f49 100644 --- a/app/models/custom_actions/conditions/base.rb +++ b/app/models/custom_actions/conditions/base.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/conditions/inexistent.rb b/app/models/custom_actions/conditions/inexistent.rb index 823d806d52..cd69c35d7f 100644 --- a/app/models/custom_actions/conditions/inexistent.rb +++ b/app/models/custom_actions/conditions/inexistent.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/conditions/project.rb b/app/models/custom_actions/conditions/project.rb index 78e19d275b..a87e157c58 100644 --- a/app/models/custom_actions/conditions/project.rb +++ b/app/models/custom_actions/conditions/project.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/conditions/role.rb b/app/models/custom_actions/conditions/role.rb index 28843f953e..9f08336703 100644 --- a/app/models/custom_actions/conditions/role.rb +++ b/app/models/custom_actions/conditions/role.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/conditions/status.rb b/app/models/custom_actions/conditions/status.rb index f268b362c8..655733ffff 100644 --- a/app/models/custom_actions/conditions/status.rb +++ b/app/models/custom_actions/conditions/status.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_actions/conditions/type.rb b/app/models/custom_actions/conditions/type.rb index ab6fec43a1..56b3dcf1ca 100644 --- a/app/models/custom_actions/conditions/type.rb +++ b/app/models/custom_actions/conditions/type.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 879e09c57b..26c13fc12b 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_field/order_statements.rb b/app/models/custom_field/order_statements.rb index bd64079e6d..7436ac5d14 100644 --- a/app/models/custom_field/order_statements.rb +++ b/app/models/custom_field/order_statements.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_option.rb b/app/models/custom_option.rb index 7aae742a21..ec3bd982a7 100644 --- a/app/models/custom_option.rb +++ b/app/models/custom_option.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value.rb b/app/models/custom_value.rb index 7e3b5b18b6..af2a15e3e2 100644 --- a/app/models/custom_value.rb +++ b/app/models/custom_value.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/ar_object_strategy.rb b/app/models/custom_value/ar_object_strategy.rb index 5f65311ea5..4612bea485 100644 --- a/app/models/custom_value/ar_object_strategy.rb +++ b/app/models/custom_value/ar_object_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/bool_strategy.rb b/app/models/custom_value/bool_strategy.rb index d8276ce190..4ff3e442f5 100644 --- a/app/models/custom_value/bool_strategy.rb +++ b/app/models/custom_value/bool_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/date_strategy.rb b/app/models/custom_value/date_strategy.rb index 78b2558c9c..5e3d1f50de 100644 --- a/app/models/custom_value/date_strategy.rb +++ b/app/models/custom_value/date_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/empty_strategy.rb b/app/models/custom_value/empty_strategy.rb index 86a5c53110..fa44c0567f 100644 --- a/app/models/custom_value/empty_strategy.rb +++ b/app/models/custom_value/empty_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/float_strategy.rb b/app/models/custom_value/float_strategy.rb index ca109b09f6..0b984ad211 100644 --- a/app/models/custom_value/float_strategy.rb +++ b/app/models/custom_value/float_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/format_strategy.rb b/app/models/custom_value/format_strategy.rb index 150747f0fb..a8897b8708 100644 --- a/app/models/custom_value/format_strategy.rb +++ b/app/models/custom_value/format_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/formattable_strategy.rb b/app/models/custom_value/formattable_strategy.rb index 5627314143..42f549d5e5 100644 --- a/app/models/custom_value/formattable_strategy.rb +++ b/app/models/custom_value/formattable_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/int_strategy.rb b/app/models/custom_value/int_strategy.rb index 8ea85a96b7..6d60f61236 100644 --- a/app/models/custom_value/int_strategy.rb +++ b/app/models/custom_value/int_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/list_strategy.rb b/app/models/custom_value/list_strategy.rb index 6883af3701..98f2a77d87 100644 --- a/app/models/custom_value/list_strategy.rb +++ b/app/models/custom_value/list_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/string_strategy.rb b/app/models/custom_value/string_strategy.rb index 825626c3c8..929e4e94e3 100644 --- a/app/models/custom_value/string_strategy.rb +++ b/app/models/custom_value/string_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/user_strategy.rb b/app/models/custom_value/user_strategy.rb index 65f6b3f3bf..d7976c7758 100644 --- a/app/models/custom_value/user_strategy.rb +++ b/app/models/custom_value/user_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/custom_value/version_strategy.rb b/app/models/custom_value/version_strategy.rb index 7203cd9387..255b0e3f98 100644 --- a/app/models/custom_value/version_strategy.rb +++ b/app/models/custom_value/version_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/enabled_module.rb b/app/models/enabled_module.rb index d89183468c..b30fd55e39 100644 --- a/app/models/enabled_module.rb +++ b/app/models/enabled_module.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index 26a7f0bf87..2fbe80ac9c 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/exports/concerns/csv.rb b/app/models/exports/concerns/csv.rb index b7c5a8c9ae..78c33e34c7 100644 --- a/app/models/exports/concerns/csv.rb +++ b/app/models/exports/concerns/csv.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/exports/export_error.rb b/app/models/exports/export_error.rb index 8a64edab92..bed9b0e3e8 100644 --- a/app/models/exports/export_error.rb +++ b/app/models/exports/export_error.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/exports/exporter.rb b/app/models/exports/exporter.rb index 659df09e2e..8be425b692 100644 --- a/app/models/exports/exporter.rb +++ b/app/models/exports/exporter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/exports/register.rb b/app/models/exports/register.rb index f38dd83cec..879b956559 100644 --- a/app/models/exports/register.rb +++ b/app/models/exports/register.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/exports/result.rb b/app/models/exports/result.rb index 0dbe9e2184..a90ade1dd7 100644 --- a/app/models/exports/result.rb +++ b/app/models/exports/result.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/forum.rb b/app/models/forum.rb index a7ea5e2b03..ac8a11d818 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/group.rb b/app/models/group.rb index 4a76eccf57..16c6f33797 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/group_custom_field.rb b/app/models/group_custom_field.rb index bd4e770d8e..3e8bff3881 100644 --- a/app/models/group_custom_field.rb +++ b/app/models/group_custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/group_user.rb b/app/models/group_user.rb index 0e601f8594..323a187ad5 100644 --- a/app/models/group_user.rb +++ b/app/models/group_user.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/groups/scopes/visible.rb b/app/models/groups/scopes/visible.rb index 85d72969d6..404ade3533 100644 --- a/app/models/groups/scopes/visible.rb +++ b/app/models/groups/scopes/visible.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/issue_priority.rb b/app/models/issue_priority.rb index 40d40bb4f3..c97af6d998 100644 --- a/app/models/issue_priority.rb +++ b/app/models/issue_priority.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal.rb b/app/models/journal.rb index 32cca2af0b..6288dc9b47 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/attachable_journal.rb b/app/models/journal/attachable_journal.rb index 245642dd96..a873265148 100644 --- a/app/models/journal/attachable_journal.rb +++ b/app/models/journal/attachable_journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/attachment_journal.rb b/app/models/journal/attachment_journal.rb index 1fdb89151d..5da8b851c9 100644 --- a/app/models/journal/attachment_journal.rb +++ b/app/models/journal/attachment_journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/changeset_journal.rb b/app/models/journal/changeset_journal.rb index 2cb83a6ac9..abf8fc62e7 100644 --- a/app/models/journal/changeset_journal.rb +++ b/app/models/journal/changeset_journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/customizable_journal.rb b/app/models/journal/customizable_journal.rb index c44d153053..3dd774ecb7 100644 --- a/app/models/journal/customizable_journal.rb +++ b/app/models/journal/customizable_journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/message_journal.rb b/app/models/journal/message_journal.rb index c41c70ec45..648e9b5ee8 100644 --- a/app/models/journal/message_journal.rb +++ b/app/models/journal/message_journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/news_journal.rb b/app/models/journal/news_journal.rb index b22caf3dcf..ae8a85ffc2 100644 --- a/app/models/journal/news_journal.rb +++ b/app/models/journal/news_journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/notification_configuration.rb b/app/models/journal/notification_configuration.rb index 95176750ac..5d74da55c6 100644 --- a/app/models/journal/notification_configuration.rb +++ b/app/models/journal/notification_configuration.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/wiki_content_journal.rb b/app/models/journal/wiki_content_journal.rb index 46b60f2d98..0758120cab 100644 --- a/app/models/journal/wiki_content_journal.rb +++ b/app/models/journal/wiki_content_journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/journal/work_package_journal.rb b/app/models/journal/work_package_journal.rb index fd9516853f..152632acca 100644 --- a/app/models/journal/work_package_journal.rb +++ b/app/models/journal/work_package_journal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/ldap_auth_source.rb b/app/models/ldap_auth_source.rb index d8c7e50d3f..345c551719 100644 --- a/app/models/ldap_auth_source.rb +++ b/app/models/ldap_auth_source.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 5281885582..9c8daae701 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/member.rb b/app/models/member.rb index 141632049c..334087a61a 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/member_role.rb b/app/models/member_role.rb index 342dab174a..d97def63bf 100644 --- a/app/models/member_role.rb +++ b/app/models/member_role.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/members/scopes/assignable.rb b/app/models/members/scopes/assignable.rb index d3f1d174ef..78999fb22b 100644 --- a/app/models/members/scopes/assignable.rb +++ b/app/models/members/scopes/assignable.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -39,7 +37,15 @@ module Members::Scopes not_locked .includes(:roles) .references(:roles) - .where(roles: { assignable: true }) + .where(assignable_permission_exists) + end + + def assignable_permission_exists + RolePermission + .where('role_permissions.role_id = roles.id') + .where(permission: 'work_package_assigned') + .arel + .exists end end end diff --git a/app/models/members/scopes/global.rb b/app/models/members/scopes/global.rb index e0913d7125..cb6b745076 100644 --- a/app/models/members/scopes/global.rb +++ b/app/models/members/scopes/global.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/members/scopes/not_locked.rb b/app/models/members/scopes/not_locked.rb index 2e276557cf..49a0eb5cd2 100644 --- a/app/models/members/scopes/not_locked.rb +++ b/app/models/members/scopes/not_locked.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/members/scopes/of.rb b/app/models/members/scopes/of.rb index 66d72baaa2..78c575e6ab 100644 --- a/app/models/members/scopes/of.rb +++ b/app/models/members/scopes/of.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/members/scopes/visible.rb b/app/models/members/scopes/visible.rb index 6c4ab42c3e..d88da67204 100644 --- a/app/models/members/scopes/visible.rb +++ b/app/models/members/scopes/visible.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/menu_item.rb b/app/models/menu_item.rb index d0acf595ef..4dad6a0dd1 100644 --- a/app/models/menu_item.rb +++ b/app/models/menu_item.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/menu_items/wiki_menu_item.rb b/app/models/menu_items/wiki_menu_item.rb index 078413b027..10a044b24e 100644 --- a/app/models/menu_items/wiki_menu_item.rb +++ b/app/models/menu_items/wiki_menu_item.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/message.rb b/app/models/message.rb index 28b5b94f62..40953469ed 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/news.rb b/app/models/news.rb index 62d1b34799..806700abfa 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/notification_settings/scopes/applicable.rb b/app/models/notification_settings/scopes/applicable.rb index 48bb9fdd6d..96ee905aea 100644 --- a/app/models/notification_settings/scopes/applicable.rb +++ b/app/models/notification_settings/scopes/applicable.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/notifications/scopes/mail_alert_unsent.rb b/app/models/notifications/scopes/mail_alert_unsent.rb index 71913a4a39..04acdb4c54 100644 --- a/app/models/notifications/scopes/mail_alert_unsent.rb +++ b/app/models/notifications/scopes/mail_alert_unsent.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/notifications/scopes/mail_reminder_unsent.rb b/app/models/notifications/scopes/mail_reminder_unsent.rb index f62a7ec24e..2d17080707 100644 --- a/app/models/notifications/scopes/mail_reminder_unsent.rb +++ b/app/models/notifications/scopes/mail_reminder_unsent.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/notifications/scopes/recipient.rb b/app/models/notifications/scopes/recipient.rb index f2147ed134..c65cf565d3 100644 --- a/app/models/notifications/scopes/recipient.rb +++ b/app/models/notifications/scopes/recipient.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/notifications/scopes/unsent_reminders_before.rb b/app/models/notifications/scopes/unsent_reminders_before.rb index a5cf36699c..34716a2f3e 100644 --- a/app/models/notifications/scopes/unsent_reminders_before.rb +++ b/app/models/notifications/scopes/unsent_reminders_before.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/ordered_work_package.rb b/app/models/ordered_work_package.rb index a80a44e9a8..943ccecf65 100644 --- a/app/models/ordered_work_package.rb +++ b/app/models/ordered_work_package.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/permitted_params.rb b/app/models/permitted_params.rb index 60efcf8388..474be3cc8c 100644 --- a/app/models/permitted_params.rb +++ b/app/models/permitted_params.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/placeholder_user.rb b/app/models/placeholder_user.rb index 5d1bb80d70..437177dc31 100644 --- a/app/models/placeholder_user.rb +++ b/app/models/placeholder_user.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/models/placeholder_users/scopes/visible.rb b/app/models/placeholder_users/scopes/visible.rb index d1d809da0e..4bb0b22479 100644 --- a/app/models/placeholder_users/scopes/visible.rb +++ b/app/models/placeholder_users/scopes/visible.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principal.rb b/app/models/principal.rb index a4f4cf9d9b..acd537831c 100644 --- a/app/models/principal.rb +++ b/app/models/principal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/human.rb b/app/models/principals/scopes/human.rb index b270636a14..4a6beb26af 100644 --- a/app/models/principals/scopes/human.rb +++ b/app/models/principals/scopes/human.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/like.rb b/app/models/principals/scopes/like.rb index 8f841f189c..b56a7d60ac 100644 --- a/app/models/principals/scopes/like.rb +++ b/app/models/principals/scopes/like.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/not_builtin.rb b/app/models/principals/scopes/not_builtin.rb index 21b76f0118..aeafd8f22c 100644 --- a/app/models/principals/scopes/not_builtin.rb +++ b/app/models/principals/scopes/not_builtin.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/ordered_by_name.rb b/app/models/principals/scopes/ordered_by_name.rb index 9edc3cfde1..58d124335d 100644 --- a/app/models/principals/scopes/ordered_by_name.rb +++ b/app/models/principals/scopes/ordered_by_name.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/possible_assignee.rb b/app/models/principals/scopes/possible_assignee.rb index 18b9223c9c..fc8cddfe25 100644 --- a/app/models/principals/scopes/possible_assignee.rb +++ b/app/models/principals/scopes/possible_assignee.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/possible_member.rb b/app/models/principals/scopes/possible_member.rb index 1a62d73d76..b5808ac531 100644 --- a/app/models/principals/scopes/possible_member.rb +++ b/app/models/principals/scopes/possible_member.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/status.rb b/app/models/principals/scopes/status.rb index 68d2da6917..f04f9e083d 100644 --- a/app/models/principals/scopes/status.rb +++ b/app/models/principals/scopes/status.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/user.rb b/app/models/principals/scopes/user.rb index abf2ac99a9..151b7ac693 100644 --- a/app/models/principals/scopes/user.rb +++ b/app/models/principals/scopes/user.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/principals/scopes/visible.rb b/app/models/principals/scopes/visible.rb index 522a8a21fe..54c121453b 100644 --- a/app/models/principals/scopes/visible.rb +++ b/app/models/principals/scopes/visible.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/priority/inexistent_priority.rb b/app/models/priority/inexistent_priority.rb index 22cea6ddc9..f07068ddc8 100644 --- a/app/models/priority/inexistent_priority.rb +++ b/app/models/priority/inexistent_priority.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/project.rb b/app/models/project.rb index f1f926968c..85ebb7d78a 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/project_custom_field.rb b/app/models/project_custom_field.rb index ad3a7e98fc..12d8a0903c 100644 --- a/app/models/project_custom_field.rb +++ b/app/models/project_custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/projects/activity.rb b/app/models/projects/activity.rb index e65b975841..36961dee53 100644 --- a/app/models/projects/activity.rb +++ b/app/models/projects/activity.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/projects/ancestors_from_root.rb b/app/models/projects/ancestors_from_root.rb index 8f3a0ca147..f9dc7fb812 100644 --- a/app/models/projects/ancestors_from_root.rb +++ b/app/models/projects/ancestors_from_root.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/projects/exports/csv.rb b/app/models/projects/exports/csv.rb index 11a47afc3e..3923fe3711 100644 --- a/app/models/projects/exports/csv.rb +++ b/app/models/projects/exports/csv.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/projects/exports/formatters/status.rb b/app/models/projects/exports/formatters/status.rb index 0b39a7e126..4a52546234 100644 --- a/app/models/projects/exports/formatters/status.rb +++ b/app/models/projects/exports/formatters/status.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/projects/exports/query_exporter.rb b/app/models/projects/exports/query_exporter.rb index e6ebd3a455..56efc17676 100644 --- a/app/models/projects/exports/query_exporter.rb +++ b/app/models/projects/exports/query_exporter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/projects/hierarchy.rb b/app/models/projects/hierarchy.rb index a476af029e..a550500afb 100644 --- a/app/models/projects/hierarchy.rb +++ b/app/models/projects/hierarchy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/projects/status.rb b/app/models/projects/status.rb index 385ad0fc64..e32c7b8ed0 100644 --- a/app/models/projects/status.rb +++ b/app/models/projects/status.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/projects/storage.rb b/app/models/projects/storage.rb index b6144c4eb1..2af936f691 100644 --- a/app/models/projects/storage.rb +++ b/app/models/projects/storage.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/actions.rb b/app/models/queries/actions.rb index 449fd23083..cf6c26cac7 100644 --- a/app/models/queries/actions.rb +++ b/app/models/queries/actions.rb @@ -27,8 +27,7 @@ #++ module Queries::Actions - query = Queries::Actions::ActionQuery - filter_ns = Queries::Actions::Filters - - Queries::Register.filter query, filter_ns::IdFilter + ::Queries::Register.register(ActionQuery) do + filter Filters::IdFilter + end end diff --git a/app/models/queries/actions/filters/action_filter.rb b/app/models/queries/actions/filters/action_filter.rb index 70c685140c..ece170800e 100644 --- a/app/models/queries/actions/filters/action_filter.rb +++ b/app/models/queries/actions/filters/action_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/capabilities.rb b/app/models/queries/capabilities.rb index f896bf9f5d..d962fd8517 100644 --- a/app/models/queries/capabilities.rb +++ b/app/models/queries/capabilities.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,15 +27,12 @@ #++ module Queries::Capabilities - query = Queries::Capabilities::CapabilityQuery - filter_ns = Queries::Capabilities::Filters - - Queries::Register.filter query, filter_ns::IdFilter - Queries::Register.filter query, filter_ns::PrincipalIdFilter - Queries::Register.filter query, filter_ns::ContextFilter - Queries::Register.filter query, filter_ns::ActionFilter - - order_ns = Queries::Capabilities::Orders + ::Queries::Register.register(CapabilityQuery) do + filter Filters::IdFilter + filter Filters::PrincipalIdFilter + filter Filters::ContextFilter + filter Filters::ActionFilter - Queries::Register.order query, order_ns::IdOrder + order Orders::IdOrder + end end diff --git a/app/models/queries/capabilities/filters/action_filter.rb b/app/models/queries/capabilities/filters/action_filter.rb index fb0e4187f6..9df8ebd1e3 100644 --- a/app/models/queries/capabilities/filters/action_filter.rb +++ b/app/models/queries/capabilities/filters/action_filter.rb @@ -33,7 +33,7 @@ class Queries::Capabilities::Filters::ActionFilter < Queries::Capabilities::Filt def split_values values.map do |value| - if (matches = value.match(/\A([a-z]+\/[a-z]+)\z/)) + if (matches = value.match(/\A([a-z_]+\/[a-z_]+)\z/)) { action: matches[1] } diff --git a/app/models/queries/capabilities/filters/capability_filter.rb b/app/models/queries/capabilities/filters/capability_filter.rb index 6c24037a28..4fcb8f688e 100644 --- a/app/models/queries/capabilities/filters/capability_filter.rb +++ b/app/models/queries/capabilities/filters/capability_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/capabilities/filters/principal_id_filter.rb b/app/models/queries/capabilities/filters/principal_id_filter.rb index 8c062cadb3..b85b549d28 100644 --- a/app/models/queries/capabilities/filters/principal_id_filter.rb +++ b/app/models/queries/capabilities/filters/principal_id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/capabilities/orders/id_order.rb b/app/models/queries/capabilities/orders/id_order.rb index 676fa024c4..5ea0c82efe 100644 --- a/app/models/queries/capabilities/orders/id_order.rb +++ b/app/models/queries/capabilities/orders/id_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/columns/base.rb b/app/models/queries/columns/base.rb index df4114e282..e992ea801c 100644 --- a/app/models/queries/columns/base.rb +++ b/app/models/queries/columns/base.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters.rb b/app/models/queries/filters.rb index de01424354..c36751ba66 100644 --- a/app/models/queries/filters.rb +++ b/app/models/queries/filters.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/available_filters.rb b/app/models/queries/filters/available_filters.rb index 2a65b73f88..a8217a56e6 100644 --- a/app/models/queries/filters/available_filters.rb +++ b/app/models/queries/filters/available_filters.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/base.rb b/app/models/queries/filters/base.rb index 1b7fbba1cf..faf12008e6 100644 --- a/app/models/queries/filters/base.rb +++ b/app/models/queries/filters/base.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/empty_filter.rb b/app/models/queries/filters/empty_filter.rb index 2835ed9040..b1c11556ad 100644 --- a/app/models/queries/filters/empty_filter.rb +++ b/app/models/queries/filters/empty_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/me_value.rb b/app/models/queries/filters/me_value.rb index 59006a429e..476d444a8a 100644 --- a/app/models/queries/filters/me_value.rb +++ b/app/models/queries/filters/me_value.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/not_existing_filter.rb b/app/models/queries/filters/not_existing_filter.rb index 562d0b4a7e..f3c7b3e618 100644 --- a/app/models/queries/filters/not_existing_filter.rb +++ b/app/models/queries/filters/not_existing_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/serializable.rb b/app/models/queries/filters/serializable.rb index c0be22b353..326450bb12 100644 --- a/app/models/queries/filters/serializable.rb +++ b/app/models/queries/filters/serializable.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/any_user_name_attribute_filter.rb b/app/models/queries/filters/shared/any_user_name_attribute_filter.rb index 4b4b4801ed..d9cdf11fe6 100644 --- a/app/models/queries/filters/shared/any_user_name_attribute_filter.rb +++ b/app/models/queries/filters/shared/any_user_name_attribute_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/boolean_filter.rb b/app/models/queries/filters/shared/boolean_filter.rb index 065001791e..791abc3866 100644 --- a/app/models/queries/filters/shared/boolean_filter.rb +++ b/app/models/queries/filters/shared/boolean_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/custom_field_filter.rb b/app/models/queries/filters/shared/custom_field_filter.rb index 069edb2da1..4f9d8c0be3 100644 --- a/app/models/queries/filters/shared/custom_field_filter.rb +++ b/app/models/queries/filters/shared/custom_field_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/custom_fields/base.rb b/app/models/queries/filters/shared/custom_fields/base.rb index c11ece908d..ba7111f9b2 100644 --- a/app/models/queries/filters/shared/custom_fields/base.rb +++ b/app/models/queries/filters/shared/custom_fields/base.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/custom_fields/bool.rb b/app/models/queries/filters/shared/custom_fields/bool.rb index f8b59d3ee8..56f76769b5 100644 --- a/app/models/queries/filters/shared/custom_fields/bool.rb +++ b/app/models/queries/filters/shared/custom_fields/bool.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/custom_fields/list_optional.rb b/app/models/queries/filters/shared/custom_fields/list_optional.rb index b06ad01455..1df900787a 100644 --- a/app/models/queries/filters/shared/custom_fields/list_optional.rb +++ b/app/models/queries/filters/shared/custom_fields/list_optional.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/custom_fields/user.rb b/app/models/queries/filters/shared/custom_fields/user.rb index ba8f763480..884fd0fb7d 100644 --- a/app/models/queries/filters/shared/custom_fields/user.rb +++ b/app/models/queries/filters/shared/custom_fields/user.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/group_filter.rb b/app/models/queries/filters/shared/group_filter.rb index 0b16f6bf22..604d8b66fd 100644 --- a/app/models/queries/filters/shared/group_filter.rb +++ b/app/models/queries/filters/shared/group_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/me_value_filter.rb b/app/models/queries/filters/shared/me_value_filter.rb index 03101435d8..9585fdad4d 100644 --- a/app/models/queries/filters/shared/me_value_filter.rb +++ b/app/models/queries/filters/shared/me_value_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/project_filter.rb b/app/models/queries/filters/shared/project_filter.rb index f6db828a2a..b4ac2697cb 100644 --- a/app/models/queries/filters/shared/project_filter.rb +++ b/app/models/queries/filters/shared/project_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/user_blocked_filter.rb b/app/models/queries/filters/shared/user_blocked_filter.rb index 221c998561..2517d419a7 100644 --- a/app/models/queries/filters/shared/user_blocked_filter.rb +++ b/app/models/queries/filters/shared/user_blocked_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/user_name_filter.rb b/app/models/queries/filters/shared/user_name_filter.rb index 8392403ff3..ebc57ae277 100644 --- a/app/models/queries/filters/shared/user_name_filter.rb +++ b/app/models/queries/filters/shared/user_name_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/shared/user_status_filter.rb b/app/models/queries/filters/shared/user_status_filter.rb index a7bfb41b19..f18cce13f0 100644 --- a/app/models/queries/filters/shared/user_status_filter.rb +++ b/app/models/queries/filters/shared/user_status_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies.rb b/app/models/queries/filters/strategies.rb index 19762d246f..39e8edb92d 100644 --- a/app/models/queries/filters/strategies.rb +++ b/app/models/queries/filters/strategies.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/base_strategy.rb b/app/models/queries/filters/strategies/base_strategy.rb index 1f7ccda748..50ded35641 100644 --- a/app/models/queries/filters/strategies/base_strategy.rb +++ b/app/models/queries/filters/strategies/base_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/boolean_list.rb b/app/models/queries/filters/strategies/boolean_list.rb index 09ff87658c..ef9830d588 100644 --- a/app/models/queries/filters/strategies/boolean_list.rb +++ b/app/models/queries/filters/strategies/boolean_list.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/boolean_list_strict.rb b/app/models/queries/filters/strategies/boolean_list_strict.rb index 8044cd7797..593ab2925a 100644 --- a/app/models/queries/filters/strategies/boolean_list_strict.rb +++ b/app/models/queries/filters/strategies/boolean_list_strict.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/cf_float.rb b/app/models/queries/filters/strategies/cf_float.rb index abcedb2657..df7a081f8b 100644 --- a/app/models/queries/filters/strategies/cf_float.rb +++ b/app/models/queries/filters/strategies/cf_float.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/cf_integer.rb b/app/models/queries/filters/strategies/cf_integer.rb index ec0f719edc..a65bb11e78 100644 --- a/app/models/queries/filters/strategies/cf_integer.rb +++ b/app/models/queries/filters/strategies/cf_integer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/cf_list_optional.rb b/app/models/queries/filters/strategies/cf_list_optional.rb index bfd0916b26..be7adc88f9 100644 --- a/app/models/queries/filters/strategies/cf_list_optional.rb +++ b/app/models/queries/filters/strategies/cf_list_optional.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/cf_numeric.rb b/app/models/queries/filters/strategies/cf_numeric.rb index 31361bcc70..19e1c4b367 100644 --- a/app/models/queries/filters/strategies/cf_numeric.rb +++ b/app/models/queries/filters/strategies/cf_numeric.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/date.rb b/app/models/queries/filters/strategies/date.rb index 815044647b..760f52b03d 100644 --- a/app/models/queries/filters/strategies/date.rb +++ b/app/models/queries/filters/strategies/date.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/date_interval.rb b/app/models/queries/filters/strategies/date_interval.rb index 51146fbfd1..8dc9540671 100644 --- a/app/models/queries/filters/strategies/date_interval.rb +++ b/app/models/queries/filters/strategies/date_interval.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/date_time_past.rb b/app/models/queries/filters/strategies/date_time_past.rb index cd53d1120e..c85ef3d484 100644 --- a/app/models/queries/filters/strategies/date_time_past.rb +++ b/app/models/queries/filters/strategies/date_time_past.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/empty_value.rb b/app/models/queries/filters/strategies/empty_value.rb index 8eeb68eed0..f5f9766045 100644 --- a/app/models/queries/filters/strategies/empty_value.rb +++ b/app/models/queries/filters/strategies/empty_value.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/float.rb b/app/models/queries/filters/strategies/float.rb index c6d6e8b766..fd0d3be21a 100644 --- a/app/models/queries/filters/strategies/float.rb +++ b/app/models/queries/filters/strategies/float.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/float_numeric.rb b/app/models/queries/filters/strategies/float_numeric.rb index d97efc0f97..fd39bb4ebc 100644 --- a/app/models/queries/filters/strategies/float_numeric.rb +++ b/app/models/queries/filters/strategies/float_numeric.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/huge_list.rb b/app/models/queries/filters/strategies/huge_list.rb index 30dfb82259..1eaf4f6366 100644 --- a/app/models/queries/filters/strategies/huge_list.rb +++ b/app/models/queries/filters/strategies/huge_list.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/inexistent.rb b/app/models/queries/filters/strategies/inexistent.rb index 42bc537635..10c1486b43 100644 --- a/app/models/queries/filters/strategies/inexistent.rb +++ b/app/models/queries/filters/strategies/inexistent.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/integer.rb b/app/models/queries/filters/strategies/integer.rb index a286a81f87..d9b17019da 100644 --- a/app/models/queries/filters/strategies/integer.rb +++ b/app/models/queries/filters/strategies/integer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/integer_list.rb b/app/models/queries/filters/strategies/integer_list.rb index daf4c50348..6225eb0ba0 100644 --- a/app/models/queries/filters/strategies/integer_list.rb +++ b/app/models/queries/filters/strategies/integer_list.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/integer_numeric.rb b/app/models/queries/filters/strategies/integer_numeric.rb index ea4c42b4c7..f2cacd4ae9 100644 --- a/app/models/queries/filters/strategies/integer_numeric.rb +++ b/app/models/queries/filters/strategies/integer_numeric.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/list.rb b/app/models/queries/filters/strategies/list.rb index 143fa229a8..4530bc4f13 100644 --- a/app/models/queries/filters/strategies/list.rb +++ b/app/models/queries/filters/strategies/list.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/list_all.rb b/app/models/queries/filters/strategies/list_all.rb index e24f9adea7..da0eab0f94 100644 --- a/app/models/queries/filters/strategies/list_all.rb +++ b/app/models/queries/filters/strategies/list_all.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/list_optional.rb b/app/models/queries/filters/strategies/list_optional.rb index d5ee5a832f..19adda4f39 100644 --- a/app/models/queries/filters/strategies/list_optional.rb +++ b/app/models/queries/filters/strategies/list_optional.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/numeric.rb b/app/models/queries/filters/strategies/numeric.rb index 5630d614bb..feac7b0acb 100644 --- a/app/models/queries/filters/strategies/numeric.rb +++ b/app/models/queries/filters/strategies/numeric.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/relation.rb b/app/models/queries/filters/strategies/relation.rb index 97b8530c32..5a5c4006e1 100644 --- a/app/models/queries/filters/strategies/relation.rb +++ b/app/models/queries/filters/strategies/relation.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/search.rb b/app/models/queries/filters/strategies/search.rb index 183428c41e..a820b142b0 100644 --- a/app/models/queries/filters/strategies/search.rb +++ b/app/models/queries/filters/strategies/search.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/string.rb b/app/models/queries/filters/strategies/string.rb index 92196d2760..fd19ec52c2 100644 --- a/app/models/queries/filters/strategies/string.rb +++ b/app/models/queries/filters/strategies/string.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/text.rb b/app/models/queries/filters/strategies/text.rb index 265bde9ecf..24ae89952c 100644 --- a/app/models/queries/filters/strategies/text.rb +++ b/app/models/queries/filters/strategies/text.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/strategies/validations.rb b/app/models/queries/filters/strategies/validations.rb index d6da2ba859..b07b6b840d 100644 --- a/app/models/queries/filters/strategies/validations.rb +++ b/app/models/queries/filters/strategies/validations.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/filters/templated_value.rb b/app/models/queries/filters/templated_value.rb index 568f62fc22..c26a1b2404 100644 --- a/app/models/queries/filters/templated_value.rb +++ b/app/models/queries/filters/templated_value.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/group_bys/available_group_bys.rb b/app/models/queries/group_bys/available_group_bys.rb index 6eaafa2a97..9e6890a86c 100644 --- a/app/models/queries/group_bys/available_group_bys.rb +++ b/app/models/queries/group_bys/available_group_bys.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/group_bys/base.rb b/app/models/queries/group_bys/base.rb index 9c4a59719c..f929e6c4c3 100644 --- a/app/models/queries/group_bys/base.rb +++ b/app/models/queries/group_bys/base.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/group_bys/not_existing_group_by.rb b/app/models/queries/group_bys/not_existing_group_by.rb index 9965dbb23f..9807f5a47d 100644 --- a/app/models/queries/group_bys/not_existing_group_by.rb +++ b/app/models/queries/group_bys/not_existing_group_by.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/groups.rb b/app/models/queries/groups.rb index e16ef214b8..e2b06d35ac 100644 --- a/app/models/queries/groups.rb +++ b/app/models/queries/groups.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,8 +27,7 @@ #++ module Queries::Groups - order_ns = Queries::Members::Orders - query = Queries::Members::MemberQuery - - Queries::Register.order query, order_ns::DefaultOrder + ::Queries::Register.register(GroupQuery) do + order Orders::DefaultOrder + end end diff --git a/app/models/queries/groups/orders/default_order.rb b/app/models/queries/groups/orders/default_order.rb index e883a86fe6..8cf4009649 100644 --- a/app/models/queries/groups/orders/default_order.rb +++ b/app/models/queries/groups/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/individual_principals/orders/group_order.rb b/app/models/queries/individual_principals/orders/group_order.rb index 8997016250..0218d0b79c 100644 --- a/app/models/queries/individual_principals/orders/group_order.rb +++ b/app/models/queries/individual_principals/orders/group_order.rb @@ -1,4 +1,3 @@ -#-- encoding: UTF-8 #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/individual_principals/orders/name_order.rb b/app/models/queries/individual_principals/orders/name_order.rb index c6e1d1753f..c2cdbf8970 100644 --- a/app/models/queries/individual_principals/orders/name_order.rb +++ b/app/models/queries/individual_principals/orders/name_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members.rb b/app/models/queries/members.rb index e15f716bca..47bf2512b6 100644 --- a/app/models/queries/members.rb +++ b/app/models/queries/members.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,24 +27,21 @@ #++ module Queries::Members - query = Queries::Members::MemberQuery - filter_ns = Queries::Members::Filters - - Queries::Register.filter query, filter_ns::NameFilter - Queries::Register.filter query, filter_ns::AnyNameAttributeFilter - Queries::Register.filter query, filter_ns::ProjectFilter - Queries::Register.filter query, filter_ns::StatusFilter - Queries::Register.filter query, filter_ns::BlockedFilter - Queries::Register.filter query, filter_ns::GroupFilter - Queries::Register.filter query, filter_ns::RoleFilter - Queries::Register.filter query, filter_ns::PrincipalFilter - Queries::Register.filter query, filter_ns::CreatedAtFilter - Queries::Register.filter query, filter_ns::UpdatedAtFilter - - order_ns = Queries::Members::Orders + ::Queries::Register.register(MemberQuery) do + filter Filters::NameFilter + filter Filters::AnyNameAttributeFilter + filter Filters::ProjectFilter + filter Filters::StatusFilter + filter Filters::BlockedFilter + filter Filters::GroupFilter + filter Filters::RoleFilter + filter Filters::PrincipalFilter + filter Filters::CreatedAtFilter + filter Filters::UpdatedAtFilter - Queries::Register.order query, order_ns::DefaultOrder - Queries::Register.order query, order_ns::NameOrder - Queries::Register.order query, order_ns::EmailOrder - Queries::Register.order query, order_ns::StatusOrder + order Orders::DefaultOrder + order Orders::NameOrder + order Orders::EmailOrder + order Orders::StatusOrder + end end diff --git a/app/models/queries/members/filters/any_name_attribute_filter.rb b/app/models/queries/members/filters/any_name_attribute_filter.rb index a22e20f211..cac52c7a4a 100644 --- a/app/models/queries/members/filters/any_name_attribute_filter.rb +++ b/app/models/queries/members/filters/any_name_attribute_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/blocked_filter.rb b/app/models/queries/members/filters/blocked_filter.rb index d5c2b5ddd2..7daebf5fd3 100644 --- a/app/models/queries/members/filters/blocked_filter.rb +++ b/app/models/queries/members/filters/blocked_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/created_at_filter.rb b/app/models/queries/members/filters/created_at_filter.rb index 1efedcb8aa..b4d9e0f619 100644 --- a/app/models/queries/members/filters/created_at_filter.rb +++ b/app/models/queries/members/filters/created_at_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/group_filter.rb b/app/models/queries/members/filters/group_filter.rb index 0cc73bbe08..e19e51cf04 100644 --- a/app/models/queries/members/filters/group_filter.rb +++ b/app/models/queries/members/filters/group_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/member_filter.rb b/app/models/queries/members/filters/member_filter.rb index df57b7dc40..2ed535c601 100644 --- a/app/models/queries/members/filters/member_filter.rb +++ b/app/models/queries/members/filters/member_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/name_filter.rb b/app/models/queries/members/filters/name_filter.rb index 145f9db952..76f3d60c3d 100644 --- a/app/models/queries/members/filters/name_filter.rb +++ b/app/models/queries/members/filters/name_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/principal_filter.rb b/app/models/queries/members/filters/principal_filter.rb index 6ed598f5b0..f95ae44cc2 100644 --- a/app/models/queries/members/filters/principal_filter.rb +++ b/app/models/queries/members/filters/principal_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/project_filter.rb b/app/models/queries/members/filters/project_filter.rb index d333f86a4e..e58146e701 100644 --- a/app/models/queries/members/filters/project_filter.rb +++ b/app/models/queries/members/filters/project_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/role_filter.rb b/app/models/queries/members/filters/role_filter.rb index 82bf93921f..a64fa3f48d 100644 --- a/app/models/queries/members/filters/role_filter.rb +++ b/app/models/queries/members/filters/role_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/status_filter.rb b/app/models/queries/members/filters/status_filter.rb index d9003eedc1..7c090083f0 100644 --- a/app/models/queries/members/filters/status_filter.rb +++ b/app/models/queries/members/filters/status_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/filters/updated_at_filter.rb b/app/models/queries/members/filters/updated_at_filter.rb index f1579ad80f..9a57dae707 100644 --- a/app/models/queries/members/filters/updated_at_filter.rb +++ b/app/models/queries/members/filters/updated_at_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/orders/default_order.rb b/app/models/queries/members/orders/default_order.rb index d870fc6094..b09ff8d734 100644 --- a/app/models/queries/members/orders/default_order.rb +++ b/app/models/queries/members/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/orders/email_order.rb b/app/models/queries/members/orders/email_order.rb index 47f396eea7..79c2b96bc9 100644 --- a/app/models/queries/members/orders/email_order.rb +++ b/app/models/queries/members/orders/email_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/orders/name_order.rb b/app/models/queries/members/orders/name_order.rb index 2cfe5e9cee..c9de4ef507 100644 --- a/app/models/queries/members/orders/name_order.rb +++ b/app/models/queries/members/orders/name_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/members/orders/status_order.rb b/app/models/queries/members/orders/status_order.rb index ffc8a9d2a6..d4b9f78c5d 100644 --- a/app/models/queries/members/orders/status_order.rb +++ b/app/models/queries/members/orders/status_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/news.rb b/app/models/queries/news.rb index 871b57bc9a..21d8bc9ab2 100644 --- a/app/models/queries/news.rb +++ b/app/models/queries/news.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,9 +27,9 @@ #++ module Queries::News - query = Queries::News::NewsQuery - - Queries::Register.filter query, Queries::News::Filters::ProjectFilter + ::Queries::Register.register(NewsQuery) do + filter Filters::ProjectFilter - Queries::Register.order query, Queries::News::Orders::DefaultOrder + order Orders::DefaultOrder + end end diff --git a/app/models/queries/news/filters/news_filter.rb b/app/models/queries/news/filters/news_filter.rb index 62a6c16bac..8fd4f086cd 100644 --- a/app/models/queries/news/filters/news_filter.rb +++ b/app/models/queries/news/filters/news_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/news/filters/project_filter.rb b/app/models/queries/news/filters/project_filter.rb index bb9df55df2..62361fcef7 100644 --- a/app/models/queries/news/filters/project_filter.rb +++ b/app/models/queries/news/filters/project_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/news/orders/default_order.rb b/app/models/queries/news/orders/default_order.rb index 02a42fe1ce..33504acca5 100644 --- a/app/models/queries/news/orders/default_order.rb +++ b/app/models/queries/news/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications.rb b/app/models/queries/notifications.rb index 9887653d42..c3ef44ab64 100644 --- a/app/models/queries/notifications.rb +++ b/app/models/queries/notifications.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH @@ -29,27 +27,20 @@ #++ module Queries::Notifications - [Queries::Notifications::Filters::ReadIanFilter, - Queries::Notifications::Filters::IdFilter, - Queries::Notifications::Filters::ProjectFilter, - Queries::Notifications::Filters::ReasonFilter, - Queries::Notifications::Filters::ResourceIdFilter, - Queries::Notifications::Filters::ResourceTypeFilter].each do |filter| - Queries::Register.filter Queries::Notifications::NotificationQuery, - filter - end + ::Queries::Register.register(NotificationQuery) do + filter Filters::ReadIanFilter + filter Filters::IdFilter + filter Filters::ProjectFilter + filter Filters::ReasonFilter + filter Filters::ResourceIdFilter + filter Filters::ResourceTypeFilter - [Queries::Notifications::Orders::DefaultOrder, - Queries::Notifications::Orders::ReasonOrder, - Queries::Notifications::Orders::ProjectOrder, - Queries::Notifications::Orders::ReadIanOrder].each do |order| - Queries::Register.order Queries::Notifications::NotificationQuery, - order - end + order Orders::DefaultOrder + order Orders::ReasonOrder + order Orders::ProjectOrder + order Orders::ReadIanOrder - [Queries::Notifications::GroupBys::GroupByReason, - Queries::Notifications::GroupBys::GroupByProject].each do |group| - Queries::Register.group_by Queries::Notifications::NotificationQuery, - group + group_by GroupBys::GroupByReason + group_by GroupBys::GroupByProject end end diff --git a/app/models/queries/notifications/filters/id_filter.rb b/app/models/queries/notifications/filters/id_filter.rb index 61646f076a..ced6ebc4ec 100644 --- a/app/models/queries/notifications/filters/id_filter.rb +++ b/app/models/queries/notifications/filters/id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/filters/notification_filter.rb b/app/models/queries/notifications/filters/notification_filter.rb index 5f0f4b9aaa..37866ab4a0 100644 --- a/app/models/queries/notifications/filters/notification_filter.rb +++ b/app/models/queries/notifications/filters/notification_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/filters/project_filter.rb b/app/models/queries/notifications/filters/project_filter.rb index fa0dcbf559..aff95be309 100644 --- a/app/models/queries/notifications/filters/project_filter.rb +++ b/app/models/queries/notifications/filters/project_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/filters/read_ian_filter.rb b/app/models/queries/notifications/filters/read_ian_filter.rb index 013282b163..0ac4808845 100644 --- a/app/models/queries/notifications/filters/read_ian_filter.rb +++ b/app/models/queries/notifications/filters/read_ian_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/filters/reason_filter.rb b/app/models/queries/notifications/filters/reason_filter.rb index 2ae5514f69..225ba56c6a 100644 --- a/app/models/queries/notifications/filters/reason_filter.rb +++ b/app/models/queries/notifications/filters/reason_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/filters/resource_id_filter.rb b/app/models/queries/notifications/filters/resource_id_filter.rb index 8dc5f36c32..832ef0849d 100644 --- a/app/models/queries/notifications/filters/resource_id_filter.rb +++ b/app/models/queries/notifications/filters/resource_id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/filters/resource_type_filter.rb b/app/models/queries/notifications/filters/resource_type_filter.rb index 06cd886c8a..445b4617aa 100644 --- a/app/models/queries/notifications/filters/resource_type_filter.rb +++ b/app/models/queries/notifications/filters/resource_type_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/group_bys/group_by_project.rb b/app/models/queries/notifications/group_bys/group_by_project.rb index 7115d029c5..fe02b0c4dd 100644 --- a/app/models/queries/notifications/group_bys/group_by_project.rb +++ b/app/models/queries/notifications/group_bys/group_by_project.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/group_bys/group_by_reason.rb b/app/models/queries/notifications/group_bys/group_by_reason.rb index f86acc354f..7c5a1bf33a 100644 --- a/app/models/queries/notifications/group_bys/group_by_reason.rb +++ b/app/models/queries/notifications/group_bys/group_by_reason.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/notification_query.rb b/app/models/queries/notifications/notification_query.rb index 259a04669e..166026eee7 100644 --- a/app/models/queries/notifications/notification_query.rb +++ b/app/models/queries/notifications/notification_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/models/queries/notifications/orders/default_order.rb b/app/models/queries/notifications/orders/default_order.rb index 6132809c59..ac55fc0695 100644 --- a/app/models/queries/notifications/orders/default_order.rb +++ b/app/models/queries/notifications/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/orders/project_order.rb b/app/models/queries/notifications/orders/project_order.rb index 9c02d40952..97c0a2eb28 100644 --- a/app/models/queries/notifications/orders/project_order.rb +++ b/app/models/queries/notifications/orders/project_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/orders/read_ian_order.rb b/app/models/queries/notifications/orders/read_ian_order.rb index 963025bc53..c30c488143 100644 --- a/app/models/queries/notifications/orders/read_ian_order.rb +++ b/app/models/queries/notifications/orders/read_ian_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/notifications/orders/reason_order.rb b/app/models/queries/notifications/orders/reason_order.rb index 99ac7c06ce..e34b8389b5 100644 --- a/app/models/queries/notifications/orders/reason_order.rb +++ b/app/models/queries/notifications/orders/reason_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators.rb b/app/models/queries/operators.rb index db186ad9cb..3cb44d9c86 100644 --- a/app/models/queries/operators.rb +++ b/app/models/queries/operators.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/ago.rb b/app/models/queries/operators/ago.rb index 759ca4961f..9e5c9fc4fa 100644 --- a/app/models/queries/operators/ago.rb +++ b/app/models/queries/operators/ago.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/all.rb b/app/models/queries/operators/all.rb index 15a25e4176..1147296d6e 100644 --- a/app/models/queries/operators/all.rb +++ b/app/models/queries/operators/all.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/all_and_non_blank.rb b/app/models/queries/operators/all_and_non_blank.rb index 8b91b83ab8..6aea578ccd 100644 --- a/app/models/queries/operators/all_and_non_blank.rb +++ b/app/models/queries/operators/all_and_non_blank.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/base.rb b/app/models/queries/operators/base.rb index fd35f373c6..58e1b670df 100644 --- a/app/models/queries/operators/base.rb +++ b/app/models/queries/operators/base.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/between_date.rb b/app/models/queries/operators/between_date.rb index 49df904ec0..d12a32d91a 100644 --- a/app/models/queries/operators/between_date.rb +++ b/app/models/queries/operators/between_date.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/between_date_time.rb b/app/models/queries/operators/between_date_time.rb index 2582533853..61128d6440 100644 --- a/app/models/queries/operators/between_date_time.rb +++ b/app/models/queries/operators/between_date_time.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/blocked.rb b/app/models/queries/operators/blocked.rb index 0182aab0e7..d0fbe81b51 100644 --- a/app/models/queries/operators/blocked.rb +++ b/app/models/queries/operators/blocked.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/blocks.rb b/app/models/queries/operators/blocks.rb index 5e66e8cf86..7b7c43ac82 100644 --- a/app/models/queries/operators/blocks.rb +++ b/app/models/queries/operators/blocks.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/boolean_equals.rb b/app/models/queries/operators/boolean_equals.rb index 976be40519..5e60d66f48 100644 --- a/app/models/queries/operators/boolean_equals.rb +++ b/app/models/queries/operators/boolean_equals.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/boolean_equals_strict.rb b/app/models/queries/operators/boolean_equals_strict.rb index dd0dd5501a..1fb88843f0 100644 --- a/app/models/queries/operators/boolean_equals_strict.rb +++ b/app/models/queries/operators/boolean_equals_strict.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/boolean_not_equals.rb b/app/models/queries/operators/boolean_not_equals.rb index b2f046d0d0..e5d44cb348 100644 --- a/app/models/queries/operators/boolean_not_equals.rb +++ b/app/models/queries/operators/boolean_not_equals.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/casted_greater_or_equal.rb b/app/models/queries/operators/casted_greater_or_equal.rb index 08fea28176..153e8e3d94 100644 --- a/app/models/queries/operators/casted_greater_or_equal.rb +++ b/app/models/queries/operators/casted_greater_or_equal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/casted_less_or_equal.rb b/app/models/queries/operators/casted_less_or_equal.rb index ea73d58b01..cf7f7a7657 100644 --- a/app/models/queries/operators/casted_less_or_equal.rb +++ b/app/models/queries/operators/casted_less_or_equal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/children.rb b/app/models/queries/operators/children.rb index 1de9c8ae78..66da45a15f 100644 --- a/app/models/queries/operators/children.rb +++ b/app/models/queries/operators/children.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/closed_work_packages.rb b/app/models/queries/operators/closed_work_packages.rb index b12fdffca9..88cec66fd6 100644 --- a/app/models/queries/operators/closed_work_packages.rb +++ b/app/models/queries/operators/closed_work_packages.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/concerns/contains_all_values.rb b/app/models/queries/operators/concerns/contains_all_values.rb index 4839382468..8467041303 100644 --- a/app/models/queries/operators/concerns/contains_all_values.rb +++ b/app/models/queries/operators/concerns/contains_all_values.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/contains.rb b/app/models/queries/operators/contains.rb index 817bf02aca..5d035b1e0a 100644 --- a/app/models/queries/operators/contains.rb +++ b/app/models/queries/operators/contains.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/date_range_clauses.rb b/app/models/queries/operators/date_range_clauses.rb index 4a26b98eac..6fa64811ed 100644 --- a/app/models/queries/operators/date_range_clauses.rb +++ b/app/models/queries/operators/date_range_clauses.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/datetime_range_clauses.rb b/app/models/queries/operators/datetime_range_clauses.rb index 9e88568920..2622155873 100644 --- a/app/models/queries/operators/datetime_range_clauses.rb +++ b/app/models/queries/operators/datetime_range_clauses.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/duplicated.rb b/app/models/queries/operators/duplicated.rb index 2d673a5756..b2c8cc25eb 100644 --- a/app/models/queries/operators/duplicated.rb +++ b/app/models/queries/operators/duplicated.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/duplicates.rb b/app/models/queries/operators/duplicates.rb index 6ecb5daf30..bab47c7673 100644 --- a/app/models/queries/operators/duplicates.rb +++ b/app/models/queries/operators/duplicates.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/equals.rb b/app/models/queries/operators/equals.rb index 260a0fe221..8453bdd311 100644 --- a/app/models/queries/operators/equals.rb +++ b/app/models/queries/operators/equals.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/everywhere.rb b/app/models/queries/operators/everywhere.rb index 883e8d2d45..4a18d6f702 100644 --- a/app/models/queries/operators/everywhere.rb +++ b/app/models/queries/operators/everywhere.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/follows.rb b/app/models/queries/operators/follows.rb index e7348e8844..08cb998c53 100644 --- a/app/models/queries/operators/follows.rb +++ b/app/models/queries/operators/follows.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/greater_or_equal.rb b/app/models/queries/operators/greater_or_equal.rb index 3dfb45a007..fd5d5274b4 100644 --- a/app/models/queries/operators/greater_or_equal.rb +++ b/app/models/queries/operators/greater_or_equal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/in.rb b/app/models/queries/operators/in.rb index ff03df0944..8e4806cd21 100644 --- a/app/models/queries/operators/in.rb +++ b/app/models/queries/operators/in.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/in_less_than.rb b/app/models/queries/operators/in_less_than.rb index 15bc81471b..1b3d56c5d9 100644 --- a/app/models/queries/operators/in_less_than.rb +++ b/app/models/queries/operators/in_less_than.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/in_more_than.rb b/app/models/queries/operators/in_more_than.rb index 120f40707a..584d00a3c0 100644 --- a/app/models/queries/operators/in_more_than.rb +++ b/app/models/queries/operators/in_more_than.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/includes.rb b/app/models/queries/operators/includes.rb index 2d6ffc73c5..bf18e3f7b4 100644 --- a/app/models/queries/operators/includes.rb +++ b/app/models/queries/operators/includes.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/less_or_equal.rb b/app/models/queries/operators/less_or_equal.rb index 324b4c9038..b128fc0678 100644 --- a/app/models/queries/operators/less_or_equal.rb +++ b/app/models/queries/operators/less_or_equal.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/less_than_ago.rb b/app/models/queries/operators/less_than_ago.rb index ff6033ab1b..4a5cedfc65 100644 --- a/app/models/queries/operators/less_than_ago.rb +++ b/app/models/queries/operators/less_than_ago.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/more_than_ago.rb b/app/models/queries/operators/more_than_ago.rb index 4ea4c8e601..7389cda3df 100644 --- a/app/models/queries/operators/more_than_ago.rb +++ b/app/models/queries/operators/more_than_ago.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/none.rb b/app/models/queries/operators/none.rb index 114b2e575b..cbf2c308ba 100644 --- a/app/models/queries/operators/none.rb +++ b/app/models/queries/operators/none.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/none_or_blank.rb b/app/models/queries/operators/none_or_blank.rb index 2e00aa2911..ac6ac9c941 100644 --- a/app/models/queries/operators/none_or_blank.rb +++ b/app/models/queries/operators/none_or_blank.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/not_contains.rb b/app/models/queries/operators/not_contains.rb index 37a5df957b..bc80871f77 100644 --- a/app/models/queries/operators/not_contains.rb +++ b/app/models/queries/operators/not_contains.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/not_equals.rb b/app/models/queries/operators/not_equals.rb index 5f75a236dc..8aac091f37 100644 --- a/app/models/queries/operators/not_equals.rb +++ b/app/models/queries/operators/not_equals.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/on_date.rb b/app/models/queries/operators/on_date.rb index 437a06cdc2..db9cd350d8 100644 --- a/app/models/queries/operators/on_date.rb +++ b/app/models/queries/operators/on_date.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/on_date_time.rb b/app/models/queries/operators/on_date_time.rb index 1dba39b580..3ca5ebbde1 100644 --- a/app/models/queries/operators/on_date_time.rb +++ b/app/models/queries/operators/on_date_time.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/open_work_packages.rb b/app/models/queries/operators/open_work_packages.rb index 331c98256e..6007062af7 100644 --- a/app/models/queries/operators/open_work_packages.rb +++ b/app/models/queries/operators/open_work_packages.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/ordered_work_packages.rb b/app/models/queries/operators/ordered_work_packages.rb index 2e49222656..b691055914 100644 --- a/app/models/queries/operators/ordered_work_packages.rb +++ b/app/models/queries/operators/ordered_work_packages.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/parent.rb b/app/models/queries/operators/parent.rb index 9e8e66e330..4806e629ac 100644 --- a/app/models/queries/operators/parent.rb +++ b/app/models/queries/operators/parent.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/part_of.rb b/app/models/queries/operators/part_of.rb index c81cf66689..4bc1d73f6d 100644 --- a/app/models/queries/operators/part_of.rb +++ b/app/models/queries/operators/part_of.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/precedes.rb b/app/models/queries/operators/precedes.rb index 92318698ec..f0d2ca166d 100644 --- a/app/models/queries/operators/precedes.rb +++ b/app/models/queries/operators/precedes.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/relates.rb b/app/models/queries/operators/relates.rb index ce9ae039ce..608f2c8b33 100644 --- a/app/models/queries/operators/relates.rb +++ b/app/models/queries/operators/relates.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/required.rb b/app/models/queries/operators/required.rb index 99d65bbdd8..6d1dab7f95 100644 --- a/app/models/queries/operators/required.rb +++ b/app/models/queries/operators/required.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/requires.rb b/app/models/queries/operators/requires.rb index 579d479448..90740b7073 100644 --- a/app/models/queries/operators/requires.rb +++ b/app/models/queries/operators/requires.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/this_week.rb b/app/models/queries/operators/this_week.rb index 04417940c4..e6499ca679 100644 --- a/app/models/queries/operators/this_week.rb +++ b/app/models/queries/operators/this_week.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/operators/today.rb b/app/models/queries/operators/today.rb index 4352d5655c..477246ae4e 100644 --- a/app/models/queries/operators/today.rb +++ b/app/models/queries/operators/today.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/orders/available_orders.rb b/app/models/queries/orders/available_orders.rb index 317bae3003..5960c57501 100644 --- a/app/models/queries/orders/available_orders.rb +++ b/app/models/queries/orders/available_orders.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/orders/base.rb b/app/models/queries/orders/base.rb index 106057cdce..1c2b14a474 100644 --- a/app/models/queries/orders/base.rb +++ b/app/models/queries/orders/base.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/orders/not_existing_order.rb b/app/models/queries/orders/not_existing_order.rb index 05d06ee7b9..0a7a514c5c 100644 --- a/app/models/queries/orders/not_existing_order.rb +++ b/app/models/queries/orders/not_existing_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users.rb b/app/models/queries/placeholder_users.rb index d31ecff41b..a58e7cf81a 100644 --- a/app/models/queries/placeholder_users.rb +++ b/app/models/queries/placeholder_users.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH @@ -29,24 +27,14 @@ #++ module Queries::PlaceholderUsers - Queries::Register.filter Queries::PlaceholderUsers::PlaceholderUserQuery, - Queries::PlaceholderUsers::Filters::NameFilter - - Queries::Register.filter Queries::PlaceholderUsers::PlaceholderUserQuery, - Queries::PlaceholderUsers::Filters::AnyNameAttributeFilter - - Queries::Register.filter Queries::PlaceholderUsers::PlaceholderUserQuery, - Queries::PlaceholderUsers::Filters::GroupFilter - - Queries::Register.filter Queries::PlaceholderUsers::PlaceholderUserQuery, - Queries::PlaceholderUsers::Filters::StatusFilter - - Queries::Register.order Queries::PlaceholderUsers::PlaceholderUserQuery, - Queries::PlaceholderUsers::Orders::DefaultOrder - - Queries::Register.order Queries::PlaceholderUsers::PlaceholderUserQuery, - Queries::PlaceholderUsers::Orders::NameOrder - - Queries::Register.order Queries::PlaceholderUsers::PlaceholderUserQuery, - Queries::PlaceholderUsers::Orders::GroupOrder + ::Queries::Register.register(PlaceholderUserQuery) do + filter Filters::NameFilter + filter Filters::AnyNameAttributeFilter + filter Filters::GroupFilter + filter Filters::StatusFilter + + order Orders::DefaultOrder + order Orders::NameOrder + order Orders::GroupOrder + end end diff --git a/app/models/queries/placeholder_users/filters/any_name_attribute_filter.rb b/app/models/queries/placeholder_users/filters/any_name_attribute_filter.rb index e20395f2cd..1babfab8b4 100644 --- a/app/models/queries/placeholder_users/filters/any_name_attribute_filter.rb +++ b/app/models/queries/placeholder_users/filters/any_name_attribute_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users/filters/group_filter.rb b/app/models/queries/placeholder_users/filters/group_filter.rb index d2522b03a7..41f852cc43 100644 --- a/app/models/queries/placeholder_users/filters/group_filter.rb +++ b/app/models/queries/placeholder_users/filters/group_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users/filters/name_filter.rb b/app/models/queries/placeholder_users/filters/name_filter.rb index d04361de37..e523e390f0 100644 --- a/app/models/queries/placeholder_users/filters/name_filter.rb +++ b/app/models/queries/placeholder_users/filters/name_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users/filters/placeholder_user_filter.rb b/app/models/queries/placeholder_users/filters/placeholder_user_filter.rb index 71810b9efd..7740e49e11 100644 --- a/app/models/queries/placeholder_users/filters/placeholder_user_filter.rb +++ b/app/models/queries/placeholder_users/filters/placeholder_user_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users/filters/status_filter.rb b/app/models/queries/placeholder_users/filters/status_filter.rb index 28baf1dd1b..cd63feece4 100644 --- a/app/models/queries/placeholder_users/filters/status_filter.rb +++ b/app/models/queries/placeholder_users/filters/status_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users/orders/default_order.rb b/app/models/queries/placeholder_users/orders/default_order.rb index 2d0ad4d54a..59d610c8f5 100644 --- a/app/models/queries/placeholder_users/orders/default_order.rb +++ b/app/models/queries/placeholder_users/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users/orders/group_order.rb b/app/models/queries/placeholder_users/orders/group_order.rb index 47939e66fd..2ba32f0802 100644 --- a/app/models/queries/placeholder_users/orders/group_order.rb +++ b/app/models/queries/placeholder_users/orders/group_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users/orders/name_order.rb b/app/models/queries/placeholder_users/orders/name_order.rb index 0986550b35..2be3e420f7 100644 --- a/app/models/queries/placeholder_users/orders/name_order.rb +++ b/app/models/queries/placeholder_users/orders/name_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/placeholder_users/placeholder_user_query.rb b/app/models/queries/placeholder_users/placeholder_user_query.rb index f39098e35e..de22a0da75 100644 --- a/app/models/queries/placeholder_users/placeholder_user_query.rb +++ b/app/models/queries/placeholder_users/placeholder_user_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/models/queries/principals.rb b/app/models/queries/principals.rb index 9eb8adf777..ec19f28f65 100644 --- a/app/models/queries/principals.rb +++ b/app/models/queries/principals.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,18 +27,15 @@ #++ module Queries::Principals - register = ::Queries::Register - filters = ::Queries::Principals::Filters - query = ::Queries::Principals::PrincipalQuery - orders = Queries::Principals::Orders - - register.filter query, filters::TypeFilter - register.filter query, filters::MemberFilter - register.filter query, filters::StatusFilter - register.filter query, filters::NameFilter - register.filter query, filters::AnyNameAttributeFilter - register.filter query, filters::TypeaheadFilter - register.filter query, filters::IdFilter + ::Queries::Register.register(PrincipalQuery) do + filter Filters::TypeFilter + filter Filters::MemberFilter + filter Filters::StatusFilter + filter Filters::NameFilter + filter Filters::AnyNameAttributeFilter + filter Filters::TypeaheadFilter + filter Filters::IdFilter - register.order query, orders::NameOrder + order Orders::NameOrder + end end diff --git a/app/models/queries/principals/filters/any_name_attribute_filter.rb b/app/models/queries/principals/filters/any_name_attribute_filter.rb index f2efc16254..8fea6a8d77 100644 --- a/app/models/queries/principals/filters/any_name_attribute_filter.rb +++ b/app/models/queries/principals/filters/any_name_attribute_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/principals/filters/id_filter.rb b/app/models/queries/principals/filters/id_filter.rb index c9a7d5f46e..9d27e33237 100644 --- a/app/models/queries/principals/filters/id_filter.rb +++ b/app/models/queries/principals/filters/id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/principals/filters/member_filter.rb b/app/models/queries/principals/filters/member_filter.rb index 1adbcfa50e..2cfbf4a829 100644 --- a/app/models/queries/principals/filters/member_filter.rb +++ b/app/models/queries/principals/filters/member_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/principals/filters/name_filter.rb b/app/models/queries/principals/filters/name_filter.rb index 334d94ee52..ab596b533f 100644 --- a/app/models/queries/principals/filters/name_filter.rb +++ b/app/models/queries/principals/filters/name_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/principals/filters/principal_filter.rb b/app/models/queries/principals/filters/principal_filter.rb index 260c88788b..e67ab5390d 100644 --- a/app/models/queries/principals/filters/principal_filter.rb +++ b/app/models/queries/principals/filters/principal_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/principals/filters/status_filter.rb b/app/models/queries/principals/filters/status_filter.rb index 0321a52fad..ec7e09c06d 100644 --- a/app/models/queries/principals/filters/status_filter.rb +++ b/app/models/queries/principals/filters/status_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/principals/filters/type_filter.rb b/app/models/queries/principals/filters/type_filter.rb index d4f8ad8e52..37a01c9b51 100644 --- a/app/models/queries/principals/filters/type_filter.rb +++ b/app/models/queries/principals/filters/type_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/principals/filters/typeahead_filter.rb b/app/models/queries/principals/filters/typeahead_filter.rb index bb5b37abda..31c371da73 100644 --- a/app/models/queries/principals/filters/typeahead_filter.rb +++ b/app/models/queries/principals/filters/typeahead_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/principals/orders/name_order.rb b/app/models/queries/principals/orders/name_order.rb index 8237a1b652..07671dc82f 100644 --- a/app/models/queries/principals/orders/name_order.rb +++ b/app/models/queries/principals/orders/name_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects.rb b/app/models/queries/projects.rb index 55ac81a0c2..93d7efd8a0 100644 --- a/app/models/queries/projects.rb +++ b/app/models/queries/projects.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,34 +27,30 @@ #++ module Queries::Projects - filters = ::Queries::Projects::Filters - orders = ::Queries::Projects::Orders - query = ::Queries::Projects::ProjectQuery - - ::Queries::Register.register do - filter query, filters::AncestorFilter - filter query, filters::TypeFilter - filter query, filters::ActiveFilter - filter query, filters::TemplatedFilter - filter query, filters::PublicFilter - filter query, filters::NameAndIdentifierFilter - filter query, filters::TypeaheadFilter - filter query, filters::CustomFieldFilter - filter query, filters::CreatedAtFilter - filter query, filters::LatestActivityAtFilter - filter query, filters::PrincipalFilter - filter query, filters::ParentFilter - filter query, filters::IdFilter - filter query, filters::ProjectStatusFilter - filter query, filters::UserActionFilter - filter query, filters::VisibleFilter + ::Queries::Register.register(ProjectQuery) do + filter Filters::AncestorFilter + filter Filters::TypeFilter + filter Filters::ActiveFilter + filter Filters::TemplatedFilter + filter Filters::PublicFilter + filter Filters::NameAndIdentifierFilter + filter Filters::TypeaheadFilter + filter Filters::CustomFieldFilter + filter Filters::CreatedAtFilter + filter Filters::LatestActivityAtFilter + filter Filters::PrincipalFilter + filter Filters::ParentFilter + filter Filters::IdFilter + filter Filters::ProjectStatusFilter + filter Filters::UserActionFilter + filter Filters::VisibleFilter - order query, orders::DefaultOrder - order query, orders::LatestActivityAtOrder - order query, orders::RequiredDiskSpaceOrder - order query, orders::CustomFieldOrder - order query, orders::ProjectStatusOrder - order query, orders::NameOrder - order query, orders::TypeaheadOrder + order Orders::DefaultOrder + order Orders::LatestActivityAtOrder + order Orders::RequiredDiskSpaceOrder + order Orders::CustomFieldOrder + order Orders::ProjectStatusOrder + order Orders::NameOrder + order Orders::TypeaheadOrder end end diff --git a/app/models/queries/projects/filters/active_filter.rb b/app/models/queries/projects/filters/active_filter.rb index f9113a05bd..bfaeff9ecc 100644 --- a/app/models/queries/projects/filters/active_filter.rb +++ b/app/models/queries/projects/filters/active_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/ancestor_filter.rb b/app/models/queries/projects/filters/ancestor_filter.rb index 693109e161..02148d7090 100644 --- a/app/models/queries/projects/filters/ancestor_filter.rb +++ b/app/models/queries/projects/filters/ancestor_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/created_at_filter.rb b/app/models/queries/projects/filters/created_at_filter.rb index 928385f17b..7af2d20fbf 100644 --- a/app/models/queries/projects/filters/created_at_filter.rb +++ b/app/models/queries/projects/filters/created_at_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/custom_field_context.rb b/app/models/queries/projects/filters/custom_field_context.rb index 58cc43be60..84ef4d0370 100644 --- a/app/models/queries/projects/filters/custom_field_context.rb +++ b/app/models/queries/projects/filters/custom_field_context.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/custom_field_filter.rb b/app/models/queries/projects/filters/custom_field_filter.rb index 452113bada..f4a67ba78b 100644 --- a/app/models/queries/projects/filters/custom_field_filter.rb +++ b/app/models/queries/projects/filters/custom_field_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/id_filter.rb b/app/models/queries/projects/filters/id_filter.rb index 484755ffdd..fbd8ff8b70 100644 --- a/app/models/queries/projects/filters/id_filter.rb +++ b/app/models/queries/projects/filters/id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/latest_activity_at_filter.rb b/app/models/queries/projects/filters/latest_activity_at_filter.rb index ea1168ec26..5aef10bc9e 100644 --- a/app/models/queries/projects/filters/latest_activity_at_filter.rb +++ b/app/models/queries/projects/filters/latest_activity_at_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/name_and_identifier_filter.rb b/app/models/queries/projects/filters/name_and_identifier_filter.rb index 83d4b0a1e3..1577db3c5b 100644 --- a/app/models/queries/projects/filters/name_and_identifier_filter.rb +++ b/app/models/queries/projects/filters/name_and_identifier_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/parent_filter.rb b/app/models/queries/projects/filters/parent_filter.rb index dd78debe2f..bebd7b3e65 100644 --- a/app/models/queries/projects/filters/parent_filter.rb +++ b/app/models/queries/projects/filters/parent_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/principal_filter.rb b/app/models/queries/projects/filters/principal_filter.rb index eccffb6f61..69ab6cca7b 100644 --- a/app/models/queries/projects/filters/principal_filter.rb +++ b/app/models/queries/projects/filters/principal_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/project_filter.rb b/app/models/queries/projects/filters/project_filter.rb index 9aa5fdbde2..68a6720cd8 100644 --- a/app/models/queries/projects/filters/project_filter.rb +++ b/app/models/queries/projects/filters/project_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/project_status_filter.rb b/app/models/queries/projects/filters/project_status_filter.rb index 61351dbf87..1a6bfbf4e5 100644 --- a/app/models/queries/projects/filters/project_status_filter.rb +++ b/app/models/queries/projects/filters/project_status_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/public_filter.rb b/app/models/queries/projects/filters/public_filter.rb index c510fe2082..26cb34b508 100644 --- a/app/models/queries/projects/filters/public_filter.rb +++ b/app/models/queries/projects/filters/public_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/templated_filter.rb b/app/models/queries/projects/filters/templated_filter.rb index e40e99383e..d9836e98a0 100644 --- a/app/models/queries/projects/filters/templated_filter.rb +++ b/app/models/queries/projects/filters/templated_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/type_filter.rb b/app/models/queries/projects/filters/type_filter.rb index 361df0d882..d079ca3cf0 100644 --- a/app/models/queries/projects/filters/type_filter.rb +++ b/app/models/queries/projects/filters/type_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/typeahead_filter.rb b/app/models/queries/projects/filters/typeahead_filter.rb index c8e92f1735..9cdb42807f 100644 --- a/app/models/queries/projects/filters/typeahead_filter.rb +++ b/app/models/queries/projects/filters/typeahead_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/user_action_filter.rb b/app/models/queries/projects/filters/user_action_filter.rb index 050e28ead2..0fb0079237 100644 --- a/app/models/queries/projects/filters/user_action_filter.rb +++ b/app/models/queries/projects/filters/user_action_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/filters/visible_filter.rb b/app/models/queries/projects/filters/visible_filter.rb index 8f61723c7e..7819fffbf5 100644 --- a/app/models/queries/projects/filters/visible_filter.rb +++ b/app/models/queries/projects/filters/visible_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/orders/custom_field_order.rb b/app/models/queries/projects/orders/custom_field_order.rb index 3231e0dd55..e063780d56 100644 --- a/app/models/queries/projects/orders/custom_field_order.rb +++ b/app/models/queries/projects/orders/custom_field_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/orders/default_order.rb b/app/models/queries/projects/orders/default_order.rb index a9895614f4..40b4245531 100644 --- a/app/models/queries/projects/orders/default_order.rb +++ b/app/models/queries/projects/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/orders/latest_activity_at_order.rb b/app/models/queries/projects/orders/latest_activity_at_order.rb index b8c63f9ae2..b283271568 100644 --- a/app/models/queries/projects/orders/latest_activity_at_order.rb +++ b/app/models/queries/projects/orders/latest_activity_at_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/orders/name_order.rb b/app/models/queries/projects/orders/name_order.rb index 9036bfe8ac..35730b5e12 100644 --- a/app/models/queries/projects/orders/name_order.rb +++ b/app/models/queries/projects/orders/name_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/orders/project_status_order.rb b/app/models/queries/projects/orders/project_status_order.rb index b1aa370bdd..4e2de50a10 100644 --- a/app/models/queries/projects/orders/project_status_order.rb +++ b/app/models/queries/projects/orders/project_status_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/orders/required_disk_space_order.rb b/app/models/queries/projects/orders/required_disk_space_order.rb index 2eedbf6b5a..baf7e4381e 100644 --- a/app/models/queries/projects/orders/required_disk_space_order.rb +++ b/app/models/queries/projects/orders/required_disk_space_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/projects/orders/typeahead_order.rb b/app/models/queries/projects/orders/typeahead_order.rb index 4cefc83650..1360e6d27e 100644 --- a/app/models/queries/projects/orders/typeahead_order.rb +++ b/app/models/queries/projects/orders/typeahead_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/queries.rb b/app/models/queries/queries.rb index bd21d32de1..6f79a6254a 100644 --- a/app/models/queries/queries.rb +++ b/app/models/queries/queries.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -33,13 +31,11 @@ # all projects that are global module Queries::Queries - filters_ns = Queries::Queries::Filters - query_ns = Queries::Queries::QueryQuery - register = Queries::Register - - register.filter query_ns, filters_ns::ProjectFilter - register.filter query_ns, filters_ns::ProjectIdentifierFilter - register.filter query_ns, filters_ns::HiddenFilter - register.filter query_ns, filters_ns::UpdatedAtFilter - register.filter query_ns, filters_ns::IdFilter + ::Queries::Register.register(QueryQuery) do + filter Filters::ProjectFilter + filter Filters::ProjectIdentifierFilter + filter Filters::HiddenFilter + filter Filters::UpdatedAtFilter + filter Filters::IdFilter + end end diff --git a/app/models/queries/queries/filters/hidden_filter.rb b/app/models/queries/queries/filters/hidden_filter.rb index 45c59f901b..1e434a5a0e 100644 --- a/app/models/queries/queries/filters/hidden_filter.rb +++ b/app/models/queries/queries/filters/hidden_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/queries/filters/id_filter.rb b/app/models/queries/queries/filters/id_filter.rb index 09719724c4..5b09368fe0 100644 --- a/app/models/queries/queries/filters/id_filter.rb +++ b/app/models/queries/queries/filters/id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/queries/filters/project_filter.rb b/app/models/queries/queries/filters/project_filter.rb index a9f7aecc33..3ddccbc56e 100644 --- a/app/models/queries/queries/filters/project_filter.rb +++ b/app/models/queries/queries/filters/project_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/queries/filters/project_identifier_filter.rb b/app/models/queries/queries/filters/project_identifier_filter.rb index 60708d059d..6338eeac3b 100644 --- a/app/models/queries/queries/filters/project_identifier_filter.rb +++ b/app/models/queries/queries/filters/project_identifier_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/queries/filters/query_filter.rb b/app/models/queries/queries/filters/query_filter.rb index 3d8ef9bdbb..ab6e443b6a 100644 --- a/app/models/queries/queries/filters/query_filter.rb +++ b/app/models/queries/queries/filters/query_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/queries/filters/updated_at_filter.rb b/app/models/queries/queries/filters/updated_at_filter.rb index 7a72dcd8a2..6f881c3f2b 100644 --- a/app/models/queries/queries/filters/updated_at_filter.rb +++ b/app/models/queries/queries/filters/updated_at_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/register.rb b/app/models/queries/register.rb index 3119515ae9..8bd720fe8b 100644 --- a/app/models/queries/register.rb +++ b/app/models/queries/register.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -68,8 +66,8 @@ module Queries::Register @columns[query] << column end - def register(&block) - instance_exec(&block) + def register(query, &block) + Registration.new(query).instance_exec(&block) end attr_accessor :filters, @@ -78,4 +76,33 @@ module Queries::Register :columns, :group_bys end + + class Registration + attr_reader :query + + def initialize(query) + @query = query + end + + def filter(filter) + Queries::Register.filter(query, filter) + end + + # Exclude filter from filters collection representer. + def exclude(filter) + Queries::Register.exclude(filter) + end + + def order(order) + Queries::Register.order(query, order) + end + + def group_by(group_by) + Queries::Register.group_by(query, group_by) + end + + def column(column) + Queries::Register.column(query, column) + end + end end diff --git a/app/models/queries/relations.rb b/app/models/queries/relations.rb index 071310e01e..93bb8eb279 100644 --- a/app/models/queries/relations.rb +++ b/app/models/queries/relations.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -30,16 +28,14 @@ module Queries module Relations - register = ::Queries::Register - filters = ::Queries::Relations::Filters - query = ::Queries::Relations::RelationQuery - - register.filter query, filters::IdFilter - register.filter query, filters::FromFilter - register.filter query, filters::ToFilter - register.filter query, filters::InvolvedFilter - register.filter query, filters::TypeFilter + ::Queries::Register.register(RelationQuery) do + filter Filters::IdFilter + filter Filters::FromFilter + filter Filters::ToFilter + filter Filters::InvolvedFilter + filter Filters::TypeFilter - register.order query, ::Queries::Relations::Orders::DefaultOrder + order Orders::DefaultOrder + end end end diff --git a/app/models/queries/relations/filters/from_filter.rb b/app/models/queries/relations/filters/from_filter.rb index 392dc2ef86..3e066b86a7 100644 --- a/app/models/queries/relations/filters/from_filter.rb +++ b/app/models/queries/relations/filters/from_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/relations/filters/id_filter.rb b/app/models/queries/relations/filters/id_filter.rb index 0e9b277052..a611dfb96c 100644 --- a/app/models/queries/relations/filters/id_filter.rb +++ b/app/models/queries/relations/filters/id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/relations/filters/involved_filter.rb b/app/models/queries/relations/filters/involved_filter.rb index d2b4dc68ee..63ecd2323d 100644 --- a/app/models/queries/relations/filters/involved_filter.rb +++ b/app/models/queries/relations/filters/involved_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/relations/filters/relation_filter.rb b/app/models/queries/relations/filters/relation_filter.rb index 844dcd740a..81675aaeb6 100644 --- a/app/models/queries/relations/filters/relation_filter.rb +++ b/app/models/queries/relations/filters/relation_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/relations/filters/to_filter.rb b/app/models/queries/relations/filters/to_filter.rb index 2fefde7cdd..857ae2eba1 100644 --- a/app/models/queries/relations/filters/to_filter.rb +++ b/app/models/queries/relations/filters/to_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/relations/filters/type_filter.rb b/app/models/queries/relations/filters/type_filter.rb index b1e04321c7..cd4af92ea9 100644 --- a/app/models/queries/relations/filters/type_filter.rb +++ b/app/models/queries/relations/filters/type_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/relations/filters/visibility_checking.rb b/app/models/queries/relations/filters/visibility_checking.rb index d370a2c23e..77b1d6ba9f 100644 --- a/app/models/queries/relations/filters/visibility_checking.rb +++ b/app/models/queries/relations/filters/visibility_checking.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/relations/orders/default_order.rb b/app/models/queries/relations/orders/default_order.rb index 91aae7a2be..85921f6776 100644 --- a/app/models/queries/relations/orders/default_order.rb +++ b/app/models/queries/relations/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/roles.rb b/app/models/queries/roles.rb index 668c2d70c5..301217c292 100644 --- a/app/models/queries/roles.rb +++ b/app/models/queries/roles.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,10 +27,8 @@ #++ module Queries::Roles - register = ::Queries::Register - filters = ::Queries::Roles::Filters - query = ::Queries::Roles::RoleQuery - - register.filter query, filters::GrantableFilter - register.filter query, filters::UnitFilter + ::Queries::Register.register(RoleQuery) do + filter Filters::GrantableFilter + filter Filters::UnitFilter + end end diff --git a/app/models/queries/roles/filters/grantable_filter.rb b/app/models/queries/roles/filters/grantable_filter.rb index c15a53431e..cb798438d0 100644 --- a/app/models/queries/roles/filters/grantable_filter.rb +++ b/app/models/queries/roles/filters/grantable_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/roles/filters/role_filter.rb b/app/models/queries/roles/filters/role_filter.rb index a79b059ca8..dada7cc4ea 100644 --- a/app/models/queries/roles/filters/role_filter.rb +++ b/app/models/queries/roles/filters/role_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/roles/filters/unit_filter.rb b/app/models/queries/roles/filters/unit_filter.rb index 46476c0678..1bc7a2a14e 100644 --- a/app/models/queries/roles/filters/unit_filter.rb +++ b/app/models/queries/roles/filters/unit_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users.rb b/app/models/queries/users.rb index 797a70000d..0cbf0ffb7e 100644 --- a/app/models/queries/users.rb +++ b/app/models/queries/users.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,14 +27,16 @@ #++ module Queries::Users - Queries::Register.filter Queries::Users::UserQuery, Queries::Users::Filters::NameFilter - Queries::Register.filter Queries::Users::UserQuery, Queries::Users::Filters::AnyNameAttributeFilter - Queries::Register.filter Queries::Users::UserQuery, Queries::Users::Filters::GroupFilter - Queries::Register.filter Queries::Users::UserQuery, Queries::Users::Filters::StatusFilter - Queries::Register.filter Queries::Users::UserQuery, Queries::Users::Filters::LoginFilter - Queries::Register.filter Queries::Users::UserQuery, Queries::Users::Filters::BlockedFilter + ::Queries::Register.register(UserQuery) do + filter Filters::NameFilter + filter Filters::AnyNameAttributeFilter + filter Filters::GroupFilter + filter Filters::StatusFilter + filter Filters::LoginFilter + filter Filters::BlockedFilter - Queries::Register.order Queries::Users::UserQuery, Queries::Users::Orders::DefaultOrder - Queries::Register.order Queries::Users::UserQuery, Queries::Users::Orders::NameOrder - Queries::Register.order Queries::Users::UserQuery, Queries::Users::Orders::GroupOrder + order Orders::DefaultOrder + order Orders::NameOrder + order Orders::GroupOrder + end end diff --git a/app/models/queries/users/filters/any_name_attribute_filter.rb b/app/models/queries/users/filters/any_name_attribute_filter.rb index 7bec231cf4..74910394f7 100644 --- a/app/models/queries/users/filters/any_name_attribute_filter.rb +++ b/app/models/queries/users/filters/any_name_attribute_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/filters/blocked_filter.rb b/app/models/queries/users/filters/blocked_filter.rb index dc04837d88..40562c229a 100644 --- a/app/models/queries/users/filters/blocked_filter.rb +++ b/app/models/queries/users/filters/blocked_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/filters/group_filter.rb b/app/models/queries/users/filters/group_filter.rb index 7757ed4e38..0f6cc8a6c9 100644 --- a/app/models/queries/users/filters/group_filter.rb +++ b/app/models/queries/users/filters/group_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/filters/login_filter.rb b/app/models/queries/users/filters/login_filter.rb index 178d6a4d8a..99d3dee1ab 100644 --- a/app/models/queries/users/filters/login_filter.rb +++ b/app/models/queries/users/filters/login_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/filters/name_filter.rb b/app/models/queries/users/filters/name_filter.rb index d712bd6fdf..835d920623 100644 --- a/app/models/queries/users/filters/name_filter.rb +++ b/app/models/queries/users/filters/name_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/filters/status_filter.rb b/app/models/queries/users/filters/status_filter.rb index 326677133a..7b40fcfa1f 100644 --- a/app/models/queries/users/filters/status_filter.rb +++ b/app/models/queries/users/filters/status_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/filters/user_filter.rb b/app/models/queries/users/filters/user_filter.rb index 618a432d1c..c6ac58d94b 100644 --- a/app/models/queries/users/filters/user_filter.rb +++ b/app/models/queries/users/filters/user_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/orders/default_order.rb b/app/models/queries/users/orders/default_order.rb index ed4614d182..aa0c03a0d7 100644 --- a/app/models/queries/users/orders/default_order.rb +++ b/app/models/queries/users/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/orders/group_order.rb b/app/models/queries/users/orders/group_order.rb index f80d700835..d55ebd5bef 100644 --- a/app/models/queries/users/orders/group_order.rb +++ b/app/models/queries/users/orders/group_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/users/orders/name_order.rb b/app/models/queries/users/orders/name_order.rb index 5347fae8d9..d9af649e0e 100644 --- a/app/models/queries/users/orders/name_order.rb +++ b/app/models/queries/users/orders/name_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/versions.rb b/app/models/queries/versions.rb index dc436860ce..22783e60c0 100644 --- a/app/models/queries/versions.rb +++ b/app/models/queries/versions.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,13 +27,10 @@ #++ module Queries::Versions - register = ::Queries::Register - filters = ::Queries::Versions::Filters - orders = ::Queries::Versions::Orders - query = ::Queries::Versions::VersionQuery - - register.filter query, filters::SharingFilter + ::Queries::Register.register(VersionQuery) do + filter Filters::SharingFilter - register.order query, orders::NameOrder - register.order query, orders::SemverNameOrder + order Orders::NameOrder + order Orders::SemverNameOrder + end end diff --git a/app/models/queries/versions/filters/sharing_filter.rb b/app/models/queries/versions/filters/sharing_filter.rb index 726ee5df2f..c2c12b062d 100644 --- a/app/models/queries/versions/filters/sharing_filter.rb +++ b/app/models/queries/versions/filters/sharing_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/versions/filters/version_filter.rb b/app/models/queries/versions/filters/version_filter.rb index b51da2982e..1ff1809bbb 100644 --- a/app/models/queries/versions/filters/version_filter.rb +++ b/app/models/queries/versions/filters/version_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/versions/orders/name_order.rb b/app/models/queries/versions/orders/name_order.rb index 1416ef7680..50bd3280e2 100644 --- a/app/models/queries/versions/orders/name_order.rb +++ b/app/models/queries/versions/orders/name_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/versions/orders/semver_name_order.rb b/app/models/queries/versions/orders/semver_name_order.rb index d144f9078e..6d95451813 100644 --- a/app/models/queries/versions/orders/semver_name_order.rb +++ b/app/models/queries/versions/orders/semver_name_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/views.rb b/app/models/queries/views.rb index a7baa88ce4..f206d56584 100644 --- a/app/models/queries/views.rb +++ b/app/models/queries/views.rb @@ -27,16 +27,10 @@ #++ module Queries::Views - [ - Queries::Views::Filters::ProjectFilter, - Queries::Views::Filters::TypeFilter - ].each do |filter| - Queries::Register.filter Queries::Views::ViewQuery, - filter - end + ::Queries::Register.register(ViewQuery) do + filter Filters::ProjectFilter + filter Filters::TypeFilter - [Queries::Views::Orders::DefaultOrder].each do |order| - Queries::Register.order Queries::Views::ViewQuery, - order + order Orders::DefaultOrder end end diff --git a/app/models/queries/views/orders/default_order.rb b/app/models/queries/views/orders/default_order.rb index 0f821b8eb5..0b95199632 100644 --- a/app/models/queries/views/orders/default_order.rb +++ b/app/models/queries/views/orders/default_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages.rb b/app/models/queries/work_packages.rb index 8dc5d54456..3e6bc3033d 100644 --- a/app/models/queries/work_packages.rb +++ b/app/models/queries/work_packages.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -29,63 +27,60 @@ #++ module Queries::WorkPackages - filters_module = Queries::WorkPackages::Filter - register = Queries::Register - - register.filter Query, filters_module::AssignedToFilter - register.filter Query, filters_module::AssigneeOrGroupFilter - register.filter Query, filters_module::AttachmentContentFilter - register.filter Query, filters_module::AttachmentFileNameFilter - register.filter Query, filters_module::AuthorFilter - register.filter Query, filters_module::CategoryFilter - register.filter Query, filters_module::CreatedAtFilter - register.filter Query, filters_module::CustomFieldFilter - register.filter Query, filters_module::DoneRatioFilter - register.filter Query, filters_module::DueDateFilter - register.filter Query, filters_module::EstimatedHoursFilter - register.filter Query, filters_module::GroupFilter - register.filter Query, filters_module::IdFilter - register.filter Query, filters_module::PriorityFilter - register.filter Query, filters_module::ProjectFilter - register.filter Query, filters_module::ResponsibleFilter - register.filter Query, filters_module::RoleFilter - register.filter Query, filters_module::StartDateFilter - register.filter Query, filters_module::StatusFilter - register.filter Query, filters_module::SubjectFilter - register.filter Query, filters_module::SubprojectFilter - register.filter Query, filters_module::OnlySubprojectFilter - register.filter Query, filters_module::TypeFilter - register.filter Query, filters_module::UpdatedAtFilter - register.filter Query, filters_module::VersionFilter - register.filter Query, filters_module::WatcherFilter - register.filter Query, filters_module::DatesIntervalFilter - register.filter Query, filters_module::ParentFilter - register.filter Query, filters_module::PrecedesFilter - register.filter Query, filters_module::FollowsFilter - register.filter Query, filters_module::RelatesFilter - register.filter Query, filters_module::DuplicatesFilter - register.filter Query, filters_module::DuplicatedFilter - register.filter Query, filters_module::BlocksFilter - register.filter Query, filters_module::BlockedFilter - register.filter Query, filters_module::PartofFilter - register.filter Query, filters_module::IncludesFilter - register.filter Query, filters_module::RequiresFilter - register.filter Query, filters_module::RequiredFilter - register.filter Query, filters_module::DescriptionFilter - register.filter Query, filters_module::SearchFilter - register.filter Query, filters_module::CommentFilter - register.filter Query, filters_module::SubjectOrIdFilter - register.filter Query, filters_module::ManualSortFilter - register.filter Query, filters_module::RelatableFilter - register.filter Query, filters_module::MilestoneFilter - register.filter Query, filters_module::TypeaheadFilter - - register.exclude filters_module::RelatableFilter + ::Queries::Register.register(Query) do + filter Filter::AssignedToFilter + filter Filter::AssigneeOrGroupFilter + filter Filter::AttachmentContentFilter + filter Filter::AttachmentFileNameFilter + filter Filter::AuthorFilter + filter Filter::CategoryFilter + filter Filter::CreatedAtFilter + filter Filter::CustomFieldFilter + filter Filter::DoneRatioFilter + filter Filter::DueDateFilter + filter Filter::EstimatedHoursFilter + filter Filter::GroupFilter + filter Filter::IdFilter + filter Filter::PriorityFilter + filter Filter::ProjectFilter + filter Filter::ResponsibleFilter + filter Filter::RoleFilter + filter Filter::StartDateFilter + filter Filter::StatusFilter + filter Filter::SubjectFilter + filter Filter::SubprojectFilter + filter Filter::OnlySubprojectFilter + filter Filter::TypeFilter + filter Filter::UpdatedAtFilter + filter Filter::VersionFilter + filter Filter::WatcherFilter + filter Filter::DatesIntervalFilter + filter Filter::ParentFilter + filter Filter::PrecedesFilter + filter Filter::FollowsFilter + filter Filter::RelatesFilter + filter Filter::DuplicatesFilter + filter Filter::DuplicatedFilter + filter Filter::BlocksFilter + filter Filter::BlockedFilter + filter Filter::PartofFilter + filter Filter::IncludesFilter + filter Filter::RequiresFilter + filter Filter::RequiredFilter + filter Filter::DescriptionFilter + filter Filter::SearchFilter + filter Filter::CommentFilter + filter Filter::SubjectOrIdFilter + filter Filter::ManualSortFilter + filter Filter::RelatableFilter + filter Filter::MilestoneFilter + filter Filter::TypeaheadFilter - columns_module = Queries::WorkPackages::Columns + exclude Filter::RelatableFilter - register.column Query, columns_module::PropertyColumn - register.column Query, columns_module::CustomFieldColumn - register.column Query, columns_module::RelationToTypeColumn - register.column Query, columns_module::RelationOfTypeColumn + column Columns::PropertyColumn + column Columns::CustomFieldColumn + column Columns::RelationToTypeColumn + column Columns::RelationOfTypeColumn + end end diff --git a/app/models/queries/work_packages/columns/custom_field_column.rb b/app/models/queries/work_packages/columns/custom_field_column.rb index 5e090523a8..d3f26e28b2 100644 --- a/app/models/queries/work_packages/columns/custom_field_column.rb +++ b/app/models/queries/work_packages/columns/custom_field_column.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/columns/manual_sorting_column.rb b/app/models/queries/work_packages/columns/manual_sorting_column.rb index 8d1fe01b20..3e7099b19e 100644 --- a/app/models/queries/work_packages/columns/manual_sorting_column.rb +++ b/app/models/queries/work_packages/columns/manual_sorting_column.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/columns/property_column.rb b/app/models/queries/work_packages/columns/property_column.rb index a85ec63325..8165e23369 100644 --- a/app/models/queries/work_packages/columns/property_column.rb +++ b/app/models/queries/work_packages/columns/property_column.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/columns/relation_column.rb b/app/models/queries/work_packages/columns/relation_column.rb index 8507348ed6..412a1aed44 100644 --- a/app/models/queries/work_packages/columns/relation_column.rb +++ b/app/models/queries/work_packages/columns/relation_column.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/columns/relation_of_type_column.rb b/app/models/queries/work_packages/columns/relation_of_type_column.rb index 760f753e3a..27f18ca300 100644 --- a/app/models/queries/work_packages/columns/relation_of_type_column.rb +++ b/app/models/queries/work_packages/columns/relation_of_type_column.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/columns/relation_to_type_column.rb b/app/models/queries/work_packages/columns/relation_to_type_column.rb index e5e93bc595..4b3e695956 100644 --- a/app/models/queries/work_packages/columns/relation_to_type_column.rb +++ b/app/models/queries/work_packages/columns/relation_to_type_column.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/columns/work_package_column.rb b/app/models/queries/work_packages/columns/work_package_column.rb index 13a80fad9c..5b47e9a51d 100644 --- a/app/models/queries/work_packages/columns/work_package_column.rb +++ b/app/models/queries/work_packages/columns/work_package_column.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/common/manual_sorting.rb b/app/models/queries/work_packages/common/manual_sorting.rb index 5ac11b607c..deeb964bf5 100644 --- a/app/models/queries/work_packages/common/manual_sorting.rb +++ b/app/models/queries/work_packages/common/manual_sorting.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter.rb b/app/models/queries/work_packages/filter.rb index 34cdadb623..acadfd0ffd 100644 --- a/app/models/queries/work_packages/filter.rb +++ b/app/models/queries/work_packages/filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/assigned_to_filter.rb b/app/models/queries/work_packages/filter/assigned_to_filter.rb index 194a16b8e1..74fd615c25 100644 --- a/app/models/queries/work_packages/filter/assigned_to_filter.rb +++ b/app/models/queries/work_packages/filter/assigned_to_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/assignee_or_group_filter.rb b/app/models/queries/work_packages/filter/assignee_or_group_filter.rb index b564b37994..10e06c5fa4 100644 --- a/app/models/queries/work_packages/filter/assignee_or_group_filter.rb +++ b/app/models/queries/work_packages/filter/assignee_or_group_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/attachment_base_filter.rb b/app/models/queries/work_packages/filter/attachment_base_filter.rb index 914d1f65ac..5baa6014aa 100644 --- a/app/models/queries/work_packages/filter/attachment_base_filter.rb +++ b/app/models/queries/work_packages/filter/attachment_base_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/attachment_content_filter.rb b/app/models/queries/work_packages/filter/attachment_content_filter.rb index 4284d51d0f..cd8739f165 100644 --- a/app/models/queries/work_packages/filter/attachment_content_filter.rb +++ b/app/models/queries/work_packages/filter/attachment_content_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/attachment_file_name_filter.rb b/app/models/queries/work_packages/filter/attachment_file_name_filter.rb index 9b40183418..23a1e3f1bd 100644 --- a/app/models/queries/work_packages/filter/attachment_file_name_filter.rb +++ b/app/models/queries/work_packages/filter/attachment_file_name_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/author_filter.rb b/app/models/queries/work_packages/filter/author_filter.rb index d51183e92b..34543dd441 100644 --- a/app/models/queries/work_packages/filter/author_filter.rb +++ b/app/models/queries/work_packages/filter/author_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/blocked_filter.rb b/app/models/queries/work_packages/filter/blocked_filter.rb index 0cc457b497..a9ba939e04 100644 --- a/app/models/queries/work_packages/filter/blocked_filter.rb +++ b/app/models/queries/work_packages/filter/blocked_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/blocks_filter.rb b/app/models/queries/work_packages/filter/blocks_filter.rb index 1718b44c9a..79dfd02eb2 100644 --- a/app/models/queries/work_packages/filter/blocks_filter.rb +++ b/app/models/queries/work_packages/filter/blocks_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/category_filter.rb b/app/models/queries/work_packages/filter/category_filter.rb index 78cd20d172..a8b71788ff 100644 --- a/app/models/queries/work_packages/filter/category_filter.rb +++ b/app/models/queries/work_packages/filter/category_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/comment_filter.rb b/app/models/queries/work_packages/filter/comment_filter.rb index 2ee1b3837e..10149a1704 100644 --- a/app/models/queries/work_packages/filter/comment_filter.rb +++ b/app/models/queries/work_packages/filter/comment_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/created_at_filter.rb b/app/models/queries/work_packages/filter/created_at_filter.rb index 7ecf341ec6..c173c48ae5 100644 --- a/app/models/queries/work_packages/filter/created_at_filter.rb +++ b/app/models/queries/work_packages/filter/created_at_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/custom_field_context.rb b/app/models/queries/work_packages/filter/custom_field_context.rb index a77b704833..f005766303 100644 --- a/app/models/queries/work_packages/filter/custom_field_context.rb +++ b/app/models/queries/work_packages/filter/custom_field_context.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/custom_field_filter.rb b/app/models/queries/work_packages/filter/custom_field_filter.rb index 93db29f89c..01fbb61e50 100644 --- a/app/models/queries/work_packages/filter/custom_field_filter.rb +++ b/app/models/queries/work_packages/filter/custom_field_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/dates_interval_filter.rb b/app/models/queries/work_packages/filter/dates_interval_filter.rb index 4e3a5abc4f..d501d59371 100644 --- a/app/models/queries/work_packages/filter/dates_interval_filter.rb +++ b/app/models/queries/work_packages/filter/dates_interval_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/description_filter.rb b/app/models/queries/work_packages/filter/description_filter.rb index 4756cb5f09..e7cfcddaff 100644 --- a/app/models/queries/work_packages/filter/description_filter.rb +++ b/app/models/queries/work_packages/filter/description_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/done_ratio_filter.rb b/app/models/queries/work_packages/filter/done_ratio_filter.rb index d0dcfd2fa4..acee8777d2 100644 --- a/app/models/queries/work_packages/filter/done_ratio_filter.rb +++ b/app/models/queries/work_packages/filter/done_ratio_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/due_date_filter.rb b/app/models/queries/work_packages/filter/due_date_filter.rb index d7d74b67d9..835271e7b1 100644 --- a/app/models/queries/work_packages/filter/due_date_filter.rb +++ b/app/models/queries/work_packages/filter/due_date_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/duplicated_filter.rb b/app/models/queries/work_packages/filter/duplicated_filter.rb index cea541e340..155f4853fb 100644 --- a/app/models/queries/work_packages/filter/duplicated_filter.rb +++ b/app/models/queries/work_packages/filter/duplicated_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/duplicates_filter.rb b/app/models/queries/work_packages/filter/duplicates_filter.rb index c8a1727623..646f7f40fa 100644 --- a/app/models/queries/work_packages/filter/duplicates_filter.rb +++ b/app/models/queries/work_packages/filter/duplicates_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/estimated_hours_filter.rb b/app/models/queries/work_packages/filter/estimated_hours_filter.rb index 0cee32f879..aa50e55d8e 100644 --- a/app/models/queries/work_packages/filter/estimated_hours_filter.rb +++ b/app/models/queries/work_packages/filter/estimated_hours_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/filter_configuration.rb b/app/models/queries/work_packages/filter/filter_configuration.rb index b8ecfd6f53..dd31a7ee07 100644 --- a/app/models/queries/work_packages/filter/filter_configuration.rb +++ b/app/models/queries/work_packages/filter/filter_configuration.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/filter_for_wp_mixin.rb b/app/models/queries/work_packages/filter/filter_for_wp_mixin.rb index 64339330ab..2201224386 100644 --- a/app/models/queries/work_packages/filter/filter_for_wp_mixin.rb +++ b/app/models/queries/work_packages/filter/filter_for_wp_mixin.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/filter_on_directed_relations_mixin.rb b/app/models/queries/work_packages/filter/filter_on_directed_relations_mixin.rb index 39c51bb9f6..2cf5395ac3 100644 --- a/app/models/queries/work_packages/filter/filter_on_directed_relations_mixin.rb +++ b/app/models/queries/work_packages/filter/filter_on_directed_relations_mixin.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/filter_on_undirected_relations_mixin.rb b/app/models/queries/work_packages/filter/filter_on_undirected_relations_mixin.rb index 77cd6acaa3..03da04ef81 100644 --- a/app/models/queries/work_packages/filter/filter_on_undirected_relations_mixin.rb +++ b/app/models/queries/work_packages/filter/filter_on_undirected_relations_mixin.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/follows_filter.rb b/app/models/queries/work_packages/filter/follows_filter.rb index 4a73f73b32..c12aa5300a 100644 --- a/app/models/queries/work_packages/filter/follows_filter.rb +++ b/app/models/queries/work_packages/filter/follows_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/group_filter.rb b/app/models/queries/work_packages/filter/group_filter.rb index 96f02a7394..da19cc7054 100644 --- a/app/models/queries/work_packages/filter/group_filter.rb +++ b/app/models/queries/work_packages/filter/group_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/id_filter.rb b/app/models/queries/work_packages/filter/id_filter.rb index ed52e4bae7..1b3f6db12a 100644 --- a/app/models/queries/work_packages/filter/id_filter.rb +++ b/app/models/queries/work_packages/filter/id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/includes_filter.rb b/app/models/queries/work_packages/filter/includes_filter.rb index c728ee7c58..c13c405ced 100644 --- a/app/models/queries/work_packages/filter/includes_filter.rb +++ b/app/models/queries/work_packages/filter/includes_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/manual_sort_filter.rb b/app/models/queries/work_packages/filter/manual_sort_filter.rb index 96cad1b736..9d3fbe1f05 100644 --- a/app/models/queries/work_packages/filter/manual_sort_filter.rb +++ b/app/models/queries/work_packages/filter/manual_sort_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/me_value_filter_mixin.rb b/app/models/queries/work_packages/filter/me_value_filter_mixin.rb index df51abc096..fda228d568 100644 --- a/app/models/queries/work_packages/filter/me_value_filter_mixin.rb +++ b/app/models/queries/work_packages/filter/me_value_filter_mixin.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/milestone_filter.rb b/app/models/queries/work_packages/filter/milestone_filter.rb index f78608a17d..7905c5d9ec 100644 --- a/app/models/queries/work_packages/filter/milestone_filter.rb +++ b/app/models/queries/work_packages/filter/milestone_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/only_subproject_filter.rb b/app/models/queries/work_packages/filter/only_subproject_filter.rb index 9a12432fad..7d08083496 100644 --- a/app/models/queries/work_packages/filter/only_subproject_filter.rb +++ b/app/models/queries/work_packages/filter/only_subproject_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/or_filter_for_wp_mixin.rb b/app/models/queries/work_packages/filter/or_filter_for_wp_mixin.rb index 0c3124ddc2..b9b25febc9 100644 --- a/app/models/queries/work_packages/filter/or_filter_for_wp_mixin.rb +++ b/app/models/queries/work_packages/filter/or_filter_for_wp_mixin.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/parent_filter.rb b/app/models/queries/work_packages/filter/parent_filter.rb index 3706725361..4fddac0f27 100644 --- a/app/models/queries/work_packages/filter/parent_filter.rb +++ b/app/models/queries/work_packages/filter/parent_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/partof_filter.rb b/app/models/queries/work_packages/filter/partof_filter.rb index 8d66f36d13..a1793f6f10 100644 --- a/app/models/queries/work_packages/filter/partof_filter.rb +++ b/app/models/queries/work_packages/filter/partof_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/precedes_filter.rb b/app/models/queries/work_packages/filter/precedes_filter.rb index a9cf1fe467..3e3c04520e 100644 --- a/app/models/queries/work_packages/filter/precedes_filter.rb +++ b/app/models/queries/work_packages/filter/precedes_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/principal_base_filter.rb b/app/models/queries/work_packages/filter/principal_base_filter.rb index 33b9a57459..45630cb5b0 100644 --- a/app/models/queries/work_packages/filter/principal_base_filter.rb +++ b/app/models/queries/work_packages/filter/principal_base_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/principal_loader.rb b/app/models/queries/work_packages/filter/principal_loader.rb index 7d84f2b9aa..72a5b232e3 100644 --- a/app/models/queries/work_packages/filter/principal_loader.rb +++ b/app/models/queries/work_packages/filter/principal_loader.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/priority_filter.rb b/app/models/queries/work_packages/filter/priority_filter.rb index aae5f613ab..97a33de4c7 100644 --- a/app/models/queries/work_packages/filter/priority_filter.rb +++ b/app/models/queries/work_packages/filter/priority_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/project_filter.rb b/app/models/queries/work_packages/filter/project_filter.rb index 8eab61915f..9f81d54458 100644 --- a/app/models/queries/work_packages/filter/project_filter.rb +++ b/app/models/queries/work_packages/filter/project_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/relatable_filter.rb b/app/models/queries/work_packages/filter/relatable_filter.rb index 41d9e967d8..8f6ecb8fb4 100644 --- a/app/models/queries/work_packages/filter/relatable_filter.rb +++ b/app/models/queries/work_packages/filter/relatable_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/relates_filter.rb b/app/models/queries/work_packages/filter/relates_filter.rb index f9e5ac7d8e..151484d778 100644 --- a/app/models/queries/work_packages/filter/relates_filter.rb +++ b/app/models/queries/work_packages/filter/relates_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/required_filter.rb b/app/models/queries/work_packages/filter/required_filter.rb index 7ce8947609..67dd5fac34 100644 --- a/app/models/queries/work_packages/filter/required_filter.rb +++ b/app/models/queries/work_packages/filter/required_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/requires_filter.rb b/app/models/queries/work_packages/filter/requires_filter.rb index ce77d52939..b5ba3b3a98 100644 --- a/app/models/queries/work_packages/filter/requires_filter.rb +++ b/app/models/queries/work_packages/filter/requires_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/responsible_filter.rb b/app/models/queries/work_packages/filter/responsible_filter.rb index 5961e4ef2f..1a470736c6 100644 --- a/app/models/queries/work_packages/filter/responsible_filter.rb +++ b/app/models/queries/work_packages/filter/responsible_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/role_filter.rb b/app/models/queries/work_packages/filter/role_filter.rb index 1253a8d9cc..7be998354a 100644 --- a/app/models/queries/work_packages/filter/role_filter.rb +++ b/app/models/queries/work_packages/filter/role_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/search_filter.rb b/app/models/queries/work_packages/filter/search_filter.rb index b40fe3d7ca..a50d988db4 100644 --- a/app/models/queries/work_packages/filter/search_filter.rb +++ b/app/models/queries/work_packages/filter/search_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/start_date_filter.rb b/app/models/queries/work_packages/filter/start_date_filter.rb index 0697274f02..7c2c276ab2 100644 --- a/app/models/queries/work_packages/filter/start_date_filter.rb +++ b/app/models/queries/work_packages/filter/start_date_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/status_filter.rb b/app/models/queries/work_packages/filter/status_filter.rb index 6583f1997a..fc6857a077 100644 --- a/app/models/queries/work_packages/filter/status_filter.rb +++ b/app/models/queries/work_packages/filter/status_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/subject_filter.rb b/app/models/queries/work_packages/filter/subject_filter.rb index c6e26d9028..02e2252e4a 100644 --- a/app/models/queries/work_packages/filter/subject_filter.rb +++ b/app/models/queries/work_packages/filter/subject_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/subject_or_id_filter.rb b/app/models/queries/work_packages/filter/subject_or_id_filter.rb index a4e4708fcd..c5a50bd21d 100644 --- a/app/models/queries/work_packages/filter/subject_or_id_filter.rb +++ b/app/models/queries/work_packages/filter/subject_or_id_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/subproject_filter.rb b/app/models/queries/work_packages/filter/subproject_filter.rb index 05aff3a364..5e9d82b7d2 100644 --- a/app/models/queries/work_packages/filter/subproject_filter.rb +++ b/app/models/queries/work_packages/filter/subproject_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/text_filter_on_join_mixin.rb b/app/models/queries/work_packages/filter/text_filter_on_join_mixin.rb index 57a6d1697e..8d5db46bca 100644 --- a/app/models/queries/work_packages/filter/text_filter_on_join_mixin.rb +++ b/app/models/queries/work_packages/filter/text_filter_on_join_mixin.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/type_filter.rb b/app/models/queries/work_packages/filter/type_filter.rb index 4ac393a79f..f9b7803063 100644 --- a/app/models/queries/work_packages/filter/type_filter.rb +++ b/app/models/queries/work_packages/filter/type_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/typeahead_filter.rb b/app/models/queries/work_packages/filter/typeahead_filter.rb index a9ea3ba0aa..5322d0b8ce 100644 --- a/app/models/queries/work_packages/filter/typeahead_filter.rb +++ b/app/models/queries/work_packages/filter/typeahead_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/updated_at_filter.rb b/app/models/queries/work_packages/filter/updated_at_filter.rb index 07e02fd75c..285198f4ed 100644 --- a/app/models/queries/work_packages/filter/updated_at_filter.rb +++ b/app/models/queries/work_packages/filter/updated_at_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/version_filter.rb b/app/models/queries/work_packages/filter/version_filter.rb index f7c8597a26..b2b5cc8786 100644 --- a/app/models/queries/work_packages/filter/version_filter.rb +++ b/app/models/queries/work_packages/filter/version_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/watcher_filter.rb b/app/models/queries/work_packages/filter/watcher_filter.rb index 19d7ad3779..ed27cc3c8f 100644 --- a/app/models/queries/work_packages/filter/watcher_filter.rb +++ b/app/models/queries/work_packages/filter/watcher_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter/work_package_filter.rb b/app/models/queries/work_packages/filter/work_package_filter.rb index 66451ce832..ce0648b6d8 100644 --- a/app/models/queries/work_packages/filter/work_package_filter.rb +++ b/app/models/queries/work_packages/filter/work_package_filter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/queries/work_packages/filter_serializer.rb b/app/models/queries/work_packages/filter_serializer.rb index d99caaef7e..cce9ed3677 100644 --- a/app/models/queries/work_packages/filter_serializer.rb +++ b/app/models/queries/work_packages/filter_serializer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query.rb b/app/models/query.rb index cd772411f6..e14a6f5a5a 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query/highlighting.rb b/app/models/query/highlighting.rb index c95c61d2a7..b4da3ba5bd 100644 --- a/app/models/query/highlighting.rb +++ b/app/models/query/highlighting.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query/manual_sorting.rb b/app/models/query/manual_sorting.rb index ff28fe186d..59dc20a12e 100644 --- a/app/models/query/manual_sorting.rb +++ b/app/models/query/manual_sorting.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query/results.rb b/app/models/query/results.rb index ca8c1447f9..ebbabd5f4f 100644 --- a/app/models/query/results.rb +++ b/app/models/query/results.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query/results/group_by.rb b/app/models/query/results/group_by.rb index 06ad252123..068aca0e9f 100644 --- a/app/models/query/results/group_by.rb +++ b/app/models/query/results/group_by.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query/results/sums.rb b/app/models/query/results/sums.rb index cd50fa6117..10d64046ea 100644 --- a/app/models/query/results/sums.rb +++ b/app/models/query/results/sums.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query/sort_criteria.rb b/app/models/query/sort_criteria.rb index 6c3465ffac..c9a89188c1 100644 --- a/app/models/query/sort_criteria.rb +++ b/app/models/query/sort_criteria.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query/statement_invalid.rb b/app/models/query/statement_invalid.rb index 48b2164f9a..2f3b9742f6 100644 --- a/app/models/query/statement_invalid.rb +++ b/app/models/query/statement_invalid.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/query/timelines.rb b/app/models/query/timelines.rb index 052dbcb6e1..f6243a5336 100644 --- a/app/models/query/timelines.rb +++ b/app/models/query/timelines.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -32,16 +30,16 @@ module Query::Timelines extend ActiveSupport::Concern included do - enum timeline_zoom_level: %i(days weeks months quarters years auto) + 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, Hash validate :valid_timeline_labels def valid_timeline_labels - return unless timeline_labels.present? + return if timeline_labels.blank? - valid_keys = %w(farRight left right) == timeline_labels.keys.map(&:to_s).sort + valid_keys = timeline_labels.keys.map(&:to_s).sort == %w(farRight left right) errors.add :timeline_labels, :invalid unless valid_keys end end diff --git a/app/models/relation.rb b/app/models/relation.rb index fc42850146..f53562688b 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/relations/scopes/follows_non_manual_ancestors.rb b/app/models/relations/scopes/follows_non_manual_ancestors.rb index c7237da71a..2ee375b2c1 100644 --- a/app/models/relations/scopes/follows_non_manual_ancestors.rb +++ b/app/models/relations/scopes/follows_non_manual_ancestors.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/relations/scopes/visible.rb b/app/models/relations/scopes/visible.rb index f86dd6896a..b7874a4793 100644 --- a/app/models/relations/scopes/visible.rb +++ b/app/models/relations/scopes/visible.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/repository.rb b/app/models/repository.rb index f47cf55908..3e8090484c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 4db90e081a..dbb287edd1 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/repository/subversion.rb b/app/models/repository/subversion.rb index 22e67a4dd9..cd3157efd1 100644 --- a/app/models/repository/subversion.rb +++ b/app/models/repository/subversion.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/role.rb b/app/models/role.rb index accdb3a203..4e6decacfc 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -50,7 +48,7 @@ class Role < ApplicationRecord has_many :member_roles, dependent: :destroy has_many :members, through: :member_roles - has_many :role_permissions + has_many :role_permissions, dependent: :destroy default_scope -> { includes(:role_permissions) diff --git a/app/models/role_permission.rb b/app/models/role_permission.rb index 89a7b43762..091e56154c 100644 --- a/app/models/role_permission.rb +++ b/app/models/role_permission.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/serializers/indifferent_hash_serializer.rb b/app/models/serializers/indifferent_hash_serializer.rb index c14b953172..7e826451f8 100644 --- a/app/models/serializers/indifferent_hash_serializer.rb +++ b/app/models/serializers/indifferent_hash_serializer.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/sessions/sql_bypass.rb b/app/models/sessions/sql_bypass.rb index 4dbb70330d..e1e2c2fc51 100644 --- a/app/models/sessions/sql_bypass.rb +++ b/app/models/sessions/sql_bypass.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/sessions/user_session.rb b/app/models/sessions/user_session.rb index a07265f191..6e660d9cc6 100644 --- a/app/models/sessions/user_session.rb +++ b/app/models/sessions/user_session.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/setting.rb b/app/models/setting.rb index d207f1b064..379054638c 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/setting/aliases.rb b/app/models/setting/aliases.rb index 0d03e8763e..778f044e19 100644 --- a/app/models/setting/aliases.rb +++ b/app/models/setting/aliases.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/setting/callbacks_helper.rb b/app/models/setting/callbacks_helper.rb index 01901871e4..5d2f3181df 100644 --- a/app/models/setting/callbacks_helper.rb +++ b/app/models/setting/callbacks_helper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/setting/self_registration.rb b/app/models/setting/self_registration.rb index 424fe0f9c2..e030998eda 100644 --- a/app/models/setting/self_registration.rb +++ b/app/models/setting/self_registration.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/status.rb b/app/models/status.rb index bc625d3930..56802334eb 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/status/inexistent_status.rb b/app/models/status/inexistent_status.rb index a09fa9bbb9..aba2e592ea 100644 --- a/app/models/status/inexistent_status.rb +++ b/app/models/status/inexistent_status.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/system_user.rb b/app/models/system_user.rb index 82cde15168..5598610236 100644 --- a/app/models/system_user.rb +++ b/app/models/system_user.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/token/api.rb b/app/models/token/api.rb index 6a448c4cf1..e2b96070ce 100644 --- a/app/models/token/api.rb +++ b/app/models/token/api.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/token/auto_login.rb b/app/models/token/auto_login.rb index b6f1994002..6be7b32528 100644 --- a/app/models/token/auto_login.rb +++ b/app/models/token/auto_login.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/token/backup.rb b/app/models/token/backup.rb index 0812a093e8..70ac079016 100644 --- a/app/models/token/backup.rb +++ b/app/models/token/backup.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/token/enterprise_trial_key.rb b/app/models/token/enterprise_trial_key.rb index dfaeaea06b..f866746789 100644 --- a/app/models/token/enterprise_trial_key.rb +++ b/app/models/token/enterprise_trial_key.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/token/invitation.rb b/app/models/token/invitation.rb index e37374a8d4..e02d3843dc 100644 --- a/app/models/token/invitation.rb +++ b/app/models/token/invitation.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/token/recovery.rb b/app/models/token/recovery.rb index 3b30a4835a..8d33cedf85 100644 --- a/app/models/token/recovery.rb +++ b/app/models/token/recovery.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/token/rss.rb b/app/models/token/rss.rb index a2309c900c..fc29b975d5 100644 --- a/app/models/token/rss.rb +++ b/app/models/token/rss.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/type.rb b/app/models/type.rb index 841938fa0a..32054cc7a7 100644 --- a/app/models/type.rb +++ b/app/models/type.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/type/attribute_group.rb b/app/models/type/attribute_group.rb index dcf3ce6113..5f2e4e3309 100644 --- a/app/models/type/attribute_group.rb +++ b/app/models/type/attribute_group.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/type/attribute_groups.rb b/app/models/type/attribute_groups.rb index 9539b8939a..a53a51aba2 100644 --- a/app/models/type/attribute_groups.rb +++ b/app/models/type/attribute_groups.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/type/attributes.rb b/app/models/type/attributes.rb index d63c7f2fb3..bbcb043806 100644 --- a/app/models/type/attributes.rb +++ b/app/models/type/attributes.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/type/form_group.rb b/app/models/type/form_group.rb index 6110ccd603..19d2a2fa03 100644 --- a/app/models/type/form_group.rb +++ b/app/models/type/form_group.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/type/inexistent_type.rb b/app/models/type/inexistent_type.rb index 70eec7d3de..de73d14de9 100644 --- a/app/models/type/inexistent_type.rb +++ b/app/models/type/inexistent_type.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/type/query_group.rb b/app/models/type/query_group.rb index 9666176530..e02dd75b15 100644 --- a/app/models/type/query_group.rb +++ b/app/models/type/query_group.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/types/scopes/milestone.rb b/app/models/types/scopes/milestone.rb index 9592cb88ce..b3915f5d32 100644 --- a/app/models/types/scopes/milestone.rb +++ b/app/models/types/scopes/milestone.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/user.rb b/app/models/user.rb index 2b07d72622..d12c97a344 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -105,10 +103,10 @@ class User < Principal attr_accessor :password, :password_confirmation, :last_before_login_on validates :login, - :firstname, - :lastname, - :mail, - presence: { unless: Proc.new { |user| user.builtin? } } + :firstname, + :lastname, + :mail, + presence: { unless: Proc.new { |user| user.builtin? } } validates :login, uniqueness: { if: Proc.new { |user| !user.login.blank? }, case_sensitive: false } validates :mail, uniqueness: { allow_blank: true, case_sensitive: false } diff --git a/app/models/user_custom_field.rb b/app/models/user_custom_field.rb index 3ab4e911ec..90b2f2e7fe 100644 --- a/app/models/user_custom_field.rb +++ b/app/models/user_custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/user_password.rb b/app/models/user_password.rb index 0eab8bead2..f4472d06ad 100644 --- a/app/models/user_password.rb +++ b/app/models/user_password.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/user_password/bcrypt.rb b/app/models/user_password/bcrypt.rb index 76f86a95cf..e8e558edb1 100644 --- a/app/models/user_password/bcrypt.rb +++ b/app/models/user_password/bcrypt.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/user_password/sha1.rb b/app/models/user_password/sha1.rb index 5d710a27e2..0af083670e 100644 --- a/app/models/user_password/sha1.rb +++ b/app/models/user_password/sha1.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index a6d35706e8..6de8d78350 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/user_preferences/schema.rb b/app/models/user_preferences/schema.rb index 9212993fe1..95ec2d8f6c 100644 --- a/app/models/user_preferences/schema.rb +++ b/app/models/user_preferences/schema.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/users/inexistent_user.rb b/app/models/users/inexistent_user.rb index 4e7023bb92..aa5141fc62 100644 --- a/app/models/users/inexistent_user.rb +++ b/app/models/users/inexistent_user.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/users/project_authorization_cache.rb b/app/models/users/project_authorization_cache.rb index 9777445a77..6e855a5109 100644 --- a/app/models/users/project_authorization_cache.rb +++ b/app/models/users/project_authorization_cache.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/users/project_role_cache.rb b/app/models/users/project_role_cache.rb index 0dad7324ee..6357d8467e 100644 --- a/app/models/users/project_role_cache.rb +++ b/app/models/users/project_role_cache.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/users/scopes/find_by_login.rb b/app/models/users/scopes/find_by_login.rb index ad43c8b07b..088bafd813 100644 --- a/app/models/users/scopes/find_by_login.rb +++ b/app/models/users/scopes/find_by_login.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/users/scopes/having_reminder_mail_to_send.rb b/app/models/users/scopes/having_reminder_mail_to_send.rb index beb979f5f9..45de39c622 100644 --- a/app/models/users/scopes/having_reminder_mail_to_send.rb +++ b/app/models/users/scopes/having_reminder_mail_to_send.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/users/scopes/newest.rb b/app/models/users/scopes/newest.rb index 1d44b17c6f..0729df93fa 100644 --- a/app/models/users/scopes/newest.rb +++ b/app/models/users/scopes/newest.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/users/scopes/notified_globally.rb b/app/models/users/scopes/notified_globally.rb index 3b42024ae0..1811ad9a36 100644 --- a/app/models/users/scopes/notified_globally.rb +++ b/app/models/users/scopes/notified_globally.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/users/scopes/watcher_recipients.rb b/app/models/users/scopes/watcher_recipients.rb index f64a29e9aa..ee35905bfd 100644 --- a/app/models/users/scopes/watcher_recipients.rb +++ b/app/models/users/scopes/watcher_recipients.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/version.rb b/app/models/version.rb index 0cfcfdadf8..b2de329603 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/version_custom_field.rb b/app/models/version_custom_field.rb index edfcf7b1b5..a20067a2a0 100644 --- a/app/models/version_custom_field.rb +++ b/app/models/version_custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/versions/project_sharing.rb b/app/models/versions/project_sharing.rb index a7445a91b5..be39edf004 100644 --- a/app/models/versions/project_sharing.rb +++ b/app/models/versions/project_sharing.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/versions/scopes/order_by_semver_name.rb b/app/models/versions/scopes/order_by_semver_name.rb index 4be1c09c9a..aac530a05d 100644 --- a/app/models/versions/scopes/order_by_semver_name.rb +++ b/app/models/versions/scopes/order_by_semver_name.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/versions/scopes/rolled_up.rb b/app/models/versions/scopes/rolled_up.rb index 6123171d6c..d4d7d9554d 100644 --- a/app/models/versions/scopes/rolled_up.rb +++ b/app/models/versions/scopes/rolled_up.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/versions/scopes/shared_with.rb b/app/models/versions/scopes/shared_with.rb index ee634d3322..64a75f0459 100644 --- a/app/models/versions/scopes/shared_with.rb +++ b/app/models/versions/scopes/shared_with.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/watcher.rb b/app/models/watcher.rb index e87191aa00..7023ed91fe 100644 --- a/app/models/watcher.rb +++ b/app/models/watcher.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/wiki.rb b/app/models/wiki.rb index 19f7999c15..c7ac06821f 100644 --- a/app/models/wiki.rb +++ b/app/models/wiki.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/wiki_content.rb b/app/models/wiki_content.rb index 2d99a530e8..6220481af7 100644 --- a/app/models/wiki_content.rb +++ b/app/models/wiki_content.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index e0999e2684..ab485ef10e 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/wiki_redirect.rb b/app/models/wiki_redirect.rb index 469de91869..c17fc46d52 100644 --- a/app/models/wiki_redirect.rb +++ b/app/models/wiki_redirect.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/wikis/annotate.rb b/app/models/wikis/annotate.rb index 022f651c58..c7cc0d61ff 100644 --- a/app/models/wikis/annotate.rb +++ b/app/models/wikis/annotate.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/wikis/diff.rb b/app/models/wikis/diff.rb index 1219fef715..df2cff5dec 100644 --- a/app/models/wikis/diff.rb +++ b/app/models/wikis/diff.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package.rb b/app/models/work_package.rb index eefe6ebacd..31e5259a79 100644 --- a/app/models/work_package.rb +++ b/app/models/work_package.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/ancestors.rb b/app/models/work_package/ancestors.rb index 98d368e47e..202fd5d46d 100644 --- a/app/models/work_package/ancestors.rb +++ b/app/models/work_package/ancestors.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/ask_before_destruction.rb b/app/models/work_package/ask_before_destruction.rb index c446896c27..5cbfbc82fd 100644 --- a/app/models/work_package/ask_before_destruction.rb +++ b/app/models/work_package/ask_before_destruction.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/custom_actioned.rb b/app/models/work_package/custom_actioned.rb index 6b0d44825d..9cd5bd2ee5 100644 --- a/app/models/work_package/custom_actioned.rb +++ b/app/models/work_package/custom_actioned.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/exports/csv.rb b/app/models/work_package/exports/csv.rb index 72654d8bdf..6e6a28adf1 100644 --- a/app/models/work_package/exports/csv.rb +++ b/app/models/work_package/exports/csv.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/exports/formatters/costs.rb b/app/models/work_package/exports/formatters/costs.rb index c2dd9d9609..67e3e02bab 100644 --- a/app/models/work_package/exports/formatters/costs.rb +++ b/app/models/work_package/exports/formatters/costs.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/exports/formatters/estimated_hours.rb b/app/models/work_package/exports/formatters/estimated_hours.rb index 8e58348ec9..e904a9cd51 100644 --- a/app/models/work_package/exports/formatters/estimated_hours.rb +++ b/app/models/work_package/exports/formatters/estimated_hours.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/exports/query_exporter.rb b/app/models/work_package/exports/query_exporter.rb index 9b8b41bf14..4e7b616db1 100644 --- a/app/models/work_package/exports/query_exporter.rb +++ b/app/models/work_package/exports/query_exporter.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/hooks.rb b/app/models/work_package/hooks.rb index 9209debacd..a31d3f9c7e 100644 --- a/app/models/work_package/hooks.rb +++ b/app/models/work_package/hooks.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/inexistent_work_package.rb b/app/models/work_package/inexistent_work_package.rb index 94d8aca8bb..e4b67e8bad 100644 --- a/app/models/work_package/inexistent_work_package.rb +++ b/app/models/work_package/inexistent_work_package.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/journalized.rb b/app/models/work_package/journalized.rb index 323e8e6125..c912635381 100644 --- a/app/models/work_package/journalized.rb +++ b/app/models/work_package/journalized.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/parent.rb b/app/models/work_package/parent.rb index a3e4250018..e2a16ce53d 100644 --- a/app/models/work_package/parent.rb +++ b/app/models/work_package/parent.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/pdf_export/attachments.rb b/app/models/work_package/pdf_export/attachments.rb index 8fe919ac11..9b3e2cdb63 100644 --- a/app/models/work_package/pdf_export/attachments.rb +++ b/app/models/work_package/pdf_export/attachments.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/pdf_export/common.rb b/app/models/work_package/pdf_export/common.rb index 31fb0799fa..b1c5025c95 100644 --- a/app/models/work_package/pdf_export/common.rb +++ b/app/models/work_package/pdf_export/common.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/pdf_export/formattable.rb b/app/models/work_package/pdf_export/formattable.rb index 399ceaf483..7e0029127a 100644 --- a/app/models/work_package/pdf_export/formattable.rb +++ b/app/models/work_package/pdf_export/formattable.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/pdf_export/view.rb b/app/models/work_package/pdf_export/view.rb index b577b112d4..778ac95459 100644 --- a/app/models/work_package/pdf_export/view.rb +++ b/app/models/work_package/pdf_export/view.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/pdf_export/work_package_list_to_pdf.rb b/app/models/work_package/pdf_export/work_package_list_to_pdf.rb index d682445d35..39ed2a3844 100644 --- a/app/models/work_package/pdf_export/work_package_list_to_pdf.rb +++ b/app/models/work_package/pdf_export/work_package_list_to_pdf.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/pdf_export/work_package_to_pdf.rb b/app/models/work_package/pdf_export/work_package_to_pdf.rb index def6e98363..311546d3f4 100644 --- a/app/models/work_package/pdf_export/work_package_to_pdf.rb +++ b/app/models/work_package/pdf_export/work_package_to_pdf.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/scheduling_rules.rb b/app/models/work_package/scheduling_rules.rb index 80b56b16f1..46493629d5 100644 --- a/app/models/work_package/scheduling_rules.rb +++ b/app/models/work_package/scheduling_rules.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/status_transitions.rb b/app/models/work_package/status_transitions.rb index 572b2af5d0..fa8a462953 100644 --- a/app/models/work_package/status_transitions.rb +++ b/app/models/work_package/status_transitions.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/time_entries_cleaner.rb b/app/models/work_package/time_entries_cleaner.rb index 2642f51535..3306bbf7c9 100644 --- a/app/models/work_package/time_entries_cleaner.rb +++ b/app/models/work_package/time_entries_cleaner.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/typed_dag_defaults.rb b/app/models/work_package/typed_dag_defaults.rb index c16f15325f..adc6164ab7 100644 --- a/app/models/work_package/typed_dag_defaults.rb +++ b/app/models/work_package/typed_dag_defaults.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package/validations.rb b/app/models/work_package/validations.rb index 0a72437aa2..aa6aac3885 100644 --- a/app/models/work_package/validations.rb +++ b/app/models/work_package/validations.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_package_custom_field.rb b/app/models/work_package_custom_field.rb index 59bef9f6a2..489bd2b20d 100644 --- a/app/models/work_package_custom_field.rb +++ b/app/models/work_package_custom_field.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_packages/costs.rb b/app/models/work_packages/costs.rb index b72add8630..193df68a79 100644 --- a/app/models/work_packages/costs.rb +++ b/app/models/work_packages/costs.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_packages/derived_dates.rb b/app/models/work_packages/derived_dates.rb index 34e3521987..3074c5d3f9 100644 --- a/app/models/work_packages/derived_dates.rb +++ b/app/models/work_packages/derived_dates.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_packages/scopes/for_scheduling.rb b/app/models/work_packages/scopes/for_scheduling.rb index 86bee80a35..8d801f6869 100644 --- a/app/models/work_packages/scopes/for_scheduling.rb +++ b/app/models/work_packages/scopes/for_scheduling.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -119,51 +117,52 @@ module WorkPackages::Scopes def paths_sql(work_packages) values = work_packages.map { |wp| "(#{wp.id}, false)" }.join(', ') - <<~SQL - to_schedule (id, manually) AS ( - SELECT * FROM (VALUES#{values}) AS t(id, manually) + <<~SQL.squish + to_schedule (id, manually) AS ( + SELECT * FROM (VALUES#{values}) AS t(id, manually) - UNION + UNION - SELECT - CASE - WHEN relations.to_id = to_schedule.id - THEN relations.from_id - ELSE relations.to_id - END id, - (work_packages.schedule_manually OR COALESCE(descendants.schedule_manually, false)) manually - FROM - to_schedule - JOIN - relations - ON NOT to_schedule.manually - AND (#{relations_condition_sql}) - AND - ((relations.to_id = to_schedule.id) - OR (relations.from_id = to_schedule.id AND relations.follows = 0)) - LEFT JOIN work_packages - ON (CASE - WHEN relations.to_id = to_schedule.id - THEN relations.from_id - ELSE relations.to_id - END) = work_packages.id - LEFT JOIN ( - SELECT - relations.from_id, - bool_and(COALESCE(work_packages.schedule_manually, false)) schedule_manually - FROM relations relations - JOIN work_packages - ON - work_packages.id = relations.to_id - AND relations.follows = 0 AND #{relations_condition_sql(transitive: true)} - GROUP BY relations.from_id - ) descendants ON work_packages.id = descendants.from_id - ) + SELECT + CASE + WHEN relations.to_id = to_schedule.id + THEN relations.from_id + ELSE relations.to_id + END id, + (related_work_packages.schedule_manually OR COALESCE(descendants.schedule_manually, false)) manually + FROM + to_schedule + JOIN + relations + ON NOT to_schedule.manually + AND (#{relations_condition_sql}) + AND + ((relations.to_id = to_schedule.id) + OR (relations.from_id = to_schedule.id AND relations.follows = 0)) + LEFT JOIN work_packages related_work_packages + ON (CASE + WHEN relations.to_id = to_schedule.id + THEN relations.from_id + ELSE relations.to_id + END) = related_work_packages.id + LEFT JOIN LATERAL ( + SELECT + relations.from_id, + bool_and(COALESCE(work_packages.schedule_manually, false)) schedule_manually + FROM relations relations + JOIN work_packages + ON + work_packages.id = relations.to_id + AND related_work_packages.id = relations.from_id + AND relations.follows = 0 AND #{relations_condition_sql(transitive: true)} + GROUP BY relations.from_id + ) descendants ON related_work_packages.id = descendants.from_id + ) SQL end def relations_condition_sql(transitive: false) - <<~SQL + <<~SQL.squish "relations"."relates" = 0 AND "relations"."duplicates" = 0 AND "relations"."blocks" = 0 AND "relations"."includes" = 0 AND "relations"."requires" = 0 AND (relations.hierarchy + relations.relates + relations.duplicates + relations.follows + relations.blocks + relations.includes + relations.requires #{transitive ? '>' : ''}= 1) SQL diff --git a/app/models/work_packages/scopes/include_derived_dates.rb b/app/models/work_packages/scopes/include_derived_dates.rb index dd7fd10949..7f8a07767c 100644 --- a/app/models/work_packages/scopes/include_derived_dates.rb +++ b/app/models/work_packages/scopes/include_derived_dates.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_packages/scopes/include_spent_time.rb b/app/models/work_packages/scopes/include_spent_time.rb index 1cb98d56b8..ac1852fbcd 100644 --- a/app/models/work_packages/scopes/include_spent_time.rb +++ b/app/models/work_packages/scopes/include_spent_time.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_packages/scopes/left_join_self_and_descendants.rb b/app/models/work_packages/scopes/left_join_self_and_descendants.rb index 3f9d70f8ef..f2c3826064 100644 --- a/app/models/work_packages/scopes/left_join_self_and_descendants.rb +++ b/app/models/work_packages/scopes/left_join_self_and_descendants.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/work_packages/spent_time.rb b/app/models/work_packages/spent_time.rb index 3e77988389..23348f1a43 100644 --- a/app/models/work_packages/spent_time.rb +++ b/app/models/work_packages/spent_time.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/models/workflow.rb b/app/models/workflow.rb index 71b75b18db..c0ac88f5b3 100644 --- a/app/models/workflow.rb +++ b/app/models/workflow.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/admin_user_seeder.rb b/app/seeders/admin_user_seeder.rb index 55f4c3cffb..58c6c43a82 100644 --- a/app/seeders/admin_user_seeder.rb +++ b/app/seeders/admin_user_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/activity_seeder.rb b/app/seeders/basic_data/activity_seeder.rb index 7de5199a19..edd4c668d4 100644 --- a/app/seeders/basic_data/activity_seeder.rb +++ b/app/seeders/basic_data/activity_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/builtin_roles_seeder.rb b/app/seeders/basic_data/builtin_roles_seeder.rb index ddeffa895e..f70ec3b8cb 100644 --- a/app/seeders/basic_data/builtin_roles_seeder.rb +++ b/app/seeders/basic_data/builtin_roles_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/color_scheme_seeder.rb b/app/seeders/basic_data/color_scheme_seeder.rb index 6cd29120c0..f76a43c03f 100644 --- a/app/seeders/basic_data/color_scheme_seeder.rb +++ b/app/seeders/basic_data/color_scheme_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/color_seeder.rb b/app/seeders/basic_data/color_seeder.rb index 46464c5821..5929550b3e 100644 --- a/app/seeders/basic_data/color_seeder.rb +++ b/app/seeders/basic_data/color_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/priority_seeder.rb b/app/seeders/basic_data/priority_seeder.rb index 3ceaf418bb..2d8d76eec0 100644 --- a/app/seeders/basic_data/priority_seeder.rb +++ b/app/seeders/basic_data/priority_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/role_seeder.rb b/app/seeders/basic_data/role_seeder.rb index 9f338b5e66..785bf33576 100644 --- a/app/seeders/basic_data/role_seeder.rb +++ b/app/seeders/basic_data/role_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -76,6 +74,7 @@ module BasicData move_work_packages edit_work_packages assign_versions + work_package_assigned add_work_package_notes edit_own_work_package_notes manage_work_package_relations diff --git a/app/seeders/basic_data/setting_seeder.rb b/app/seeders/basic_data/setting_seeder.rb index 36ad70a1f1..e766d22ae8 100644 --- a/app/seeders/basic_data/setting_seeder.rb +++ b/app/seeders/basic_data/setting_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/status_seeder.rb b/app/seeders/basic_data/status_seeder.rb index c5f48e135b..113bc4ccfe 100644 --- a/app/seeders/basic_data/status_seeder.rb +++ b/app/seeders/basic_data/status_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/type_seeder.rb b/app/seeders/basic_data/type_seeder.rb index fa054dfd41..0c1f864f51 100644 --- a/app/seeders/basic_data/type_seeder.rb +++ b/app/seeders/basic_data/type_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data/workflow_seeder.rb b/app/seeders/basic_data/workflow_seeder.rb index 8066153088..5e145015b1 100644 --- a/app/seeders/basic_data/workflow_seeder.rb +++ b/app/seeders/basic_data/workflow_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/basic_data_seeder.rb b/app/seeders/basic_data_seeder.rb index 45f5d34c7b..5ce1d8cb74 100644 --- a/app/seeders/basic_data_seeder.rb +++ b/app/seeders/basic_data_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/composite_seeder.rb b/app/seeders/composite_seeder.rb index 559172866b..ff4642ba0c 100644 --- a/app/seeders/composite_seeder.rb +++ b/app/seeders/composite_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/demo_data/attribute_help_text_seeder.rb b/app/seeders/demo_data/attribute_help_text_seeder.rb index 28a7b13a25..82952ec7a0 100644 --- a/app/seeders/demo_data/attribute_help_text_seeder.rb +++ b/app/seeders/demo_data/attribute_help_text_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. diff --git a/app/seeders/demo_data/custom_field_seeder.rb b/app/seeders/demo_data/custom_field_seeder.rb index 5e004ccc56..3caa95c6f7 100644 --- a/app/seeders/demo_data/custom_field_seeder.rb +++ b/app/seeders/demo_data/custom_field_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/demo_data/global_query_seeder.rb b/app/seeders/demo_data/global_query_seeder.rb index b104f39f9a..24561a6d0e 100644 --- a/app/seeders/demo_data/global_query_seeder.rb +++ b/app/seeders/demo_data/global_query_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. diff --git a/app/seeders/demo_data/group_seeder.rb b/app/seeders/demo_data/group_seeder.rb index 6e661313bf..5f409f14e0 100644 --- a/app/seeders/demo_data/group_seeder.rb +++ b/app/seeders/demo_data/group_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. diff --git a/app/seeders/demo_data/project_seeder.rb b/app/seeders/demo_data/project_seeder.rb index e7eb3bd044..8449ebf8fa 100644 --- a/app/seeders/demo_data/project_seeder.rb +++ b/app/seeders/demo_data/project_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. @@ -134,7 +132,7 @@ module DemoData def set_members(project) role = Role.find_by(name: translate_with_base_url(:default_role_project_admin)) - user = User.admin.first + user = User.user.admin.first Member.create!( project: project, diff --git a/app/seeders/demo_data/query_builder.rb b/app/seeders/demo_data/query_builder.rb index f3bc2dfbdd..17ba39c7f0 100644 --- a/app/seeders/demo_data/query_builder.rb +++ b/app/seeders/demo_data/query_builder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH @@ -50,10 +48,11 @@ module DemoData def base_attributes { name: config[:name], - user: User.admin.first, - public: config[:public] != false, - show_hierarchies: config[:hierarchy] == true, - timeline_visible: config[:timeline] == true + user: User.admin.user.first, + public: config.fetch(:public, true), + starred: config.fetch(:starred, false), + show_hierarchies: config.fetch(:hierarchy, false), + timeline_visible: config.fetch(:timeline, false) } end @@ -75,10 +74,15 @@ module DemoData end def create_view(query) + type = config.fetch(:module, 'work_packages_table') View.create!( - type: 'work_packages_table', + type: type, query: query ) + + # Save information that a view has been seeded. + # This information can be used for example in the onboarding tour + Setting["demo_view_of_type_#{type}_seeded"] = 'true' end def set_project!(attr) @@ -122,14 +126,13 @@ module DemoData set_version_filter! filters set_type_filter! filters set_parent_filter! filters + set_assignee_filter! filters filters end def set_status_filter!(filters) - status = String(config[:status]) - - filters[:status_id] = { operator: "o" } if status == "open" + filters[:status_id] = { operator: "o" } if String(config[:status]) == "open" end def set_version_filter!(filters) @@ -142,14 +145,14 @@ module DemoData end def set_type_filter!(filters) - types = Array(config[:type]).map do |name| - Type.find_by(name: translate_with_base_url(name)) - end + types = Type + .where(name: Array(config[:type]).map { |name| translate_with_base_url(name) }) + .pluck(:id) - if !types.empty? + if types.any? filters[:type_id] = { operator: "=", - values: types.map(&:id).map(&:to_s) + values: types.map(&:to_s) } end end @@ -163,6 +166,22 @@ module DemoData end end + def set_assignee_filter!(filters) + users = Array(config[:assignee]) + .map(&:split) + .inject(User.user.none) do |scope, (firstname, lastname)| + scope.or(User.user.where(firstname: firstname, lastname: lastname)) + end + .pluck(:id) + + if users.any? + filters[:assigned_to_id] = { + operator: "=", + values: users.map(&:to_s) + } + end + end + def backlogs_present? @backlogs_present = defined? OpenProject::Backlogs if @backlogs_present.nil? diff --git a/app/seeders/demo_data/references.rb b/app/seeders/demo_data/references.rb index 2f6e046c5b..d27fad56ba 100644 --- a/app/seeders/demo_data/references.rb +++ b/app/seeders/demo_data/references.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/demo_data/version_builder.rb b/app/seeders/demo_data/version_builder.rb index a0a9b79324..95eae517d8 100644 --- a/app/seeders/demo_data/version_builder.rb +++ b/app/seeders/demo_data/version_builder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/demo_data/wiki_seeder.rb b/app/seeders/demo_data/wiki_seeder.rb index 8343124b8c..8e5930f39a 100644 --- a/app/seeders/demo_data/wiki_seeder.rb +++ b/app/seeders/demo_data/wiki_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/demo_data/work_package_board_seeder.rb b/app/seeders/demo_data/work_package_board_seeder.rb index 1452256ae2..418f8f2533 100644 --- a/app/seeders/demo_data/work_package_board_seeder.rb +++ b/app/seeders/demo_data/work_package_board_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. diff --git a/app/seeders/demo_data/work_package_seeder.rb b/app/seeders/demo_data/work_package_seeder.rb index 1b67a5cf50..028ca696f8 100644 --- a/app/seeders/demo_data/work_package_seeder.rb +++ b/app/seeders/demo_data/work_package_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH @@ -36,7 +34,7 @@ module DemoData def initialize(project, key) self.project = project self.key = key - self.user = User.admin.first + self.user = User.user.admin.first self.statuses = Status.all self.repository = Repository.first self.types = project.types.all.reject(&:is_milestone?) @@ -148,7 +146,7 @@ module DemoData end def set_time_tracking_attributes!(wp_attr, attributes) - start_date = attributes[:start] && calculate_start_date(attributes[:start]) + start_date = calculate_start_date(attributes[:start]) wp_attr[:start_date] = start_date wp_attr[:due_date] = calculate_due_date(start_date, attributes[:duration]) if start_date && attributes[:duration] @@ -207,12 +205,13 @@ module DemoData end def calculate_start_date(days_ahead) - monday = Date.today.monday - days_ahead > 0 ? monday + days_ahead : monday + Time.zone.today.monday + (days_ahead || 0).days end + # Returns the due date based on the starting date and the duration + # but ensures that the due date cannot be before the start date. def calculate_due_date(date, duration) - duration && duration > 1 ? date + duration : date + [date + ((duration || 0) - 1).days, date].max end end end diff --git a/app/seeders/demo_data_seeder.rb b/app/seeders/demo_data_seeder.rb index f42c40d888..b86ca8ce3b 100644 --- a/app/seeders/demo_data_seeder.rb +++ b/app/seeders/demo_data_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/development_data/custom_fields_seeder.rb b/app/seeders/development_data/custom_fields_seeder.rb index 2e36a1f4d6..a53eec9f9e 100644 --- a/app/seeders/development_data/custom_fields_seeder.rb +++ b/app/seeders/development_data/custom_fields_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/development_data/projects_seeder.rb b/app/seeders/development_data/projects_seeder.rb index 38d7fd9b7d..83256a4a2a 100644 --- a/app/seeders/development_data/projects_seeder.rb +++ b/app/seeders/development_data/projects_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/development_data/users_seeder.rb b/app/seeders/development_data/users_seeder.rb index c68ea2c0c9..c620767a72 100644 --- a/app/seeders/development_data/users_seeder.rb +++ b/app/seeders/development_data/users_seeder.rb @@ -1,4 +1,3 @@ -#-- encoding: UTF-8 #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -26,8 +25,6 @@ # # See COPYRIGHT and LICENSE files for more details. #++ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/development_data_seeder.rb b/app/seeders/development_data_seeder.rb index dc6993836c..00a65341d2 100644 --- a/app/seeders/development_data_seeder.rb +++ b/app/seeders/development_data_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/random_data/forum_seeder.rb b/app/seeders/random_data/forum_seeder.rb index 813705996c..2b4e34e791 100644 --- a/app/seeders/random_data/forum_seeder.rb +++ b/app/seeders/random_data/forum_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/random_data/news_seeder.rb b/app/seeders/random_data/news_seeder.rb index 462a210304..1e3a965687 100644 --- a/app/seeders/random_data/news_seeder.rb +++ b/app/seeders/random_data/news_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/random_data/wiki_seeder.rb b/app/seeders/random_data/wiki_seeder.rb index c4a77383e6..673f50d4eb 100644 --- a/app/seeders/random_data/wiki_seeder.rb +++ b/app/seeders/random_data/wiki_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/random_data/work_package_seeder.rb b/app/seeders/random_data/work_package_seeder.rb index 095f0b286d..3597d1d1ac 100644 --- a/app/seeders/random_data/work_package_seeder.rb +++ b/app/seeders/random_data/work_package_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/random_data_seeder.rb b/app/seeders/random_data_seeder.rb index 9bc4c2d268..523a8c34e3 100644 --- a/app/seeders/random_data_seeder.rb +++ b/app/seeders/random_data_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2020 the OpenProject GmbH diff --git a/app/seeders/root_seeder.rb b/app/seeders/root_seeder.rb index 08bfdc9967..73df04bbce 100644 --- a/app/seeders/root_seeder.rb +++ b/app/seeders/root_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -101,7 +99,7 @@ class RootSeeder < Seeder # #set_language_if_valid here as it # would mean to circumvent the default settings # for valid_languages. - desired_lang = (ENV['LOCALE'] || :en).to_sym + desired_lang = (ENV['OPENPROJECT_SEED_LOCALE'] || :en).to_sym if all_languages.include?(desired_lang) I18n.locale = desired_lang diff --git a/app/seeders/seeder.rb b/app/seeders/seeder.rb index 7aab6727bf..4085568534 100644 --- a/app/seeders/seeder.rb +++ b/app/seeders/seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -35,7 +33,7 @@ class Seeder seed_data! end else - puts " *** #{not_applicable_message}" + Rails.logger.debug { " *** #{not_applicable_message}" } end end @@ -54,27 +52,20 @@ class Seeder protected def print_status(message) - print message - - return unless block_given? + Rails.logger.info message - yield - puts + yield if block_given? end ## # Translate the given string with the fixed interpolation for base_url # Deep interpolation is required in order for interpolations on hashes to work! - def translate_with_base_url(string) - I18n.t(string, deep_interpolation: true, base_url: "{{opSetting:base_url}}") + def translate_with_base_url(string, **i18n_options) + I18n.t(string, deep_interpolation: true, base_url: "{{opSetting:base_url}}", **i18n_options) end def edition_data_for(key) - data = translate_with_base_url("seeders.#{OpenProject::Configuration['edition']}.#{key}") - - return nil if data.is_a?(String) && data.start_with?("translation missing") - - data + translate_with_base_url("seeders.#{OpenProject::Configuration['edition']}.#{key}", default: nil) end def demo_data_for(key) diff --git a/app/seeders/standard_seeder/basic_data/activity_seeder.rb b/app/seeders/standard_seeder/basic_data/activity_seeder.rb index 92fa7a688d..5082ef7241 100644 --- a/app/seeders/standard_seeder/basic_data/activity_seeder.rb +++ b/app/seeders/standard_seeder/basic_data/activity_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/standard_seeder/basic_data/priority_seeder.rb b/app/seeders/standard_seeder/basic_data/priority_seeder.rb index b104cfdf01..f0d20a6847 100644 --- a/app/seeders/standard_seeder/basic_data/priority_seeder.rb +++ b/app/seeders/standard_seeder/basic_data/priority_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/standard_seeder/basic_data/status_seeder.rb b/app/seeders/standard_seeder/basic_data/status_seeder.rb index bea9afb761..045bc416fa 100644 --- a/app/seeders/standard_seeder/basic_data/status_seeder.rb +++ b/app/seeders/standard_seeder/basic_data/status_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/standard_seeder/basic_data/type_seeder.rb b/app/seeders/standard_seeder/basic_data/type_seeder.rb index 4ba671206d..03bfa379a2 100644 --- a/app/seeders/standard_seeder/basic_data/type_seeder.rb +++ b/app/seeders/standard_seeder/basic_data/type_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/standard_seeder/basic_data/workflow_seeder.rb b/app/seeders/standard_seeder/basic_data/workflow_seeder.rb index c495dea172..806ea66227 100644 --- a/app/seeders/standard_seeder/basic_data/workflow_seeder.rb +++ b/app/seeders/standard_seeder/basic_data/workflow_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/seeders/standard_seeder/basic_data_seeder.rb b/app/seeders/standard_seeder/basic_data_seeder.rb index 3522c5674c..4ca670082c 100644 --- a/app/seeders/standard_seeder/basic_data_seeder.rb +++ b/app/seeders/standard_seeder/basic_data_seeder.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/add_work_package_note_service.rb b/app/services/add_work_package_note_service.rb index 364364a64d..0148b578c7 100644 --- a/app/services/add_work_package_note_service.rb +++ b/app/services/add_work_package_note_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/api/v3/work_package_collection_from_query_service.rb b/app/services/api/v3/work_package_collection_from_query_service.rb index 1226013791..0667fb2395 100644 --- a/app/services/api/v3/work_package_collection_from_query_service.rb +++ b/app/services/api/v3/work_package_collection_from_query_service.rb @@ -30,7 +30,7 @@ module API module V3 class WorkPackageCollectionFromQueryService include Utilities::PathHelper - include ::API::Utilities::PageSizeHelper + include ::API::Utilities::UrlPropsParsingHelper def initialize(query, user, scope: nil) self.query = query @@ -88,6 +88,8 @@ module API params[:offset] = to_i_or_nil(params[:offset]) params[:pageSize] = pageSizeParam(params) end + + params[:select] = nested_from_csv(provided_params['select']) end end @@ -147,18 +149,27 @@ module API def collection_representer(work_packages, params:, project:, groups:, sums:) resulting_params = calculate_resulting_params(params) - ::API::V3::WorkPackages::WorkPackageCollectionRepresenter.new( - work_packages, - self_link: self_link(project), - project: project, - query: resulting_params, - page: resulting_params[:offset], - per_page: resulting_params[:pageSize], - groups: groups, - total_sums: sums, - embed_schemas: true, - current_user: current_user - ) + if resulting_params[:select] + ::API::V3::Utilities::SqlRepresenterWalker + .new(work_packages, + current_user: current_user, + self_path: self_link(project), + url_query: resulting_params) + .walk(::API::V3::WorkPackages::WorkPackageSqlCollectionRepresenter) + else + ::API::V3::WorkPackages::WorkPackageCollectionRepresenter.new( + work_packages, + self_link: self_link(project), + project: project, + query: resulting_params, + page: resulting_params[:offset], + per_page: resulting_params[:pageSize], + groups: groups, + total_sums: sums, + embed_schemas: true, + current_user: current_user + ) + end end def to_i_or_nil(value) diff --git a/app/services/attachments/replace_attachments.rb b/app/services/attachments/replace_attachments.rb index 805d804966..3ae3f2bec9 100644 --- a/app/services/attachments/replace_attachments.rb +++ b/app/services/attachments/replace_attachments.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/attachments/set_attributes_service.rb b/app/services/attachments/set_attributes_service.rb index 7d4c772d25..c07f54bc44 100644 --- a/app/services/attachments/set_attributes_service.rb +++ b/app/services/attachments/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/attachments/set_prepared_attributes_service.rb b/app/services/attachments/set_prepared_attributes_service.rb index d2111ec27e..e37b6a7d9b 100644 --- a/app/services/attachments/set_prepared_attributes_service.rb +++ b/app/services/attachments/set_prepared_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/attachments/set_replacements.rb b/app/services/attachments/set_replacements.rb index 238dffec17..3781751d60 100644 --- a/app/services/attachments/set_replacements.rb +++ b/app/services/attachments/set_replacements.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/attachments/touch_container.rb b/app/services/attachments/touch_container.rb index ce6bf1d9c9..241abfc767 100644 --- a/app/services/attachments/touch_container.rb +++ b/app/services/attachments/touch_container.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/attribute_help_texts/create_service.rb b/app/services/attribute_help_texts/create_service.rb index dadd1d5533..51f8be87fd 100644 --- a/app/services/attribute_help_texts/create_service.rb +++ b/app/services/attribute_help_texts/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/attribute_help_texts/set_attributes_service.rb b/app/services/attribute_help_texts/set_attributes_service.rb index 8141dfec35..1f9774ce39 100644 --- a/app/services/attribute_help_texts/set_attributes_service.rb +++ b/app/services/attribute_help_texts/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/attribute_help_texts/update_service.rb b/app/services/attribute_help_texts/update_service.rb index 2b9ee9cec6..7c21928db3 100644 --- a/app/services/attribute_help_texts/update_service.rb +++ b/app/services/attribute_help_texts/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authentication/omniauth_service.rb b/app/services/authentication/omniauth_service.rb index 50a973ccb7..4e1d40fdb9 100644 --- a/app/services/authentication/omniauth_service.rb +++ b/app/services/authentication/omniauth_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization.rb b/app/services/authorization.rb index 8d6406e4b0..9b82541efc 100644 --- a/app/services/authorization.rb +++ b/app/services/authorization.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/abstract_query.rb b/app/services/authorization/abstract_query.rb index 1c98cec832..a69bce8cdc 100644 --- a/app/services/authorization/abstract_query.rb +++ b/app/services/authorization/abstract_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/abstract_user_query.rb b/app/services/authorization/abstract_user_query.rb index c281cce02b..87a6e0aff7 100644 --- a/app/services/authorization/abstract_user_query.rb +++ b/app/services/authorization/abstract_user_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/enterprise_service.rb b/app/services/authorization/enterprise_service.rb index 7e9a488718..7112af5780 100644 --- a/app/services/authorization/enterprise_service.rb +++ b/app/services/authorization/enterprise_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/project_query.rb b/app/services/authorization/project_query.rb index a4b10f5fdb..dc0f46bab0 100644 --- a/app/services/authorization/project_query.rb +++ b/app/services/authorization/project_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -147,9 +145,13 @@ class Authorization::ProjectQuery < Authorization::AbstractQuery permissions(action).all?(&:public?) end + def self.granted_to_admin?(user, action) + user.admin? && OpenProject::AccessControl.grant_to_admin?(action) + end + transformations.register :all, - :members_join do |statement, user| - if user.admin? + :members_join do |statement, user, action| + if granted_to_admin?(user, action) statement else statement @@ -172,7 +174,7 @@ class Authorization::ProjectQuery < Authorization::AbstractQuery transformations.register :all, :role_permissions_join, after: [:enabled_modules_join] do |statement, user, action| - if action_public?(action) || user.admin? + if action_public?(action) || granted_to_admin?(user, action) statement else statement.join(role_permissions_table) @@ -182,8 +184,8 @@ class Authorization::ProjectQuery < Authorization::AbstractQuery transformations.register :all, :members_member_roles_join, - after: [:members_join] do |statement, user| - if user.admin? + after: [:members_join] do |statement, user, action| + if granted_to_admin?(user, action) statement else statement.outer_join(member_roles_table) @@ -194,7 +196,7 @@ class Authorization::ProjectQuery < Authorization::AbstractQuery transformations.register :all, :permission_roles_join, after: [:role_permissions_join] do |statement, user, action| - if action_public?(action) || user.admin? + if action_public?(action) || granted_to_admin?(user, action) statement else statement.join(permission_roles_table) @@ -206,7 +208,7 @@ class Authorization::ProjectQuery < Authorization::AbstractQuery :assigned_roles_join, after: %i[permission_roles_join members_member_roles_join] do |statement, user, action| - if user.admin? + if granted_to_admin?(user, action) statement else statement.outer_join(assigned_roles_table) @@ -215,8 +217,8 @@ class Authorization::ProjectQuery < Authorization::AbstractQuery end transformations.register :all, - :assigned_role_exists_condition do |statement, user| - if user.admin? + :assigned_role_exists_condition do |statement, user, action| + if granted_to_admin?(user, action) statement.where(project_active_condition) else statement.where(assigned_roles_table[:id].not_eq(nil)) diff --git a/app/services/authorization/query_transformation.rb b/app/services/authorization/query_transformation.rb index 9ab10bc15e..1b931cecc8 100644 --- a/app/services/authorization/query_transformation.rb +++ b/app/services/authorization/query_transformation.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/query_transformation_visitor.rb b/app/services/authorization/query_transformation_visitor.rb index 27ee143a5a..8f74aa2aa7 100644 --- a/app/services/authorization/query_transformation_visitor.rb +++ b/app/services/authorization/query_transformation_visitor.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/query_transformations.rb b/app/services/authorization/query_transformations.rb index 34512ea350..c8543beefe 100644 --- a/app/services/authorization/query_transformations.rb +++ b/app/services/authorization/query_transformations.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/query_transformations_order.rb b/app/services/authorization/query_transformations_order.rb index 41033506c9..0f28857aac 100644 --- a/app/services/authorization/query_transformations_order.rb +++ b/app/services/authorization/query_transformations_order.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/user_allowed_query.rb b/app/services/authorization/user_allowed_query.rb index 81ea67abd5..0fe736d199 100644 --- a/app/services/authorization/user_allowed_query.rb +++ b/app/services/authorization/user_allowed_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -53,7 +51,11 @@ class Authorization::UserAllowedQuery < Authorization::AbstractUserQuery has_role.and(has_permission) end - is_admin = users_table[:admin].eq(true) + is_admin = if OpenProject::AccessControl.grant_to_admin?(action) + users_table[:admin].eq(true) + else + Arel::Nodes::Equality.new(1, 0) + end statement.where(has_role_and_permission.or(is_admin)) else diff --git a/app/services/authorization/user_allowed_service.rb b/app/services/authorization/user_allowed_service.rb index aad36b510a..a390aa10ef 100644 --- a/app/services/authorization/user_allowed_service.rb +++ b/app/services/authorization/user_allowed_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -93,7 +91,8 @@ class Authorization::UserAllowedService # Inactive users are never authorized return false unless authorizable_user? # Admin users are authorized for anything else - return true if user.admin? + # unless the permission is explicitly flagged not to be granted to admins. + return true if granted_to_admin?(action) has_authorized_role?(action, project) end @@ -104,7 +103,7 @@ class Authorization::UserAllowedService # Inactive users are never authorized return false unless authorizable_user? # Admin users are always authorized - return true if user.admin? + return true if granted_to_admin?(action) has_authorized_role?(action) end @@ -116,6 +115,12 @@ class Authorization::UserAllowedService !user.locked? || user.is_a?(SystemUser) end + # Admin users are granted every permission unless the + # permission explicitly disables it. + def granted_to_admin?(action) + user.admin? && OpenProject::AccessControl.grant_to_admin?(action) + end + def has_authorized_role?(action, project = nil) project_role_cache .fetch(project) diff --git a/app/services/authorization/user_global_roles_query.rb b/app/services/authorization/user_global_roles_query.rb index 8efbf176b1..36e0169c44 100644 --- a/app/services/authorization/user_global_roles_query.rb +++ b/app/services/authorization/user_global_roles_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/user_project_roles_query.rb b/app/services/authorization/user_project_roles_query.rb index 5f76698788..61f9c8d121 100644 --- a/app/services/authorization/user_project_roles_query.rb +++ b/app/services/authorization/user_project_roles_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization/user_roles_query.rb b/app/services/authorization/user_roles_query.rb index 11045bc608..68e53abd9c 100644 --- a/app/services/authorization/user_roles_query.rb +++ b/app/services/authorization/user_roles_query.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/authorization_service.rb b/app/services/authorization_service.rb index 3fca489d64..3e016c642e 100644 --- a/app/services/authorization_service.rb +++ b/app/services/authorization_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/backups/create_service.rb b/app/services/backups/create_service.rb index ff4f9e7471..6dd356a006 100644 --- a/app/services/backups/create_service.rb +++ b/app/services/backups/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/backups/set_attributes_service.rb b/app/services/backups/set_attributes_service.rb index fc8f74b801..d51df10609 100644 --- a/app/services/backups/set_attributes_service.rb +++ b/app/services/backups/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_project_service.rb b/app/services/base_project_service.rb index 9088447277..5c2bce2a15 100644 --- a/app/services/base_project_service.rb +++ b/app/services/base_project_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_services/base_callable.rb b/app/services/base_services/base_callable.rb index 63439fc7de..973ddfb4bc 100644 --- a/app/services/base_services/base_callable.rb +++ b/app/services/base_services/base_callable.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_services/base_contracted.rb b/app/services/base_services/base_contracted.rb index 7e4338a056..a5bd31f6ac 100644 --- a/app/services/base_services/base_contracted.rb +++ b/app/services/base_services/base_contracted.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_services/copy.rb b/app/services/base_services/copy.rb index bfd2b298c5..610ce94e5a 100644 --- a/app/services/base_services/copy.rb +++ b/app/services/base_services/copy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_services/create.rb b/app/services/base_services/create.rb index db7673a971..da6c70014c 100644 --- a/app/services/base_services/create.rb +++ b/app/services/base_services/create.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_services/set_attributes.rb b/app/services/base_services/set_attributes.rb index 8730b901b3..46109999d2 100644 --- a/app/services/base_services/set_attributes.rb +++ b/app/services/base_services/set_attributes.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_services/update.rb b/app/services/base_services/update.rb index f2e411f0c3..7886742aa9 100644 --- a/app/services/base_services/update.rb +++ b/app/services/base_services/update.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_services/write.rb b/app/services/base_services/write.rb index 7d451b71b8..8d0c44698a 100644 --- a/app/services/base_services/write.rb +++ b/app/services/base_services/write.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/base_type_service.rb b/app/services/base_type_service.rb index 8f9d902240..fb875a2ffa 100644 --- a/app/services/base_type_service.rb +++ b/app/services/base_type_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/changesets/log_time_service.rb b/app/services/changesets/log_time_service.rb index 0bce3bc247..83dfd7cb84 100644 --- a/app/services/changesets/log_time_service.rb +++ b/app/services/changesets/log_time_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/concerns/contracted.rb b/app/services/concerns/contracted.rb index 27218ad868..c57c2a9204 100644 --- a/app/services/concerns/contracted.rb +++ b/app/services/concerns/contracted.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/concerns/with_reversible_state.rb b/app/services/concerns/with_reversible_state.rb index e0ecf2014f..888705817b 100644 --- a/app/services/concerns/with_reversible_state.rb +++ b/app/services/concerns/with_reversible_state.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/copy/dependency.rb b/app/services/copy/dependency.rb index e1a43419e7..1de74179b9 100644 --- a/app/services/copy/dependency.rb +++ b/app/services/copy/dependency.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/create_type_service.rb b/app/services/create_type_service.rb index 6f3cb3cdbd..d507bc7976 100644 --- a/app/services/create_type_service.rb +++ b/app/services/create_type_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/custom_actions/base_service.rb b/app/services/custom_actions/base_service.rb index 323e8e9332..13385d98a6 100644 --- a/app/services/custom_actions/base_service.rb +++ b/app/services/custom_actions/base_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/custom_actions/create_service.rb b/app/services/custom_actions/create_service.rb index acd94a493f..6ad1aa65b8 100644 --- a/app/services/custom_actions/create_service.rb +++ b/app/services/custom_actions/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/custom_actions/update_service.rb b/app/services/custom_actions/update_service.rb index a4672f1157..8bcfb1ef5d 100644 --- a/app/services/custom_actions/update_service.rb +++ b/app/services/custom_actions/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/custom_actions/update_work_package_service.rb b/app/services/custom_actions/update_work_package_service.rb index 056683faac..9f671b9035 100644 --- a/app/services/custom_actions/update_work_package_service.rb +++ b/app/services/custom_actions/update_work_package_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/custom_fields/create_service.rb b/app/services/custom_fields/create_service.rb index bb6986a3f4..5c341395f2 100644 --- a/app/services/custom_fields/create_service.rb +++ b/app/services/custom_fields/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/custom_fields/set_attributes_service.rb b/app/services/custom_fields/set_attributes_service.rb index d3b122db5f..df6d735a1d 100644 --- a/app/services/custom_fields/set_attributes_service.rb +++ b/app/services/custom_fields/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/custom_fields/update_service.rb b/app/services/custom_fields/update_service.rb index db6386a4ae..67ea37636d 100644 --- a/app/services/custom_fields/update_service.rb +++ b/app/services/custom_fields/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/grids/copy/widgets_dependent_service.rb b/app/services/grids/copy/widgets_dependent_service.rb index b2d58ab92b..cab6c5d94c 100644 --- a/app/services/grids/copy/widgets_dependent_service.rb +++ b/app/services/grids/copy/widgets_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/grids/copy_service.rb b/app/services/grids/copy_service.rb index 9233c9b4fe..dad8ce5336 100644 --- a/app/services/grids/copy_service.rb +++ b/app/services/grids/copy_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/groups/add_users_service.rb b/app/services/groups/add_users_service.rb index 59254e0bf7..f201e2c338 100644 --- a/app/services/groups/add_users_service.rb +++ b/app/services/groups/add_users_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb index 6611c1e3d3..bde36466ed 100644 --- a/app/services/groups/create_service.rb +++ b/app/services/groups/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/groups/set_attributes_service.rb b/app/services/groups/set_attributes_service.rb index aec29857ac..f9a865b645 100644 --- a/app/services/groups/set_attributes_service.rb +++ b/app/services/groups/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/groups/update_service.rb b/app/services/groups/update_service.rb index c4c4275277..0a5cffa67c 100644 --- a/app/services/groups/update_service.rb +++ b/app/services/groups/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/members/create_service.rb b/app/services/members/create_service.rb index 6464b1ae0e..887997a2f4 100644 --- a/app/services/members/create_service.rb +++ b/app/services/members/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/members/edit_membership_service.rb b/app/services/members/edit_membership_service.rb index 4104ea00b9..d61f8d51e6 100644 --- a/app/services/members/edit_membership_service.rb +++ b/app/services/members/edit_membership_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/members/set_attributes_service.rb b/app/services/members/set_attributes_service.rb index f8bad8dc1d..657e3ed11b 100644 --- a/app/services/members/set_attributes_service.rb +++ b/app/services/members/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/members/update_service.rb b/app/services/members/update_service.rb index 5f43d17177..49e689c033 100644 --- a/app/services/members/update_service.rb +++ b/app/services/members/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/messages/create_service.rb b/app/services/messages/create_service.rb index 5772f62070..28ea5b6de0 100644 --- a/app/services/messages/create_service.rb +++ b/app/services/messages/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/messages/set_attributes_service.rb b/app/services/messages/set_attributes_service.rb index 07adce217c..b85ce2ee41 100644 --- a/app/services/messages/set_attributes_service.rb +++ b/app/services/messages/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/messages/update_service.rb b/app/services/messages/update_service.rb index 511b9ffed1..ef23494ebc 100644 --- a/app/services/messages/update_service.rb +++ b/app/services/messages/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/notifications/aggregated_journal_service.rb b/app/services/notifications/aggregated_journal_service.rb index d635ee6e7f..c22c2dd798 100644 --- a/app/services/notifications/aggregated_journal_service.rb +++ b/app/services/notifications/aggregated_journal_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/notifications/create_from_model_service.rb b/app/services/notifications/create_from_model_service.rb index 7d83839fba..db58010e9b 100644 --- a/app/services/notifications/create_from_model_service.rb +++ b/app/services/notifications/create_from_model_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/notifications/create_from_model_service/comment_strategy.rb b/app/services/notifications/create_from_model_service/comment_strategy.rb index 6ca45eaa9d..a8c9463f6b 100644 --- a/app/services/notifications/create_from_model_service/comment_strategy.rb +++ b/app/services/notifications/create_from_model_service/comment_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/notifications/create_from_model_service/message_strategy.rb b/app/services/notifications/create_from_model_service/message_strategy.rb index 13d930d2ae..2fee34af68 100644 --- a/app/services/notifications/create_from_model_service/message_strategy.rb +++ b/app/services/notifications/create_from_model_service/message_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/notifications/create_from_model_service/news_strategy.rb b/app/services/notifications/create_from_model_service/news_strategy.rb index 78518889ad..2cd06b386d 100644 --- a/app/services/notifications/create_from_model_service/news_strategy.rb +++ b/app/services/notifications/create_from_model_service/news_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/notifications/create_from_model_service/wiki_content_strategy.rb b/app/services/notifications/create_from_model_service/wiki_content_strategy.rb index f84f83263c..2308ccbad1 100644 --- a/app/services/notifications/create_from_model_service/wiki_content_strategy.rb +++ b/app/services/notifications/create_from_model_service/wiki_content_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/notifications/create_from_model_service/work_package_strategy.rb b/app/services/notifications/create_from_model_service/work_package_strategy.rb index 803c5fc467..fbab3bff0c 100644 --- a/app/services/notifications/create_from_model_service/work_package_strategy.rb +++ b/app/services/notifications/create_from_model_service/work_package_strategy.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/notifications/create_service.rb b/app/services/notifications/create_service.rb index 0cd8b68488..f18862fc46 100644 --- a/app/services/notifications/create_service.rb +++ b/app/services/notifications/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/oauth/persist_application_service.rb b/app/services/oauth/persist_application_service.rb index f3dea3dd90..245a88e425 100644 --- a/app/services/oauth/persist_application_service.rb +++ b/app/services/oauth/persist_application_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/parse_schema_filter_params_service.rb b/app/services/parse_schema_filter_params_service.rb index 1e42c1ac4b..84fd43cabc 100644 --- a/app/services/parse_schema_filter_params_service.rb +++ b/app/services/parse_schema_filter_params_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/placeholder_users/create_service.rb b/app/services/placeholder_users/create_service.rb index ed1a7fa3b2..e7af85b0c5 100644 --- a/app/services/placeholder_users/create_service.rb +++ b/app/services/placeholder_users/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/placeholder_users/delete_service.rb b/app/services/placeholder_users/delete_service.rb index d36cbb1a8c..d854f85bcc 100644 --- a/app/services/placeholder_users/delete_service.rb +++ b/app/services/placeholder_users/delete_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/placeholder_users/set_attributes_service.rb b/app/services/placeholder_users/set_attributes_service.rb index 94cfe9c4b5..6876645450 100644 --- a/app/services/placeholder_users/set_attributes_service.rb +++ b/app/services/placeholder_users/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/placeholder_users/update_service.rb b/app/services/placeholder_users/update_service.rb index 29cf52d8e0..e407a5fdff 100644 --- a/app/services/placeholder_users/update_service.rb +++ b/app/services/placeholder_users/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/principals/replace_references_service.rb b/app/services/principals/replace_references_service.rb index 36fbfb0458..ef44dd41b9 100644 --- a/app/services/principals/replace_references_service.rb +++ b/app/services/principals/replace_references_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/archive_service.rb b/app/services/projects/archive_service.rb index 0ef6ee8ae9..7bdeb9a211 100644 --- a/app/services/projects/archive_service.rb +++ b/app/services/projects/archive_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/concerns/new_project_service.rb b/app/services/projects/concerns/new_project_service.rb index d0a8f818ef..0e48001356 100644 --- a/app/services/projects/concerns/new_project_service.rb +++ b/app/services/projects/concerns/new_project_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/concerns/update_demo_data.rb b/app/services/projects/concerns/update_demo_data.rb index 936124ea8d..6194cc76bb 100644 --- a/app/services/projects/concerns/update_demo_data.rb +++ b/app/services/projects/concerns/update_demo_data.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/boards_dependent_service.rb b/app/services/projects/copy/boards_dependent_service.rb index f6083a4a5a..28b28dfd60 100644 --- a/app/services/projects/copy/boards_dependent_service.rb +++ b/app/services/projects/copy/boards_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/categories_dependent_service.rb b/app/services/projects/copy/categories_dependent_service.rb index c6c801cc0b..c655709eb7 100644 --- a/app/services/projects/copy/categories_dependent_service.rb +++ b/app/services/projects/copy/categories_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/dependency.rb b/app/services/projects/copy/dependency.rb index 1f7b1536a5..54740b2ffb 100644 --- a/app/services/projects/copy/dependency.rb +++ b/app/services/projects/copy/dependency.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/forums_dependent_service.rb b/app/services/projects/copy/forums_dependent_service.rb index 40fb7db9f9..a9af28e806 100644 --- a/app/services/projects/copy/forums_dependent_service.rb +++ b/app/services/projects/copy/forums_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/members_dependent_service.rb b/app/services/projects/copy/members_dependent_service.rb index d96e3a89bb..90d94ce285 100644 --- a/app/services/projects/copy/members_dependent_service.rb +++ b/app/services/projects/copy/members_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/overview_dependent_service.rb b/app/services/projects/copy/overview_dependent_service.rb index 4c4b7a9d50..585656937d 100644 --- a/app/services/projects/copy/overview_dependent_service.rb +++ b/app/services/projects/copy/overview_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/queries_dependent_service.rb b/app/services/projects/copy/queries_dependent_service.rb index 9756513672..e6d123dc92 100644 --- a/app/services/projects/copy/queries_dependent_service.rb +++ b/app/services/projects/copy/queries_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/versions_dependent_service.rb b/app/services/projects/copy/versions_dependent_service.rb index b783f9092a..9e5f7a451e 100644 --- a/app/services/projects/copy/versions_dependent_service.rb +++ b/app/services/projects/copy/versions_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/wiki_dependent_service.rb b/app/services/projects/copy/wiki_dependent_service.rb index 01de17691b..36ddef9c78 100644 --- a/app/services/projects/copy/wiki_dependent_service.rb +++ b/app/services/projects/copy/wiki_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/wiki_page_attachments_dependent_service.rb b/app/services/projects/copy/wiki_page_attachments_dependent_service.rb index 0272297349..d4f18c75bd 100644 --- a/app/services/projects/copy/wiki_page_attachments_dependent_service.rb +++ b/app/services/projects/copy/wiki_page_attachments_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/work_package_attachments_dependent_service.rb b/app/services/projects/copy/work_package_attachments_dependent_service.rb index 55372ec6b7..15379744ee 100644 --- a/app/services/projects/copy/work_package_attachments_dependent_service.rb +++ b/app/services/projects/copy/work_package_attachments_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy/work_packages_dependent_service.rb b/app/services/projects/copy/work_packages_dependent_service.rb index 70b4b35f47..58d9e3a026 100644 --- a/app/services/projects/copy/work_packages_dependent_service.rb +++ b/app/services/projects/copy/work_packages_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/copy_service.rb b/app/services/projects/copy_service.rb index f0da3c9fce..18753e3200 100644 --- a/app/services/projects/copy_service.rb +++ b/app/services/projects/copy_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index bbeaa16848..1964137a69 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/delete_service.rb b/app/services/projects/delete_service.rb index ef1a549618..2612619834 100644 --- a/app/services/projects/delete_service.rb +++ b/app/services/projects/delete_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/enabled_modules_service.rb b/app/services/projects/enabled_modules_service.rb index 62b87f7d62..2398ba9c73 100644 --- a/app/services/projects/enabled_modules_service.rb +++ b/app/services/projects/enabled_modules_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/enqueue_copy_service.rb b/app/services/projects/enqueue_copy_service.rb index 9a596979cf..806d4b3a50 100644 --- a/app/services/projects/enqueue_copy_service.rb +++ b/app/services/projects/enqueue_copy_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/gantt_query_generator_service.rb b/app/services/projects/gantt_query_generator_service.rb index c5fe1c473c..3c4cabe763 100644 --- a/app/services/projects/gantt_query_generator_service.rb +++ b/app/services/projects/gantt_query_generator_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/schedule_deletion_service.rb b/app/services/projects/schedule_deletion_service.rb index cfa7318681..78da4f194b 100644 --- a/app/services/projects/schedule_deletion_service.rb +++ b/app/services/projects/schedule_deletion_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/set_attributes_service.rb b/app/services/projects/set_attributes_service.rb index 18e5ab79f7..c48d333362 100644 --- a/app/services/projects/set_attributes_service.rb +++ b/app/services/projects/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/unarchive_service.rb b/app/services/projects/unarchive_service.rb index 6a216b5102..f31eae434a 100644 --- a/app/services/projects/unarchive_service.rb +++ b/app/services/projects/unarchive_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/projects/update_service.rb b/app/services/projects/update_service.rb index 9ab4bb1226..bacea46f3c 100644 --- a/app/services/projects/update_service.rb +++ b/app/services/projects/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/queries/base_service.rb b/app/services/queries/base_service.rb index 214d8cb200..93b14dc777 100644 --- a/app/services/queries/base_service.rb +++ b/app/services/queries/base_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/queries/copy/filters_mapper.rb b/app/services/queries/copy/filters_mapper.rb index e4bd56df30..ec61294c83 100644 --- a/app/services/queries/copy/filters_mapper.rb +++ b/app/services/queries/copy/filters_mapper.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/queries/copy/ordered_work_packages_dependent_service.rb b/app/services/queries/copy/ordered_work_packages_dependent_service.rb index eb77248c27..762215f6d3 100644 --- a/app/services/queries/copy/ordered_work_packages_dependent_service.rb +++ b/app/services/queries/copy/ordered_work_packages_dependent_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/queries/copy_service.rb b/app/services/queries/copy_service.rb index 80c982a004..105f3cdb0e 100644 --- a/app/services/queries/copy_service.rb +++ b/app/services/queries/copy_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/queries/create_service.rb b/app/services/queries/create_service.rb index 643180e606..3ae93b737b 100644 --- a/app/services/queries/create_service.rb +++ b/app/services/queries/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/queries/update_service.rb b/app/services/queries/update_service.rb index 307359196c..4d94662086 100644 --- a/app/services/queries/update_service.rb +++ b/app/services/queries/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/relations/base_service.rb b/app/services/relations/base_service.rb index 4d50209c89..6f866e250c 100644 --- a/app/services/relations/base_service.rb +++ b/app/services/relations/base_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/relations/create_service.rb b/app/services/relations/create_service.rb index a5df494cfb..68541ddfdc 100644 --- a/app/services/relations/create_service.rb +++ b/app/services/relations/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/relations/update_service.rb b/app/services/relations/update_service.rb index 0aae93afc0..7ab19bf7a9 100644 --- a/app/services/relations/update_service.rb +++ b/app/services/relations/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/assignee_report.rb b/app/services/reports/assignee_report.rb index 2634ed5a14..393e1cab99 100644 --- a/app/services/reports/assignee_report.rb +++ b/app/services/reports/assignee_report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/author_report.rb b/app/services/reports/author_report.rb index e186b82732..86b472384a 100644 --- a/app/services/reports/author_report.rb +++ b/app/services/reports/author_report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/category_report.rb b/app/services/reports/category_report.rb index c528075320..85a4079618 100644 --- a/app/services/reports/category_report.rb +++ b/app/services/reports/category_report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/priority_report.rb b/app/services/reports/priority_report.rb index b1ea6dccb9..788f94f38c 100644 --- a/app/services/reports/priority_report.rb +++ b/app/services/reports/priority_report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/report.rb b/app/services/reports/report.rb index 268606895d..2b9b76d898 100644 --- a/app/services/reports/report.rb +++ b/app/services/reports/report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/reports_service.rb b/app/services/reports/reports_service.rb index 5bd8bf7872..5712868c7c 100644 --- a/app/services/reports/reports_service.rb +++ b/app/services/reports/reports_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/responsible_report.rb b/app/services/reports/responsible_report.rb index e8802b1fdf..02e3e0a058 100644 --- a/app/services/reports/responsible_report.rb +++ b/app/services/reports/responsible_report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/subproject_report.rb b/app/services/reports/subproject_report.rb index 4499217bc1..afa69a32ff 100644 --- a/app/services/reports/subproject_report.rb +++ b/app/services/reports/subproject_report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/type_report.rb b/app/services/reports/type_report.rb index 41dd194c4e..ff7908c44a 100644 --- a/app/services/reports/type_report.rb +++ b/app/services/reports/type_report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/reports/version_report.rb b/app/services/reports/version_report.rb index af7cc6c7d0..3924aedfd3 100644 --- a/app/services/reports/version_report.rb +++ b/app/services/reports/version_report.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/roles/create_service.rb b/app/services/roles/create_service.rb index d4fd7a86ef..4cab268fbc 100644 --- a/app/services/roles/create_service.rb +++ b/app/services/roles/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/roles/notify_mixin.rb b/app/services/roles/notify_mixin.rb index 3720ffff41..c6d4e991c8 100644 --- a/app/services/roles/notify_mixin.rb +++ b/app/services/roles/notify_mixin.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/roles/set_attributes_service.rb b/app/services/roles/set_attributes_service.rb index c936120ce1..a53eabd1ac 100644 --- a/app/services/roles/set_attributes_service.rb +++ b/app/services/roles/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/roles/update_service.rb b/app/services/roles/update_service.rb index b10f576a12..e4f9c03de5 100644 --- a/app/services/roles/update_service.rb +++ b/app/services/roles/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/scm/base_repository_service.rb b/app/services/scm/base_repository_service.rb index c51e63a51c..cd044dc37b 100644 --- a/app/services/scm/base_repository_service.rb +++ b/app/services/scm/base_repository_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/scm/checkout_instructions_service.rb b/app/services/scm/checkout_instructions_service.rb index f4157fcb08..f331722ecf 100644 --- a/app/services/scm/checkout_instructions_service.rb +++ b/app/services/scm/checkout_instructions_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/scm/create_managed_repository_service.rb b/app/services/scm/create_managed_repository_service.rb index d8b5c0c0e4..ab02886fa0 100644 --- a/app/services/scm/create_managed_repository_service.rb +++ b/app/services/scm/create_managed_repository_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/scm/delete_managed_repository_service.rb b/app/services/scm/delete_managed_repository_service.rb index a45527237b..41e4c7d912 100644 --- a/app/services/scm/delete_managed_repository_service.rb +++ b/app/services/scm/delete_managed_repository_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/scm/repository_factory_service.rb b/app/services/scm/repository_factory_service.rb index 012201d950..3415249f75 100644 --- a/app/services/scm/repository_factory_service.rb +++ b/app/services/scm/repository_factory_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/service_result.rb b/app/services/service_result.rb index 1b8354e105..258b6fcf80 100644 --- a/app/services/service_result.rb +++ b/app/services/service_result.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -32,7 +30,6 @@ class ServiceResult attr_accessor :success, :result, :errors, - :message_type, :state, :dependent_results @@ -49,6 +46,7 @@ class ServiceResult initialize_errors(errors) @message = message + @message_type = message_type self.dependent_results = dependent_results end @@ -77,10 +75,8 @@ class ServiceResult ## # Print messages to flash def apply_flash_message!(flash) - type = get_message_type - - if message && type - flash[type] = message + if message + flash[message_type] = message end end @@ -143,11 +139,6 @@ class ServiceResult self end - def tap - yield(self) - self - end - def each yield result if success? self @@ -189,9 +180,9 @@ class ServiceResult end end - def get_message_type - if message_type.present? - message_type.to_sym + def message_type + if @message_type + @message_type.to_sym elsif success? :notice else diff --git a/app/services/sessions/base_service.rb b/app/services/sessions/base_service.rb index 101076c6d1..2610493411 100644 --- a/app/services/sessions/base_service.rb +++ b/app/services/sessions/base_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/sessions/drop_other_sessions_service.rb b/app/services/sessions/drop_other_sessions_service.rb index 5da71e1b90..2c0a549810 100644 --- a/app/services/sessions/drop_other_sessions_service.rb +++ b/app/services/sessions/drop_other_sessions_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/sessions/initialize_session_service.rb b/app/services/sessions/initialize_session_service.rb index c27c99e253..17f87d31a1 100644 --- a/app/services/sessions/initialize_session_service.rb +++ b/app/services/sessions/initialize_session_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/settings/update_service.rb b/app/services/settings/update_service.rb index 1c7d9221ac..f18e63fd43 100644 --- a/app/services/settings/update_service.rb +++ b/app/services/settings/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/shared/block_service.rb b/app/services/shared/block_service.rb index 32f222f106..46ddf5c4fb 100644 --- a/app/services/shared/block_service.rb +++ b/app/services/shared/block_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/shared/service_context.rb b/app/services/shared/service_context.rb index a420fd269f..40086a2324 100644 --- a/app/services/shared/service_context.rb +++ b/app/services/shared/service_context.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/shared/service_state.rb b/app/services/shared/service_state.rb index 2397621763..c8f3e7579b 100644 --- a/app/services/shared/service_state.rb +++ b/app/services/shared/service_state.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/update_projects_types_service.rb b/app/services/update_projects_types_service.rb index 504bb128ab..4bef408774 100644 --- a/app/services/update_projects_types_service.rb +++ b/app/services/update_projects_types_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/update_type_service.rb b/app/services/update_type_service.rb index 099b6b4170..74425ccabe 100644 --- a/app/services/update_type_service.rb +++ b/app/services/update_type_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/user_preferences/set_attributes_service.rb b/app/services/user_preferences/set_attributes_service.rb index ada7012960..725585d617 100644 --- a/app/services/user_preferences/set_attributes_service.rb +++ b/app/services/user_preferences/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/user_preferences/update_service.rb b/app/services/user_preferences/update_service.rb index 2244a4cd2f..fc44f0c817 100644 --- a/app/services/user_preferences/update_service.rb +++ b/app/services/user_preferences/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/user_search_service.rb b/app/services/user_search_service.rb index 1cc4afa6f0..35358686dd 100644 --- a/app/services/user_search_service.rb +++ b/app/services/user_search_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/users/change_password_service.rb b/app/services/users/change_password_service.rb index 1e8ec706b2..b791532320 100644 --- a/app/services/users/change_password_service.rb +++ b/app/services/users/change_password_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/users/create_service.rb b/app/services/users/create_service.rb index e8f8cf2838..c2ee32b60a 100644 --- a/app/services/users/create_service.rb +++ b/app/services/users/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/users/delete_service.rb b/app/services/users/delete_service.rb index 9445aa8b4d..0c039ff935 100644 --- a/app/services/users/delete_service.rb +++ b/app/services/users/delete_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/users/login_service.rb b/app/services/users/login_service.rb index 1ef42905f3..9dea45757f 100644 --- a/app/services/users/login_service.rb +++ b/app/services/users/login_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/users/logout_service.rb b/app/services/users/logout_service.rb index b24a22e468..86e7e31c91 100644 --- a/app/services/users/logout_service.rb +++ b/app/services/users/logout_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/users/register_user_service.rb b/app/services/users/register_user_service.rb index 2cd510ac5f..e0087a5915 100644 --- a/app/services/users/register_user_service.rb +++ b/app/services/users/register_user_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/users/set_attributes_service.rb b/app/services/users/set_attributes_service.rb index ffade203b2..5e1c635cb6 100644 --- a/app/services/users/set_attributes_service.rb +++ b/app/services/users/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/users/update_service.rb b/app/services/users/update_service.rb index 31ac112aed..5f85ac6813 100644 --- a/app/services/users/update_service.rb +++ b/app/services/users/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/versions/create_service.rb b/app/services/versions/create_service.rb index e0ac57749e..05b4682594 100644 --- a/app/services/versions/create_service.rb +++ b/app/services/versions/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/versions/set_attributes_service.rb b/app/services/versions/set_attributes_service.rb index 4a3d6045d1..c09035c7b6 100644 --- a/app/services/versions/set_attributes_service.rb +++ b/app/services/versions/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/versions/update_service.rb b/app/services/versions/update_service.rb index e5f65e742d..e4aada5ed2 100644 --- a/app/services/versions/update_service.rb +++ b/app/services/versions/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/wiki_pages/copy_service.rb b/app/services/wiki_pages/copy_service.rb index ffc4ba32f5..ef8865dcb3 100644 --- a/app/services/wiki_pages/copy_service.rb +++ b/app/services/wiki_pages/copy_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/wiki_pages/create_service.rb b/app/services/wiki_pages/create_service.rb index b064a01338..829450691f 100644 --- a/app/services/wiki_pages/create_service.rb +++ b/app/services/wiki_pages/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/wiki_pages/set_attributes_service.rb b/app/services/wiki_pages/set_attributes_service.rb index 0f1a9fad5e..43792d1932 100644 --- a/app/services/wiki_pages/set_attributes_service.rb +++ b/app/services/wiki_pages/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/wiki_pages/update_service.rb b/app/services/wiki_pages/update_service.rb index 6913b9a3de..221aaafcc5 100644 --- a/app/services/wiki_pages/update_service.rb +++ b/app/services/wiki_pages/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/bulk/bulked_service.rb b/app/services/work_packages/bulk/bulked_service.rb index a21df8bcf6..c57252fcfa 100644 --- a/app/services/work_packages/bulk/bulked_service.rb +++ b/app/services/work_packages/bulk/bulked_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/bulk/copy_service.rb b/app/services/work_packages/bulk/copy_service.rb index 50685ddb28..0ba21cdca0 100644 --- a/app/services/work_packages/bulk/copy_service.rb +++ b/app/services/work_packages/bulk/copy_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/bulk/move_service.rb b/app/services/work_packages/bulk/move_service.rb index a82538d152..e101b11aca 100644 --- a/app/services/work_packages/bulk/move_service.rb +++ b/app/services/work_packages/bulk/move_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/bulk/update_service.rb b/app/services/work_packages/bulk/update_service.rb index 8fa7f69ac8..96a496aed0 100644 --- a/app/services/work_packages/bulk/update_service.rb +++ b/app/services/work_packages/bulk/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/copy_service.rb b/app/services/work_packages/copy_service.rb index 47c261faa7..be6e0f5f49 100644 --- a/app/services/work_packages/copy_service.rb +++ b/app/services/work_packages/copy_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/create_service.rb b/app/services/work_packages/create_service.rb index dca5dd560e..f20e5491e4 100644 --- a/app/services/work_packages/create_service.rb +++ b/app/services/work_packages/create_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/delete_service.rb b/app/services/work_packages/delete_service.rb index 0765df431d..54dd75912b 100644 --- a/app/services/work_packages/delete_service.rb +++ b/app/services/work_packages/delete_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/exports/schedule_service.rb b/app/services/work_packages/exports/schedule_service.rb index 2791c46fa4..70d373bc00 100644 --- a/app/services/work_packages/exports/schedule_service.rb +++ b/app/services/work_packages/exports/schedule_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/schedule_dependency.rb b/app/services/work_packages/schedule_dependency.rb index 1c7a93536b..b3fcb280b9 100644 --- a/app/services/work_packages/schedule_dependency.rb +++ b/app/services/work_packages/schedule_dependency.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -38,21 +36,13 @@ class WorkPackages::ScheduleDependency end def each - unhandled = dependencies.keys - - while unhandled.any? - movement = false - dependencies.each do |scheduled, dependency| - next unless unhandled.include?(scheduled) - next unless dependency.met?(unhandled) + each_while_unhandled do |unhandled_by_id, scheduled, dependency| + next unless unhandled_by_id[scheduled.id] + next unless dependency.met?(unhandled_by_id.keys) - yield scheduled, dependency - - unhandled.delete(scheduled) - movement = true - end + yield scheduled, dependency - raise "Circular dependency" unless movement + unhandled_by_id.except!(scheduled.id) end end @@ -62,6 +52,10 @@ class WorkPackages::ScheduleDependency :known_work_packages_by_id, :known_work_packages_by_parent_id + def scheduled_work_packages_by_id + @scheduled_work_packages_by_id ||= (work_packages + dependencies.keys).group_by(&:id).transform_values(&:first) + end + private def build_dependencies @@ -122,6 +116,21 @@ class WorkPackages::ScheduleDependency dependencies.merge!(moved) end + def each_while_unhandled + unhandled_by_id = dependencies.keys.group_by(&:id).transform_values(&:last) + + while unhandled_by_id.any? + unhandled_by_id_count_before = unhandled_by_id_count_after = unhandled_by_id.count + dependencies.each do |scheduled, dependency| + yield unhandled_by_id, scheduled, dependency + + unhandled_by_id_count_after = unhandled_by_id.count + end + + raise "Circular dependency" unless unhandled_by_id_count_after < unhandled_by_id_count_before + end + end + class Dependency def initialize(work_package, schedule_dependency) self.schedule_dependency = schedule_dependency @@ -136,6 +145,10 @@ class WorkPackages::ScheduleDependency @descendants ||= descendants_from_preloaded(work_package) end + def descendants_ids + @descendants_ids ||= descendants.map(&:id) + end + def follows_moved tree = ancestors + descendants @@ -148,12 +161,16 @@ class WorkPackages::ScheduleDependency @follows_unmoved ||= unmoved_predecessors_from_preloaded(work_package, tree) end + def follows_moved_to_ids + @follows_moved_to_ids ||= follows_moved.map(&:to).map(&:id) + end + attr_accessor :work_package, :schedule_dependency - def met?(unhandled_work_packages) - (descendants & unhandled_work_packages).empty? && - (follows_moved.map(&:to) & unhandled_work_packages).empty? + def met?(unhandled_ids) + (descendants_ids & unhandled_ids).empty? && + (follows_moved_to_ids & unhandled_ids).empty? end def max_date_of_followed @@ -195,7 +212,8 @@ class WorkPackages::ScheduleDependency delegate :known_work_packages, :known_work_packages_by_id, - :known_work_packages_by_parent_id, to: :schedule_dependency + :known_work_packages_by_parent_id, + :scheduled_work_packages_by_id, to: :schedule_dependency def scheduled_work_packages schedule_dependency.work_packages + schedule_dependency.dependencies.keys @@ -206,7 +224,7 @@ class WorkPackages::ScheduleDependency .map(&:follows_relations) .flatten .map do |relation| - scheduled = scheduled_work_packages.detect { |c| relation.to_id == c.id } + scheduled = scheduled_work_packages_by_id[relation.to_id] if scheduled relation.to = scheduled @@ -221,7 +239,7 @@ class WorkPackages::ScheduleDependency .map(&:follows_relations) .flatten .reject do |relation| - scheduled_work_packages.any? { |m| relation.to_id == m.id } + scheduled_work_packages_by_id[relation.to_id].present? end end end diff --git a/app/services/work_packages/set_attributes_service.rb b/app/services/work_packages/set_attributes_service.rb index dd6ae94aec..471d5116ce 100644 --- a/app/services/work_packages/set_attributes_service.rb +++ b/app/services/work_packages/set_attributes_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/set_schedule_service.rb b/app/services/work_packages/set_schedule_service.rb index f2d91235e8..5dfe495773 100644 --- a/app/services/work_packages/set_schedule_service.rb +++ b/app/services/work_packages/set_schedule_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/shared/update_ancestors.rb b/app/services/work_packages/shared/update_ancestors.rb index 8541449e73..1a88b21dd1 100644 --- a/app/services/work_packages/shared/update_ancestors.rb +++ b/app/services/work_packages/shared/update_ancestors.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/work_packages/update_ancestors_service.rb b/app/services/work_packages/update_ancestors_service.rb index 28f9682882..2786deadfe 100644 --- a/app/services/work_packages/update_ancestors_service.rb +++ b/app/services/work_packages/update_ancestors_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH @@ -38,8 +36,7 @@ class WorkPackages::UpdateAncestorsService end def call(attributes) - modified = update_ancestors(attributes) - modified += update_former_ancestors(attributes) + modified = update_current_and_former_ancestors(attributes) set_journal_note(modified) @@ -59,22 +56,31 @@ class WorkPackages::UpdateAncestorsService private - def update_ancestors(attributes) - work_package.ancestors.includes(:status).select do |ancestor| + def update_current_and_former_ancestors(attributes) + to_update = get_current_ancestors + + if (%i(parent_id parent) & attributes).any? + to_update += get_former_ancestors + to_update.uniq! + end + + to_update.select do |ancestor| inherit_attributes(ancestor, attributes) ancestor.changed? end end - def update_former_ancestors(attributes) - return [] unless (%i(parent_id parent) & attributes).any? && previous_parent_id + def get_current_ancestors + work_package.ancestors.includes(:status) + end + + def get_former_ancestors + return [] unless previous_parent_id parent = WorkPackage.find(previous_parent_id) - ([parent] + parent.ancestors).each do |ancestor| - inherit_attributes!(ancestor) - end.select(&:changed?) + [parent] + parent.ancestors end def inherit_attributes!(ancestor) @@ -105,11 +111,9 @@ class WorkPackages::UpdateAncestorsService return if WorkPackage.use_status_for_done_ratio? && ancestor.status && ancestor.status.default_done_ratio # done ratio = weighted average ratio of leaves - ratio = aggregate_done_ratio(ancestor) + ratio = (aggregate_done_ratio(ancestor) || 0) - if ratio - ancestor.done_ratio = ratio.round - end + ancestor.done_ratio = ratio.round end ## diff --git a/app/services/work_packages/update_service.rb b/app/services/work_packages/update_service.rb index cdb61c9979..0015a9eaef 100644 --- a/app/services/work_packages/update_service.rb +++ b/app/services/work_packages/update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/services/workflows/bulk_update_service.rb b/app/services/workflows/bulk_update_service.rb index 878ded8aca..f97ad125fd 100644 --- a/app/services/workflows/bulk_update_service.rb +++ b/app/services/workflows/bulk_update_service.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/validators/not_nil_validator.rb b/app/validators/not_nil_validator.rb index 9da456c785..9f22f8268b 100644 --- a/app/validators/not_nil_validator.rb +++ b/app/validators/not_nil_validator.rb @@ -1,5 +1,3 @@ -#-- encoding: UTF-8 - #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2022 the OpenProject GmbH diff --git a/app/views/common/upsale.html.erb b/app/views/common/upsale.html.erb index ab6cbeb98d..71b9a9d40d 100644 --- a/app/views/common/upsale.html.erb +++ b/app/views/common/upsale.html.erb @@ -22,7 +22,7 @@ <% if feature_video.empty? %> <% if feature_image.empty? %> - <%= image_tag "enterprise_edition.png", class: "widget-box--teaser-image" %> + <%= image_tag "enterprise_edition.png", class: "widget-box--teaser-image_default" %> <% else %> <%= image_tag feature_image, class: "widget-box--teaser-image" %> <% end %> @@ -42,7 +42,7 @@
<% end %> - <%= link_to( "#{OpenProject::Static::Links.links[:upsale][:href]}/?utm_source=unknown&utm_medium=community-edition&utm_campaign=#{feature_reference}", + <%= link_to( "https://www.openproject.org/pricing/", { class: 'button -highlight -round', aria: {label: t('admin.enterprise.buttons.upgrade')}, target: '_blank', diff --git a/app/views/layouts/_common_head.html.erb b/app/views/layouts/_common_head.html.erb index 1cb58073b3..1940d6b5da 100644 --- a/app/views/layouts/_common_head.html.erb +++ b/app/views/layouts/_common_head.html.erb @@ -21,6 +21,7 @@ <% if Setting.demo_projects_available %><% end %> <% if Setting.boards_demo_data_available %><% end %> +<% if Setting.demo_view_of_type_team_planner_seeded %><% end %> <%= csrf_meta_tags %> <%= initializer_meta_tag %> @@ -53,4 +54,4 @@ <% end %> <% end %> <% end %> -<%= crowdin_in_context_translation %> \ No newline at end of file +<%= crowdin_in_context_translation %> diff --git a/app/views/onboarding/_configuration_modal.html.erb b/app/views/onboarding/_configuration_modal.html.erb index 4ba7c51081..05dcf56190 100644 --- a/app/views/onboarding/_configuration_modal.html.erb +++ b/app/views/onboarding/_configuration_modal.html.erb @@ -32,7 +32,7 @@ See COPYRIGHT and LICENSE files for more details.