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
Fix some review issues such as naming and typos
Mir Bhatia5acc40eef692
diff --git a/config/locales/en.yml b/config/locales/en.ymlindex a246f1d2ead..d9ceffa354c 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -1003,7 +1003,7 @@ en:hour_html:one: "<i>%{count} hour</i>"other: "<i>%{count} hours</i>"- updated: "changed from %{first} to %{last}"+ updated: "changed from %{old_value} to %{value}"logged_for: "Logged for"filter:changeset: "Changesets"diff --git a/lib/open_project/journal_formatter/time_entry_hours.rb b/lib/open_project/journal_formatter/time_entry_hours.rbindex 0739185748b..7e2672783cf 100644--- a/lib/open_project/journal_formatter/time_entry_hours.rb+++ b/lib/open_project/journal_formatter/time_entry_hours.rb@@ -43,19 +43,19 @@ class OpenProject::JournalFormatter::TimeEntryHours < JournalFormatter::Base(val % 1).zero? ? val.to_i : valend- def value(html, first, last)+ def value(html, old_value, value)html = html ? '_html' : ''- first = format_float(first) if first- last = format_float(last)+ old_value = format_float(old_value) if old_value+ value = format_float(value)- if first+ if old_valueI18n.t(:'activity.item.time_entry.updated',- first: I18n.t(:"activity.item.time_entry.hour#{html}", count: first),- last: I18n.t(:"activity.item.time_entry.hour#{html}", count: last))+ old_value: I18n.t(:"activity.item.time_entry.hour#{html}", count: old_value),+ value: I18n.t(:"activity.item.time_entry.hour#{html}", count: value))elseI18n.t(:"activity.item.time_entry.hour#{html}",- count: last)+ count: value)endendenddiff --git a/spec/components/activities/item_component_spec.rb b/spec/components/activities/item_component_spec.rbindex a0fc0e77ca3..2b1c1a89209 100644--- a/spec/components/activities/item_component_spec.rb+++ b/spec/components/activities/item_component_spec.rb@@ -122,7 +122,7 @@ RSpec.describe Activities::ItemComponent, type: :component doendend- context 'for TimeEntry activites' do+ context 'for TimeEntry activities' dolet(:journal) { build_stubbed(:time_entry_journal) }let(:event) doActivities::Event.new(diff --git a/spec/support/capybara.rb b/spec/support/capybara.rbindex cdbd5b5f79c..6ec16088112 100644--- a/spec/support/capybara.rb+++ b/spec/support/capybara.rb@@ -6,19 +6,18 @@ require 'rack_session_access/capybara'require 'action_dispatch'RSpec.shared_context 'with default_url_options and host name set to Capybara test server' do- before do- @original_host = default_url_options[:host]- @original_port = default_url_options[:port]- @original_host_setting = Setting.host_name- Setting.host_name = "#{Capybara.server_host}:#{Capybara.server_port}"+ around do |example|+ original_host = default_url_options[:host]+ original_port = default_url_options[:port]+ original_host_setting = Setting.host_namedefault_url_options[:host] = Capybara.server_hostdefault_url_options[:port] = Capybara.server_port- end-- after do- default_url_options[:host] = @original_host # rubocop:disable RSpec/InstanceVariable- default_url_options[:port] = @original_port # rubocop:disable RSpec/InstanceVariable- Setting.host_name = @original_host_setting # rubocop:disable RSpec/InstanceVariable+ Setting.host_name = "#{Capybara.server_host}:#{Capybara.server_port}"+ example.run+ ensure+ default_url_options[:host] = original_host+ default_url_options[:port] = original_port+ Setting.host_name = original_host_settingendend