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

Remove link to work package fullscreen

Oliver Güntherc787d5995e82
diff --git a/frontend/src/app/features/work-packages/services/notifications/work-package-notification.service.ts b/frontend/src/app/features/work-packages/services/notifications/work-package-notification.service.ts
index dfeccf3ef82..2b07cf74b1f 100644
--- a/frontend/src/app/features/work-packages/services/notifications/work-package-notification.service.ts
+++ b/frontend/src/app/features/work-packages/services/notifications/work-package-notification.service.ts
@@ -48,14 +48,6 @@ export class WorkPackageNotificationService extends HalResourceNotificationServi
type: 'success',
};
- // The WorkPackageNotificationService is injected for the whole wpIsolatedQuerySpace as the notification service.
- // However, when logging time on a WP, the provided resource is a TimeEntryResource.
- // Thus, the link in the toast would link to the WP with the ID of the TimeEntryResource (see #50731).
- // That is why, we check for WorkPackageResources and show the link only for them.
- if (resource.$halType === 'WorkPackage') {
- this.addWorkPackageFullscreenLink(message, resource);
- }
-
this.ToastService.addSuccess(message);
}
@@ -75,14 +67,4 @@ export class WorkPackageNotificationService extends HalResourceNotificationServi
return super.showCustomError(errorResource, resource);
}
-
- private addWorkPackageFullscreenLink(message:IToast, resource:HalResource) {
- // 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.tabs', { tabIdentifier: 'activity', workPackageId: resource.id }),
- text: this.I18n.t('js.work_packages.message_successful_show_in_fullscreen'),
- };
- }
- }
}
diff --git a/modules/bim/spec/features/bcf/create_spec.rb b/modules/bim/spec/features/bcf/create_spec.rb
index c3c4b34f575..a706a93c89b 100644
--- a/modules/bim/spec/features/bcf/create_spec.rb
+++ b/modules/bim/spec/features/bcf/create_spec.rb
@@ -70,7 +70,7 @@ RSpec.describe "Create BCF", :js,
create_page.save!
index_page.expect_and_dismiss_toaster(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
if with_viewpoints
diff --git a/modules/my_page/spec/features/my/assigned_to_me_spec.rb b/modules/my_page/spec/features/my/assigned_to_me_spec.rb
index a8b70c7e179..f313d4c5504 100644
--- a/modules/my_page/spec/features/my/assigned_to_me_spec.rb
+++ b/modules/my_page/spec/features/my/assigned_to_me_spec.rb
@@ -159,7 +159,7 @@ RSpec.describe "Assigned to me embedded query on my page", :js do
project_field.set_value project.name
embedded_table.expect_toast(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
wp = WorkPackage.last
diff --git a/spec/features/work_packages/new/attributes_from_filter_spec.rb b/spec/features/work_packages/new/attributes_from_filter_spec.rb
index e46318cbb4c..2f701a8a52d 100644
--- a/spec/features/work_packages/new/attributes_from_filter_spec.rb
+++ b/spec/features/work_packages/new/attributes_from_filter_spec.rb
@@ -99,7 +99,7 @@ RSpec.describe "Work package create uses attributes from filters", :js, :seleniu
split_page.save!
wp_table.expect_and_dismiss_toaster(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
wp = WorkPackage.last
expect(wp.subject).to eq "Foobar!"
@@ -140,7 +140,7 @@ RSpec.describe "Work package create uses attributes from filters", :js, :seleniu
subject_field.submit_by_enter
wp_table.expect_toast(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
wp_table.dismiss_toaster!
@@ -203,7 +203,7 @@ RSpec.describe "Work package create uses attributes from filters", :js, :seleniu
subject_field.submit_by_enter
wp_table.expect_toast(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
wp_table.dismiss_toaster!
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 f3cb6eda851..88b8b70ec96 100644
--- a/spec/features/work_packages/new/new_work_package_spec.rb
+++ b/spec/features/work_packages/new/new_work_package_spec.rb
@@ -95,7 +95,7 @@ RSpec.describe "new work package", :js, :with_cuprite do
# safeguards
wp_page.dismiss_toaster!
wp_page.expect_no_toaster(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
subject_field.expect_state_text(subject)
@@ -115,7 +115,7 @@ RSpec.describe "new work package", :js, :with_cuprite do
# safeguards
wp_page.dismiss_toaster!
wp_page.expect_no_toaster(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
wp_page.edit_field(:subject).expect_text(subject)
@@ -190,7 +190,7 @@ RSpec.describe "new work package", :js, :with_cuprite do
end
it do
- ids = custom_fields.map(&:id)
+ custom_fields.map(&:id)
cf1 = find(".#{custom_fields.first.attribute_name(:camel_case)} input")
expect(cf1).not_to be_nil
@@ -231,12 +231,7 @@ RSpec.describe "new work package", :js, :with_cuprite do
create_work_package(type_task)
save_work_package!
- wp_page.expect_toast message: "Successful creation. Click here to open this work package in fullscreen view."
- page.find(".op-toast--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
+ wp_page.expect_toast message: "Successful creation."
end
it "reloads the table and selects the new work package" do
@@ -262,7 +257,7 @@ RSpec.describe "new work package", :js, :with_cuprite do
table_subject.expect_state_text new_subject
wp_page.expect_toast(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
new_wp.reload
diff --git a/spec/features/work_packages/sorting/manual_sorting_spec.rb b/spec/features/work_packages/sorting/manual_sorting_spec.rb
index c9bfe6f4dfb..96558b11926 100644
--- a/spec/features/work_packages/sorting/manual_sorting_spec.rb
+++ b/spec/features/work_packages/sorting/manual_sorting_spec.rb
@@ -261,7 +261,7 @@ RSpec.describe "Manual sorting of WP table", :js do
subject_field.submit_by_enter
wp_table.expect_and_dismiss_toaster(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
wp_table.expect_work_package_subject "Foobar!"
diff --git a/spec/features/work_packages/table/edit_work_packages_spec.rb b/spec/features/work_packages/table/edit_work_packages_spec.rb
index 6b49032e6fb..e7d21cb01f4 100644
--- a/spec/features/work_packages/table/edit_work_packages_spec.rb
+++ b/spec/features/work_packages/table/edit_work_packages_spec.rb
@@ -63,7 +63,7 @@ RSpec.describe "Inline editing work packages", :js do
subject_field.expect_text("New subject!")
wp_table.expect_toast(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
work_package.reload
@@ -187,7 +187,7 @@ RSpec.describe "Inline editing work packages", :js do
cf_list.expect_inactive!
wp_table.expect_toast(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
work_package.reload
diff --git a/spec/features/work_packages/table/inline_create/create_work_packages_spec.rb b/spec/features/work_packages/table/inline_create/create_work_packages_spec.rb
index 4bcbd45d2a7..91e48751c65 100644
--- a/spec/features/work_packages/table/inline_create/create_work_packages_spec.rb
+++ b/spec/features/work_packages/table/inline_create/create_work_packages_spec.rb
@@ -48,7 +48,7 @@ RSpec.describe "inline create work package", :js do
callback.call
wp_table.expect_toast(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
# Expect new create row to exist
@@ -71,7 +71,7 @@ RSpec.describe "inline create work package", :js do
# safeguards
wp_table.dismiss_toaster!
wp_table.expect_no_toaster(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
# Expect no inline create open
@@ -127,7 +127,7 @@ RSpec.describe "inline create work package", :js do
subject_field.save!
wp_table.expect_toast(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
created_wp = WorkPackage.last
diff --git a/spec/features/work_packages/table/inline_create/parallel_creation_spec.rb b/spec/features/work_packages/table/inline_create/parallel_creation_spec.rb
index aa26dda79bc..34820498f9e 100644
--- a/spec/features/work_packages/table/inline_create/parallel_creation_spec.rb
+++ b/spec/features/work_packages/table/inline_create/parallel_creation_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe "Parallel work package creation spec", :js do
expect(page).to have_no_css(".wp-inline-create-row")
wp_table.expect_toast(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
wp_table.dismiss_toaster!
diff --git a/spec/features/work_packages/table/switch_types_spec.rb b/spec/features/work_packages/table/switch_types_spec.rb
index e565ae3ccbe..57be6c1b4c3 100644
--- a/spec/features/work_packages/table/switch_types_spec.rb
+++ b/spec/features/work_packages/table/switch_types_spec.rb
@@ -80,7 +80,7 @@ RSpec.describe "Switching types in work package table", :js do
text_field.save!
wp_table.expect_and_dismiss_toaster(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
# Switch type
@@ -98,7 +98,7 @@ RSpec.describe "Switching types in work package table", :js do
req_text_field.save!
wp_table.expect_and_dismiss_toaster(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
expect { text_field.display_element }.to raise_error(Capybara::ElementNotFound)
@@ -107,7 +107,7 @@ RSpec.describe "Switching types in work package table", :js do
type_field.set_value type_task.name
wp_table.expect_and_dismiss_toaster(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
expect(page).to have_no_css "#{req_text_field.selector} #{req_text_field.display_selector}"
@@ -133,7 +133,7 @@ RSpec.describe "Switching types in work package table", :js do
type_field.set_value type_task.name
wp_table.expect_and_dismiss_toaster(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
end
@@ -167,7 +167,7 @@ RSpec.describe "Switching types in work package table", :js do
req_text_field.update "foobar"
wp_table.expect_and_dismiss_toaster(
- message: "Successful update. Click here to open this work package in fullscreen view."
+ message: "Successful update."
)
req_text_field.expect_state_text "foobar"
diff --git a/spec/features/work_packages/table/work_packages_table_project_include_spec.rb b/spec/features/work_packages/table/work_packages_table_project_include_spec.rb
index f0936f9ac4b..0d81a11cee4 100644
--- a/spec/features/work_packages/table/work_packages_table_project_include_spec.rb
+++ b/spec/features/work_packages/table/work_packages_table_project_include_spec.rb
@@ -89,7 +89,7 @@ RSpec.describe "Work package project include", :js do
subject_field.submit_by_enter
work_package_view.expect_and_dismiss_toaster(
- message: "Successful creation. Click here to open this work package in fullscreen view."
+ message: "Successful creation."
)
work_package_view.expect_work_package_subject "Foobar!"