- 'db/migrate/20120714122200_add_workflows_rule_fields.rb' | - 'db/migrate/20120714122200_add_workflows_rule_fields.rb' | ||||
- 'db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb' | - 'db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb' | ||||
Rails/CompactBlank: | |||||
Enabled: false | |||||
Rails/EnvironmentVariableAccess: | Rails/EnvironmentVariableAccess: | ||||
Enabled: false | Enabled: false | ||||
Rails/FilePath: | |||||
Enabled: false | |||||
Rails/HelperInstanceVariable: | Rails/HelperInstanceVariable: | ||||
Enabled: false | Enabled: false | ||||
Style/BlockComments: | Style/BlockComments: | ||||
Enabled: true | Enabled: true | ||||
Exclude: | Exclude: | ||||
- 'lib/diff.rb' | |||||
- 'lib/redmine/string_array_diff/diff.rb' | |||||
- 'lib/redmine/string_array_diff/diffable.rb' | |||||
Style/BlockDelimiters: | Style/BlockDelimiters: | ||||
Enabled: true | Enabled: true | ||||
Exclude: | Exclude: | ||||
- 'db/migrate/007_create_journals.rb' | - 'db/migrate/007_create_journals.rb' | ||||
- 'lib/diff.rb' | |||||
- 'lib/redmine/string_array_diff/diff.rb' | |||||
- 'lib/redmine/string_array_diff/diffable.rb' | |||||
Style/EmptyElse: | Style/EmptyElse: | ||||
EnforcedStyle: empty | EnforcedStyle: empty | ||||
- 'config.ru' | - 'config.ru' | ||||
- 'config/additional_environment.rb' | - 'config/additional_environment.rb' | ||||
Style/GlobalStdStream: | |||||
Enabled: false | |||||
Style/HashEachMethods: | Style/HashEachMethods: | ||||
Enabled: true | Enabled: true | ||||
# This configuration was generated by | # This configuration was generated by | ||||
# `rubocop --auto-gen-config --exclude-limit 20 --no-offense-counts --no-auto-gen-timestamp` | # `rubocop --auto-gen-config --exclude-limit 20 --no-offense-counts --no-auto-gen-timestamp` | ||||
# using RuboCop version 1.17.0. | |||||
# using RuboCop version 1.24.0. | |||||
# The point is for the user to remove these configuration records | # The point is for the user to remove these configuration records | ||||
# one by one as the offenses are removed from the code base. | # one by one as the offenses are removed from the code base. | ||||
# Note that changes in the inspected code, or installation of new | # Note that changes in the inspected code, or installation of new | ||||
Layout/EmptyLineAfterGuardClause: | Layout/EmptyLineAfterGuardClause: | ||||
Exclude: | Exclude: | ||||
- 'db/migrate/101_populate_changesets_user_id.rb' | - 'db/migrate/101_populate_changesets_user_id.rb' | ||||
- 'lib/diff.rb' | |||||
- 'lib/redmine/default_data/loader.rb' | - 'lib/redmine/default_data/loader.rb' | ||||
- 'lib/redmine/safe_attributes.rb' | - 'lib/redmine/safe_attributes.rb' | ||||
- 'lib/redmine/string_array_diff/diff.rb' | |||||
- 'lib/redmine/string_array_diff/diffable.rb' | |||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
- 'db/migrate/20111201201315_add_unique_index_to_issue_relations.rb' | - 'db/migrate/20111201201315_add_unique_index_to_issue_relations.rb' | ||||
- 'db/migrate/20120115143126_set_default_repositories.rb' | - 'db/migrate/20120115143126_set_default_repositories.rb' | ||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | ||||
- 'test/mocks/open_id_authentication_mock.rb' | |||||
# Cop supports --auto-correct. | |||||
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment. | |||||
Layout/LeadingCommentSpace: | |||||
Exclude: | |||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb' | |||||
# Cop supports --auto-correct. | |||||
# Configuration parameters: EnforcedStyle, IndentationWidth. | |||||
# SupportedStyles: aligned, indented | |||||
Layout/LineEndStringConcatenationIndentation: | |||||
Enabled: false | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: EnforcedStyle. | # Configuration parameters: EnforcedStyle. | ||||
Layout/SpaceInsideArrayLiteralBrackets: | Layout/SpaceInsideArrayLiteralBrackets: | ||||
Exclude: | Exclude: | ||||
- 'app/models/query.rb' | - 'app/models/query.rb' | ||||
- 'lib/diff.rb' | |||||
- 'lib/redmine/string_array_diff/diff.rb' | |||||
- 'test/unit/mailer_localisation_test.rb' | - 'test/unit/mailer_localisation_test.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: EnforcedStyle. | # Configuration parameters: EnforcedStyle. | ||||
# SupportedStyles: space, no_space | |||||
# SupportedStyles: space, compact, no_space | |||||
Layout/SpaceInsideParens: | Layout/SpaceInsideParens: | ||||
Exclude: | Exclude: | ||||
- 'app/helpers/issues_helper.rb' | - 'app/helpers/issues_helper.rb' | ||||
- 'test/unit/custom_field_test.rb' | - 'test/unit/custom_field_test.rb' | ||||
- 'test/unit/member_test.rb' | - 'test/unit/member_test.rb' | ||||
# Cop supports --auto-correct. | |||||
Lint/AmbiguousOperatorPrecedence: | |||||
Enabled: false | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
Lint/AmbiguousRegexpLiteral: | Lint/AmbiguousRegexpLiteral: | ||||
Enabled: false | Enabled: false | ||||
Lint/MissingSuper: | Lint/MissingSuper: | ||||
Exclude: | Exclude: | ||||
- 'app/models/query.rb' | - 'app/models/query.rb' | ||||
- 'lib/redmine/diff_table.rb' | |||||
- 'lib/redmine/scm/adapters/bazaar_adapter.rb' | - 'lib/redmine/scm/adapters/bazaar_adapter.rb' | ||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb' | - 'lib/redmine/scm/adapters/cvs_adapter.rb' | ||||
- 'lib/redmine/scm/adapters/filesystem_adapter.rb' | - 'lib/redmine/scm/adapters/filesystem_adapter.rb' | ||||
Lint/NonDeterministicRequireOrder: | Lint/NonDeterministicRequireOrder: | ||||
Exclude: | Exclude: | ||||
- 'lib/redmine/core_ext.rb' | - 'lib/redmine/core_ext.rb' | ||||
- 'lib/redmine/twofa.rb' | |||||
Lint/OutOfRangeRegexpRef: | Lint/OutOfRangeRegexpRef: | ||||
Exclude: | Exclude: | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
Lint/SendWithMixinArgument: | Lint/SendWithMixinArgument: | ||||
Exclude: | Exclude: | ||||
- 'lib/redmine/acts/positioned.rb' | |||||
- 'test/object_helpers.rb' | - 'test/object_helpers.rb' | ||||
Lint/ShadowingOuterLocalVariable: | Lint/ShadowingOuterLocalVariable: | ||||
- 'app/models/time_entry_activity.rb' | - 'app/models/time_entry_activity.rb' | ||||
- 'lib/redmine/helpers/gantt.rb' | - 'lib/redmine/helpers/gantt.rb' | ||||
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms. | |||||
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms. | |||||
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src | |||||
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS | # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS | ||||
Naming/FileName: | Naming/FileName: | ||||
Exclude: | Exclude: | ||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: AutoCorrect. | |||||
Performance/StringInclude: | Performance/StringInclude: | ||||
Exclude: | Exclude: | ||||
- 'test/functional/versions_controller_test.rb' | - 'test/functional/versions_controller_test.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
Rails/ContentTag: | Rails/ContentTag: | ||||
Enabled: false | |||||
Exclude: | |||||
- 'lib/redmine/wiki_formatting/markdown/formatter.rb' | |||||
# Configuration parameters: Include. | # Configuration parameters: Include. | ||||
# Include: db/migrate/*.rb | # Include: db/migrate/*.rb | ||||
- 'app/models/import.rb' | - 'app/models/import.rb' | ||||
- 'app/models/setting.rb' | - 'app/models/setting.rb' | ||||
- 'config/environment.rb' | - 'config/environment.rb' | ||||
- 'config/initializers/00-core_plugins.rb' | |||||
- 'config/initializers/10-patches.rb' | - 'config/initializers/10-patches.rb' | ||||
- 'lib/redmine/configuration.rb' | - 'lib/redmine/configuration.rb' | ||||
- 'lib/redmine/plugin.rb' | |||||
- 'lib/redmine/twofa.rb' | - 'lib/redmine/twofa.rb' | ||||
- 'lib/redmine/version.rb' | - 'lib/redmine/version.rb' | ||||
- 'test/application_system_test_case.rb' | - 'test/application_system_test_case.rb' | ||||
- 'test/functional/custom_fields_controller_test.rb' | - 'test/functional/custom_fields_controller_test.rb' | ||||
- 'test/functional/settings_controller_test.rb' | - 'test/functional/settings_controller_test.rb' | ||||
- 'test/test_helper.rb' | - 'test/test_helper.rb' | ||||
- 'test/unit/lib/redmine/configuration_test.rb' | |||||
- 'test/unit/lib/redmine/i18n_test.rb' | - 'test/unit/lib/redmine/i18n_test.rb' | ||||
- 'test/unit/lib/redmine/plugin_test.rb' | - 'test/unit/lib/redmine/plugin_test.rb' | ||||
- 'app/models/document_category.rb' | - 'app/models/document_category.rb' | ||||
- 'app/models/issue_priority.rb' | - 'app/models/issue_priority.rb' | ||||
- 'app/models/issue_status.rb' | - 'app/models/issue_status.rb' | ||||
- 'app/models/principal.rb' | |||||
- 'app/models/project.rb' | - 'app/models/project.rb' | ||||
- 'app/models/repository.rb' | |||||
- 'app/models/repository/mercurial.rb' | |||||
- 'app/models/time_entry_activity.rb' | - 'app/models/time_entry_activity.rb' | ||||
- 'app/models/tracker.rb' | - 'app/models/tracker.rb' | ||||
- 'app/models/user.rb' | |||||
- 'app/models/wiki.rb' | - 'app/models/wiki.rb' | ||||
- 'app/models/wiki_page.rb' | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: EnforcedStyle. | # Configuration parameters: EnforcedStyle. | ||||
Rails/NegateInclude: | Rails/NegateInclude: | ||||
Enabled: false | Enabled: false | ||||
# Cop supports --auto-correct. | |||||
# Configuration parameters: Include. | # Configuration parameters: Include. | ||||
# Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb | # Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb | ||||
Rails/Output: | Rails/Output: | ||||
Exclude: | Exclude: | ||||
- 'app/models/mail_handler.rb' | - 'app/models/mail_handler.rb' | ||||
- 'config/routes.rb' | - 'config/routes.rb' | ||||
- 'lib/redmine/unified_diff.rb' | |||||
- 'lib/redmine/diff.rb' | |||||
- 'lib/redmine/diff_table.rb' | |||||
Rails/OutputSafety: | Rails/OutputSafety: | ||||
Enabled: false | Enabled: false | ||||
- 'app/models/role.rb' | - 'app/models/role.rb' | ||||
- 'app/models/setting.rb' | - 'app/models/setting.rb' | ||||
- 'app/models/time_entry.rb' | - 'app/models/time_entry.rb' | ||||
- 'app/models/user.rb' | |||||
- 'app/models/user_preference.rb' | - 'app/models/user_preference.rb' | ||||
- 'app/models/wiki_page.rb' | - 'app/models/wiki_page.rb' | ||||
- 'app/models/query.rb' | - 'app/models/query.rb' | ||||
- 'app/models/role.rb' | - 'app/models/role.rb' | ||||
# Cop supports --auto-correct. | |||||
# Configuration parameters: Include. | |||||
# Include: spec/**/*.rb, test/**/*.rb | |||||
Rails/RedundantTravelBack: | |||||
Exclude: | |||||
- 'test/integration/sudo_mode_test.rb' | |||||
- 'test/system/sudo_mode_test.rb' | |||||
Rails/ReflectionClassName: | Rails/ReflectionClassName: | ||||
Exclude: | Exclude: | ||||
- 'lib/redmine/nested_set/issue_nested_set.rb' | - 'lib/redmine/nested_set/issue_nested_set.rb' | ||||
- 'app/models/user.rb' | - 'app/models/user.rb' | ||||
- 'config/initializers/00-core_plugins.rb' | - 'config/initializers/00-core_plugins.rb' | ||||
# Cop supports --auto-correct. | |||||
Security/IoMethods: | |||||
Exclude: | |||||
- 'Gemfile' | |||||
- 'app/models/attachment.rb' | |||||
- 'test/functional/mail_handler_controller_test.rb' | |||||
- 'test/unit/mail_handler_test.rb' | |||||
Security/Open: | Security/Open: | ||||
Exclude: | Exclude: | ||||
- 'app/models/version.rb' | - 'app/models/version.rb' | ||||
Style/AccessorGrouping: | Style/AccessorGrouping: | ||||
Exclude: | Exclude: | ||||
- 'app/models/user.rb' | - 'app/models/user.rb' | ||||
- 'lib/redmine/diff.rb' | |||||
- 'lib/redmine/helpers/gantt.rb' | - 'lib/redmine/helpers/gantt.rb' | ||||
- 'lib/redmine/unified_diff.rb' | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: EnforcedStyle. | # Configuration parameters: EnforcedStyle. | ||||
- 'lib/redmine/scm/adapters/filesystem_adapter.rb' | - 'lib/redmine/scm/adapters/filesystem_adapter.rb' | ||||
- 'lib/redmine/scm/adapters/git_adapter.rb' | - 'lib/redmine/scm/adapters/git_adapter.rb' | ||||
- 'lib/redmine/scm/adapters/subversion_adapter.rb' | - 'lib/redmine/scm/adapters/subversion_adapter.rb' | ||||
- 'lib/redmine/wiki_formatting.rb' | |||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
- 'app/models/user.rb' | - 'app/models/user.rb' | ||||
- 'app/models/workflow_transition.rb' | - 'app/models/workflow_transition.rb' | ||||
- 'lib/redmine/access_control.rb' | - 'lib/redmine/access_control.rb' | ||||
- 'lib/redmine/diff_table.rb' | |||||
- 'lib/redmine/export/pdf/issues_pdf_helper.rb' | - 'lib/redmine/export/pdf/issues_pdf_helper.rb' | ||||
- 'lib/redmine/field_format.rb' | - 'lib/redmine/field_format.rb' | ||||
- 'lib/redmine/i18n.rb' | - 'lib/redmine/i18n.rb' | ||||
- 'lib/redmine/scm/adapters/bazaar_adapter.rb' | - 'lib/redmine/scm/adapters/bazaar_adapter.rb' | ||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb' | - 'lib/redmine/scm/adapters/cvs_adapter.rb' | ||||
- 'lib/redmine/scm/adapters/git_adapter.rb' | - 'lib/redmine/scm/adapters/git_adapter.rb' | ||||
- 'lib/redmine/unified_diff.rb' | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: EnforcedStyle. | # Configuration parameters: EnforcedStyle. | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
Style/ClassMethods: | Style/ClassMethods: | ||||
Exclude: | Exclude: | ||||
- 'lib/diff.rb' | |||||
- 'lib/redmine/string_array_diff/diff.rb' | |||||
Style/ClassVars: | Style/ClassVars: | ||||
Exclude: | Exclude: | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
Style/ColonMethodCall: | Style/ColonMethodCall: | ||||
Exclude: | Exclude: | ||||
- 'Gemfile' | |||||
- 'app/controllers/admin_controller.rb' | - 'app/controllers/admin_controller.rb' | ||||
- 'app/models/setting.rb' | - 'app/models/setting.rb' | ||||
- 'lib/redmine/configuration.rb' | - 'lib/redmine/configuration.rb' | ||||
Style/CombinableLoops: | Style/CombinableLoops: | ||||
Exclude: | Exclude: | ||||
- 'app/models/wiki_page.rb' | |||||
- 'app/models/wiki_annotate.rb' | |||||
- 'lib/redmine/default_data/loader.rb' | - 'lib/redmine/default_data/loader.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
- 'app/models/setting.rb' | - 'app/models/setting.rb' | ||||
- 'app/models/time_entry_import.rb' | - 'app/models/time_entry_import.rb' | ||||
- 'app/models/workflow_permission.rb' | - 'app/models/workflow_permission.rb' | ||||
- 'config/initializers/10-patches.rb' | |||||
- 'lib/redmine/acts/positioned.rb' | - 'lib/redmine/acts/positioned.rb' | ||||
- 'lib/redmine/configuration.rb' | - 'lib/redmine/configuration.rb' | ||||
- 'lib/redmine/i18n.rb' | - 'lib/redmine/i18n.rb' | ||||
Style/FormatString: | Style/FormatString: | ||||
Exclude: | Exclude: | ||||
- 'app/models/query.rb' | - 'app/models/query.rb' | ||||
- 'config/initializers/10-patches.rb' | |||||
- 'lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb' | - 'lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb' | ||||
- 'lib/redmine/export/csv.rb' | - 'lib/redmine/export/csv.rb' | ||||
- 'lib/redmine/helpers/gantt.rb' | - 'lib/redmine/helpers/gantt.rb' | ||||
# Configuration parameters: AllowedReceivers. | # Configuration parameters: AllowedReceivers. | ||||
Style/HashEachMethods: | Style/HashEachMethods: | ||||
Exclude: | Exclude: | ||||
- 'app/controllers/application_controller.rb' | |||||
- 'app/controllers/groups_controller.rb' | - 'app/controllers/groups_controller.rb' | ||||
- 'app/models/mailer.rb' | - 'app/models/mailer.rb' | ||||
- 'app/models/role.rb' | - 'app/models/role.rb' | ||||
- 'app/models/time_entry_query.rb' | - 'app/models/time_entry_query.rb' | ||||
- 'app/views/common/feed.atom.builder' | - 'app/views/common/feed.atom.builder' | ||||
- 'lib/redmine/helpers/gantt.rb' | - 'lib/redmine/helpers/gantt.rb' | ||||
- 'lib/redmine/wiki_formatting.rb' | |||||
- 'lib/redmine/wiki_formatting/links_helper.rb' | |||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
- 'lib/redmine/scm/adapters/filesystem_adapter.rb' | - 'lib/redmine/scm/adapters/filesystem_adapter.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: AllowMethodComparison. | |||||
Style/MultipleComparison: | Style/MultipleComparison: | ||||
Exclude: | Exclude: | ||||
- 'app/helpers/application_helper.rb' | - 'app/helpers/application_helper.rb' | ||||
- 'app/models/custom_field.rb' | - 'app/models/custom_field.rb' | ||||
- 'app/models/project.rb' | - 'app/models/project.rb' | ||||
- 'app/models/repository/cvs.rb' | - 'app/models/repository/cvs.rb' | ||||
- 'lib/diff.rb' | |||||
- 'lib/redmine/codeset_util.rb' | - 'lib/redmine/codeset_util.rb' | ||||
- 'lib/redmine/string_array_diff/diff.rb' | |||||
- 'lib/redmine/thumbnail.rb' | - 'lib/redmine/thumbnail.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
- 'test/unit/user_test.rb' | - 'test/unit/user_test.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: Strict. | |||||
# Configuration parameters: Strict, AllowedNumbers. | |||||
Style/NumericLiterals: | Style/NumericLiterals: | ||||
MinDigits: 9 | MinDigits: 9 | ||||
- 'app/models/user.rb' | - 'app/models/user.rb' | ||||
- 'app/models/wiki_content_version.rb' | - 'app/models/wiki_content_version.rb' | ||||
- 'config/initializers/10-patches.rb' | - 'config/initializers/10-patches.rb' | ||||
- 'lib/redmine.rb' | |||||
- 'lib/redmine/preparation.rb' | |||||
- 'test/integration/lib/redmine/menu_manager_test.rb' | - 'test/integration/lib/redmine/menu_manager_test.rb' | ||||
- 'test/unit/lib/redmine/menu_manager/menu_helper_test.rb' | - 'test/unit/lib/redmine/menu_manager/menu_helper_test.rb' | ||||
- 'test/unit/lib/redmine/menu_manager/menu_item_test.rb' | - 'test/unit/lib/redmine/menu_manager/menu_item_test.rb' | ||||
# Configuration parameters: Methods. | # Configuration parameters: Methods. | ||||
Style/RedundantArgument: | Style/RedundantArgument: | ||||
Exclude: | Exclude: | ||||
- 'app/controllers/account_controller.rb' | |||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb' | - 'lib/redmine/scm/adapters/cvs_adapter.rb' | ||||
- 'lib/redmine/scm/adapters/git_adapter.rb' | - 'lib/redmine/scm/adapters/git_adapter.rb' | ||||
- 'test/functional/projects_controller_test.rb' | - 'test/functional/projects_controller_test.rb' | ||||
- 'app/models/repository.rb' | - 'app/models/repository.rb' | ||||
- 'app/models/setting.rb' | - 'app/models/setting.rb' | ||||
- 'lib/redmine/codeset_util.rb' | - 'lib/redmine/codeset_util.rb' | ||||
- 'lib/redmine/plugin.rb' | |||||
- 'test/unit/issue_nested_set_concurrency_test.rb' | - 'test/unit/issue_nested_set_concurrency_test.rb' | ||||
- 'test/unit/project_nested_set_concurrency_test.rb' | - 'test/unit/project_nested_set_concurrency_test.rb' | ||||
- 'test/unit/query_test.rb' | - 'test/unit/query_test.rb' | ||||
- 'app/views/journals/index.builder' | - 'app/views/journals/index.builder' | ||||
- 'lib/redmine/helpers/time_report.rb' | - 'lib/redmine/helpers/time_report.rb' | ||||
- 'lib/redmine/scm/adapters/subversion_adapter.rb' | - 'lib/redmine/scm/adapters/subversion_adapter.rb' | ||||
- 'lib/redmine/wiki_formatting.rb' | |||||
- 'lib/redmine/wiki_formatting/links_helper.rb' | |||||
- 'test/functional/versions_controller_test.rb' | - 'test/functional/versions_controller_test.rb' | ||||
- 'test/functional/watchers_controller_test.rb' | - 'test/functional/watchers_controller_test.rb' | ||||
Exclude: | Exclude: | ||||
- 'lib/redmine/menu_manager.rb' | - 'lib/redmine/menu_manager.rb' | ||||
# Cop supports --auto-correct. | |||||
Style/RedundantSelfAssignmentBranch: | |||||
Exclude: | |||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb' | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
Style/RedundantSort: | Style/RedundantSort: | ||||
Exclude: | Exclude: | ||||
Style/SafeNavigation: | Style/SafeNavigation: | ||||
Enabled: false | Enabled: false | ||||
# Cop supports --auto-correct. | |||||
Style/SelectByRegexp: | |||||
Exclude: | |||||
- 'app/models/user.rb' | |||||
- 'test/application_system_test_case.rb' | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
Style/SelfAssignment: | Style/SelfAssignment: | ||||
Exclude: | Exclude: | ||||
- 'app/models/user_import.rb' | - 'app/models/user_import.rb' | ||||
- 'app/models/version.rb' | - 'app/models/version.rb' | ||||
- 'app/models/watcher.rb' | - 'app/models/watcher.rb' | ||||
- 'app/models/wiki_annotate.rb' | |||||
- 'app/models/wiki_page.rb' | - 'app/models/wiki_page.rb' | ||||
- 'lib/redmine/core_ext/active_record.rb' | |||||
- 'app/validators/date_validator.rb' | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: . | |||||
# Configuration parameters: RequireEnglish. | |||||
# SupportedStyles: use_perl_names, use_english_names | # SupportedStyles: use_perl_names, use_english_names | ||||
Style/SpecialGlobalVars: | Style/SpecialGlobalVars: | ||||
EnforcedStyle: use_perl_names | EnforcedStyle: use_perl_names | ||||
- 'app/models/user.rb' | - 'app/models/user.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: Mode. | |||||
Style/StringConcatenation: | Style/StringConcatenation: | ||||
Enabled: false | Enabled: false | ||||
- 'app/models/issue_query.rb' | - 'app/models/issue_query.rb' | ||||
- 'config/environment.rb' | - 'config/environment.rb' | ||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb' | - 'lib/redmine/scm/adapters/cvs_adapter.rb' | ||||
- 'lib/redmine/wiki_formatting.rb' | |||||
- 'lib/redmine/wiki_formatting/links_helper.rb' | |||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' | ||||
- 'test/unit/member_test.rb' | - 'test/unit/member_test.rb' | ||||
Exclude: | Exclude: | ||||
- 'app/controllers/auth_sources_controller.rb' | - 'app/controllers/auth_sources_controller.rb' | ||||
- 'app/controllers/trackers_controller.rb' | - 'app/controllers/trackers_controller.rb' | ||||
- 'lib/redmine/diff_table.rb' | |||||
- 'lib/redmine/scm/adapters/abstract_adapter.rb' | - 'lib/redmine/scm/adapters/abstract_adapter.rb' | ||||
- 'lib/redmine/unified_diff.rb' | |||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
Style/VariableInterpolation: | Style/VariableInterpolation: | ||||
- 'test/unit/custom_field_test.rb' | - 'test/unit/custom_field_test.rb' | ||||
# Cop supports --auto-correct. | # Cop supports --auto-correct. | ||||
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. | |||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. | |||||
# URISchemes: http, https | # URISchemes: http, https | ||||
Layout/LineLength: | Layout/LineLength: | ||||
Max: 194 | Max: 194 |
source 'https://rubygems.org' | source 'https://rubygems.org' | ||||
ruby '>= 2.5.0', '< 3.1.0' | |||||
ruby '>= 2.5.0', '< 3.2.0' | |||||
gem 'bundler', '>= 1.12.0' | gem 'bundler', '>= 1.12.0' | ||||
gem 'rails', '6.1.4.1' | |||||
gem 'rails', '6.1.4.4' | |||||
gem 'globalid', '~> 0.4.2' if Gem.ruby_version < Gem::Version.new('2.6.0') | gem 'globalid', '~> 0.4.2' if Gem.ruby_version < Gem::Version.new('2.6.0') | ||||
gem 'rouge', '~> 3.26.0' | |||||
gem 'rouge', '~> 3.27.0' | |||||
gem 'request_store', '~> 1.5.0' | gem 'request_store', '~> 1.5.0' | ||||
gem 'mini_mime', '~> 1.1.0' | gem 'mini_mime', '~> 1.1.0' | ||||
gem "actionpack-xml_parser" | gem "actionpack-xml_parser" | ||||
gem 'roadie-rails', '~> 2.2.0' | |||||
gem 'roadie-rails', (Gem.ruby_version < Gem::Version.new('2.6.0') ? '~> 2.2.0' : '~> 2.3.0') | |||||
gem 'marcel' | gem 'marcel' | ||||
gem "mail", "~> 2.7.1" | gem "mail", "~> 2.7.1" | ||||
gem 'csv', '~> 3.2.0' | gem 'csv', '~> 3.2.0' | ||||
gem 'nokogiri', '~> 1.12.2' | |||||
gem 'nokogiri', (Gem.ruby_version < Gem::Version.new('2.6.0') ? '~> 1.12.2' : '~> 1.13.0') | |||||
gem 'i18n', '~> 1.8.2' | gem 'i18n', '~> 1.8.2' | ||||
gem "rbpdf", "~> 1.20.0" | gem "rbpdf", "~> 1.20.0" | ||||
gem 'addressable' | gem 'addressable' | ||||
gem 'rubyzip', '~> 2.3.0' | gem 'rubyzip', '~> 2.3.0' | ||||
gem 'net-smtp', '~> 0.3.0' | |||||
gem 'net-imap', '~> 0.2.2' | |||||
gem 'net-pop', '~> 0.1.1' | |||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem | ||||
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] | gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] | ||||
gem 'net-ldap', '~> 0.17.0' | gem 'net-ldap', '~> 0.17.0' | ||||
end | end | ||||
# Optional gem for OpenID authentication | |||||
group :openid do | |||||
gem "ruby-openid", "~> 2.9.2", :require => "openid" | |||||
gem "rack-openid" | |||||
end | |||||
# Optional gem for exporting the gantt to a PNG file | # Optional gem for exporting the gantt to a PNG file | ||||
group :minimagick do | group :minimagick do | ||||
gem 'mini_magick', '~> 4.11.0' | gem 'mini_magick', '~> 4.11.0' | ||||
end | end | ||||
group :development do | group :development do | ||||
gem 'listen', '~> 3.3' | |||||
gem "yard" | gem "yard" | ||||
end | end | ||||
gem "ffi", platforms: [:mingw, :x64_mingw, :mswin] | gem "ffi", platforms: [:mingw, :x64_mingw, :mswin] | ||||
# For running system tests | # For running system tests | ||||
gem 'puma' | gem 'puma' | ||||
gem 'capybara', '~> 3.35.3' | |||||
gem "selenium-webdriver" | |||||
gem 'webdrivers', '~> 4.4', require: false | |||||
gem 'capybara', (Gem.ruby_version < Gem::Version.new('2.6.0') ? '~> 3.35.3' : '~> 3.36.0') | |||||
gem "selenium-webdriver", "~> 3.142.7" | |||||
gem 'webdrivers', '4.6.1', require: false | |||||
# RuboCop | # RuboCop | ||||
gem 'rubocop', '~> 1.17.0' | |||||
gem 'rubocop-performance', '~> 1.11.0' | |||||
gem 'rubocop-rails', '~> 2.11.0' | |||||
gem 'rubocop', '~> 1.24.0' | |||||
gem 'rubocop-performance', '~> 1.13.0' | |||||
gem 'rubocop-rails', '~> 2.13.0' | |||||
end | end | ||||
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") | local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") | ||||
if File.exists?(local_gemfile) | |||||
if File.exist?(local_gemfile) | |||||
eval_gemfile local_gemfile | eval_gemfile local_gemfile | ||||
end | end | ||||
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
skip_before_action :check_if_login_required, :check_password_change | skip_before_action :check_if_login_required, :check_password_change | ||||
skip_before_action :check_twofa_activation, :only => :logout | skip_before_action :check_twofa_activation, :only => :logout | ||||
# Overrides ApplicationController#verify_authenticity_token to disable | |||||
# token verification on openid callbacks | |||||
def verify_authenticity_token | |||||
unless using_open_id? | |||||
super | |||||
end | |||||
end | |||||
# Login request and validation | # Login request and validation | ||||
def login | def login | ||||
if request.post? | if request.post? | ||||
redirect_to my_account_path | redirect_to my_account_path | ||||
end | end | ||||
else | else | ||||
unless user_params[:identity_url].present? && user_params[:password].blank? && user_params[:password_confirmation].blank? | |||||
unless user_params[:password].blank? && user_params[:password_confirmation].blank? | |||||
@user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation] | @user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation] | ||||
end | end | ||||
end | end | ||||
def authenticate_user | def authenticate_user | ||||
if Setting.openid? && using_open_id? | |||||
open_id_authenticate(params[:openid_url]) | |||||
else | |||||
password_authentication | |||||
end | |||||
password_authentication | |||||
end | end | ||||
def password_authentication | def password_authentication | ||||
update_sudo_timestamp! # activate Sudo Mode | update_sudo_timestamp! # activate Sudo Mode | ||||
end | end | ||||
def open_id_authenticate(openid_url) | |||||
back_url = signin_url(:autologin => params[:autologin]) | |||||
authenticate_with_open_id( | |||||
openid_url, :required => [:nickname, :fullname, :email], | |||||
:return_to => back_url, :method => :post | |||||
) do |result, identity_url, registration| | |||||
if result.successful? | |||||
user = User.find_or_initialize_by_identity_url(identity_url) | |||||
if user.new_record? | |||||
# Self-registration off | |||||
(redirect_to(home_url); return) unless Setting.self_registration? | |||||
# Create on the fly | |||||
user.login = registration['nickname'] unless registration['nickname'].nil? | |||||
user.mail = registration['email'] unless registration['email'].nil? | |||||
user.firstname, user.lastname = registration['fullname'].split(' ') unless registration['fullname'].nil? | |||||
user.random_password | |||||
user.register | |||||
case Setting.self_registration | |||||
when '1' | |||||
register_by_email_activation(user) do | |||||
onthefly_creation_failed(user) | |||||
end | |||||
when '3' | |||||
register_automatically(user) do | |||||
onthefly_creation_failed(user) | |||||
end | |||||
else | |||||
register_manually_by_administrator(user) do | |||||
onthefly_creation_failed(user) | |||||
end | |||||
end | |||||
else | |||||
# Existing record | |||||
if user.active? | |||||
successful_authentication(user) | |||||
else | |||||
handle_inactive_user(user) | |||||
end | |||||
end | |||||
end | |||||
end | |||||
end | |||||
def successful_authentication(user) | def successful_authentication(user) | ||||
logger.info "Successful authentication for '#{user.login}' from #{request.remote_ip} at #{Time.now.utc}" | logger.info "Successful authentication for '#{user.login}' from #{request.remote_ip} at #{Time.now.utc}" | ||||
# Valid user | # Valid user |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
rescue | rescue | ||||
nil | nil | ||||
end | end | ||||
unless klass && klass.reflect_on_association(:attachments) | |||||
unless klass && (klass.reflect_on_association(:attachments) || klass.method_defined?(:attachments)) | |||||
render_404 | render_404 | ||||
return | return | ||||
end | end |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
respond_to do |format| | respond_to do |format| | ||||
format.html {render :action => "show", :layout => !request.xhr?} | format.html {render :action => "show", :layout => !request.xhr?} | ||||
if @gantt.respond_to?('to_image') | |||||
if @gantt.respond_to?(:to_image) | |||||
format.png do | format.png do | ||||
send_data(@gantt.to_image, | send_data(@gantt.to_image, | ||||
:disposition => 'inline', :type => 'image/png', | :disposition => 'inline', :type => 'image/png', |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
url_params[:issue][:project_id] = @issue.project_id | url_params[:issue][:project_id] = @issue.project_id | ||||
redirect_to new_issue_path(url_params) | redirect_to new_issue_path(url_params) | ||||
end | end | ||||
elsif params[:follow] | |||||
redirect_to issue_path(@issue) | |||||
else | else | ||||
redirect_back_or_default issue_path(@issue) | redirect_back_or_default issue_path(@issue) | ||||
end | end |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
helper :issues | helper :issues | ||||
helper :custom_fields | helper :custom_fields | ||||
helper :queries | helper :queries | ||||
helper :attachments | |||||
include QueriesHelper | include QueriesHelper | ||||
def index | def index |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
return | return | ||||
end | end | ||||
retrieve_default_query | |||||
retrieve_project_query | retrieve_project_query | ||||
scope = project_scope | scope = project_scope | ||||
def retrieve_project_query | def retrieve_project_query | ||||
retrieve_query(ProjectQuery, false, :defaults => @default_columns_names) | retrieve_query(ProjectQuery, false, :defaults => @default_columns_names) | ||||
end | end | ||||
def retrieve_default_query | |||||
return if params[:query_id].present? | |||||
return if api_request? | |||||
return if params[:set_filter] && (params.key?(:op) || params.key?(:f)) | |||||
if params[:without_default].present? | |||||
params[:set_filter] = 1 | |||||
return | |||||
end | |||||
if default_query = ProjectQuery.default | |||||
params[:query_id] = default_query.id | |||||
end | |||||
end | |||||
end | end |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
def issue_report | def issue_report | ||||
with_subprojects = Setting.display_subprojects_issues? | with_subprojects = Setting.display_subprojects_issues? | ||||
@trackers = @project.rolled_up_trackers(with_subprojects).visible | @trackers = @project.rolled_up_trackers(with_subprojects).visible | ||||
@versions = @project.shared_versions.sorted | |||||
@versions = @project.shared_versions.sorted + [Version.new(:name => "[#{l(:label_none)}]")] | |||||
@priorities = IssuePriority.all.reverse | @priorities = IssuePriority.all.reverse | ||||
@categories = @project.issue_categories | |||||
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted | |||||
@categories = @project.issue_categories + [IssueCategory.new(:name => "[#{l(:label_none)}]")] | |||||
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted + [User.new(:firstname => "[#{l(:label_none)}]")] | |||||
@authors = @project.users.sorted | @authors = @project.users.sorted | ||||
@subprojects = @project.descendants.visible | @subprojects = @project.descendants.visible | ||||
@issues_by_tracker = Issue.by_tracker(@project, with_subprojects) | @issues_by_tracker = Issue.by_tracker(@project, with_subprojects) | ||||
@report_title = l(:field_tracker) | @report_title = l(:field_tracker) | ||||
when "version" | when "version" | ||||
@field = "fixed_version_id" | @field = "fixed_version_id" | ||||
@rows = @project.shared_versions.sorted | |||||
@rows = @project.shared_versions.sorted + [Version.new(:name => "[#{l(:label_none)}]")] | |||||
@data = Issue.by_version(@project, with_subprojects) | @data = Issue.by_version(@project, with_subprojects) | ||||
@report_title = l(:field_version) | @report_title = l(:field_version) | ||||
when "priority" | when "priority" | ||||
@report_title = l(:field_priority) | @report_title = l(:field_priority) | ||||
when "category" | when "category" | ||||
@field = "category_id" | @field = "category_id" | ||||
@rows = @project.issue_categories | |||||
@rows = @project.issue_categories + [IssueCategory.new(:name => "[#{l(:label_none)}]")] | |||||
@data = Issue.by_category(@project, with_subprojects) | @data = Issue.by_category(@project, with_subprojects) | ||||
@report_title = l(:field_category) | @report_title = l(:field_category) | ||||
when "assigned_to" | when "assigned_to" | ||||
@field = "assigned_to_id" | @field = "assigned_to_id" | ||||
@rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted | |||||
@rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted + [User.new(:firstname => "[#{l(:label_none)}]")] | |||||
@data = Issue.by_assigned_to(@project, with_subprojects) | @data = Issue.by_assigned_to(@project, with_subprojects) | ||||
@report_title = l(:field_assigned_to) | @report_title = l(:field_assigned_to) | ||||
when "author" | when "author" |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
image_tag( | image_tag( | ||||
thumbnail_path(attachment), | thumbnail_path(attachment), | ||||
:srcset => "#{thumbnail_path(attachment, :size => thumbnail_size * 2)} 2x", | :srcset => "#{thumbnail_path(attachment, :size => thumbnail_size * 2)} 2x", | ||||
:style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;" | |||||
:style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;", | |||||
:loading => "lazy" | |||||
), | ), | ||||
attachment_path( | attachment_path( | ||||
attachment | attachment | ||||
# when using an image link, try to use an attachment, if possible | # when using an image link, try to use an attachment, if possible | ||||
attachments = options[:attachments] || [] | attachments = options[:attachments] || [] | ||||
attachments += obj.attachments if obj.respond_to?(:attachments) | |||||
if obj.is_a?(Journal) | |||||
attachments += obj.journalized.attachments if obj.journalized.respond_to?(:attachments) | |||||
else | |||||
attachments += obj.attachments if obj.respond_to?(:attachments) | |||||
end | |||||
if attachments.present? | if attachments.present? | ||||
text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))"(\s+alt="([^"]*)")?/i) do |m| | text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))"(\s+alt="([^"]*)")?/i) do |m| | ||||
filename, ext, alt, alttext = $1, $2, $3, $4 | filename, ext, alt, alttext = $1, $2, $3, $4 | ||||
if !desc.blank? && alttext.blank? | if !desc.blank? && alttext.blank? | ||||
alt = " title=\"#{desc}\" alt=\"#{desc}\"" | alt = " title=\"#{desc}\" alt=\"#{desc}\"" | ||||
end | end | ||||
"src=\"#{image_url}\"#{alt}" | |||||
"src=\"#{image_url}\"#{alt} loading=\"lazy\"" | |||||
else | else | ||||
m | m | ||||
end | end |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
value = "##{detail.value}" unless detail.value.blank? | value = "##{detail.value}" unless detail.value.blank? | ||||
old_value = "##{detail.old_value}" unless detail.old_value.blank? | old_value = "##{detail.old_value}" unless detail.old_value.blank? | ||||
when 'child_id' | |||||
label = l(:label_subtask) | |||||
value = "##{detail.value}" unless detail.value.blank? | |||||
old_value = "##{detail.old_value}" unless detail.old_value.blank? | |||||
multiple = true | |||||
when 'is_private' | when 'is_private' | ||||
value = l(detail.value == "0" ? :general_text_No : :general_text_Yes) unless detail.value.blank? | value = l(detail.value == "0" ? :general_text_No : :general_text_Yes) unless detail.value.blank? | ||||
old_value = l(detail.old_value == "0" ? :general_text_No : :general_text_Yes) unless detail.old_value.blank? | old_value = l(detail.old_value == "0" ? :general_text_No : :general_text_Yes) unless detail.old_value.blank? |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
indice = journal.indice || @journal.issue.visible_journals_with_index.find{|j| j.id == @journal.id}.indice | indice = journal.indice || @journal.issue.visible_journals_with_index.find{|j| j.id == @journal.id}.indice | ||||
dropbown_links << copy_object_url_link(issue_url(issue, anchor: "note-#{indice}", only_path: false)) | dropbown_links << copy_object_url_link(issue_url(issue, anchor: "note-#{indice}", only_path: false)) | ||||
if journal.attachments.size > 1 | |||||
dropbown_links << link_to(l(:label_download_all_attachments), | |||||
container_attachments_download_path(journal), | |||||
:title => l(:label_download_all_attachments), | |||||
:class => 'icon icon-download' | |||||
) | |||||
end | |||||
if journal.notes.present? | if journal.notes.present? | ||||
if options[:reply_links] | if options[:reply_links] | ||||
links << link_to(l(:button_quote), | links << link_to(l(:button_quote), | ||||
dropbown_links << link_to(l(:button_delete), | dropbown_links << link_to(l(:button_delete), | ||||
journal_path(journal, :journal => {:notes => ""}), | journal_path(journal, :journal => {:notes => ""}), | ||||
:remote => true, | :remote => true, | ||||
:method => 'put', :data => {:confirm => l(:text_are_you_sure)}, | |||||
:method => 'put', | |||||
:data => {:confirm => l(:text_are_you_sure)}, | |||||
:class => 'icon icon-del' | :class => 'icon icon-del' | ||||
) | ) | ||||
end | end |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
end | end | ||||
def aggregate_path(project, field, row, options={}) | def aggregate_path(project, field, row, options={}) | ||||
parameters = {:set_filter => 1, :subproject_id => '!*', field => row.id}.merge(options) | |||||
parameters = {:set_filter => 1, :subproject_id => '!*', field => (row.id || '!*')}.merge(options) | |||||
project_issues_path(row.is_a?(Project) ? row : project, parameters) | project_issues_path(row.is_a?(Project) ? row : project, parameters) | ||||
end | end | ||||
end | end |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
[[l(:label_none), '']] + IssueQuery.only_public.where(project_id: nil).pluck(:name, :id) | [[l(:label_none), '']] + IssueQuery.only_public.where(project_id: nil).pluck(:name, :id) | ||||
end | end | ||||
def default_global_project_query_options | |||||
[[l(:label_none), '']] + ProjectQuery.only_public.pluck(:name, :id) | |||||
end | |||||
def cross_project_subtasks_options | def cross_project_subtasks_options | ||||
options = [ | options = [ | ||||
[:label_disabled, ''], | [:label_disabled, ''], |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License | ||||
grouped_options_for_select(grouped, user.pref.default_issue_query) | grouped_options_for_select(grouped, user.pref.default_issue_query) | ||||
end | end | ||||
def default_project_query_options(user) | |||||
global_queries = ProjectQuery | |||||
global_public_queries = global_queries.only_public | |||||
global_user_queries = global_queries.where(user_id: user.id).where.not(id: global_public_queries.ids) | |||||
label = user == User.current ? 'label_my_queries' : 'label_default_queries.for_this_user' | |||||
grouped = { | |||||
l('label_default_queries.for_all_users') => global_public_queries.pluck(:name, :id), | |||||
l(".#{label}") => global_user_queries.pluck(:name, :id), | |||||
} | |||||
grouped_options_for_select(grouped, user.pref.default_project_query) | |||||
end | |||||
def textarea_font_options | def textarea_font_options | ||||
[[l(:label_font_default), '']] + UserPreference::TEXTAREA_FONT_OPTIONS.map {|o| [l("label_font_#{o}"), o]} | [[l(:label_font_default), '']] + UserPreference::TEXTAREA_FONT_OPTIONS.map {|o| [l("label_font_#{o}"), o]} | ||||
end | end |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |
# frozen_string_literal: true | # frozen_string_literal: true | ||||
# Redmine - project management software | # Redmine - project management software | ||||
# Copyright (C) 2006-2021 Jean-Philippe Lang | |||||
# Copyright (C) 2006-2022 Jean-Philippe Lang | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License | # modify it under the terms of the GNU General Public License |