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
Set the title to "Unnamed team planner"
Oliver Günther22033a5d07b1
diff --git a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.tsindex 406c1925367..b9215392666 100644--- a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts+++ b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts@@ -13,6 +13,7 @@ import { ZenModeButtonComponent } from 'core-app/features/work-packages/componenimport { WorkPackageFilterButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/wp-filter-button/wp-filter-button.component';import { WorkPackageFilterContainerComponent } from 'core-app/features/work-packages/components/filters/filter-container/filter-container.directive';import { QueryParamListenerService } from 'core-app/features/work-packages/components/wp-query/query-param-listener.service';+import { QueryResource } from 'core-app/features/hal/resources/query-resource';@Component({templateUrl: '../../../work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html',@@ -27,13 +28,14 @@ import { QueryParamListenerService } from 'core-app/features/work-packages/compoexport class TeamPlannerPageComponent extends PartitionedQuerySpacePageComponent implements OnInit {text = {title: this.I18n.t('js.team_planner.title'),+ unsaved_title: this.I18n.t('js.team_planner.unsaved_title'),};/** Go back using back-button */backButtonCallback:() => void;/** Current query title to render */- selectedTitle = this.text.title;+ selectedTitle = this.text.unsaved_title;filterContainerDefinition:DynamicComponentDefinition = {component: WorkPackageFilterContainerComponent,@@ -87,6 +89,14 @@ export class TeamPlannerPageComponent extends PartitionedQuerySpacePageComponentthis.currentPartition = state.data?.partition || '-split';}+ updateTitle(query?:QueryResource):void {+ if (!query?.id) {+ this.selectedTitle = this.text.unsaved_title;+ } else {+ super.updateTitle(query);+ }+ }+// For shared template compliance// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-varsupdateTitleName(val:string):void {diff --git a/modules/team_planner/config/locales/js-en.yml b/modules/team_planner/config/locales/js-en.ymlindex 43b4c02f7d7..0bf7129f8e9 100644--- a/modules/team_planner/config/locales/js-en.yml+++ b/modules/team_planner/config/locales/js-en.yml@@ -3,4 +3,5 @@ en:js:team_planner:title: 'Team planner'+ unsaved_title: 'Unnamed team planner'label_assignee_plural: 'Assignees'diff --git a/modules/team_planner/spec/features/team_planner_spec.rb b/modules/team_planner/spec/features/team_planner_spec.rbindex 4cc5574694f..e4585eeb202 100644--- a/modules/team_planner/spec/features/team_planner_spec.rb+++ b/modules/team_planner/spec/features/team_planner_spec.rb@@ -113,6 +113,8 @@ describe 'Team planner', type: :feature, js: true doit 'renders a basic board' doteam_planner.visit!+ team_planner.title+team_planner.expect_assignee userteam_planner.expect_assignee other_userdiff --git a/modules/team_planner/spec/support/pages/team_planner.rb b/modules/team_planner/spec/support/pages/team_planner.rbindex 0e995fd0c7d..0f3b5546e19 100644--- a/modules/team_planner/spec/support/pages/team_planner.rb+++ b/modules/team_planner/spec/support/pages/team_planner.rb@@ -44,8 +44,8 @@ module Pagesproject_team_planner_path(project)end- def expect_title- expect(page).to have_selector '.editable-toolbar-title--fixed', text: 'Team planner'+ def expect_title(title = 'Unnamed team planner')+ expect(page).to have_selector '.editable-toolbar-title--fixed', text: titleenddef expect_assignee(user, present: true)