Skip to content

WEB-929: Keep edited datatable column values on save - #4042

Merged
IOhacker merged 2 commits into
openMF:devfrom
jamalkamaladdin:WEB-929-datatable-column-edit
Sep 25, 2026
Merged

IOhacker merged 2 commits into
openMF:devfrom
jamalkamaladdin:WEB-929-datatable-column-edit

Conversation

@jamalkamaladdin

@jamalkamaladdin jamalkamaladdin commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

editColumn in create-data-table.component.ts compared column.name against newColumn.columnName. Rows store columnName, not name, so column.name was always undefined. findIndex returned -1, and assignment went to index -1 instead of the row. Column edits, including length changes, never reached columnData, and submit sent the original values.

Fix compares newColumn.columnName against column.columnName.

Added a spec for editColumn. It opens the edit dialog, closes it with a longer column length, and checks the stored row for the new length.

Related issues and discussion

https://mifosforge.jira.com/browse/WEB-929

Screenshots, if any

No visual effect.

Checklist

  • If you have multiple commits please combine them into one commit by squashing them.
  • Read and understood the contribution guidelines at web-app/.github/CONTRIBUTING.md.

Summary by CodeRabbit

  • Bug Fixes
    • Editing a data table column now correctly saves its updated length to that column, without changing the number of columns in the table. This helps ensure the edited column retains the value entered when you update it.

@jamalkamaladdin
jamalkamaladdin requested a review from a team September 24, 2026 10:26
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Repository: openMF/web-app/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9ca987b6-47f3-411b-8c79-f0547e83cee8

📥 Commits

Reviewing files that changed from the base of the PR and between 63a26c6 and 95a252a.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "pre_merge_checks"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openMF/web-app/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 78eaa9de-1221-49b9-b632-4021c0164846

📥 Commits

Reviewing files that changed from the base of the PR and between 17a4824 and 63a26c6.

📒 Files selected for processing (2)
  • src/app/system/manage-data-tables/create-data-table/create-data-table.component.spec.ts
  • src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The column edit lookup now uses column.columnName to find the row to replace. A new unit test verifies that editing a column updates its length and preserves the number of rows.

Changes

Column editing

Layer / File(s) Summary
Column replacement and regression test
src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts, src/app/system/manage-data-tables/create-data-table/create-data-table.component.spec.ts
editColumn now matches the edited row by columnName. The new spec verifies that the column length changes to '50' and the array retains one entry.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: gkbishnoi07

Merge Risk: ⚪ Minimal · up to 63a26

Edited column values can replace the existing row; no actionable merge-blocking risk remains after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: preserving edited datatable column values when saving. It matches the implementation change and the added regression test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@IOhacker
IOhacker merged commit 174b292 into openMF:dev Sep 25, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants