Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[59539] Migrate scheduling mode and lags #17235

Draft
wants to merge 29 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
778b04c
[42388] Migrate scheduling mode and lags
cbliard Nov 20, 2024
7c0f1fb
Define a 'scheduling mode' column in table_helpers
cbliard Nov 22, 2024
f792612
[59539] Migration: followers and parents have automatic scheduling mode
cbliard Nov 22, 2024
54d9159
[59539] Migration: set lag for follows relations
cbliard Nov 22, 2024
f13d7c1
[59539] Respect non-working days when computing lags in migration
cbliard Nov 25, 2024
8a206dc
[59539] Only set lag for the closest relation in the migration
cbliard Nov 25, 2024
dc7ff3a
[59539] Keep manual scheduling mode in migration
cbliard Nov 27, 2024
f35db43
[59539] Make work packages manually scheduled by default
cbliard Nov 28, 2024
31f6586
Show non-working days in the rendered table of table helpers
cbliard Dec 10, 2024
293d43e
[59539] Start as soon as possible in automatic scheduling mode
cbliard Dec 10, 2024
5a8400c
Fix broken feature test
cbliard Dec 11, 2024
0cb43e3
Simplify method calls
cbliard Dec 11, 2024
cc6bd02
table helpers: rename properties column to predecessors
cbliard Dec 12, 2024
d21e70a
[59539] Correctly reschedule predecessors needing relations rescheduling
cbliard Dec 13, 2024
28f0719
refactor: reword some tests cases
cbliard Dec 13, 2024
7923850
[59539] Update seeding data to be compatible with new automatic sched…
cbliard Dec 16, 2024
b8c7bb2
[59539] switch scheduling mode when modifying follows relations
cbliard Dec 17, 2024
176cfaa
Fix unit tests broken by previous commit
cbliard Dec 17, 2024
9987998
refactor: rewrite with positive assertions
cbliard Dec 24, 2024
88b2f6a
table_helpers: Fix issue with empty tables
cbliard Dec 24, 2024
e17260c
refactor: make test output and code less verbose
cbliard Dec 24, 2024
3d80092
Add missing magic comment `# frozen_string_literal: true`
cbliard Jan 6, 2025
62b609b
Move some tests at the `UpdateService` integration test level
cbliard Jan 6, 2025
c8902b2
refactor: rewrite test using schedule helpers
cbliard Jan 7, 2025
aa95b5c
refactor: replace condition term with guard clause
cbliard Jan 7, 2025
0464d6c
Make test assertion clearer
cbliard Jan 7, 2025
a90fb94
Move dates handling to `SetAttributesService`
cbliard Jan 7, 2025
0fb2ae7
[59539] Reschedule when switching parent to automatic mode
cbliard Jan 8, 2025
555fce9
Merge branch 'dev' into feature/42388-new-automatic-scheduling-mode
cbliard Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
table_helpers: Fix issue with empty tables
  • Loading branch information
cbliard committed Dec 24, 2024
commit 88b2f6a41725906655945a9b2f0cab4ffcb87ccc
2 changes: 1 addition & 1 deletion spec/support/table_helpers/table_representer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def column_widths
else
values = tables_data.flat_map { _1.values_for_attribute(column.attribute) }
values_max_size = values.map { column.format(_1).size }.max
[column.title.size, values_max_size].max
[column.title.size, values_max_size].compact.max
end
end
end
Expand Down
25 changes: 25 additions & 0 deletions spec/support_spec/table_helpers/table_representer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ module TableHelpers
end
end

context "when there are no work packages" do
let(:table_data) do
TableData.from_work_packages([], columns)
end
let(:columns) { [Column.for("subject")] }

it "renders no rows" do
expect(representer.render(table_data)).to eq <<~TABLE
| subject |
TABLE
end
end

describe "subject column" do
let(:columns) { [Column.for("subject")] }

Expand Down Expand Up @@ -131,6 +144,18 @@ module TableHelpers
TABLE
end

context "when there are no work packages" do
let(:table_data) do
TableData.from_work_packages([], columns)
end

it "renders no rows" do
expect(representer.render(table_data)).to eq <<~TABLE
| MTWTFSS |
TABLE
end
end

context "when non working days are defined" do
let(:table) do
<<~TABLE
Expand Down
Loading