opf/openproject

View on GitHub

Showing 1,042 of 1,682 total issues

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

export class StoragesStore extends EntityStore<StoragesState> {
  constructor() {
    super(createInitialResourceState());
  }
}
Severity: Major
Found in frontend/src/app/core/state/storages/storages.store.ts and 16 other locations - About 40 mins to fix
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

  public setValues(change:QuerySharingChange):void {
    this.isStarred = change.isStarred;
    this.isPublic = change.isPublic;
  }
frontend/src/app/shared/components/modals/save-modal/save-query.modal.ts on lines 83..86
frontend/src/app/shared/components/modals/view-settings-modal/view-settings.modal.ts on lines 83..86

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

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

  public get state():InputState<this> {
    return this.states.types.get(this.href as string) as any;
  }
Severity: Major
Found in frontend/src/app/features/hal/resources/type-resource.ts and 4 other locations - About 40 mins to fix
frontend/src/app/features/hal/resources/placeholder-user-resource.ts on lines 40..42
frontend/src/app/features/hal/resources/schema-resource.ts on lines 33..35
frontend/src/app/features/hal/resources/status-resource.ts on lines 41..43
frontend/src/app/features/hal/resources/user-resource.ts on lines 59..61

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

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

  public get state():InputState<this> {
    return this.states.placeholderUsers.get(this.href as string) as any;
  }
frontend/src/app/features/hal/resources/schema-resource.ts on lines 33..35
frontend/src/app/features/hal/resources/status-resource.ts on lines 41..43
frontend/src/app/features/hal/resources/type-resource.ts on lines 35..37
frontend/src/app/features/hal/resources/user-resource.ts on lines 59..61

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

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

      {
        identifier: 'work_packages_accountable',
        component: WidgetWpTableQuerySpaceComponent,
        title: i18n.t('js.grid.widgets.work_packages_accountable.title'),
        properties: {
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 206..214
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 224..232
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 233..241

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

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

export class IanCenterStore extends Store<IanCenterState> {
  constructor() {
    super(createInitialState());
  }
}
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

export class ProjectStoragesStore extends EntityStore<ProjectStoragesState> {
  constructor() {
    super(createInitialResourceState());
  }
}
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

@Component({
  selector: 'op-wp-graph-configuration-settings-tab',
  templateUrl: './settings-tab.component.html',
  hostDirectives: [WorkPackageIsolatedQuerySpaceDirective],
})
frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/filters-tab.component.ts on lines 7..19

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

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

export class AttachmentsStore extends EntityStore<AttachmentsState> {
  constructor() {
    super(createInitialResourceState());
  }
}
Severity: Major
Found in frontend/src/app/core/state/attachments/attachments.store.ts and 16 other locations - About 40 mins to fix
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

export class WeekdayStore extends EntityStore<WeekdayState> {
  constructor() {
    super(createInitialResourceState());
  }
}
Severity: Major
Found in frontend/src/app/core/state/days/weekday.store.ts and 16 other locations - About 40 mins to fix
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

  public get state():InputState<this> {
    return this.states.schemas.get(this.href as string) as any;
  }
Severity: Major
Found in frontend/src/app/features/hal/resources/schema-resource.ts and 4 other locations - About 40 mins to fix
frontend/src/app/features/hal/resources/placeholder-user-resource.ts on lines 40..42
frontend/src/app/features/hal/resources/status-resource.ts on lines 41..43
frontend/src/app/features/hal/resources/type-resource.ts on lines 35..37
frontend/src/app/features/hal/resources/user-resource.ts on lines 59..61

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

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

  public get state():InputState<this> {
    return this.states.statuses.get(this.href as string) as any;
  }
Severity: Major
Found in frontend/src/app/features/hal/resources/status-resource.ts and 4 other locations - About 40 mins to fix
frontend/src/app/features/hal/resources/placeholder-user-resource.ts on lines 40..42
frontend/src/app/features/hal/resources/schema-resource.ts on lines 33..35
frontend/src/app/features/hal/resources/type-resource.ts on lines 35..37
frontend/src/app/features/hal/resources/user-resource.ts on lines 59..61

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

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

export class EnterpriseTrialStore extends Store<IEnterpriseTrial> {
  constructor() {
    super(createInitialState());
  }
}
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

export class CapabilitiesStore extends EntityStore<CapabilitiesState> {
  constructor() {
    super(createInitialResourceState());
  }
}
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

export class FileLinksStore extends EntityStore<FileLinksState> {
  constructor() {
    super(createInitialResourceState());
  }
}
Severity: Major
Found in frontend/src/app/core/state/file-links/file-links.store.ts and 16 other locations - About 40 mins to fix
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

      {
        identifier: 'work_packages_watched',
        component: WidgetWpTableQuerySpaceComponent,
        title: i18n.t('js.grid.widgets.work_packages_watched.title'),
        properties: {
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 206..214
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 215..223
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 224..232

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

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

export class ProjectsStore extends EntityStore<ProjectsState> {
  constructor() {
    super(createInitialResourceState());
  }
}
Severity: Major
Found in frontend/src/app/core/state/projects/projects.store.ts and 16 other locations - About 40 mins to fix
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/in-app-notifications/in-app-notifications.store.ts on lines 9..13
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

export class InAppNotificationsStore extends EntityStore<InAppNotificationsState> {
  constructor() {
    super(createInitialResourceState());
  }
}
frontend/src/app/core/state/attachments/attachments.store.ts on lines 36..40
frontend/src/app/core/state/capabilities/capabilities.store.ts on lines 9..13
frontend/src/app/core/state/days/day.store.ts on lines 15..19
frontend/src/app/core/state/days/weekday.store.ts on lines 15..19
frontend/src/app/core/state/file-links/file-links.store.ts on lines 36..40
frontend/src/app/core/state/principals/principals.store.ts on lines 9..13
frontend/src/app/core/state/project-storages/project-storages.store.ts on lines 37..41
frontend/src/app/core/state/projects/projects.store.ts on lines 9..13
frontend/src/app/core/state/storages/storages.store.ts on lines 36..40
frontend/src/app/core/state/views/views.store.ts on lines 9..13
frontend/src/app/features/enterprise/enterprise-trial.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/bell/state/ian-bell.store.ts on lines 17..21
frontend/src/app/features/in-app-notifications/center/state/ian-center.store.ts on lines 44..48
frontend/src/app/features/user-preferences/state/user-preferences.store.ts on lines 58..62
frontend/src/app/features/work-packages/routing/wp-view-base/state/wp-single-view.store.ts on lines 19..23
modules/github_integration/frontend/module/state/github-pull-request.store.ts on lines 12..16

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

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

  public setValues(change:QuerySharingChange):void {
    this.isStarred = change.isStarred;
    this.isPublic = change.isPublic;
  }
frontend/src/app/shared/components/modals/save-modal/save-query.modal.ts on lines 83..86
frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.ts on lines 90..93

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

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

      {
        identifier: 'work_packages_assigned',
        component: WidgetWpTableQuerySpaceComponent,
        title: i18n.t('js.grid.widgets.work_packages_assigned.title'),
        properties: {
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 215..223
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 224..232
frontend/src/app/shared/components/grids/openproject-grids.module.ts on lines 233..241

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

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