opf/openproject

View on GitHub

Showing 1,042 of 1,682 total issues

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

  private openInLocationAction():FloatingAction {
    return new FloatingAction(
      'folder-open',
      this.text.title.openFileLocation,
      undefined,
frontend/src/app/shared/components/storages/file-link-list-item/file-link-list-item.component.ts on lines 241..248

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

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

  module V3
    module Queries
      module Schemas
        class AccessToProjectFilterDependencyRepresenter <
          PrincipalFilterDependencyRepresenter
lib/api/v3/queries/schemas/project_members_filter_dependency_representer.rb on lines 30..55

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

  module V3
    module Queries
      module Schemas
        class ProjectMembersFilterDependencyRepresenter <
          PrincipalFilterDependencyRepresenter
lib/api/v3/queries/schemas/access_to_project_filter_dependency_representer.rb on lines 30..55

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

  constructor(private HookService:HookService,
    private UrlParamsHelper:UrlParamsHelperService,
    private wpViewRepresentation:WorkPackageViewDisplayRepresentationService,
    private wpViewTimeline:WorkPackageViewTimelineService,
    private wpViewIndent:WorkPackageViewHierarchyIdentationService,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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

  constructor(readonly injector:Injector,
    readonly I18n:I18nService,
    readonly states:States,
    readonly querySpace:IsolatedQuerySpace,
    readonly Banners:BannersService,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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

  constructor(protected $state:StateService,
    protected states:States,
    protected halEvents:HalEventsService,
    protected notificationService:WorkPackageNotificationService,
    protected pathHelper:PathHelperService,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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

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

      wrapper.addEventListener('scroll', (evt:Event) => {
        if (that.active && !that.portalHostElement.contains(evt.target as Element)) {
          that.close();
        }
      }, true);
frontend/src/app/shared/components/op-context-menu/op-context-menu.service.ts on lines 70..74

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

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

  constructor(
    readonly I18n:I18nService,
    readonly elementRef:ElementRef,
    readonly bannersService:BannersService,
    readonly apiV3Service:ApiV3Service,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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

  constructor(
    readonly wpTableFilters:WorkPackageViewFiltersService,
    readonly wpTableBaseline:WorkPackageViewBaselineService,
    readonly schemaCache:SchemaCacheService,
    readonly I18n:I18nService,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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

  constructor(
    readonly I18n:I18nService,
    readonly timezoneService:TimezoneService,
    readonly injector:Injector,
    readonly cdRef:ChangeDetectorRef,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45

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

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

export function uiRouterBoardsConfiguration(uiRouter:UIRouter) {
  // Ensure boards/ are being redirected correctly
  // cf., https://community.openproject.com/wp/29754
  uiRouter.urlService.rules
    .when(
frontend/src/app/features/dashboards/openproject-dashboards.module.ts on lines 52..60

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

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

  constructor(readonly opModalService:OpModalService,
    readonly authorisationService:AuthorisationService,
    private readonly querySpace:IsolatedQuerySpace,
    private readonly boardService:BoardService,
    private readonly boardActionRegistry:BoardActionsRegistryService,
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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

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

      wrapper.addEventListener('click', (evt:Event) => {
        if (that.active && !that.portalHostElement.contains(evt.target as Element)) {
          that.close();
        }
      });
frontend/src/app/shared/components/op-context-menu/op-context-menu.service.ts on lines 76..80

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

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

  constructor(readonly elementRef:ElementRef,
    readonly I18n:I18nService,
    protected http:HttpClient,
    protected toastService:ToastService,
    public eeTrialService:EnterpriseTrialService,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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

  constructor(
    readonly wpTabsService:WorkPackageTabsService,
    readonly I18n:I18nService,
    readonly injector:Injector,
    readonly $state:StateService,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/boards/board/board-list/board-lists.service.ts on lines 22..30
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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

export function uiRouterDashboardsConfiguration(uiRouter:UIRouter) {
  // Ensure boards/ are being redirected correctly
  // cf., https://community.openproject.com/wp/29754
  uiRouter.urlService.rules
    .when(
frontend/src/app/features/boards/openproject-boards.routes.ts on lines 97..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 62.

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

  constructor(
    private readonly CurrentProject:CurrentProjectService,
    private readonly pathHelper:PathHelperService,
    private readonly apiV3Service:ApiV3Service,
    private readonly halResourceService:HalResourceService,
frontend/src/app/features/boards/board/board-list/board-list-menu.component.ts on lines 51..57
frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts on lines 67..73
frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.ts on lines 93..100
frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.ts on lines 90..98
frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts on lines 40..47
frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts on lines 60..66
frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts on lines 76..82
frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.ts on lines 37..45
frontend/src/app/shared/components/datepicker/sheet/date-picker-sheet.component.ts on lines 80..88

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

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.attributeDrake = this
      .dragula
      .createGroup('attributes', {
        moves: (el, source, handle:HTMLElement) => handle.classList.contains('attribute-handle'),
      })
frontend/src/app/features/admin/types/type-form-configuration.component.ts on lines 118..123

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

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.groupsDrake = this
      .dragula
      .createGroup('groups', {
        moves: (el, source, handle:HTMLElement) => handle.classList.contains('group-handle'),
      })
frontend/src/app/features/admin/types/type-form-configuration.component.ts on lines 126..131

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

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

  constructor(
    readonly elementRef:ElementRef,
    readonly opContextMenu:OPContextMenuService,
    readonly browserDetector:BrowserDetector,
    readonly wpCreate:WorkPackageCreateService,
frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.ts on lines 50..56
frontend/src/app/shared/components/grids/widgets/project-details/project-details.component.ts on lines 49..57
frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.ts on lines 66..72
frontend/src/app/shared/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts on lines 44..52
frontend/src/app/shared/components/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts on lines 21..27

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

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