Skip to content

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

[37555] Fix fullscreen link in notification

Oliver Günthere40b8367a5c5
diff --git a/frontend/src/app/modules/work_packages/notifications/work-package-notification.service.ts b/frontend/src/app/modules/work_packages/notifications/work-package-notification.service.ts
index ae464df1030..07ea7b5488a 100644
--- a/frontend/src/app/modules/work_packages/notifications/work-package-notification.service.ts
+++ b/frontend/src/app/modules/work_packages/notifications/work-package-notification.service.ts
@@ -71,7 +71,8 @@ export class WorkPackageNotificationService extends HalResourceNotificationServi
// Don't show the 'Show in full screen' link if we're there already
if (!this.$state.includes('work-packages.show')) {
message.link = {
- target: () => this.$state.go('work-packages.show.activity', { workPackageId: resource.id }),
+ target: () =>
+ this.$state.go('work-packages.show.tabs', { tabIdentifier: 'activity', workPackageId: resource.id }),
text: this.I18n.t('js.work_packages.message_successful_show_in_fullscreen')
};
}
diff --git a/spec/features/work_packages/new/new_work_package_spec.rb b/spec/features/work_packages/new/new_work_package_spec.rb
index 2877f53c9b8..c312a70534b 100644
--- a/spec/features/work_packages/new/new_work_package_spec.rb
+++ b/spec/features/work_packages/new/new_work_package_spec.rb
@@ -227,6 +227,18 @@ describe 'new work package', js: true do
let(:create_method) { method(:create_work_package) }
end
+ it 'allows to go to the full page through the notification (Regression #37555)' do
+ create_work_package(type_task, project.name)
+ save_work_package!
+
+ wp_page.expect_notification message: 'Successful creation. Click here to open this work package in fullscreen view.'
+ page.find('.notification-box--target-link', text: 'Click here to open this work package in fullscreen view.').click
+
+ full_page = Pages::FullWorkPackage.new(WorkPackage.last)
+ full_page.ensure_page_loaded
+ full_page.expect_subject
+ end
+
it 'reloads the table and selects the new work package' do
expect(page).to have_no_selector('.wp--row')