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

show the TZ hint also when opening the dialog

Klaus Zanders25d4277dd88f
diff --git a/modules/costs/app/components/time_entries/user_form.rb b/modules/costs/app/components/time_entries/user_form.rb
index 697271d36ac..1dd2bcaa3e2 100644
--- a/modules/costs/app/components/time_entries/user_form.rb
+++ b/modules/costs/app/components/time_entries/user_form.rb
@@ -30,6 +30,8 @@
module TimeEntries
class UserForm < ApplicationForm
+ include Redmine::I18n
+
def initialize(visible: true)
super()
@visible = visible
@@ -43,6 +45,7 @@ module TimeEntries
name: :user_id,
id: "time_entry_user_id",
label: TimeEntry.human_attribute_name(:user),
+ caption: caption,
required: true,
autocomplete_options: {
defaultData: true,
@@ -84,5 +87,13 @@ module TimeEntries
filters
end
+
+ def caption
+ if model.user.time_zone == User.current.time_zone
+ nil
+ else
+ I18n.t("notice_different_time_zones", tz: friendly_timezone_name(model.user.time_zone))
+ end
+ end
end
end