From 646d7611a91655983b6f860ae16fa989a4631d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 8 Apr 2024 15:44:43 +0200 Subject: [PATCH] Add 14.0 release notes draft for breaking change --- app/services/work_packages/shared/all_days.rb | 2 +- docs/release-notes/14-0-0/README.md | 214 ++++++++++++++++++ .../relations/create_contract_spec.rb | 2 +- .../relations/shared_contract_examples.rb | 2 +- .../relations/update_contract_spec.rb | 2 +- .../v3/relations/relation_representer_spec.rb | 6 +- .../covering_dates_and_days_of_week_spec.rb | 6 +- .../api/v3/relations/relations_api_spec.rb | 16 +- .../services/relations/create_service_spec.rb | 4 +- .../services/relations/update_service_spec.rb | 4 +- .../set_schedule_service_spec.rb | 32 +-- .../set_schedule_service_working_days_spec.rb | 32 +-- .../work_packages/shared/all_days_spec.rb | 18 +- .../shared/shared_examples_days.rb | 6 +- .../work_packages/shared/working_days_spec.rb | 38 ++-- spec/support/schedule_helpers/chart.rb | 16 +- .../support/schedule_helpers/chart_builder.rb | 6 +- .../schedule_helpers/example_methods.rb | 2 +- .../schedule_helpers/schedule_builder.rb | 2 +- spec/support/wait_for.rb | 2 +- .../schedule_helpers/chart_builder_spec.rb | 12 +- .../schedule_helpers/example_methods_spec.rb | 4 +- .../schedule_helpers/let_schedule_spec.rb | 2 +- .../apply_working_days_change_job_spec.rb | 38 ++-- 24 files changed, 341 insertions(+), 127 deletions(-) create mode 100644 docs/release-notes/14-0-0/README.md diff --git a/app/services/work_packages/shared/all_days.rb b/app/services/work_packages/shared/all_days.rb index e313b90e5716..3efe16d213b9 100644 --- a/app/services/work_packages/shared/all_days.rb +++ b/app/services/work_packages/shared/all_days.rb @@ -50,7 +50,7 @@ def due_date(start_date, duration) start_date + duration - 1 end - def soonest_working_day(date, alg: nil) + def soonest_working_day(date, lag: nil) lag ||= 0 date + lag.days if date end diff --git a/docs/release-notes/14-0-0/README.md b/docs/release-notes/14-0-0/README.md new file mode 100644 index 000000000000..b95a1b42666d --- /dev/null +++ b/docs/release-notes/14-0-0/README.md @@ -0,0 +1,214 @@ +--- +title: OpenProject 14.0.0 +sidebar_navigation: + title: 14.0.0 +release_version: 14.0.0 +release_date: 2024-04-08 +--- + +# OpenProject 14.0.0 + +Release date: 2024-04-08 + +We released [OpenProject 14.0.0](https://community.openproject.org/versions/1356). +The release contains several bug fixes and we recommend updating to the newest version. + +## Important updates and breaking changes + +### API V3: Renaming of Delay to Lag + +In the relations API, the attribute `delay` has been renamed to `lag`. +This change is to align the API with the terminology used in project management and the UI. + +For more information, see [#44054](https://community.openproject.org/work_packages/44054) + + + +## Bug fixes and changes + + + + +- Bugfix: Roadmap graph shows only work packages of current + project \[[#30865](https://community.openproject.org/wp/30865)\] +- Bugfix: Saving changes to user profile after handling error message leads to user profile instead of edit user + page \[[#36521](https://community.openproject.org/wp/36521)\] +- Bugfix: Search bar doesn't have focus state and the first element on the list seams always + selected \[[#43520](https://community.openproject.org/wp/43520)\] +- Bugfix: Search field is not cleared after selection on + Watchers \[[#44469](https://community.openproject.org/wp/44469)\] +- Bugfix: Users who are not allowed to see hourly rates see planned and booked labor costs in + budgets \[[#45834](https://community.openproject.org/wp/45834)\] +- Bugfix: No space between avatar and username in the github tab of a work + package \[[#46215](https://community.openproject.org/wp/46215)\] +- Bugfix: Missing space on the left of the advanced filter \[[#46346](https://community.openproject.org/wp/46346)\] +- Bugfix: Meeting Minutes: Toggling preview mode causes losing + content \[[#48210](https://community.openproject.org/wp/48210)\] +- Bugfix: +Create button disabled after creating a child work package until reloading the + page \[[#49136](https://community.openproject.org/wp/49136)\] +- Bugfix: Missing space between avatars and usernames in Administration -> + Users \[[#50213](https://community.openproject.org/wp/50213)\] +- Bugfix: Taskboard column width stopped working \[[#51416](https://community.openproject.org/wp/51416)\] +- Bugfix: Double close button on Share modal for mobile \[[#51699](https://community.openproject.org/wp/51699)\] +- Bugfix: Odd spacing in Notification and Email Reminder personal setting + pages \[[#51772](https://community.openproject.org/wp/51772)\] +- Bugfix: Misleading error message: IFC upload (file size) \[[#52098](https://community.openproject.org/wp/52098)\] +- Bugfix: OpenProject behind prefix some assests still loaded from web + root \[[#52292](https://community.openproject.org/wp/52292)\] +- Bugfix: Position of status selector too high after opening the drop + down \[[#52669](https://community.openproject.org/wp/52669)\] +- Bugfix: Add meaningful flash error message when user cancels OAuth flow on + OneDrive/SharePoint \[[#52798](https://community.openproject.org/wp/52798)\] +- Bugfix: Waiting modal stuck on network error \[[#53005](https://community.openproject.org/wp/53005)\] +- Bugfix: Imprint Menu Label is not localized \[[#53062](https://community.openproject.org/wp/53062)\] +- Bugfix: Logo not reset when logo file is deleted \[[#53121](https://community.openproject.org/wp/53121)\] +- Bugfix: Health status is not showing for OneDrive storages \[[#53202](https://community.openproject.org/wp/53202)\] +- Bugfix: Error when sorting projects list by "latest activity + at" \[[#53315](https://community.openproject.org/wp/53315)\] +- Bugfix: Cannot modify a query that was created by a deleted + user \[[#53344](https://community.openproject.org/wp/53344)\] +- Bugfix: [AppSignal] Investigate absence of oauth_client for OneDrive + storage. \[[#53345](https://community.openproject.org/wp/53345)\] +- Bugfix: Autocompleters do not find users with accent when using simple + letter \[[#53371](https://community.openproject.org/wp/53371)\] +- Bugfix: Project custom fields and project description no longer allows + macros \[[#53391](https://community.openproject.org/wp/53391)\] +- Bugfix: OAuth flow causes loss of already selected option while adding a storage to a + project \[[#53394](https://community.openproject.org/wp/53394)\] +- Bugfix: Calendar buttons are not translated \[[#53422](https://community.openproject.org/wp/53422)\] +- Bugfix: Project storage main-menu links do not include prefix \[[#53429](https://community.openproject.org/wp/53429)\] +- Bugfix: Empty assignee board for user with reader role \[[#53436](https://community.openproject.org/wp/53436)\] +- Bugfix: Toolbar buttons too close on user page \[[#53477](https://community.openproject.org/wp/53477)\] +- Bugfix: Link on top of the storage should be removed if the read_files permission is missing when it is a + automatically managed project folder. \[[#53484](https://community.openproject.org/wp/53484)\] +- Bugfix: Buttons have the wrong colour in freshly seeded BIM + instance \[[#53504](https://community.openproject.org/wp/53504)\] +- Bugfix: Removing a project custom field stored as a filter in a project list leads to wrong counter + value \[[#53585](https://community.openproject.org/wp/53585)\] +- Bugfix: Meetings: Remove the "Add notes" item from the dropdown menu when notes already + exist \[[#53618](https://community.openproject.org/wp/53618)\] +- Bugfix: Macros text should wrap \[[#53644](https://community.openproject.org/wp/53644)\] +- Bugfix: Error in french translation \[[#53673](https://community.openproject.org/wp/53673)\] +- Bugfix: Visible=false project attribute values are deleted when a non-admin user edits the + attributes \[[#53704](https://community.openproject.org/wp/53704)\] +- Bugfix: Reordering project attributes is popping back on + render \[[#53706](https://community.openproject.org/wp/53706)\] +- Bugfix: ckEditor "..." more menu is overflowing the project custom field + dialog. \[[#53724](https://community.openproject.org/wp/53724)\] +- Bugfix: Fill custom_field_section_id when migrating CreateCustomFieldSections for the first + time \[[#53728](https://community.openproject.org/wp/53728)\] +- Bugfix: Insert code snippet or link modal opens behind the project attributes + modal \[[#53730](https://community.openproject.org/wp/53730)\] +- Bugfix: Action menu position on project attributes admin settings page + broken \[[#53735](https://community.openproject.org/wp/53735)\] +- Bugfix: Project attribute edit button doesn't work \[[#53739](https://community.openproject.org/wp/53739)\] +- Bugfix: Missing translation in help menu for Legal Notice menu + item \[[#53768](https://community.openproject.org/wp/53768)\] +- Bugfix: Project attribute edit menu jumps out of place \[[#53790](https://community.openproject.org/wp/53790)\] +- Bugfix: Deletion dialog does not provide enough context \[[#53802](https://community.openproject.org/wp/53802)\] +- Bugfix: Meeting agenda item overflow with long work package + subject \[[#53812](https://community.openproject.org/wp/53812)\] +- Bugfix: Blank page when clicking a link in meeting agenda item + notes \[[#53813](https://community.openproject.org/wp/53813)\] +- Bugfix: workPackageValue macro for milestone cannot use startDate and + dueDate \[[#53814](https://community.openproject.org/wp/53814)\] +- Bugfix: Dynamics meetings: Macro button for new work packages leads to a blank + page \[[#53935](https://community.openproject.org/wp/53935)\] +- Bugfix: New GitLab integration tab content is displayed in front of all + popups \[[#53948](https://community.openproject.org/wp/53948)\] +- Bugfix: Editing the work package to a different work package doesn't show clearly in the Meeting + history \[[#53976](https://community.openproject.org/wp/53976)\] +- Bugfix: Impossible to copy a project \[[#53990](https://community.openproject.org/wp/53990)\] +- Feature: Consistent calculation of progress (% Complete) in work package + hierarchies \[[#40749](https://community.openproject.org/wp/40749)\] +- Feature: Rename Delay to Lag \[[#44054](https://community.openproject.org/wp/44054)\] +- Feature: Save the "trashed" state of linked files in OpenProject's + cache \[[#45940](https://community.openproject.org/wp/45940)\] +- Feature: Group agenda items with sections \[[#49060](https://community.openproject.org/wp/49060)\] +- Feature: Exclude by status some work packages from the calculation of % Complete and work + estimates \[[#49409](https://community.openproject.org/wp/49409)\] +- Feature: Remove member and revoke shared work packages \[[#50266](https://community.openproject.org/wp/50266)\] +- Feature: Show meeting history / changes \[[#50820](https://community.openproject.org/wp/50820)\] +- Feature: Inform an admin via email about an unhealthy automatically managed file + storage \[[#50913](https://community.openproject.org/wp/50913)\] +- Feature: Fix seeding of status to include % Complete values \[[#50965](https://community.openproject.org/wp/50965)\] +- Feature: Persist the sort order of project lists \[[#51671](https://community.openproject.org/wp/51671)\] +- Feature: Allow renaming persisted project lists \[[#51673](https://community.openproject.org/wp/51673)\] +- Feature: "Save as" option in project list more menu \[[#51675](https://community.openproject.org/wp/51675)\] +- Feature: Global project attributes administration \[[#51789](https://community.openproject.org/wp/51789)\] +- Feature: Project-specific project attributes mapping \[[#51790](https://community.openproject.org/wp/51790)\] +- Feature: Display project attributes on project overview page \[[#51791](https://community.openproject.org/wp/51791)\] +- Feature: Remove project custom fields from global custom field settings + page \[[#51792](https://community.openproject.org/wp/51792)\] +- Feature: Split existing project administration settings into multiple + pages \[[#51793](https://community.openproject.org/wp/51793)\] +- Feature: Remove project custom fields widget \[[#51794](https://community.openproject.org/wp/51794)\] +- Feature: Adjust project API in order to respect project-specific custom + fields \[[#51796](https://community.openproject.org/wp/51796)\] +- Feature: Changing a persisted list (only own) \[[#52144](https://community.openproject.org/wp/52144)\] +- Feature: Copy automatically managed project folder on project copy for + OneDrive/SharePoint \[[#52175](https://community.openproject.org/wp/52175)\] +- Feature: Add toggle to deactivate/activate admin health notification for a + storage \[[#52449](https://community.openproject.org/wp/52449)\] +- Feature: File Storage Permissions explanation \[[#52571](https://community.openproject.org/wp/52571)\] +- Feature: Update the PageHeader component to do all required + actions \[[#52582](https://community.openproject.org/wp/52582)\] +- Feature: Changes in meeting automatically trigger email notification with updated ics + file \[[#52829](https://community.openproject.org/wp/52829)\] +- Feature: Show involved persons of agenda items \[[#52830](https://community.openproject.org/wp/52830)\] +- Feature: Improve UI for OneDrive/SharePoint file storage + settings \[[#52892](https://community.openproject.org/wp/52892)\] +- Feature: Restrict filtering on custom values that are not active + attributes \[[#53007](https://community.openproject.org/wp/53007)\] +- Feature: Sort work packages autocompletion by descending updated at time in meetings + module \[[#53033](https://community.openproject.org/wp/53033)\] +- Feature: Nudge user to login to storage upon project storage + edit \[[#53058](https://community.openproject.org/wp/53058)\] +- Feature: Reduce configurable design variables \[[#53309](https://community.openproject.org/wp/53309)\] +- Feature: Change row break in email notifications \[[#53316](https://community.openproject.org/wp/53316)\] +- Feature: Disable name and email fields in user profile for LDAP + user \[[#53330](https://community.openproject.org/wp/53330)\] +- Feature: Have only non bundled gems appear in the Plugin list \[[#53346](https://community.openproject.org/wp/53346)\] +- Feature: Fine-tuning of truncation feature in project list and project + overview \[[#53373](https://community.openproject.org/wp/53373)\] +- Feature: Before saving a OneDrive/SharePoint storage the storage settings should be validated against + OneDrive/SharePoint \[[#53386](https://community.openproject.org/wp/53386)\] +- Feature: Allow setting createdAt, author via API \[[#53423](https://community.openproject.org/wp/53423)\] +- Feature: Make the Author field editable or settable \[[#53444](https://community.openproject.org/wp/53444)\] +- Feature: Allow 4 and 8 week display modes in team planner \[[#53475](https://community.openproject.org/wp/53475)\] +- Feature: Allow umlauts for login name in OpenProject, LDAP + authentication \[[#53486](https://community.openproject.org/wp/53486)\] +- Feature: Meetings: Improve attachments \[[#53506](https://community.openproject.org/wp/53506)\] +- Feature: Support setting accountable to current user via custom + action \[[#53507](https://community.openproject.org/wp/53507)\] +- Feature: Add separate checkbox about attachments when user copies a + meeting \[[#53568](https://community.openproject.org/wp/53568)\] +- Feature: Handle no active project attributes in project overview + sidebar \[[#53577](https://community.openproject.org/wp/53577)\] +- Feature: Check if and how project activity logs should be + adapted \[[#53580](https://community.openproject.org/wp/53580)\] +- Feature: Disable the macros for the project custom fields. \[[#53701](https://community.openproject.org/wp/53701)\] +- Feature: Project creation with project attributes \[[#53703](https://community.openproject.org/wp/53703)\] +- Feature: Project copy with project attributes \[[#53705](https://community.openproject.org/wp/53705)\] +- Feature: Project export with disabled project attributes \[[#53733](https://community.openproject.org/wp/53733)\] +- Feature: Removing a work package from a agenda should be called "Remove" instead of " + Delete" \[[#53766](https://community.openproject.org/wp/53766)\] +- Feature: Add % Complete to section "Estimates and time" \[[#53771](https://community.openproject.org/wp/53771)\] +- Feature: Show diff for changes in meeting agenda items \[[#53975](https://community.openproject.org/wp/53975)\] +- Feature: Progress reporting for work package hierarchies \[[#40867](https://community.openproject.org/wp/40867)\] +- Feature: Custom set of project attributes grouped in sections \[[#49688](https://community.openproject.org/wp/49688)\] +- Feature: Copy of template projects including their project folders in + SharePoint \[[#51000](https://community.openproject.org/wp/51000)\] +- Feature: Email notifications for unhealthy file storages \[[#52840](https://community.openproject.org/wp/52840)\] + + + + +#### Contributions + +A big thanks to community members for reporting bugs and helping us identifying and providing fixes. + +Special thanks for reporting and finding bugs go to + +Silas Kropf, Philipp Schulz, Benjamin Rönnau, Mario Haustein, Matt User, Mario Zeppin, Romain Besson, Cécile Guiot, +Daniel Hilbrand, Christina Vechkanova, Sven Kunze, Richard Richter, Julian Wolff diff --git a/spec/contracts/relations/create_contract_spec.rb b/spec/contracts/relations/create_contract_spec.rb index 6bdfec0816c5..36fd49415085 100644 --- a/spec/contracts/relations/create_contract_spec.rb +++ b/spec/contracts/relations/create_contract_spec.rb @@ -35,7 +35,7 @@ Relation.new from: relation_from, to: relation_to, relation_type:, - lag: relation_delay + lag: relation_lag end end end diff --git a/spec/contracts/relations/shared_contract_examples.rb b/spec/contracts/relations/shared_contract_examples.rb index 175801fd373f..ab8153029c8f 100644 --- a/spec/contracts/relations/shared_contract_examples.rb +++ b/spec/contracts/relations/shared_contract_examples.rb @@ -51,7 +51,7 @@ let(:relation_type) do Relation::TYPE_RELATES end - let(:relation_delay) { 42 } + let(:relation_lag) { 42 } let!(:wp_visible_scope) do instance_double(ActiveRecord::Relation).tap do |relation| allow(WorkPackage) diff --git a/spec/contracts/relations/update_contract_spec.rb b/spec/contracts/relations/update_contract_spec.rb index d8c925dd0959..c18527dd625e 100644 --- a/spec/contracts/relations/update_contract_spec.rb +++ b/spec/contracts/relations/update_contract_spec.rb @@ -36,7 +36,7 @@ from: relation_from, to: relation_to, relation_type:, - delay: relation_delay) + lag: relation_lag) end end diff --git a/spec/lib/api/v3/relations/relation_representer_spec.rb b/spec/lib/api/v3/relations/relation_representer_spec.rb index 294cb4403a0a..318ff6dd1f93 100644 --- a/spec/lib/api/v3/relations/relation_representer_spec.rb +++ b/spec/lib/api/v3/relations/relation_representer_spec.rb @@ -79,7 +79,7 @@ "type" => "follows", "reverseType" => "precedes", "description" => description, - "delay" => delay + "lag" => lag } end @@ -95,9 +95,9 @@ expect(rel.from_id).to eq from.id.to_s expect(rel.to_id).to eq to.id.to_s - expect(rel.delay).to eq delay + expect(rel.lag).to eq lag expect(rel.relation_type).to eq type expect(rel.description).to eq description - expect(rel.delay).to eq delay + expect(rel.lag).to eq lag end end diff --git a/spec/models/work_packages/scopes/covering_dates_and_days_of_week_spec.rb b/spec/models/work_packages/scopes/covering_dates_and_days_of_week_spec.rb index d1aea82e5521..8c38183c4a0f 100644 --- a/spec/models/work_packages/scopes/covering_dates_and_days_of_week_spec.rb +++ b/spec/models/work_packages/scopes/covering_dates_and_days_of_week_spec.rb @@ -116,13 +116,13 @@ .to eq([]) end - it "does not return work packages having follows relation with delay covering the given days of week" do + it "does not return work packages having follows relation with lag covering the given days of week" do create_schedule(<<~CHART) days | MTWTFSS | not_covered1 | X | - follower1 | X | follows not_covered1 with delay 3 + follower1 | X | follows not_covered1 with lag 3 not_covered2 | X | - follower2 | X | follows not_covered2 with delay 1 + follower2 | X | follows not_covered2 with lag 1 CHART expect(WorkPackage.covering_dates_and_days_of_week(**day_args[:tuesday, :thursday])) diff --git a/spec/requests/api/v3/relations/relations_api_spec.rb b/spec/requests/api/v3/relations/relations_api_spec.rb index fbb1d59d3801..a64fbbb3a4db 100644 --- a/spec/requests/api/v3/relations/relations_api_spec.rb +++ b/spec/requests/api/v3/relations/relations_api_spec.rb @@ -39,7 +39,7 @@ let(:type) { "follows" } let(:description) { "This first" } - let(:delay) { 3 } + let(:lag) { 3 } let(:params) do { @@ -53,7 +53,7 @@ }, type:, description:, - delay: + lag: } end let(:relation) do @@ -62,7 +62,7 @@ to:, relation_type: type, description:, - delay:) + lag:) end before do @@ -78,7 +78,7 @@ expect(rel.to).to eq to expect(rel.relation_type).to eq type expect(rel.description).to eq description - expect(rel.delay).to eq delay + expect(rel.lag).to eq lag end end @@ -226,12 +226,12 @@ describe "updating a relation" do let(:new_description) { "This is another description" } - let(:new_delay) { 42 } + let(:new_lag) { 42 } let(:update) do { description: new_description, - delay: new_delay + lag: new_lag } end @@ -249,8 +249,8 @@ expect(relation.reload.description).to eq new_description end - it "updates the relation's delay" do - expect(relation.reload.delay).to eq new_delay + it "updates the relation's lag" do + expect(relation.reload.lag).to eq new_lag end it "returns the updated relation" do diff --git a/spec/services/relations/create_service_spec.rb b/spec/services/relations/create_service_spec.rb index 6d2371a621bc..fdf39d5051ae 100644 --- a/spec/services/relations/create_service_spec.rb +++ b/spec/services/relations/create_service_spec.rb @@ -35,7 +35,7 @@ let(:work_package2_due_date) { nil } let(:follows_relation) { false } - let(:delay) { 3 } + let(:lag) { 3 } let(:work_package1) do build_stubbed(:work_package, @@ -63,7 +63,7 @@ { to: work_package1, from: work_package2, - delay: + lag: } end diff --git a/spec/services/relations/update_service_spec.rb b/spec/services/relations/update_service_spec.rb index e008a6ef57fc..7868ae19d1b6 100644 --- a/spec/services/relations/update_service_spec.rb +++ b/spec/services/relations/update_service_spec.rb @@ -35,7 +35,7 @@ let(:work_package2_due_date) { nil } let(:follows_relation) { false } - let(:delay) { 3 } + let(:lag) { 3 } let(:work_package1) do build_stubbed(:work_package, @@ -63,7 +63,7 @@ { to: work_package1, from: work_package2, - delay: + lag: } end diff --git a/spec/services/work_packages/set_schedule_service_spec.rb b/spec/services/work_packages/set_schedule_service_spec.rb index 1ddef14287c6..8062b24e560f 100644 --- a/spec/services/work_packages/set_schedule_service_spec.rb +++ b/spec/services/work_packages/set_schedule_service_spec.rb @@ -47,27 +47,27 @@ let(:follower1_start_date) { Time.zone.today + 1.day } let(:follower1_due_date) { Time.zone.today + 3.days } - let(:follower1_delay) { 0 } + let(:follower1_lag) { 0 } let(:following_work_package1) do create_follower(follower1_start_date, follower1_due_date, - { work_package => follower1_delay }) + { work_package => follower1_lag }) end let(:follower2_start_date) { Time.zone.today + 4.days } let(:follower2_due_date) { Time.zone.today + 8.days } - let(:follower2_delay) { 0 } + let(:follower2_lag) { 0 } let(:following_work_package2) do create_follower(follower2_start_date, follower2_due_date, - { following_work_package1 => follower2_delay }) + { following_work_package1 => follower2_lag }) end let(:follower3_start_date) { Time.zone.today + 9.days } let(:follower3_due_date) { Time.zone.today + 10.days } - let(:follower3_delay) { 0 } + let(:follower3_lag) { 0 } let(:following_work_package3) do create_follower(follower3_start_date, follower3_due_date, - { following_work_package2 => follower3_delay }) + { following_work_package2 => follower3_lag }) end let(:parent_follower1_start_date) { follower1_start_date } @@ -93,9 +93,9 @@ def create_follower(start_date, due_date, predecessors, parent: nil) due_date:, parent:) - predecessors.map do |predecessor, delay| + predecessors.map do |predecessor, lag| create(:follows_relation, - delay:, + lag:, from: work_package, to: predecessor) end @@ -273,10 +273,10 @@ def create_child(parent, start_date, due_date) it_behaves_like 'does not reschedule' end - context 'when moving forward with the follower having some space left and a delay' do + context 'when moving forward with the follower having some space left and a lag' do let(:follower1_start_date) { Time.zone.today + 5.days } let(:follower1_due_date) { Time.zone.today + 7.days } - let(:follower1_delay) { 3 } + let(:follower1_lag) { 3 } before do work_package.due_date = Time.zone.today + 5.days @@ -421,7 +421,7 @@ def create_child(parent, start_date, due_date) let(:following_work_package1) do create_follower(follower1_start_date, follower1_due_date, - { work_package => follower1_delay, + { work_package => follower1_lag, another_successor => 0 }) end let(:another_successor) do @@ -743,20 +743,20 @@ def create_child(parent, start_date, due_date) context 'with a chain of successors with two paths leading to the same work package in the end' do let(:follower3_start_date) { Time.zone.today + 4.days } let(:follower3_due_date) { Time.zone.today + 7.days } - let(:follower3_delay) { 0 } + let(:follower3_lag) { 0 } let(:following_work_package3) do create_follower(follower3_start_date, follower3_due_date, - { work_package => follower3_delay }) + { work_package => follower3_lag }) end let(:follower4_start_date) { Time.zone.today + 9.days } let(:follower4_due_date) { Time.zone.today + 10.days } - let(:follower4_delay2) { 0 } - let(:follower4_delay3) { 0 } + let(:follower4_lag2) { 0 } + let(:follower4_lag3) { 0 } let(:following_work_package4) do create_follower(follower4_start_date, follower4_due_date, - { following_work_package2 => follower4_delay2, following_work_package3 => follower4_delay3 }) + { following_work_package2 => follower4_lag2, following_work_package3 => follower4_lag3 }) end let!(:following) do [following_work_package1, diff --git a/spec/services/work_packages/set_schedule_service_working_days_spec.rb b/spec/services/work_packages/set_schedule_service_working_days_spec.rb index 2d7f1a9f1b9c..ae53f37c86a0 100644 --- a/spec/services/work_packages/set_schedule_service_working_days_spec.rb +++ b/spec/services/work_packages/set_schedule_service_working_days_spec.rb @@ -254,11 +254,11 @@ end end - context "with the follower having some space left and a delay" do + context "with the follower having some space left and a lag" do let_schedule(<<~CHART) days | MTWTFSSmtwtfss | work_package | X | - follower | XXX | follows work_package with delay 3 + follower | XXX | follows work_package with lag 3 CHART before do @@ -268,7 +268,7 @@ CHART end - it "reschedules the follower to start after the delay" do + it "reschedules the follower to start after the lag" do expect_schedule(subject.all_results, <<~CHART) | MTWTFSSmtwtfss | work_package | XXXXX..X | @@ -277,11 +277,11 @@ end end - context "with the follower having a delay overlapping non-working days" do + context "with the follower having a lag overlapping non-working days" do let_schedule(<<~CHART) days | MTWTFSS | work_package | X | - follower | XX | follows work_package with delay 2 + follower | XX | follows work_package with lag 2 CHART before do @@ -291,7 +291,7 @@ CHART end - it "reschedules the follower to start after the non-working days and the delay" do + it "reschedules the follower to start after the non-working days and the lag" do expect(subject.all_results).to match_schedule(<<~CHART) | MTWTFSSmtwt | work_package | X | @@ -350,7 +350,7 @@ let_schedule(<<~CHART) days | mtwtfssmtwtfssMTWTFSS | work_package | X | - follower | XX | follows work_package, follows annoyer with delay 2 + follower | XX | follows work_package, follows annoyer with lag 2 annoyer | XX..XX | CHART @@ -943,12 +943,12 @@ end end - context "when moving forward with some delay and spaces between the followers" do + context "when moving forward with some lag and spaces between the followers" do let_schedule(<<~CHART) days | MTWTFSSm sm sm | work_package | ] | follower1 | XXX | follows work_package - follower2 | XXXX | follows follower1 with delay 3 + follower2 | XXXX | follows follower1 with lag 3 follower3 | XXX..XX | follows follower2 follower4 | XX | follows follower3 CHART @@ -960,7 +960,7 @@ CHART end - it "reschedules all the followers keeping the delay and compacting the extra spaces" do + it "reschedules all the followers keeping the lag and compacting the extra spaces" do expect(subject.all_results).to match_schedule(<<~CHART) days | MTWTFSSm sm sm sm | work_package | ] | @@ -994,7 +994,7 @@ CHART end - it "reschedules all the followers keeping the delay and compacting the extra spaces" do + it "reschedules all the followers keeping the lag and compacting the extra spaces" do expect(subject.all_results).to match_schedule(<<~CHART) days | MTWTFSSm w m | work_package | X.X | @@ -1125,7 +1125,7 @@ let_schedule(<<~CHART) days | MTWTFSS | work_package | | - new_parent | | follows new_parent_predecessor with delay 3 + new_parent | | follows new_parent_predecessor with lag 3 new_parent_predecessor | X | CHART @@ -1147,7 +1147,7 @@ let_schedule(<<~CHART) days | MTWTFSS | work_package | | duration 4 - new_parent | | follows new_parent_predecessor with delay 3 + new_parent | | follows new_parent_predecessor with lag 3 new_parent_predecessor | X | CHART @@ -1170,7 +1170,7 @@ let_schedule(<<~CHART) days | MTWTFSS | work_package | ] | - new_parent | | follows new_parent_predecessor with delay 3 + new_parent | | follows new_parent_predecessor with lag 3 new_parent_predecessor | X | CHART @@ -1192,7 +1192,7 @@ let_schedule(<<~CHART) days | MTWTFSS | work_package | ] | - new_parent | | follows new_parent_predecessor with delay 3 + new_parent | | follows new_parent_predecessor with lag 3 new_parent_predecessor | X | CHART @@ -1214,7 +1214,7 @@ let_schedule(<<~CHART) days | MTWTFSS | work_package | XX | - new_parent | | follows new_parent_predecessor with delay 3 + new_parent | | follows new_parent_predecessor with lag 3 new_parent_predecessor | X | CHART diff --git a/spec/services/work_packages/shared/all_days_spec.rb b/spec/services/work_packages/shared/all_days_spec.rb index b131e1214821..b74103033b17 100644 --- a/spec/services/work_packages/shared/all_days_spec.rb +++ b/spec/services/work_packages/shared/all_days_spec.rb @@ -142,11 +142,11 @@ expect(subject.soonest_working_day(nil)).to be_nil end - context "with delay" do - it "returns the soonest working day from the given day, after a configurable delay of working days" do - expect(subject.soonest_working_day(sunday_2022_07_31, delay: nil)).to eq(sunday_2022_07_31) - expect(subject.soonest_working_day(sunday_2022_07_31, delay: 0)).to eq(sunday_2022_07_31) - expect(subject.soonest_working_day(sunday_2022_07_31, delay: 1)).to eq(Date.new(2022, 8, 1)) + context "with lag" do + it "returns the soonest working day from the given day, after a configurable lag of working days" do + expect(subject.soonest_working_day(sunday_2022_07_31, lag: nil)).to eq(sunday_2022_07_31) + expect(subject.soonest_working_day(sunday_2022_07_31, lag: 0)).to eq(sunday_2022_07_31) + expect(subject.soonest_working_day(sunday_2022_07_31, lag: 1)).to eq(Date.new(2022, 8, 1)) end end @@ -155,8 +155,8 @@ expect(subject.soonest_working_day(sunday_2022_07_31)).to eq(sunday_2022_07_31) end - context "with delay" do - include_examples "soonest working day with delay", date: Date.new(2022, 1, 1), delay: 30, expected: Date.new(2022, 1, 31) + context "with lag" do + include_examples "soonest working day with lag", date: Date.new(2022, 1, 1), lag: 30, expected: Date.new(2022, 1, 31) end end @@ -165,8 +165,8 @@ expect(subject.soonest_working_day(Date.new(2022, 12, 25))).to eq(Date.new(2022, 12, 25)) end - context "with delay" do - include_examples "soonest working day with delay", date: Date.new(2022, 12, 24), delay: 7, + context "with lag" do + include_examples "soonest working day with lag", date: Date.new(2022, 12, 24), lag: 7, expected: Date.new(2022, 12, 31) end end diff --git a/spec/services/work_packages/shared/shared_examples_days.rb b/spec/services/work_packages/shared/shared_examples_days.rb index 0f652d74615d..29033a2ee643 100644 --- a/spec/services/work_packages/shared/shared_examples_days.rb +++ b/spec/services/work_packages/shared/shared_examples_days.rb @@ -89,8 +89,8 @@ end end -RSpec.shared_examples "soonest working day with delay" do |date:, delay:, expected:| - it "soonest_working_day(#{date.to_fs(:wday_date)}, delay: #{delay.inspect}) => #{expected.to_fs(:wday_date)}" do - expect(subject.soonest_working_day(date, delay:)).to eq(expected) +RSpec.shared_examples "soonest working day with lag" do |date:, lag:, expected:| + it "soonest_working_day(#{date.to_fs(:wday_date)}, lag: #{lag.inspect}) => #{expected.to_fs(:wday_date)}" do + expect(subject.soonest_working_day(date, lag:)).to eq(expected) end end diff --git a/spec/services/work_packages/shared/working_days_spec.rb b/spec/services/work_packages/shared/working_days_spec.rb index 3835cd505291..a2be2810338f 100644 --- a/spec/services/work_packages/shared/working_days_spec.rb +++ b/spec/services/work_packages/shared/working_days_spec.rb @@ -188,16 +188,16 @@ expect(subject.soonest_working_day(nil)).to be_nil end - context "with delay" do - it "returns the soonest working day from the given day, after a configurable delay of working days" do - expect(subject.soonest_working_day(sunday_2022_07_31, delay: nil)).to eq(sunday_2022_07_31) - expect(subject.soonest_working_day(sunday_2022_07_31, delay: 0)).to eq(sunday_2022_07_31) - expect(subject.soonest_working_day(sunday_2022_07_31, delay: 1)).to eq(monday_2022_08_01) + context "with lag" do + it "returns the soonest working day from the given day, after a configurable lag of working days" do + expect(subject.soonest_working_day(sunday_2022_07_31, lag: nil)).to eq(sunday_2022_07_31) + expect(subject.soonest_working_day(sunday_2022_07_31, lag: 0)).to eq(sunday_2022_07_31) + expect(subject.soonest_working_day(sunday_2022_07_31, lag: 1)).to eq(monday_2022_08_01) end - it "works with big delay value like 100_000" do + it "works with big lag value like 100_000" do # First implementation was recursive and failed with SystemStackError: stack level too deep - expect { subject.soonest_working_day(sunday_2022_07_31, delay: 100_000) } + expect { subject.soonest_working_day(sunday_2022_07_31, lag: 100_000) } .not_to raise_error end end @@ -208,18 +208,18 @@ include_examples "soonest working day", date: sunday_2022_07_31, expected: monday_2022_08_01 include_examples "soonest working day", date: monday_2022_08_01, expected: monday_2022_08_01 - context "with delay" do - include_examples "soonest working day with delay", date: friday_2022_07_29, delay: 0, expected: friday_2022_07_29 - include_examples "soonest working day with delay", date: saturday_2022_07_30, delay: 0, expected: monday_2022_08_01 - include_examples "soonest working day with delay", date: sunday_2022_07_31, delay: 0, expected: monday_2022_08_01 - include_examples "soonest working day with delay", date: monday_2022_08_01, delay: 0, expected: monday_2022_08_01 + context "with lag" do + include_examples "soonest working day with lag", date: friday_2022_07_29, lag: 0, expected: friday_2022_07_29 + include_examples "soonest working day with lag", date: saturday_2022_07_30, lag: 0, expected: monday_2022_08_01 + include_examples "soonest working day with lag", date: sunday_2022_07_31, lag: 0, expected: monday_2022_08_01 + include_examples "soonest working day with lag", date: monday_2022_08_01, lag: 0, expected: monday_2022_08_01 - include_examples "soonest working day with delay", date: friday_2022_07_29, delay: 1, expected: monday_2022_08_01 - include_examples "soonest working day with delay", date: saturday_2022_07_30, delay: 1, expected: Date.new(2022, 8, 2) - include_examples "soonest working day with delay", date: sunday_2022_07_31, delay: 1, expected: Date.new(2022, 8, 2) - include_examples "soonest working day with delay", date: monday_2022_08_01, delay: 1, expected: Date.new(2022, 8, 2) + include_examples "soonest working day with lag", date: friday_2022_07_29, lag: 1, expected: monday_2022_08_01 + include_examples "soonest working day with lag", date: saturday_2022_07_30, lag: 1, expected: Date.new(2022, 8, 2) + include_examples "soonest working day with lag", date: sunday_2022_07_31, lag: 1, expected: Date.new(2022, 8, 2) + include_examples "soonest working day with lag", date: monday_2022_08_01, lag: 1, expected: Date.new(2022, 8, 2) - include_examples "soonest working day with delay", date: friday_2022_07_29, delay: 8, expected: Date.new(2022, 8, 10) + include_examples "soonest working day with lag", date: friday_2022_07_29, lag: 8, expected: Date.new(2022, 8, 10) end end @@ -228,8 +228,8 @@ include_examples "soonest working day", date: Date.new(2022, 12, 31), expected: Date.new(2022, 12, 31) include_examples "soonest working day", date: Date.new(2023, 1, 1), expected: Date.new(2023, 1, 2) - context "with delay" do - include_examples "soonest working day with delay", date: Date.new(2022, 12, 24), delay: 7, expected: Date.new(2023, 1, 2) + context "with lag" do + include_examples "soonest working day with lag", date: Date.new(2022, 12, 24), lag: 7, expected: Date.new(2023, 1, 2) end end diff --git a/spec/support/schedule_helpers/chart.rb b/spec/support/schedule_helpers/chart.rb index 42124c5ce4cf..503603511c03 100644 --- a/spec/support/schedule_helpers/chart.rb +++ b/spec/support/schedule_helpers/chart.rb @@ -87,7 +87,7 @@ def with(order: work_package_names, id_column_size: self.id_column_size, first_d chart.first_day = first_day chart.last_day = last_day chart.predecessors_by_followers = predecessors_by_followers - chart.delays_between = delays_between + chart.lags_between = lags_between chart.parent_by_child = parent_by_child chart end @@ -129,8 +129,8 @@ def predecessors_by_follower(follower) predecessors_by_followers[follower] end - def delay_between(predecessor:, follower:) - delays_between.fetch([predecessor, follower]) + def lag_between(predecessor:, follower:) + lags_between.fetch([predecessor, follower]) end def add_work_package(attributes) @@ -160,9 +160,9 @@ def set_ignore_non_working_days(name, ignore_non_working_days) attributes[:ignore_non_working_days] = ignore_non_working_days end - def add_follows_relation(predecessor:, follower:, delay:) + def add_follows_relation(predecessor:, follower:, lag:) predecessors_by_follower(follower) << predecessor - delays_between[[predecessor, follower]] = delay + lags_between[[predecessor, follower]] = lag end def add_parent_relation(parent:, child:) @@ -200,7 +200,7 @@ def compact_dates :first_day, :last_day, :predecessors_by_followers, - :delays_between, + :lags_between, :parent_by_child private @@ -252,8 +252,8 @@ def predecessors_by_followers @predecessors_by_followers ||= Hash.new { |h, k| h[k] = [] } end - def delays_between - @delays_between ||= Hash.new(0) + def lags_between + @lags_between ||= Hash.new(0) end def parent_by_child diff --git a/spec/support/schedule_helpers/chart_builder.rb b/spec/support/schedule_helpers/chart_builder.rb index 3d71625d9391..e7fcafe3ab6b 100644 --- a/spec/support/schedule_helpers/chart_builder.rb +++ b/spec/support/schedule_helpers/chart_builder.rb @@ -101,11 +101,11 @@ def parse_work_package_line(line) def parse_properties(name, property) case property - when /^follows (\w+)(?: with delay (\d+))?/ + when /^follows (\w+)(?: with lag (\d+))?/ chart.add_follows_relation( predecessor: $1.to_sym, follower: name.to_sym, - delay: $2.to_i + lag: $2.to_i ) when /^child of (\w+)/ chart.add_parent_relation( @@ -122,7 +122,7 @@ def parse_properties(name, property) spell_checker = DidYouMean::SpellChecker.new( dictionary: [ "follows :wp", - "follows :wp with delay :int", + "follows :wp with lag :int", "child of :wp", "duration :int", "working days work week", diff --git a/spec/support/schedule_helpers/example_methods.rb b/spec/support/schedule_helpers/example_methods.rb index 739ca4d79e23..bc0f88e71cf8 100644 --- a/spec/support/schedule_helpers/example_methods.rb +++ b/spec/support/schedule_helpers/example_methods.rb @@ -46,7 +46,7 @@ module ExampleMethods # create(:work_package, subject: 'follower', start_date: next_monday + 2.days, due_date: next_monday + 4.days) } # create(:work_package, subject: 'start_only', start_date: next_monday + 1.day) } # create(:work_package, subject: 'due_only', due_date: next_monday + 3.days) } - # create(:follows_relation, from: follower, to: main, delay: 0) } + # create(:follows_relation, from: follower, to: main, lag: 0) } # def create_schedule(chart_representation) chart = Chart.for(chart_representation) diff --git a/spec/support/schedule_helpers/schedule_builder.rb b/spec/support/schedule_helpers/schedule_builder.rb index 3d4ad1b747a9..f85ea86fca43 100644 --- a/spec/support/schedule_helpers/schedule_builder.rb +++ b/spec/support/schedule_helpers/schedule_builder.rb @@ -61,7 +61,7 @@ def create_follows_relations(follower) FactoryBot.create(:follows_relation, from: create_work_package(follower), to: create_work_package(predecessor), - delay: chart.delay_between(predecessor:, follower:)) + lag: chart.lag_between(predecessor:, follower:)) end end diff --git a/spec/support/wait_for.rb b/spec/support/wait_for.rb index 6a2a93f3f8a8..96d19f304d3a 100644 --- a/spec/support/wait_for.rb +++ b/spec/support/wait_for.rb @@ -36,7 +36,7 @@ def wait_for(value = Target::UndefinedValue, &block) # @param timeout [Numeric] time in seconds to wait up for assertions to pass # @param delay [Numeric] time in seconds elapsing between two checks of an # assertion - def with_wait(timeout: nil, delay: nil) + def with_wait(timeout: nil, lag: nil) original_timeout = RSpec.configuration.wait_timeout original_delay = RSpec.configuration.wait_delay diff --git a/spec/support_spec/schedule_helpers/chart_builder_spec.rb b/spec/support_spec/schedule_helpers/chart_builder_spec.rb index 096dd94a5d2d..b73a33dbb0ec 100644 --- a/spec/support_spec/schedule_helpers/chart_builder_spec.rb +++ b/spec/support_spec/schedule_helpers/chart_builder_spec.rb @@ -107,7 +107,7 @@ follower | | follows main CHART expect(chart.predecessors_by_follower(:follower)).to eq([:main]) - expect(chart.delay_between(predecessor: :main, follower: :follower)).to eq(0) + expect(chart.lag_between(predecessor: :main, follower: :follower)).to eq(0) end it "can be declared in any order" do @@ -117,19 +117,19 @@ main | | CHART expect(chart.predecessors_by_follower(:follower)).to eq([:main]) - expect(chart.delay_between(predecessor: :main, follower: :follower)).to eq(0) + expect(chart.lag_between(predecessor: :main, follower: :follower)).to eq(0) end end - describe "follows with delay " do - it "adds a follows relation to the named with a delay" do + describe "follows with lag " do + it "adds a follows relation to the named with a lag" do chart = builder.parse(<<~CHART) days | MTWTFSS | main | | - follower | | follows main with delay 3 + follower | | follows main with lag 3 CHART expect(chart.predecessors_by_follower(:follower)).to eq([:main]) - expect(chart.delay_between(predecessor: :main, follower: :follower)).to eq(3) + expect(chart.lag_between(predecessor: :main, follower: :follower)).to eq(3) end end diff --git a/spec/support_spec/schedule_helpers/example_methods_spec.rb b/spec/support_spec/schedule_helpers/example_methods_spec.rb index 2f29d72f65a0..cb01a9bcb098 100644 --- a/spec/support_spec/schedule_helpers/example_methods_spec.rb +++ b/spec/support_spec/schedule_helpers/example_methods_spec.rb @@ -91,13 +91,13 @@ schedule = create_schedule(<<~CHART) days | MTWTFSS | predecessor | XX | - follower | X | follows predecessor with delay 2 + follower | X | follows predecessor with lag 2 CHART expect(Relation.count).to eq(1) expect(schedule.follows_relation(from: "follower", to: "predecessor")).to be_an_instance_of(Relation) expect(schedule.follows_relation(from: "follower", to: "predecessor")).to have_attributes( relation_type: "follows", - delay: 2, + lag: 2, from: schedule.work_package("follower"), to: schedule.work_package("predecessor") ) diff --git a/spec/support_spec/schedule_helpers/let_schedule_spec.rb b/spec/support_spec/schedule_helpers/let_schedule_spec.rb index 030b18d6d80f..a6e9f8b4d18b 100644 --- a/spec/support_spec/schedule_helpers/let_schedule_spec.rb +++ b/spec/support_spec/schedule_helpers/let_schedule_spec.rb @@ -35,7 +35,7 @@ let_schedule(<<~CHART) days | MTWTFSS | main | XX | - follower | XXX | follows main with delay 2 + follower | XXX | follows main with lag 2 child | | child of main CHART diff --git a/spec/workers/work_packages/apply_working_days_change_job_spec.rb b/spec/workers/work_packages/apply_working_days_change_job_spec.rb index e296de7ca974..5588405c4f62 100644 --- a/spec/workers/work_packages/apply_working_days_change_job_spec.rb +++ b/spec/workers/work_packages/apply_working_days_change_job_spec.rb @@ -207,18 +207,18 @@ end end - context "when a follower has a predecessor with delay covering a day that is now a non-working day" do + context "when a follower has a predecessor with lag covering a day that is now a non-working day" do let_schedule(<<~CHART) days | MTWTFSS | predecessor | XX ░░ | - follower | X ░░ | follows predecessor with delay 1 + follower | X ░░ | follows predecessor with lag 1 CHART before do set_non_working_week_days("wednesday") end - it "moves the follower start date forward to keep the delay to 1 day" do + it "moves the follower start date forward to keep the lag to 1 day" do subject expect(WorkPackage.all).to match_schedule(<<~CHART) days | MTWTFSS | @@ -243,11 +243,11 @@ end end - context "with work packages without dates following each other with delay" do + context "with work packages without dates following each other with lag" do let_schedule(<<~CHART) days | MTWTFSS | predecessor | ░░ | - follower | ░░ | follows predecessor with delay 5 + follower | ░░ | follows predecessor with lag 5 CHART before do @@ -270,11 +270,11 @@ end end - context "when a follower has a predecessor with delay covering multiple days with different working changes" do + context "when a follower has a predecessor with lag covering multiple days with different working changes" do let_schedule(<<~CHART) days | MTWTFSS | predecessor | X ░ ░░ | - follower | ░ X░░ | follows predecessor with delay 2 + follower | ░ X░░ | follows predecessor with lag 2 CHART let(:work_week) { set_work_week("monday", "tuesday", "thursday", "friday") } @@ -753,18 +753,18 @@ end end - context "when a follower has a predecessor with delay covering a day that is now a non-working day" do + context "when a follower has a predecessor with lag covering a day that is now a non-working day" do let_schedule(<<~CHART) days | MTWTFSS | predecessor | XX ░░ | - follower | X ░░ | follows predecessor with delay 1 + follower | X ░░ | follows predecessor with lag 1 CHART before do set_non_working_days(next_monday.next_occurring(:wednesday)) end - it "moves the follower start date forward to keep the delay to 1 day" do + it "moves the follower start date forward to keep the lag to 1 day" do subject expect(WorkPackage.all).to match_schedule(<<~CHART) days | MTWTFSS | @@ -789,11 +789,11 @@ end end - context "with work packages without dates following each other with delay" do + context "with work packages without dates following each other with lag" do let_schedule(<<~CHART) days | MTWTFSS | predecessor | ░░ | - follower | ░░ | follows predecessor with delay 5 + follower | ░░ | follows predecessor with lag 5 CHART before do @@ -816,11 +816,11 @@ end end - context "when a follower has a predecessor with delay covering multiple days with different working changes" do + context "when a follower has a predecessor with lag covering multiple days with different working changes" do let_schedule(<<~CHART) days | MTWTFSS | predecessor | X ░ ░░ | - follower | ░ X░░ | follows predecessor with delay 2 + follower | ░ X░░ | follows predecessor with lag 2 CHART let(:non_working_day) { create(:non_working_day, date: next_monday.next_occurring(:wednesday)) } @@ -1355,18 +1355,18 @@ end end - context "when a follower has a predecessor with delay covering a day that is now a non-working day" do + context "when a follower has a predecessor with lag covering a day that is now a non-working day" do let_schedule(<<~CHART) days | MTWTFSS | predecessor | XX ░░ | - follower | X ░░ | follows predecessor with delay 1 + follower | X ░░ | follows predecessor with lag 1 CHART before do set_non_working_days(next_monday.next_occurring(:wednesday)) end - it "moves the follower start date forward to keep the delay to 1 day" do + it "moves the follower start date forward to keep the lag to 1 day" do subject expect(WorkPackage.all).to match_schedule(<<~CHART) days | MTWTFSS | @@ -1391,11 +1391,11 @@ end end - context "with work packages without dates following each other with delay" do + context "with work packages without dates following each other with lag" do let_schedule(<<~CHART) days | MTWTFSS | predecessor | ░░ | - follower | ░░ | follows predecessor with delay 5 + follower | ░░ | follows predecessor with lag 5 CHART before do