opf/openproject

View on GitHub

Showing 1,042 of 1,682 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    this.querySpace.query.values$()
      .pipe(
        this.untilDestroyed(),
      )
      .subscribe((queryUpdate) => {
frontend/src/app/shared/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts on lines 110..116

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  public list(params?:ApiV3ListParameters):Observable<CollectionResource<ProjectResource>> {
    return this
      .halResourceService
      .get<CollectionResource<ProjectResource>>(this.path + listParamsString(params))
      .pipe(
frontend/src/app/core/apiv3/endpoints/time-entries/apiv3-time-entries-paths.ts on lines 66..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    this.querySpace.queryForm.values$()
      .pipe(
        this.untilDestroyed(),
      )
      .subscribe((formUpdate) => {
frontend/src/app/shared/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts on lines 100..106

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

@Component({
  selector: 'spot-checkbox',
  templateUrl: './checkbox.component.html',
  providers: [{
    provide: NG_VALUE_ACCESSOR,
frontend/src/app/spot/components/toggle/toggle.component.ts on lines 18..98

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      if (target.tagName.toLowerCase() === 'select') {
        target.addEventListener('change', this.debouncedPreview);
      } else {
        target.addEventListener('input', this.debouncedPreview);
      }
frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.ts on lines 106..110

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      indexBy(actions:any) {
        const index = _.findIndex(actions, { key: 'log_time' });
        return index !== -1 ? index + 1 : actions.length;
      },
Severity: Major
Found in modules/costs/frontend/module/main.ts and 1 other location - About 1 hr to fix
modules/costs/frontend/module/main.ts on lines 53..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

@Component({
  selector: 'spot-toggle',
  templateUrl: './toggle.component.html',
  providers: [{
    provide: NG_VALUE_ACCESSOR,
Severity: Major
Found in frontend/src/app/spot/components/toggle/toggle.component.ts and 1 other location - About 1 hr to fix
frontend/src/app/spot/components/checkbox/checkbox.component.ts on lines 20..97

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      if (target.tagName.toLowerCase() === 'select') {
        target.removeEventListener('change', this.debouncedPreview);
      } else {
        target.removeEventListener('input', this.debouncedPreview);
      }
frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.ts on lines 87..91

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  module V3
    module Attachments
      class AttachmentsByDocumentAPI < ::API::OpenProjectAPI
        resources :attachments do
          helpers API::V3::Attachments::AttachmentsByContainerAPI::Helpers
lib/api/v3/attachments/attachments_by_wiki_page_api.rb on lines 30..51
modules/meeting/lib/api/v3/attachments/attachments_by_meeting_content_api.rb on lines 30..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  module V3
    module Attachments
      class AttachmentsByBudgetAPI < ::API::OpenProjectAPI
        resources :attachments do
          helpers API::V3::Attachments::AttachmentsByContainerAPI::Helpers
lib/api/v3/attachments/attachments_by_help_text_api.rb on lines 30..51
modules/grids/app/controllers/api/v3/attachments/attachments_by_grid_api.rb on lines 30..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  module V3
    module Attachments
      class AttachmentsByHelpTextAPI < ::API::OpenProjectAPI
        resources :attachments do
          helpers API::V3::Attachments::AttachmentsByContainerAPI::Helpers
Severity: Major
Found in lib/api/v3/attachments/attachments_by_help_text_api.rb and 2 other locations - About 1 hr to fix
modules/budgets/lib/api/v3/attachments/attachments_by_budget_api.rb on lines 30..51
modules/grids/app/controllers/api/v3/attachments/attachments_by_grid_api.rb on lines 30..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  module V3
    module Attachments
      class AttachmentsByWikiPageAPI < ::API::OpenProjectAPI
        resources :attachments do
          helpers API::V3::Attachments::AttachmentsByContainerAPI::Helpers
Severity: Major
Found in lib/api/v3/attachments/attachments_by_wiki_page_api.rb and 2 other locations - About 1 hr to fix
modules/documents/lib/api/v3/attachments/attachments_by_document_api.rb on lines 30..51
modules/meeting/lib/api/v3/attachments/attachments_by_meeting_content_api.rb on lines 30..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        property :file_links,
                 exec_context: :decorator,
                 getter: ->(*) {},
                 setter: ->(fragment:, **) do
                   next unless fragment.is_a?(Array)
lib/api/v3/attachments/attachable_payload_representer_mixin.rb on lines 40..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          property :attachments,
                   exec_context: :decorator,
                   getter: ->(*) {},
                   setter: ->(fragment:, **) do
                     next unless fragment.is_a?(Array)
lib/api/v3/work_packages/work_package_payload_representer.rb on lines 38..57

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  module V3
    module Attachments
      class AttachmentsByGridAPI < ::API::OpenProjectAPI
        resources :attachments do
          helpers API::V3::Attachments::AttachmentsByContainerAPI::Helpers
lib/api/v3/attachments/attachments_by_help_text_api.rb on lines 30..51
modules/budgets/lib/api/v3/attachments/attachments_by_budget_api.rb on lines 30..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  module V3
    module Attachments
      class AttachmentsByMeetingContentAPI < ::API::OpenProjectAPI
        resources :attachments do
          helpers API::V3::Attachments::AttachmentsByContainerAPI::Helpers
lib/api/v3/attachments/attachments_by_wiki_page_api.rb on lines 30..51
modules/documents/lib/api/v3/attachments/attachments_by_document_api.rb on lines 30..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

  public text = {
    label_created_by: this.I18n.t('js.label_created_by'),
    label_last_updated_on: this.I18n.t('js.gitlab_integration.updated_on'),
    label_details: this.I18n.t('js.label_details'),
  };
frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts on lines 64..68
frontend/src/app/features/boards/board/board-actions/version/version-board-header.component.ts on lines 45..49
frontend/src/app/features/enterprise/enterprise-trial.service.ts on lines 97..101
frontend/src/app/features/homescreen/blocks/new-features.component.ts on lines 79..83
frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts on lines 40..44
frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.ts on lines 104..108
frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.ts on lines 35..39
frontend/src/app/features/user-preferences/reminder-settings/immediate-reminders/immediate-reminder-settings.component.ts on lines 21..25
frontend/src/app/features/work-packages/components/wp-buttons/wp-status-button/wp-status-button.component.ts on lines 50..54
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-create/wp-relations-create.component.ts on lines 29..33
frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.ts on lines 70..74
frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.component.ts on lines 65..69
frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.modal.ts on lines 43..47
frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.ts on lines 124..128
frontend/src/app/shared/components/grids/widgets/members/members.component.ts on lines 28..32
frontend/src/app/shared/components/project-include/list/project-include-list.component.ts on lines 77..81
frontend/src/app/shared/components/time_entries/timer/timer-account-menu.component.ts on lines 54..58

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

  public text = {
    add: this.i18n.t('js.grid.widgets.members.add'),
    noResults: this.i18n.t('js.grid.widgets.members.no_results'),
    viewAll: this.i18n.t('js.grid.widgets.members.view_all_members'),
  };
frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts on lines 64..68
frontend/src/app/features/boards/board/board-actions/version/version-board-header.component.ts on lines 45..49
frontend/src/app/features/enterprise/enterprise-trial.service.ts on lines 97..101
frontend/src/app/features/homescreen/blocks/new-features.component.ts on lines 79..83
frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts on lines 40..44
frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.ts on lines 104..108
frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.ts on lines 35..39
frontend/src/app/features/user-preferences/reminder-settings/immediate-reminders/immediate-reminder-settings.component.ts on lines 21..25
frontend/src/app/features/work-packages/components/wp-buttons/wp-status-button/wp-status-button.component.ts on lines 50..54
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-create/wp-relations-create.component.ts on lines 29..33
frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.ts on lines 70..74
frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.component.ts on lines 65..69
frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.modal.ts on lines 43..47
frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.ts on lines 124..128
frontend/src/app/shared/components/project-include/list/project-include-list.component.ts on lines 77..81
frontend/src/app/shared/components/time_entries/timer/timer-account-menu.component.ts on lines 54..58
modules/gitlab_integration/frontend/module/issue/issue.component.ts on lines 47..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

  readonly text = {
    attachments: this.I18n.t('js.label_attachments'),
    edit: this.I18n.t('js.button_edit'),
    close: this.I18n.t('js.button_close'),
  };
frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts on lines 64..68
frontend/src/app/features/boards/board/board-actions/version/version-board-header.component.ts on lines 45..49
frontend/src/app/features/enterprise/enterprise-trial.service.ts on lines 97..101
frontend/src/app/features/homescreen/blocks/new-features.component.ts on lines 79..83
frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts on lines 40..44
frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.ts on lines 104..108
frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.ts on lines 35..39
frontend/src/app/features/user-preferences/reminder-settings/immediate-reminders/immediate-reminder-settings.component.ts on lines 21..25
frontend/src/app/features/work-packages/components/wp-buttons/wp-status-button/wp-status-button.component.ts on lines 50..54
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-create/wp-relations-create.component.ts on lines 29..33
frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.ts on lines 70..74
frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.component.ts on lines 65..69
frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.ts on lines 124..128
frontend/src/app/shared/components/grids/widgets/members/members.component.ts on lines 28..32
frontend/src/app/shared/components/project-include/list/project-include-list.component.ts on lines 77..81
frontend/src/app/shared/components/time_entries/timer/timer-account-menu.component.ts on lines 54..58
modules/gitlab_integration/frontend/module/issue/issue.component.ts on lines 47..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

  text = {
    title: this.I18n.t('js.reminders.settings.immediate.title'),
    explanation: this.I18n.t('js.reminders.settings.immediate.explanation'),
    mentioned: this.I18n.t('js.reminders.settings.immediate.mentioned'),
  };
frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts on lines 64..68
frontend/src/app/features/boards/board/board-actions/version/version-board-header.component.ts on lines 45..49
frontend/src/app/features/enterprise/enterprise-trial.service.ts on lines 97..101
frontend/src/app/features/homescreen/blocks/new-features.component.ts on lines 79..83
frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.ts on lines 40..44
frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.ts on lines 104..108
frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.ts on lines 35..39
frontend/src/app/features/work-packages/components/wp-buttons/wp-status-button/wp-status-button.component.ts on lines 50..54
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-create/wp-relations-create.component.ts on lines 29..33
frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.ts on lines 70..74
frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.component.ts on lines 65..69
frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.modal.ts on lines 43..47
frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.ts on lines 124..128
frontend/src/app/shared/components/grids/widgets/members/members.component.ts on lines 28..32
frontend/src/app/shared/components/project-include/list/project-include-list.component.ts on lines 77..81
frontend/src/app/shared/components/time_entries/timer/timer-account-menu.component.ts on lines 54..58
modules/gitlab_integration/frontend/module/issue/issue.component.ts on lines 47..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language