Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…et (storytold#4179) Upstream PR: storytold#4248 Head: 7c885a8
Merges the zcode-pr-transfer branch (61 commits transferring open, not-yet-merged upstream PRs into our fork) into main. Docs (docs/ui-parity.md, docs/file-format-parity.md) resolved in favor of main's current changelog state; code from all transferred PRs carried over cleanly. Commits carried over (21 from this session + 40 earlier transfers): storytold#4408, storytold#4405, storytold#4406, storytold#4386, storytold#4379, storytold#4378, storytold#4376, storytold#4375, storytold#4373, storytold#4370, storytold#4369, storytold#4348, storytold#4347, storytold#4345, storytold#4344, storytold#4343, storytold#4341, storytold#4340, storytold#4337, storytold#4336, storytold#4318, storytold#4316, storytold#4315, storytold#4312, storytold#4310, storytold#4307, storytold#4306, storytold#4305, storytold#4303, storytold#4298, storytold#4295, storytold#4287, storytold#4286, storytold#4257, storytold#4256, storytold#4254, storytold#4252, storytold#4251, storytold#4248, storytold#4244, storytold#4243, storytold#4229, storytold#4228, storytold#4227, storytold#4225, storytold#4221, storytold#4220, storytold#4219, storytold#4217, storytold#4424, storytold#4423, storytold#4420, storytold#4419, storytold#4418, storytold#4414, storytold#3617, storytold#2642, storytold#2556, storytold#2321
Fixes #4179
What was wrong
When a computed (formula) criterion sat on a different sheet from the list, an unqualified reference with a relative row (the issue's
=B2>24onRules) was evaluated against the criteria sheet. Excel evaluates it against the list's sheet, advancing one row per record, so GridCraft selected the wrong records.Fix
crates/engine/src/cmd/whatif/advanced_filter.rs, when shifting a computed criterion's references for each list row:Tests
crates/engine/src/cmd/whatif/tests.rs,advanced_filter_computed_criteria_on_separate_sheet_matches_excel: the issue's two sheets. Without the fix it fails (wrong records). With the fix it passes and returns the records Excel returns.Checks
cargo test -p gridcraft-engine: no new failures.save_keeps_the_destination_access_restrictionsfails on my Linux test machine with and without this change (a file-permission check that depends on the machine).cargo clippy -p gridcraft-engine --all-targets -- -D warnings: clean.cargo fmt --check: clean.Note: #4180 also edits
advanced_filter.rs, in a different function. Whichever merges second may need a small rebase.Summary by CodeRabbit