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 static timeline query

Oliver Günther247bcab0e015
diff --git a/modules/gantt/app/controllers/gantt/gantt_controller.rb b/modules/gantt/app/controllers/gantt/gantt_controller.rb
index fc4b17d97f7..ac0f1c0cf5c 100644
--- a/modules/gantt/app/controllers/gantt/gantt_controller.rb
+++ b/modules/gantt/app/controllers/gantt/gantt_controller.rb
@@ -43,5 +43,11 @@ module ::Gantt
end
end
end
+
+ private
+
+ def default_breadcrumb
+ t(:label_gantt_chart_plural)
+ end
end
end
diff --git a/modules/gantt/app/services/gantt/default_query_generator_service.rb b/modules/gantt/app/services/gantt/default_query_generator_service.rb
index 6c11f2c9f9d..d7f8f3d3d03 100644
--- a/modules/gantt/app/services/gantt/default_query_generator_service.rb
+++ b/modules/gantt/app/services/gantt/default_query_generator_service.rb
@@ -31,7 +31,6 @@ module ::Gantt
DEFAULT_QUERY = :all_open
QUERY_MAPPINGS = {
DEFAULT_QUERY => I18n.t('js.queries.all_open'),
- :timeline => I18n.t('js.queries.timeline'),
:milestones => I18n.t('js.queries.milestones')
}.freeze
QUERY_OPTIONS = QUERY_MAPPINGS.keys
@@ -59,8 +58,6 @@ module ::Gantt
case query_key
when DEFAULT_QUERY
self.class.all_open_query(@project)
- when :timeline
- self.class.timeline_query(@project)
when :milestones
self.class.milestones_query(@project)
end
@@ -79,16 +76,6 @@ module ::Gantt
default_with_filter
end
- def timeline_query(project)
- default_with_filter = add_columns(project)
-
- type_filter_values = milestone_ids(project).concat(phase_ids(project)).uniq
- return if type_filter_values.empty?
-
- default_with_filter['f'] = [{ 'n' => 'type', 'o' => '=', 'v' => type_filter_values }]
- default_with_filter
- end
-
def milestones_query(project)
default_with_filter = add_columns(project)