From 9571b5c4d354c272fcc08bfc4e143c6de47ca323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 18 Nov 2015 21:09:46 +0100 Subject: [PATCH 01/12] Bump version to 5.0.0 --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index fd602ce982..ba62f580bf 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.0-alpha" + VERSION = "5.0.0" end end From cb106aa59812bd5e7c54cece5a2c62607d174fb6 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Wed, 18 Nov 2015 21:35:25 +0100 Subject: [PATCH 02/12] Adapt version to corresponding OpenProject core version. --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index ba62f580bf..3c88d367cd 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.0" + VERSION = "5.0.1" end end From 143e0b67a7ab8035f77ec43b4eb529c2deb2d639 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Fri, 20 Nov 2015 11:10:39 +0100 Subject: [PATCH 03/12] Update icon font --- lib/open_project/reporting/engine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/engine.rb b/lib/open_project/reporting/engine.rb index 3a0700b2a0..5311292cd5 100644 --- a/lib/open_project/reporting/engine.rb +++ b/lib/open_project/reporting/engine.rb @@ -63,7 +63,7 @@ module OpenProject::Reporting after: :time_entries, caption: :cost_reports_title, if: Proc.new { |project| project.module_enabled?(:reporting_module) }, - html: { class: 'icon2 icon-stats' } + html: { class: 'icon2 icon-cost-reports' } # Cost reports should remove the default time entries menu item hide_menu_item :project_menu, From 8cf260f9c288c57d0606d994d42085d246f2a383 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Fri, 20 Nov 2015 18:18:55 +0100 Subject: [PATCH 04/12] Adapt version to corresponding OpenProject core version. --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index 3c88d367cd..ee602c87b4 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.1" + VERSION = "5.0.2" end end From 1a612fe1aba8c6e835b00237e266cc952e475670 Mon Sep 17 00:00:00 2001 From: jonasheinrich Date: Mon, 23 Nov 2015 13:37:11 +0100 Subject: [PATCH 05/12] Bump dependencies --- openproject-reporting.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openproject-reporting.gemspec b/openproject-reporting.gemspec index a965a6575b..2930d5b685 100644 --- a/openproject-reporting.gemspec +++ b/openproject-reporting.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.add_dependency 'rails', '~> 4.2.4' s.add_dependency "reporting_engine", ">= 1.1.0" - s.add_dependency "openproject-costs", ">= 4.0.0" + s.add_dependency "openproject-costs", ">= 5.0.1" s.add_development_dependency "factory_girl_rails", "~> 4.0" end From 20a1ad781859f7a52ed6888bd8c2b6e96a6ad3af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 24 Nov 2015 13:39:11 +0100 Subject: [PATCH 06/12] Adapt version to corresponding OpenProject core version. --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index ee602c87b4..8cb9bf35d9 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.2" + VERSION = "5.0.3" end end From 665cfdd7d06b94e29c1d0c793d0793db37b764c8 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 24 Nov 2015 17:03:14 +0100 Subject: [PATCH 07/12] Adapt version to corresponding OpenProject core version. --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index 8cb9bf35d9..08006f8142 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.3" + VERSION = "5.0.4" end end From de38fba972905705b33bd4775512fcec2f3a82f3 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Fri, 27 Nov 2015 16:54:26 +0100 Subject: [PATCH 08/12] Adapt version to corresponding OpenProject core version. --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index 08006f8142..df7a8eaa66 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.4" + VERSION = "5.0.5" end end From 930f5881f65404d0a091497ca7aa6f64c9c028b1 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Wed, 2 Dec 2015 17:20:33 +0100 Subject: [PATCH 09/12] Adapt version to corresponding OpenProject core version. --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index df7a8eaa66..380dd437a3 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.5" + VERSION = "5.0.6" end end From 475391ef7fd0291d8f9b92ea76ce75e7583a572e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 9 Dec 2015 09:41:23 +0100 Subject: [PATCH 10/12] Adapt version to corresponding OpenProject core version. --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index 380dd437a3..407dd9246a 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.6" + VERSION = "5.0.7" end end From 66e222ef9c065511469cef2286852da998f897bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Fri, 11 Dec 2015 16:35:25 +0100 Subject: [PATCH 11/12] Adapt version to corresponding OpenProject core version. --- lib/open_project/reporting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/reporting/version.rb b/lib/open_project/reporting/version.rb index 407dd9246a..7060041f6b 100644 --- a/lib/open_project/reporting/version.rb +++ b/lib/open_project/reporting/version.rb @@ -19,6 +19,6 @@ module OpenProject module Reporting - VERSION = "5.0.7" + VERSION = "5.0.8" end end From 62cf1a23574e3c49b57efee8b592821e1de94388 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Fri, 18 Dec 2015 11:03:01 +0100 Subject: [PATCH 12/12] replace n+1 query --- app/models/cost_query/filter/user_id.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/models/cost_query/filter/user_id.rb b/app/models/cost_query/filter/user_id.rb index 5dc72a81b6..1c58411a28 100644 --- a/app/models/cost_query/filter/user_id.rb +++ b/app/models/cost_query/filter/user_id.rb @@ -23,10 +23,16 @@ class CostQuery::Filter::UserId < Report::Filter::Base end def self.available_values(*) - users = Project.visible.collect(&:users).flatten.uniq.sort + # All users which are members in projects the user can see. + # Excludes the anonymous user + users = User.joins(members: :project) + .merge(Project.visible) + .where.not(id: User.anonymous) + .order_by_name + .select(User::USER_FORMATS_STRUCTURE[Setting.user_format].map(&:to_s) << :id) + .distinct + values = users.map { |u| [u.name, u.id] } - values.delete_if { |u| (u.first.include? 'OpenProject Admin') || (u.first.include? 'Anonymous') } - values.sort! values.unshift ["<< #{::I18n.t(:label_me)} >>", User.current.id.to_s] if User.current.logged? values end