Skip to content

[FIX] range: correctly handle unbounded ranges on row/col changes#8755

Closed
fw-bot wants to merge 1 commit into
saas-19.3from
saas-19.3-saas-18.3-fix-unbounded-ranges-rmbh-528210-fw
Closed

[FIX] range: correctly handle unbounded ranges on row/col changes#8755
fw-bot wants to merge 1 commit into
saas-19.3from
saas-19.3-saas-18.3-fix-unbounded-ranges-rmbh-528210-fw

Conversation

@fw-bot
Copy link
Copy Markdown
Collaborator

@fw-bot fw-bot commented May 20, 2026

Description:

Steps to reproduce:

  • Create a sheet with 3 rows
  • Set A1 = 1, A2 = 2, and C1 = SUM(A:A)
  • Delete row 3
  • Add a new row at the bottom
  • Set A3 = 6

Issue:

  • Unbounded ranges (e.g. A:A) are not properly updated on row/col changes.
    The changeType can be incorrectly computed as NONE or MOVE instead
    of RESIZE, causing formulas to miss newly added cells (e.g. A3 in SUM).

Cause:

  • Incomplete condition handling for unbounded ranges caused inconsistent
    changeType detection across different scenarios.

Fix:

  • Refine changeType computation for unbounded ranges by covering all edge
    cases and ensuring correct RESIZE behavior when the range should expand.

Task: 6167358

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

Forward-Port-Of: #8533

@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented May 20, 2026

Pull request status dashboard

@fw-bot
Copy link
Copy Markdown
Collaborator Author

fw-bot commented May 20, 2026

@rmbh-odoo @rrahir cherrypicking of pull request #8533 failed.

stdout:

Auto-merging src/helpers/range.ts
Auto-merging tests/range_plugin.test.ts
CONFLICT (content): Merge conflict in tests/range_plugin.test.ts

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

:shipit: you can use git-fw to re-do the forward-port for you locally.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

Steps to reproduce:
- Create a sheet with 3 rows
- Set `A1 = 1`, `A2 = 2`, and `C1 = SUM(A:A)`
- Delete row 3
- Add a new row at the bottom
- Set `A3 = 6`

Issue:
- Unbounded ranges (e.g. `A:A`) are not properly updated on row/col changes.
  The changeType can be incorrectly computed as `NONE` or `MOVE` instead
  of `RESIZE`, causing formulas to miss newly added cells (e.g. `A3` in `SUM`).

Cause:
- Incomplete condition handling for unbounded ranges caused inconsistent
  changeType detection across different scenarios.

Fix:
- Refine changeType computation for unbounded ranges by covering all edge
  cases and ensuring correct `RESIZE` behavior when the range should expand.

Task: 6167358
X-original-commit: ae0a2d6
@rmbh-odoo rmbh-odoo force-pushed the saas-19.3-saas-18.3-fix-unbounded-ranges-rmbh-528210-fw branch from 4ede2ab to cdf9215 Compare May 20, 2026 07:09
@rmbh-odoo
Copy link
Copy Markdown
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request May 20, 2026
Steps to reproduce:
- Create a sheet with 3 rows
- Set `A1 = 1`, `A2 = 2`, and `C1 = SUM(A:A)`
- Delete row 3
- Add a new row at the bottom
- Set `A3 = 6`

Issue:
- Unbounded ranges (e.g. `A:A`) are not properly updated on row/col changes.
  The changeType can be incorrectly computed as `NONE` or `MOVE` instead
  of `RESIZE`, causing formulas to miss newly added cells (e.g. `A3` in `SUM`).

Cause:
- Incomplete condition handling for unbounded ranges caused inconsistent
  changeType detection across different scenarios.

Fix:
- Refine changeType computation for unbounded ranges by covering all edge
  cases and ensuring correct `RESIZE` behavior when the range should expand.

closes #8755

Task: 6167358
X-original-commit: ae0a2d6
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Ronakkumar Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com>
@robodoo robodoo closed this May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants