Skip to content

GRUD_DEV-1233/fix-internal-error-with-multilang-value#328

Merged
zingmane merged 4 commits into
masterfrom
GRUD_DEV-1233/fix-internal-error-with-multilang-value
Apr 17, 2026
Merged

GRUD_DEV-1233/fix-internal-error-with-multilang-value#328
zingmane merged 4 commits into
masterfrom
GRUD_DEV-1233/fix-internal-error-with-multilang-value

Conversation

@zingmane

@zingmane zingmane commented Apr 16, 2026

Copy link
Copy Markdown
Member

Submit a pull request

Related Ticket: GRUD_DEV-1233

Please make sure the following is true

  • I gave the PR a meaningful name
  • I checked that the correct target branch is selected
  • I rebased the branch on the target branch and it can be merged
  • I ran the linter and it did pass
  • I checked for unused code / dead code / debug code
  • I checked that variables/functions have meaningful names
  • I checked that the behaviour is as the documentation/task describes and I tested it
  • I updated the docs / specifications if possible
  • I could explain all that code when someone wakes me up at 3am
  • I checked that the code considers failures and not just the happy path
  • There are no new dependencies OR I listed them and explained them below
  • PR introduces no breaking changes OR I listed them and described them below
  • I added/updated tests for new/modified unit-testable functions/helpers
  • I ran the tests and they did pass

Other information/comments (e.g. reasons why points are not checked from above)

Reason for this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR addresses an internal error scenario when row values don’t match a column’s language/value shape (single-language vs multi-language), and adds regression tests to ensure the API returns a proper validation error instead of failing unexpectedly.

Changes:

  • Add validation to reject multilanguage JSON objects for single-language columns and improve type validation errors for several simple column types.
  • Broaden text-type validation to accept numeric inputs (converted to string) and add explicit error messages for invalid types.
  • Add tests covering mismatched multilanguage/single-language values and invalid numeric column values.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/test/scala/com/campudus/tableaux/api/content/CreateTest.scala Adds new regression tests for invalid row value shapes/types and refactors column-json helpers used by tests.
src/main/scala/com/campudus/tableaux/database/domain/column.scala Tightens (and in one case broadens) value validation for simple columns, adding explicit IllegalArgumentException messages for invalid inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/scala/com/campudus/tableaux/database/domain/column.scala
Comment thread src/main/scala/com/campudus/tableaux/database/domain/column.scala Outdated
Comment thread src/main/scala/com/campudus/tableaux/database/domain/column.scala Outdated
Comment thread src/test/scala/com/campudus/tableaux/api/content/CreateTest.scala
@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown

