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 correct count to notification activity tab and preserve the filter params when opening the split screen
Henriette Darge024be50884ea
diff --git a/config/initializers/menus.rb b/config/initializers/menus.rbindex cedec66d1d5..3cc5b4fac98 100644--- a/config/initializers/menus.rb+++ b/config/initializers/menus.rb@@ -649,7 +649,13 @@ Redmine::MenuManager.map :work_package_split_view do |menu|menu.push :activity,{ tab: :activity },skip_permissions_check: true,- badge: ->(work_package:, **) { 123 },+ badge: ->(work_package:, **) {+ Notification.where(recipient: User.current,+ read_ian: false,+ resource: work_package)+ .where.not(reason: %i[date_alert_start_date date_alert_due_date])+ .count+ },caption: :"js.work_packages.tabs.activity"menu.push :files,{ tab: :files },diff --git a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.tsindex c4a7bab5ac3..4b9bb11b2a7 100644--- a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts+++ b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts@@ -232,7 +232,7 @@ export class IanCenterService extends UntilDestroyedMixin {}openSplitScreen(workPackageId:string, tabIdentifier:string = 'activity'):void {- window.location.href = this.pathHelper.notificationsDetailsPath(workPackageId, tabIdentifier);+ window.location.href = this.pathHelper.notificationsDetailsPath(workPackageId, tabIdentifier) + window.location.search;}openFullView(workPackageId:string|null):void {diff --git a/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb b/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rbindex 038ba8ef550..96726418d7f 100644--- a/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb+++ b/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb@@ -257,7 +257,7 @@ RSpec.describe "Notification center date alerts", :js, :with_cuprite,split_screen.expect_no_notification_badge# The same is true for the mention item that is opened in date alerts filter- center.click_item notification_wp_double_mention+ center.click_item notification_wp_double_date_alertsplit_screen = Pages::PrimerizedSplitWorkPackage.new wp_double_notificationsplit_screen.expect_tab :overviewwait_for_network_idle