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 a today route so we can always switch to today ...
Klaus Zanderse5ae50a5a175
diff --git a/modules/costs/app/components/my/time_tracking/sub_header_component.rb b/modules/costs/app/components/my/time_tracking/sub_header_component.rbindex aa37f01c2b1..006792336f6 100644--- a/modules/costs/app/components/my/time_tracking/sub_header_component.rb+++ b/modules/costs/app/components/my/time_tracking/sub_header_component.rb@@ -54,7 +54,7 @@ module Myenddef today_href- my_time_tracking_path(date: Date.current, view_mode:, mode:)+ my_time_tracking_path(date: "today", view_mode:, mode:)enddef previous_attrs # rubocop:disable Metrics/AbcSizediff --git a/modules/costs/app/controllers/my/time_tracking_controller.rb b/modules/costs/app/controllers/my/time_tracking_controller.rbindex fb988f43e21..da455856fa3 100644--- a/modules/costs/app/controllers/my/time_tracking_controller.rb+++ b/modules/costs/app/controllers/my/time_tracking_controller.rb@@ -81,10 +81,14 @@ module Mydef parsed_dateif params[:date].present?- begin- Date.iso8601(params[:date])- rescue StandardError- nil+ if params[:date] == "today"+ current_date+ else+ begin+ Date.iso8601(params[:date])+ rescue StandardError+ nil+ endendendenddiff --git a/modules/costs/config/routes.rb b/modules/costs/config/routes.rbindex 2a3ab497020..55bae7c66cc 100644--- a/modules/costs/config/routes.rb+++ b/modules/costs/config/routes.rb@@ -55,7 +55,7 @@ Rails.application.routes.draw doconstraints: {mode: /day|week|workweek|month/,view_mode: /list|calendar/,- date: /\d{4}-\d{2}-\d{2}/+ date: /(\d{4}-\d{2}-\d{2}|today)/}get "/time-tracking/refresh" => "time_tracking#refresh",as: :time_tracking_refresh