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
fixing back rout after deleting wp in boards module
bsatarnejadde47f50a42f1
diff --git a/frontend/src/app/modules/common/back-routing/back-routing.service.ts b/frontend/src/app/modules/common/back-routing/back-routing.service.tsindex fc8a14ea5cc..98703892519 100644--- a/frontend/src/app/modules/common/back-routing/back-routing.service.ts+++ b/frontend/src/app/modules/common/back-routing/back-routing.service.ts@@ -58,7 +58,7 @@ export class BackRoutingService {} else {if (this.keepTab.isDetailsState(this.backRoute.parent)) {if (preferListOverSplit) {- this.$state.go(baseRoute, this.$state.params);+ this.$state.go(baseRoute, this.backRoute.params);} else {this.$state.go(baseRoute + this.keepTab.currentDetailsSubState, this.backRoute.params);}diff --git a/modules/boards/spec/features/board_navigation_spec.rb b/modules/boards/spec/features/board_navigation_spec.rbindex b988617c861..be5879cf3ee 100644--- a/modules/boards/spec/features/board_navigation_spec.rb+++ b/modules/boards/spec/features/board_navigation_spec.rb@@ -46,6 +46,7 @@ describe 'Work Package boards spec', type: :feature, js: true dolet(:board_index) { Pages::BoardIndex.new(project) }let!(:board_view) { FactoryBot.create :board_grid_with_query, name: 'My board', project: project }let(:project_html_title) { ::Components::HtmlTitle.new project }+ let(:destroy_modal) { Components::WorkPackages::DestroyModal.new }before dowith_enterprise_token :board_view@@ -140,4 +141,33 @@ describe 'Work Package boards spec', type: :feature, js: true doexpect(page).to have_current_path /details\/#{wp.id}\/relations/split_view.expect_tab 'Relations'end++ it 'navigates to boards after deleting WP(see #33756)' do+ board_index.visit!++ # Add a new WP on the board+ board_page = board_index.open_board board_view+ board_page.expect_query 'List 1', editable: true+ board_page.add_card 'List 1', 'Task 1'+ board_page.expect_notification message: I18n.t(:notice_successful_create)+ wp = WorkPackage.last+ expect(wp.subject).to eq 'Task 1'++ # Open the details page with the info icon+ card = board_page.card_for(wp)+ split_view = card.open_details_view+ split_view.expect_subject++ # Go to full view of WP+ full_view = split_view.switch_to_fullscreen+ find('#action-show-more-dropdown-menu').click();++ # Delete the WP+ destroy_modal.expect_listed(wp)+ destroy_modal.confirm_deletion+ click_button(I18n.t('button_delete'))++ board_page.expect_empty+ expect(page).to have_current_path+ endend