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
[50955] Rename time fields in the UI
Christophe Bliardd4d7506c01e8
diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 33a79a1d5fa..24a30b6f8a8 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -664,7 +664,7 @@ en:begin_insertion: "Begin of the insertion"begin_deletion: "Begin of the deletion"children: "Subelements"- done_ratio: "Progress (%)"+ done_ratio: "% Complete"duration: "Duration"end_insertion: "End of the insertion"end_deletion: "End of the deletion"@@ -678,7 +678,7 @@ en:parent_issue: "Parent"parent_work_package: "Parent"priority: "Priority"- progress: "Progress (%)"+ progress: "% Complete"readonly: "Read only"schedule_manually: "Manual scheduling"spent_hours: "Spent time"@@ -1097,12 +1097,12 @@ en:default_columns: "Default columns"description: "Description"derived_due_date: "Derived finish date"- derived_estimated_hours: "Derived estimated time"+ derived_estimated_hours: "Derived work"derived_start_date: "Derived start date"display_sums: "Display Sums"due_date: "Finish date"- estimated_hours: "Estimated time"- estimated_time: "Estimated time"+ estimated_hours: "Work"+ estimated_time: "Work"expires_at: "Expires at"firstname: "First name"group: "Group"@@ -3116,7 +3116,7 @@ en:help_texts:views:project: >- %{plural} are always attached to a project.+ %{plural} are always attached to a project.You can only select projects here where the %{plural} module is active.After creating a %{singular} you can add work packages from other projects to it.public: "Publish this view, allowing other users to access your view. Users with the 'Manage public views' permission can modify or remove public query. This does not affect the visibility of work package results in that view and depending on their permissions, users may see different results."@@ -3360,7 +3360,7 @@ en:validation:done_ratio: "Done ratio cannot be set on parent work packages, when it is inferred by status or when it is disabled."due_date: "Finish date cannot be set on parent work packages."- estimated_hours: "Estimated hours cannot be set on parent work packages."+ estimated_hours: "Estimated hours cannot be set on parent work packages." # feel like this one should be removed eventuallyinvalid_user_assigned_to_work_package: "The chosen user is not allowed to be '%{property}' for this work package."start_date: "Start date cannot be set on parent work packages."eprops:diff --git a/modules/backlogs/config/locales/en.yml b/modules/backlogs/config/locales/en.ymlindex bc1346869e4..c02ee00a6eb 100644--- a/modules/backlogs/config/locales/en.yml+++ b/modules/backlogs/config/locales/en.yml@@ -36,10 +36,10 @@ en:attributes:work_package:position: "Position"- remaining_hours: "Remaining hours"- remaining_time: "Remaining hours"- derived_remaining_hours: "Derived remaining hours"- derived_remaining_time: "Derived remaining hours"+ remaining_hours: "Remaining work"+ remaining_time: "Remaining work"+ derived_remaining_hours: "Derived remaining work"+ derived_remaining_time: "Derived remaining work"story_points: "Story Points"backlogs_work_package_type: "Backlog type"diff --git a/modules/backlogs/spec/api/work_packages/work_package_schema_representer_spec.rb b/modules/backlogs/spec/api/work_packages/work_package_schema_representer_spec.rbindex 193306e8678..d374e573e34 100644--- a/modules/backlogs/spec/api/work_packages/work_package_schema_representer_spec.rb+++ b/modules/backlogs/spec/api/work_packages/work_package_schema_representer_spec.rb@@ -113,11 +113,11 @@ RSpec.describe API::V3::WorkPackages::Schema::WorkPackageSchemaRepresenter doallow(schema.project).to receive(:backlogs_enabled?).and_return(false)end- it 'has no schema for remaining time' do+ it 'has no schema for remainingTime' doexpect(subject).not_to have_json_path('remainingTime')end- it 'has no schema for derivedRemaining time' do+ it 'has no schema for derivedRemainingTime' doexpect(subject).not_to have_json_path('derivedRemainingTime')endenddiff --git a/spec/features/types/form_configuration_spec.rb b/spec/features/types/form_configuration_spec.rbindex 1d7f2c550d6..dc13e6bfbdc 100644--- a/spec/features/types/form_configuration_spec.rb+++ b/spec/features/types/form_configuration_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'form configuration', js: true do+RSpec.describe 'form configuration', :js doshared_let(:admin) { create(:admin) }let(:type) { create(:type) }@@ -63,7 +63,7 @@ RSpec.describe 'form configuration', js: true dodialog.expect_opendialog.cancel- expect(page).to have_selector('.group-edit-handler', text: 'WHATEVER')+ expect(page).to have_css('.group-edit-handler', text: 'WHATEVER')# Click the dialog again after some time# Otherwise this may cause issues due to the animation,@@ -78,7 +78,7 @@ RSpec.describe 'form configuration', js: true do# Wait for page reloadsleep 1- expect(page).not_to have_selector('.group-head', text: 'WHATEVER')+ expect(page).not_to have_css('.group-head', text: 'WHATEVER')form.expect_group('details', 'Details')form.expect_attribute(key: :assignee)end@@ -91,7 +91,7 @@ RSpec.describe 'form configuration', js: true do# Save configurationform.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)form.expect_empty@@ -116,7 +116,7 @@ RSpec.describe 'form configuration', js: true dogroups = page.all('.attributes-group--header-text').map(&:text)expect(groups).to eq []expect(page)- .to have_selector('.work-packages--details--description', text: work_package.description)+ .to have_css('.work-packages--details--description', text: work_package.description)endit 'allows modification of the form configuration' do@@ -129,14 +129,15 @@ RSpec.describe 'form configuration', js: true doform.expect_group 'estimates_and_time','Estimates and time',- { key: :estimated_time, translation: 'Estimated time' },- { key: :spent_time, translation: 'Spent time' }+ { key: :estimated_time, translation: 'Work' },+ { key: :spent_time, translation: 'Spent time' },+ { key: :remaining_time, translation: 'Remaining work' }form.expect_group 'details','Details',{ key: :category, translation: 'Category' },{ key: :date, translation: 'Date' },- { key: :percentage_done, translation: 'Progress (%)' },+ { key: :percentage_done, translation: '% Complete' },{ key: :priority, translation: 'Priority' },{ key: :version, translation: 'Version' }@@ -157,8 +158,8 @@ RSpec.describe 'form configuration', js: true doinput = find('.group-edit-in-place--input')input.set('FOOBAR')input.send_keys(:escape)- expect(page).to have_selector('.group-edit-handler', text: 'COOL STUFF')- expect(page).not_to have_selector('.group-edit-handler', text: 'FOOBAR')+ expect(page).to have_css('.group-edit-handler', text: 'COOL STUFF')+ expect(page).not_to have_css('.group-edit-handler', text: 'FOOBAR')# Create new groupform.add_attribute_group('New Group')@@ -169,7 +170,7 @@ RSpec.describe 'form configuration', js: true do# Save configurationform.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)# Expect configuration to be correct nowform.expect_no_attribute('assignee', 'Cool Stuff')@@ -180,13 +181,14 @@ RSpec.describe 'form configuration', js: true doform.expect_group 'estimates_and_time','Estimates and time',- { key: :estimated_time, translation: 'Estimated time' },- { key: :spent_time, translation: 'Spent time' }+ { key: :estimated_time, translation: 'Work' },+ { key: :spent_time, translation: 'Spent time' },+ { key: :remaining_time, translation: 'Remaining work' }form.expect_group 'Whatever','Whatever',{ key: :date, translation: 'Date' },- { key: :percentage_done, translation: 'Progress (%)' }+ { key: :percentage_done, translation: '% Complete' }form.expect_group 'New Group','New Group',@@ -233,7 +235,7 @@ RSpec.describe 'form configuration', js: true dowp_page.click_create_wp_button(type)wp_page.expect_group('Estimates and time') do- expect(page).to have_selector('.inline-edit--container.estimatedTime')+ expect(page).to have_css('.inline-edit--container.estimatedTime')endfind_by_id('work-packages--edit-actions-cancel').click@@ -266,7 +268,7 @@ RSpec.describe 'form configuration', js: true doform.expect_attribute(key: cf_identifier)form.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)endend@@ -296,7 +298,7 @@ RSpec.describe 'form configuration', js: true doform.expect_attribute(key: cf_identifier)form.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)endcontext 'if inactive in project' dodiff --git a/spec/features/views/shared_examples.rb b/spec/features/views/shared_examples.rbindex e7401f79dde..9e7ff79b639 100644--- a/spec/features/views/shared_examples.rb+++ b/spec/features/views/shared_examples.rb@@ -47,7 +47,7 @@ RSpec.shared_examples 'module specific query view management' doquery_menu.expect_menu_entry 'My first query'# Change the filter again- filters.add_filter_by 'Progress (%)', 'is', ['25'], 'percentageDone'+ filters.add_filter_by '% Complete', 'is', ['25'], 'percentageDone'filters.expect_filter_count(initial_filter_count + 2)# Save as another querydiff --git a/spec/features/work_packages/display_fields/estimated_hours_display_spec.rb b/spec/features/work_packages/display_fields/estimated_hours_display_spec.rbindex aa97e4778fb..8eb78b72432 100644--- a/spec/features/work_packages/display_fields/estimated_hours_display_spec.rb+++ b/spec/features/work_packages/display_fields/estimated_hours_display_spec.rb@@ -66,7 +66,7 @@ RSpec.describe 'Estimated hours display' dologin_as(user)end- context "with both estimated and derived estimated time" do+ context "with both work and derived work" dolet(:hierarchy) do[{@@ -89,11 +89,11 @@ RSpec.describe 'Estimated hours display' doit 'work package details', js: true dovisit work_package_path(parent.id)- expect(page).to have_content("Estimated time\n1 h(+3 h)")+ expect(page).to have_content("Work\n1 h(+3 h)")endend- context "with just estimated time" do+ context "with just work" dolet(:hierarchy) do[{@@ -116,11 +116,11 @@ RSpec.describe 'Estimated hours display' doit 'work package details', js: true dovisit work_package_path(parent.id)- expect(page).to have_content("Estimated time\n1 h")+ expect(page).to have_content("Work\n1 h")endend- context "with just derived estimated time" do+ context "with just derived work" dolet(:hierarchy) do[{@@ -143,11 +143,11 @@ RSpec.describe 'Estimated hours display' doit 'work package details', js: true dovisit work_package_path(parent.id)- expect(page).to have_content("Estimated time\n0 h(+3 h)")+ expect(page).to have_content("Work\n0 h(+3 h)")endend- context "with neither estimated nor derived estimated time" do+ context "with neither work nor derived work" dolet(:hierarchy) do[{@@ -170,7 +170,7 @@ RSpec.describe 'Estimated hours display' doit 'work package details', js: true dovisit work_package_path(parent.id)- expect(page).to have_content("Estimated time\n0 h")+ expect(page).to have_content("Work\n0 h")endendenddiff --git a/spec/features/work_packages/edit_work_package_spec.rb b/spec/features/work_packages/edit_work_package_spec.rbindex a926ab789e3..bad5b01e7df 100644--- a/spec/features/work_packages/edit_work_package_spec.rb+++ b/spec/features/work_packages/edit_work_package_spec.rb@@ -117,11 +117,11 @@ RSpec.describe 'edit work package',visit!end- it 'does not hide empty progress while it is being edited' do+ it 'does not hide empty % Complete while it is being edited' dofield = wp_page.work_package_field(:percentageDone)field.update('0', save: false, expect_failure: true)- expect(page).to have_text("Progress (%)")+ expect(page).to have_text("% Complete")endenddiff --git a/spec/features/work_packages/export_spec.rb b/spec/features/work_packages/export_spec.rbindex b68a1790187..427f6560f97 100644--- a/spec/features/work_packages/export_spec.rb+++ b/spec/features/work_packages/export_spec.rb@@ -131,7 +131,7 @@ RSpec.describe 'work package export' doit 'shows only the work package with the right progress if filtered this way',js: true do- filters.add_filter_by 'Progress (%)', 'is', ['25'], 'percentageDone'+ filters.add_filter_by '% Complete', 'is', ['25'], 'percentageDone'sleep 1loading_indicator_saveguard@@ -161,11 +161,11 @@ RSpec.describe 'work package export' doendit 'exports selected columns', js: true do- columns.add 'Progress (%)'+ columns.add '% Complete'export!- expect(subject).to have_text('Progress (%)')+ expect(subject).to have_text('% Complete')expect(subject).to have_text('25')endenddiff --git a/spec/features/work_packages/index_sums_spec.rb b/spec/features/work_packages/index_sums_spec.rbindex b20a3c7a552..b3450e11a6a 100644--- a/spec/features/work_packages/index_sums_spec.rb+++ b/spec/features/work_packages/index_sums_spec.rb@@ -110,8 +110,8 @@ RSpec.describe 'Work package index sums', :js doit 'calculates sums correctly' dowp_table.expect_work_package_listed work_package_1, work_package_2- # Add estimated time column- columns.add 'Estimated time'+ # Add work column+ columns.add 'Work'# Add int cf columncolumns.add int_cf.name# Add float cf columndiff --git a/spec/features/work_packages/select/select_query_spec.rb b/spec/features/work_packages/select/select_query_spec.rbindex bb7c48d5810..3b3bad10db6 100644--- a/spec/features/work_packages/select/select_query_spec.rb+++ b/spec/features/work_packages/select/select_query_spec.rb@@ -83,7 +83,7 @@ RSpec.describe 'Query selection' doit 'shows the saved filters', js: true dofilters.openfilters.expect_filter_by 'Assignee', 'is (OR)', ['me']- filters.expect_filter_by 'Progress (%)', '>=', ['10'], 'percentageDone'+ filters.expect_filter_by 'Percent Complete', '>=', ['10'], 'percentageDone'expect(page).to have_selector("#{test_selector('wp-filter-button')} .badge", text: '2')enddiff --git a/spec/features/work_packages/table/group_by/group_by_progress_spec.rb b/spec/features/work_packages/table/group_by/group_by_progress_spec.rbindex 5cca515c3da..9fdbe3a8e90 100644--- a/spec/features/work_packages/table/group_by/group_by_progress_spec.rb+++ b/spec/features/work_packages/table/group_by/group_by_progress_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package group by progress', js: true do+RSpec.describe 'Work Package group by progress', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }@@ -30,7 +30,7 @@ RSpec.describe 'Work Package group by progress', js: true doit 'shows group headers for group by progress (regression test #26717)' do# Group by category- group_by.enable_via_menu 'Progress (%)'+ group_by.enable_via_menu '% Complete'# Expect table to be grouped as WP created abovegroup_by.expect_number_of_groups 3diff --git a/spec/features/work_packages/table/group_by/group_by_spec.rb b/spec/features/work_packages/table/group_by/group_by_spec.rbindex 79d08d35386..77be6d808f5 100644--- a/spec/features/work_packages/table/group_by/group_by_spec.rb+++ b/spec/features/work_packages/table/group_by/group_by_spec.rb@@ -49,6 +49,6 @@ RSpec.describe 'Work Package group by progress', :js do# Expect table to be grouped into 1 groupgroup_by.expect_number_of_groups 1- group_by.expect_grouped_by_value '-', 3+ group_by.expect_grouped_by_value '0%', 3endenddiff --git a/spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rb b/spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rbindex 32cab6ec6a0..064e2481536 100644--- a/spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rb+++ b/spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rb@@ -32,7 +32,7 @@ RSpec.describe 'Refreshing in inline-create row', flaky: true, js: true doexpect(page).to have_selector('.wp-inline-create-row .wp-table--cell-td.subject')expect(page).to have_selector('.wp-inline-create-row .wp-table--cell-td.category')- columns.add 'Progress (%)'+ columns.add '% Complete'expect(page).to have_selector('.wp-inline-create-row .wp-table--cell-td.wp-table--cell-td.percentageDone')endenddiff --git a/spec/lib/api/v3/work_packages/schema/specific_work_package_schema_spec.rb b/spec/lib/api/v3/work_packages/schema/specific_work_package_schema_spec.rbindex a34149ee3e4..f8e49013d28 100644--- a/spec/lib/api/v3/work_packages/schema/specific_work_package_schema_spec.rb+++ b/spec/lib/api/v3/work_packages/schema/specific_work_package_schema_spec.rb@@ -168,7 +168,7 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doenddescribe '#writable?' do- context 'percentage done' do+ describe '% Complete' doit 'is not writable when inferred by status' doallow(Setting).to receive(:work_package_done_ratio).and_return('status')expect(subject).not_to be_writable(:done_ratio)@@ -190,7 +190,7 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doendend- context 'estimated time' do+ describe 'work' doit 'is writable when the work package is a parent' doallow(work_package).to receive(:leaf?).and_return(false)expect(subject).to be_writable(:estimated_hours)@@ -202,7 +202,7 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doendend- context 'derived estimated time' do+ describe 'derived work' doit 'is not writable when the work package is a parent' doallow(work_package).to receive(:leaf?).and_return(false)expect(subject).not_to be_writable(:derived_estimated_time)@@ -214,21 +214,21 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doendend- context 'start date' do- context 'work package is parent' do+ describe 'start date' do+ context 'when work package is parent' dobefore doallow(work_package).to receive(:leaf?).and_return(false)end- context 'scheduled automatically' do+ context 'when scheduled automatically' doit 'is not writable' doexpect(subject).not_to be_writable(:start_date)endend- context 'scheduled manually' do+ context 'when scheduled manually' dobefore dowork_package.schedule_manually = trueend@@ -239,7 +239,7 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doendend- context 'work package is a leaf' do+ context 'when work package is a leaf' doit 'is writable' doallow(work_package).to receive(:leaf?).and_return(true)expect(subject).to be_writable(:start_date)@@ -247,21 +247,21 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doendend- context 'due date' do- context 'work package is parent' do+ describe 'due date' do+ context 'when work package is parent' dobefore doallow(work_package).to receive(:leaf?).and_return(false)end- context 'scheduled automatically' do+ context 'when scheduled automatically' doit 'is not writable' doexpect(subject).not_to be_writable(:due_date)endend- context 'scheduled manually' do+ context 'when scheduled manually' dobefore dowork_package.schedule_manually = trueend@@ -272,7 +272,7 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doendend- context 'work package is a leaf' do+ context 'when work package is a leaf' doit 'is writable' doallow(work_package).to receive(:leaf?).and_return(true)expect(subject).to be_writable(:due_date)@@ -280,7 +280,7 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doendend- context 'date' do+ describe 'date' do# As a date only exists on milestones, which can have no children# we do not need to check for differences caused by scheduling modes.before do@@ -298,7 +298,7 @@ RSpec.describe API::V3::WorkPackages::Schema::SpecificWorkPackageSchema doendend- context 'priority' do+ describe 'priority' doit 'is writable when the work package is a parent' doallow(work_package).to receive(:leaf?).and_return(false)expect(subject).to be_writable(:priority)diff --git a/spec/lib/api/v3/work_packages/schema/typed_work_package_schema_spec.rb b/spec/lib/api/v3/work_packages/schema/typed_work_package_schema_spec.rbindex d6ac1ee7399..2423a7e86c9 100644--- a/spec/lib/api/v3/work_packages/schema/typed_work_package_schema_spec.rb+++ b/spec/lib/api/v3/work_packages/schema/typed_work_package_schema_spec.rb@@ -62,7 +62,7 @@ RSpec.describe API::V3::WorkPackages::Schema::TypedWorkPackageSchema doexpect(subject).to be_writable(:done_ratio)end- it 'estimated time is writable' do+ it 'work is writable' doexpect(subject).to be_writable(:estimated_hours)enddiff --git a/spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb b/spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rbindex edc441da6ad..9c954d60945 100644--- a/spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb+++ b/spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb@@ -143,9 +143,8 @@ RSpec.describe WorkPackage::PDFExport::WorkPackageToPdf do'amet', ', consetetur sadipscing elitr.', ' ', '@OpenProject Admin','Image Caption','Foo',- '1', export_time_formatted, project.name,'LongText', 'foo',- '2', export_time_formatted, project.name+ '1', export_time_formatted, project.name].join(' ')expect(result).to eq(expected_result)expect(result).not_to include('DisabledCustomField')diff --git a/spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rb b/spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rbindex 255f2d3cd97..d061fed9a55 100644--- a/spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rb+++ b/spec/requests/api/v3/work_packages/work_packages_schemas_resource_spec.rb@@ -201,7 +201,7 @@ RSpec.describe API::V3::WorkPackages::Schema::WorkPackageSchemasAPI do# Further fields are tested in the representer specsit 'returns the schema for estimated_hours' doexpected = { type: 'Duration',- name: 'Estimated time',+ name: 'Work',required: false,hasDefault: false,writable: false,diff --git a/spec/services/work_packages/update_service_integration_spec.rb b/spec/services/work_packages/update_service_integration_spec.rbindex 889057a44a2..a5663e91a67 100644--- a/spec/services/work_packages/update_service_integration_spec.rb+++ b/spec/services/work_packages/update_service_integration_spec.rb@@ -476,7 +476,7 @@ RSpec.describe WorkPackages::UpdateService, 'integration tests', type: :model dosibling2_work_packageend- it 'works and inherits average done ratio of leaves weighted by estimated times' do+ it 'works and inherits average done ratio of leaves weighted by work values' doexpect(subject).to be_success