File Coverage
All files 87%
com/campudus/tableaux/exceptions.scala 0%
com/campudus/tableaux/exceptions.scala 0%
com/campudus/tableaux/arguments.scala 97%
com/campudus/tableaux/Starter.scala 76%
com/campudus/tableaux/controller/SystemController.scala 99%
com/campudus/tableaux/controller/TableauxController.scala 98%
com/campudus/tableaux/controller/UserController.scala 72%
com/campudus/tableaux/controller/StructureController.scala 91%
com/campudus/tableaux/controller/MediaController.scala 79%
com/campudus/tableaux/database/historyType.scala 7%
com/campudus/tableaux/database/languageType.scala 86%
com/campudus/tableaux/database/dbType.scala 93%
com/campudus/tableaux/database/historyType.scala 66%
com/campudus/tableaux/database/database.scala 96%
com/campudus/tableaux/database/database.scala 81%
com/campudus/tableaux/database/database.scala 97%
com/campudus/tableaux/database/domain/column.scala 71%
com/campudus/tableaux/database/domain/column.scala 64%
com/campudus/tableaux/database/domain/column.scala 95%
com/campudus/tableaux/database/domain/table.scala 96%
com/campudus/tableaux/database/domain/service.scala 81%
com/campudus/tableaux/database/domain/userSetting.scala 60%
com/campudus/tableaux/database/domain/column.scala 77%
com/campudus/tableaux/database/domain/annotation.scala 14%
com/campudus/tableaux/database/domain/column.scala 57%
com/campudus/tableaux/database/domain/annotation.scala 60%
com/campudus/tableaux/database/domain/history.scala 84%
com/campudus/tableaux/database/domain/column.scala 62%
com/campudus/tableaux/database/domain/annotation.scala 83%
com/campudus/tableaux/database/domain/userSetting.scala 95%
com/campudus/tableaux/database/domain/annotation.scala 80%
com/campudus/tableaux/database/domain/userSetting.scala 94%
com/campudus/tableaux/database/domain/table.scala 98%
com/campudus/tableaux/database/domain/column.scala 0%
com/campudus/tableaux/database/domain/column.scala 95%
com/campudus/tableaux/database/domain/history.scala 60%
com/campudus/tableaux/database/domain/file.scala 72%
com/campudus/tableaux/database/domain/userSetting.scala 90%
com/campudus/tableaux/database/domain/userSetting.scala 0%
com/campudus/tableaux/database/domain/column.scala 90%
com/campudus/tableaux/database/domain/domainobject.scala 99%
com/campudus/tableaux/database/domain/column.scala 94%
com/campudus/tableaux/database/domain/column.scala 78%
com/campudus/tableaux/database/domain/domainobject.scala 93%
com/campudus/tableaux/database/domain/column.scala 89%
com/campudus/tableaux/database/model/HistoryModel.scala 98%
com/campudus/tableaux/database/model/FolderModel.scala 95%
com/campudus/tableaux/database/model/UserModel.scala 99%
com/campudus/tableaux/database/model/AttachmentModel.scala 82%
com/campudus/tableaux/database/model/TableauxModel.scala 91%
com/campudus/tableaux/database/model/StructureModel.scala 95%
com/campudus/tableaux/database/model/SystemModel.scala 85%
com/campudus/tableaux/database/model/FileModel.scala 94%
com/campudus/tableaux/database/model/structure/ColumnModel.scala 87%
com/campudus/tableaux/database/model/structure/TableGroupModel.scala 79%
com/campudus/tableaux/database/model/structure/TableModel.scala 85%
com/campudus/tableaux/database/model/structure/ColumnModel.scala 88%
com/campudus/tableaux/database/model/tableaux/RowModel.scala 87%
com/campudus/tableaux/database/model/tableaux/RowModel.scala 93%
com/campudus/tableaux/database/model/tableaux/RowModel.scala 92%
com/campudus/tableaux/helper/FileUtils.scala 74%
com/campudus/tableaux/helper/JsonUtils.scala 94%
com/campudus/tableaux/helper/ResultChecker.scala 98%
com/campudus/tableaux/helper/IdentifierFlattener.scala 83%
com/campudus/tableaux/router/DocumentationRouter.scala 21%
com/campudus/tableaux/router/BaseRouter.scala 64%
com/campudus/tableaux/router/SystemRouter.scala 90%
com/campudus/tableaux/router/MediaRouter.scala 78%
com/campudus/tableaux/router/TableauxRouter.scala 82%
com/campudus/tableaux/router/StructureRouter.scala 99%
com/campudus/tableaux/router/RouterRegistry.scala 53%
com/campudus/tableaux/router/auth/KeycloakAuthHandler.scala 72%
com/campudus/tableaux/router/auth/permission/Condition.scala 89%
com/campudus/tableaux/router/auth/permission/Condition.scala 74%
com/campudus/tableaux/router/auth/permission/Condition.scala 87%
com/campudus/tableaux/router/auth/permission/RoleModel.scala 87%
com/campudus/tableaux/router/auth/permission/RoleModel.scala 0%
com/campudus/tableaux/router/auth/permission/Condition.scala 90%
com/campudus/tableaux/router/auth/permission/Condition.scala 79%
com/campudus/tableaux/router/auth/permission/Action.scala 97%
com/campudus/tableaux/router/auth/permission/Condition.scala 85%
com/campudus/tableaux/router/auth/permission/TableauxUser.scala 63%
com/campudus/tableaux/verticles/ThumbnailVerticle.scala 52%
com/campudus/tableaux/verticles/EventClient.scala 72%
com/campudus/tableaux/verticles/CacheVerticle.scala 76%
com/campudus/tableaux/verticles/JsonSchemaValidator.scala 86%
com/campudus/tableaux/verticles/MessagingVerticle.scala 83%

Minimum allowed coverage is 80%

Generated by 🐒 cobertura-action against d99d70c

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown

Test Results

1 182 tests  +6   1 174 ✅ +6   4m 13s ⏱️ +10s
  146 suites ±0       8 💤 ±0 
  146 files   ±0       0 ❌ ±0 

Results for commit d99d70c. ± Comparison against base commit 7ad437c.

This pull request removes 1 and adds 7 tests. Note that renamed tests count towards both.
com.campudus.tableaux.api.content.CreateRowTest ‑ createRow
com.campudus.tableaux.api.content.CreateRowTest ‑ createRowWithValues_withMultilanguageValueForSinglelanguageColumn_throwsException
com.campudus.tableaux.api.content.CreateRowTest ‑ createRowWithValues_withSinglelanguageValueForMultilanguageColumn_throwsException
com.campudus.tableaux.api.content.CreateRowTest ‑ createRowWithValues_withTextValueForBooleanColumn_throwsException
com.campudus.tableaux.api.content.CreateRowTest ‑ createRowWithValues_withTextValueForCurrencyColumn_throwsException
com.campudus.tableaux.api.content.CreateRowTest ‑ createRowWithValues_withTextValueForIntegerColumn_throwsException
com.campudus.tableaux.api.content.CreateRowTest ‑ createRowWithValues_withTextValueForNumericColumn_throwsException
com.campudus.tableaux.api.content.CreateRowTest ‑ createRow_ok

♻️ This comment has been updated with latest results.

but no implicit conversion from number/integer to any text value
@zingmane zingmane merged commit b6440cd into master Apr 17, 2026
11 checks passed
@zingmane zingmane deleted the GRUD_DEV-1233/fix-internal-error-with-multilang-value branch April 17, 2026 08:18
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.

3 participants