OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Remove magic string
Klaus Zanders60ecc52beb84
diff --git a/frontend/src/app/features/work-packages/components/wp-fast-table/builders/internal-sort-columns.ts b/frontend/src/app/features/work-packages/components/wp-fast-table/builders/internal-sort-columns.tsindex fc6d50c8414..a5d265d98d0 100644--- a/frontend/src/app/features/work-packages/components/wp-fast-table/builders/internal-sort-columns.ts+++ b/frontend/src/app/features/work-packages/components/wp-fast-table/builders/internal-sort-columns.ts@@ -11,3 +11,7 @@ export const internalContextMenuColumn = {export const internalBaselineColumn = {id: '__internal-baseline',} as QueryColumn;++export const sharedUserColumn = {+ id: 'sharedWithUsers',+} as QueryColumn;diff --git a/frontend/src/app/features/work-packages/components/wp-fast-table/builders/rows/single-row-builder.ts b/frontend/src/app/features/work-packages/components/wp-fast-table/builders/rows/single-row-builder.tsindex a31a0e73cb9..89638411457 100644--- a/frontend/src/app/features/work-packages/components/wp-fast-table/builders/rows/single-row-builder.ts+++ b/frontend/src/app/features/work-packages/components/wp-fast-table/builders/rows/single-row-builder.ts@@ -9,6 +9,7 @@ import {internalBaselineColumn,internalContextMenuColumn,internalSortColumn,+ sharedUserColumn,} from 'core-app/features/work-packages/components/wp-fast-table/builders/internal-sort-columns';import { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';import { debugLog } from 'core-app/shared/helpers/debug_output';@@ -97,7 +98,7 @@ export class SingleRowBuilder {return this.relationCellBuilder.build(workPackage, column);}- if (column.id === 'sharedWithUsers') {+ if (column.id === sharedUserColumn.id) {return this.shareCellBuilder.build(workPackage, column);}diff --git a/frontend/src/app/features/work-packages/routing/wp-view-base/view-services/wp-view-columns.service.ts b/frontend/src/app/features/work-packages/routing/wp-view-base/view-services/wp-view-columns.service.tsindex 7e90d7bb12a..bb12f96ce51 100644--- a/frontend/src/app/features/work-packages/routing/wp-view-base/view-services/wp-view-columns.service.ts+++ b/frontend/src/app/features/work-packages/routing/wp-view-base/view-services/wp-view-columns.service.ts@@ -35,6 +35,7 @@ import { combine } from '@openproject/reactivestates';import { mapTo, take } from 'rxjs/operators';import { cloneHalResourceCollection } from 'core-app/features/hal/helpers/hal-resource-builder';import { WorkPackageQueryStateService } from './wp-view-base.service';+import { sharedUserColumn } from 'core-app/features/work-packages/components/wp-fast-table/builders/internal-sort-columns';@Injectable()export class WorkPackageViewColumnsService extends WorkPackageQueryStateService<QueryColumn[]> {@@ -89,7 +90,7 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService<* Returns whether the current set of columns include shares*/public hasShareColumn() {- return !!_.find(this.getColumns(), (c) => c.id === 'sharedWithUsers');+ return !!_.find(this.getColumns(), (c) => c.id === sharedUserColumn.id);}/**