opf/openproject

View on GitHub

Showing 1,045 of 1,693 total issues

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

  public text = {
    label_previous: this.I18n.t('js.pagination.pages.previous'),
    label_next: this.I18n.t('js.pagination.pages.next'),
    per_page: this.I18n.t('js.label_per_page'),
    no_other_page: this.I18n.t('js.pagination.no_other_page'),
frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts on lines 96..101
frontend/src/app/features/projects/components/new-project/new-project.component.ts on lines 38..43
frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.ts on lines 30..35
frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts on lines 71..76
frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts on lines 94..99
frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.ts on lines 46..52
frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.component.ts on lines 48..53
frontend/src/app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component.ts on lines 59..64
frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts on lines 81..86
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts on lines 18..23
frontend/src/app/shared/components/modals/share-modal/query-sharing-form.component.ts on lines 27..33
frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts on lines 55..60
frontend/src/app/shared/components/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts on lines 42..48
modules/github_integration/frontend/module/pull-request/pull-request.component.ts on lines 57..62
modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts on lines 48..53

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 74.

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 17 locations. Consider refactoring.
Open

  text = {
    use_template: this.I18n.t('js.project.use_template'),
    no_template_selected: this.I18n.t('js.project.no_template_selected'),
    advancedSettingsLabel: this.I18n.t('js.forms.advanced_settings'),
    copySettingsLabel: this.I18n.t('js.project.copy.copy_options'),
frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts on lines 96..101
frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.ts on lines 30..35
frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts on lines 71..76
frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts on lines 94..99
frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.ts on lines 46..52
frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.component.ts on lines 48..53
frontend/src/app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component.ts on lines 59..64
frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts on lines 81..86
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts on lines 18..23
frontend/src/app/shared/components/modals/share-modal/query-sharing-form.component.ts on lines 27..33
frontend/src/app/shared/components/table-pagination/table-pagination.component.ts on lines 63..68
frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts on lines 55..60
frontend/src/app/shared/components/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts on lines 42..48
modules/github_integration/frontend/module/pull-request/pull-request.component.ts on lines 57..62
modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts on lines 48..53

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 74.

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 5 locations. Consider refactoring.
Open

    project: {
      singular: this.I18n.t('js.label_project'),
      plural: this.I18n.t('js.label_project_plural'),
      list: this.I18n.t('js.label_project_list'),
      select: this.I18n.t('js.label_select_project'),
frontend/src/app/features/admin/types/type-banner.service.ts on lines 17..22
frontend/src/app/features/invite-user-modal/principal/principal.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/sort-by-tab.component.ts on lines 34..39
frontend/src/app/shared/components/storages/location-picker-modal/location-picker-modal.component.ts on lines 72..77

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 74.

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 17 locations. Consider refactoring.
Open

  public text = {
    now_meets_filter_criteria: this.I18n.t('js.baseline.legends.now_meets_filter_criteria'),
    no_longer_meets_filter_criteria: this.I18n.t('js.baseline.legends.no_longer_meets_filter_criteria'),
    maintained_with_changes: this.I18n.t('js.baseline.legends.maintained_with_changes'),
    in_your_timezone: this.I18n.t('js.baseline.legends.in_your_timezone'),
frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts on lines 96..101
frontend/src/app/features/projects/components/new-project/new-project.component.ts on lines 38..43
frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.ts on lines 30..35
frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts on lines 71..76
frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts on lines 94..99
frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.ts on lines 46..52
frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.component.ts on lines 48..53
frontend/src/app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component.ts on lines 59..64
frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts on lines 81..86
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts on lines 18..23
frontend/src/app/shared/components/modals/share-modal/query-sharing-form.component.ts on lines 27..33
frontend/src/app/shared/components/table-pagination/table-pagination.component.ts on lines 63..68
frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts on lines 55..60
frontend/src/app/shared/components/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts on lines 42..48
modules/github_integration/frontend/module/pull-request/pull-request.component.ts on lines 57..62
modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts on lines 48..53

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 74.

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 17 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'),
    label_pipelines: this.I18n.t('js.gitlab_integration.gitlab_pipelines'),
frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts on lines 96..101
frontend/src/app/features/projects/components/new-project/new-project.component.ts on lines 38..43
frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.ts on lines 30..35
frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts on lines 71..76
frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts on lines 94..99
frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.ts on lines 46..52
frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.component.ts on lines 48..53
frontend/src/app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component.ts on lines 59..64
frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts on lines 81..86
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts on lines 18..23
frontend/src/app/shared/components/modals/share-modal/query-sharing-form.component.ts on lines 27..33
frontend/src/app/shared/components/table-pagination/table-pagination.component.ts on lines 63..68
frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts on lines 55..60
frontend/src/app/shared/components/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts on lines 42..48
modules/github_integration/frontend/module/pull-request/pull-request.component.ts on lines 57..62

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 74.

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 17 locations. Consider refactoring.
Open

  text = {
    title: this.I18n.t('js.bcf.management'),
    delete: this.I18n.t('js.button_delete'),
    edit: this.I18n.t('js.button_edit'),
    areYouSure: this.I18n.t('js.text_are_you_sure'),
frontend/src/app/features/projects/components/new-project/new-project.component.ts on lines 38..43
frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.ts on lines 30..35
frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts on lines 71..76
frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts on lines 94..99
frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.ts on lines 46..52
frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.component.ts on lines 48..53
frontend/src/app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component.ts on lines 59..64
frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts on lines 81..86
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts on lines 18..23
frontend/src/app/shared/components/modals/share-modal/query-sharing-form.component.ts on lines 27..33
frontend/src/app/shared/components/table-pagination/table-pagination.component.ts on lines 63..68
frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts on lines 55..60
frontend/src/app/shared/components/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts on lines 42..48
modules/github_integration/frontend/module/pull-request/pull-request.component.ts on lines 57..62
modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts on lines 48..53

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 74.

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 17 locations. Consider refactoring.
Open

  public text = {
    edit_parent: this.I18n.t('js.relation_buttons.change_parent'),
    set_or_remove_parent: this.I18n.t('js.relations_autocomplete.parent_placeholder'),
    remove_parent: this.I18n.t('js.relation_buttons.remove_parent'),
    set_parent: this.I18n.t('js.relation_buttons.set_parent'),
frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts on lines 96..101
frontend/src/app/features/projects/components/new-project/new-project.component.ts on lines 38..43
frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.ts on lines 30..35
frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts on lines 71..76
frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts on lines 94..99
frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.ts on lines 46..52
frontend/src/app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component.ts on lines 59..64
frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts on lines 81..86
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts on lines 18..23
frontend/src/app/shared/components/modals/share-modal/query-sharing-form.component.ts on lines 27..33
frontend/src/app/shared/components/table-pagination/table-pagination.component.ts on lines 63..68
frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts on lines 55..60
frontend/src/app/shared/components/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts on lines 42..48
modules/github_integration/frontend/module/pull-request/pull-request.component.ts on lines 57..62
modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts on lines 48..53

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 74.

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 17 locations. Consider refactoring.
Open

  public text = {
    label_created_on: this.I18n.t('js.label_created_on'),
    label_updated_on: this.I18n.t('js.label_updated_on'),
    quote_comment: this.I18n.t('js.label_quote_comment'),
    edit_comment: this.I18n.t('js.label_edit_comment'),
frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts on lines 96..101
frontend/src/app/features/projects/components/new-project/new-project.component.ts on lines 38..43
frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.ts on lines 30..35
frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts on lines 71..76
frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.ts on lines 46..52
frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.component.ts on lines 48..53
frontend/src/app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component.ts on lines 59..64
frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts on lines 81..86
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts on lines 18..23
frontend/src/app/shared/components/modals/share-modal/query-sharing-form.component.ts on lines 27..33
frontend/src/app/shared/components/table-pagination/table-pagination.component.ts on lines 63..68
frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts on lines 55..60
frontend/src/app/shared/components/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts on lines 42..48
modules/github_integration/frontend/module/pull-request/pull-request.component.ts on lines 57..62
modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts on lines 48..53

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 74.

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 17 locations. Consider refactoring.
Open

  public text = {
    label_created_by: this.I18n.t('js.label_created_by'),
    label_last_updated_on: this.I18n.t('js.label_last_updated_on'),
    label_details: this.I18n.t('js.label_details'),
    label_actions: this.I18n.t('js.github_integration.github_actions'),
frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts on lines 96..101
frontend/src/app/features/projects/components/new-project/new-project.component.ts on lines 38..43
frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.ts on lines 30..35
frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts on lines 71..76
frontend/src/app/features/work-packages/components/wp-activity/user/user-activity.component.ts on lines 94..99
frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.ts on lines 46..52
frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.component.ts on lines 48..53
frontend/src/app/features/work-packages/components/wp-buttons/wp-create-button/wp-create-button.component.ts on lines 59..64
frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.ts on lines 81..86
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts on lines 18..23
frontend/src/app/shared/components/modals/share-modal/query-sharing-form.component.ts on lines 27..33
frontend/src/app/shared/components/table-pagination/table-pagination.component.ts on lines 63..68
frontend/src/app/shared/components/time_entries/edit/trigger-actions-entry.component.ts on lines 55..60
frontend/src/app/shared/components/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts on lines 42..48
modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts on lines 48..53

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 74.

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 5 locations. Consider refactoring.
Open

    sorting_mode: {
      description: this.I18n.t('js.work_packages.table_configuration.sorting_mode.description'),
      automatic: this.I18n.t('js.work_packages.table_configuration.sorting_mode.automatic'),
      manually: this.I18n.t('js.work_packages.table_configuration.sorting_mode.manually'),
      warning: this.I18n.t('js.work_packages.table_configuration.sorting_mode.warning'),
frontend/src/app/features/admin/types/type-banner.service.ts on lines 17..22
frontend/src/app/features/invite-user-modal/principal/principal.component.ts on lines 81..86
frontend/src/app/shared/components/header-project-select/header-project-select.component.ts on lines 130..135
frontend/src/app/shared/components/storages/location-picker-modal/location-picker-modal.component.ts on lines 72..77

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 74.

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 5 locations. Consider refactoring.
Open

      text: {
        title: this.I18n.t('js.types.attribute_groups.upgrade_to_ee'),
        text: this.I18n.t('js.types.attribute_groups.upgrade_to_ee_text'),
        button_continue: this.I18n.t('js.types.attribute_groups.more_information'),
        button_cancel: this.I18n.t('js.types.attribute_groups.nevermind'),
frontend/src/app/features/invite-user-modal/principal/principal.component.ts on lines 81..86
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/sort-by-tab.component.ts on lines 34..39
frontend/src/app/shared/components/header-project-select/header-project-select.component.ts on lines 130..135
frontend/src/app/shared/components/storages/location-picker-modal/location-picker-modal.component.ts on lines 72..77

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 74.

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

  isNonWorkingDay(date:Moment|string):boolean {
    const formatted = moment(date).format('YYYY-MM-DD');
    return (this.nonWorkingDays.findIndex((el) => el.date === formatted) !== -1);
  }
frontend/src/app/features/calendar/op-work-packages-calendar.service.ts on lines 154..157
frontend/src/app/features/work-packages/components/wp-table/timeline/container/wp-timeline-container.directive.ts on lines 394..397

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 74.

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<NewsResource>> {
    return this
      .halResourceService
      .get<CollectionResource<TimeEntryResource>>(this.path + listParamsString(params));
  }
frontend/src/app/core/apiv3/endpoints/notifications/apiv3-notifications-paths.ts on lines 67..71

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 74.

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<IHALCollection<INotification>> {
    return this
      .http
      .get<IHALCollection<INotification>>(this.path + listParamsString(params));
  }
frontend/src/app/core/apiv3/endpoints/news/apiv3-news-paths.ts on lines 53..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 74.

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

    {
      id: 2,
      subject: 'Workpackage 2',
      name: 'Workpackage 2',
      author: {
frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.spec.ts on lines 15..32

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 74.

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

  onStateChange():void {
    const value = (this.input.nativeElement as HTMLInputElement).checked;
    this.checkedChange.emit(value);
    this.onChange(value);
    this.onTouched(value);
Severity: Major
Found in frontend/src/app/spot/components/switch/switch.component.ts and 1 other location - About 1 hr to fix
frontend/src/app/spot/components/checkbox/checkbox.component.ts on lines 67..72

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 74.

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

    {
      id: 1,
      subject: 'Workpackage 1',
      name: 'Workpackage 1',
      author: {
frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.spec.ts on lines 33..50

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 74.

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

  onStateChange():void {
    const value = (this.input.nativeElement as HTMLInputElement).checked;
    this.checkedChange.emit(value);
    this.onChange(value);
    this.onTouched(value);
frontend/src/app/spot/components/switch/switch.component.ts on lines 73..78

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 74.

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

      const verticalHover = e.pageY >= Math.floor(previewElement.offset()!.top) && e.pageY < previewElement.offset()!.top + previewElement.height()!;
frontend/src/app/core/setup/globals/global-listeners/preview-trigger.service.ts on lines 105..105

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 73.

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

  private get eeGuardedShareRoute() {
    if (this.bannersService.eeShowBanners) {
      return { uiSref: 'work-packages.share_upsale', uiParams: null, uiOptions: { inherit: false } };
    }

frontend/src/app/shared/components/op-view-select/op-static-queries.service.ts on lines 261..273

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 73.

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