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
Add a method to check for shared column
Klaus Zanders3602fc2bfca0
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 392609ac7f7..089e2987cae 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@@ -73,8 +73,8 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService<// We can avoid reloading even with relation columns if we only removed columnsconst onlyRemoved = _.difference(newColumns, oldColumns).length === 0;- // Reload the table visibly if adding relation columns.- return !onlyRemoved && this.hasRelationColumns();+ // Reload the table visibly if adding relation or share columns.+ return !onlyRemoved && (this.hasRelationColumns() || this.hasShareColumn());}/**@@ -85,6 +85,13 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService<return !!_.find(this.getColumns(), (c) => relationColumns.indexOf(c._type) >= 0);}+ /**+ * Returns whether the current set of columns include shares+ */+ public hasShareColumn() {+ return !!_.find(this.getColumns(), (c) => c.id === 'sharedWithUser');+ }+/*** Retrieve the QueryColumn objects for the selected columns.* Returns a shallow copy with the original column objects.