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
Revert "[#43884] Change wording on manual scheduling activity"
ulferts189d2b8b9f0b
diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 5e1830deeba..525a7ee5b1f 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -603,7 +603,6 @@ en:progress: "Progress (%)"readonly: "Read only"schedule_manually: "Manual scheduling"- schedule_default: "Default scheduling"spent_hours: "Spent time"spent_time: "Spent time"subproject: "Subproject"@@ -2776,7 +2775,6 @@ en:text_journal_set_to: "%{label} set to %{value}"text_journal_set_with_diff: "%{label} set (%{link})"text_journal_label_value: "%{label} %{value}"- text_scheduling_label: "%{type} activated"text_latest_note: "The latest comment is: %{note}"text_length_between: "Length between %{min} and %{max} characters."text_line_separated: "Multiple values allowed (one line for each value)."diff --git a/lib/open_project/journal_formatter/schedule_manually.rb b/lib/open_project/journal_formatter/schedule_manually.rbindex b1781c5093b..e605b9ca522 100644--- a/lib/open_project/journal_formatter/schedule_manually.rb+++ b/lib/open_project/journal_formatter/schedule_manually.rb@@ -28,9 +28,9 @@class OpenProject::JournalFormatter::ScheduleManually < JournalFormatter::Basedef render(key, values, options = { no_html: false })- calculated_key = values.last ? :schedule_default : :schedule_manually- label_text = options[:no_html] ? label(calculated_key) : content_tag('strong', label(calculated_key))+ label_text = options[:no_html] ? label(key) : content_tag('strong', label(key))+ activated_text = values.last ? I18n.t('scheduling.activated') : I18n.t('scheduling.deactivated')- I18n.t(:text_scheduling_label, type: label_text)+ I18n.t(:text_journal_label_value, label: label_text, value: activated_text)endenddiff --git a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb b/spec/features/work_packages/scheduling/scheduling_mode_spec.rbindex 7122f1c76fd..abdb8930a85 100644--- a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb+++ b/spec/features/work_packages/scheduling/scheduling_mode_spec.rb@@ -132,7 +132,7 @@ describe 'scheduling mode',work_packages_page.expect_and_dismiss_toaster message: 'Successful update.'# Changing the scheduling mode is journalized- work_packages_page.expect_activity_message("Default scheduling activated")+ work_packages_page.expect_activity_message("Manual scheduling activated")expect_dates(wp, '2016-01-05', '2016-01-10')expect(wp.schedule_manually).to be_truthydiff --git a/spec/lib/journal_formatter/schedule_manually_spec.rb b/spec/lib/journal_formatter/schedule_manually_spec.rbindex 56d1e735782..a83b53b0889 100644--- a/spec/lib/journal_formatter/schedule_manually_spec.rb+++ b/spec/lib/journal_formatter/schedule_manually_spec.rb@@ -40,7 +40,9 @@ describe OpenProject::JournalFormatter::ScheduleManually dodescribe '#render' dodescribe 'with the first value being true, and the second false' dolet(:expected) do- I18n.t(:text_scheduling_label, type: "<strong>Manual scheduling</strong>")+ I18n.t(:text_journal_label_value,+ label: "<strong>Manual scheduling</strong>",+ value: 'deactivated')endit { expect(instance.render(key, [true, false])).to eq(expected) }@@ -48,7 +50,9 @@ describe OpenProject::JournalFormatter::ScheduleManually dodescribe 'with the first value being false, and the second true' dolet(:expected) do- I18n.t(:text_scheduling_label, type: "<strong>Default scheduling</strong>")+ I18n.t(:text_journal_label_value,+ label: "<strong>Manual scheduling</strong>",+ value: 'activated')endit { expect(instance.render(key, [false, true])).to eq(expected) }