Skip to content

Ab#134989 abc uniqueness constraints in forms - #1271

Merged
AntoineRelief merged 13 commits into
nextfrom
AB#134989-ABC-Uniqueness-constraints-in-forms
Oct 1, 2026
Merged

AntoineRelief merged 13 commits into
nextfrom
AB#134989-ABC-Uniqueness-constraints-in-forms

Conversation

@GhaziAlibi

@GhaziAlibi GhaziAlibi commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds configurable scoped uniqueness constraints on resource records, enforced on create, update, and bulk (XLSX) import.

Useful links

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Configured a single-field rule (error severity) on a resource, confirmed duplicate record creation/edit is blocked.
  • Configured a composite-field rule with warning severity, confirmed the errors modal appears and "Update" saves anyway.
  • Configured a conditional rule (field != value / field = value), confirmed it only applies to matching records.
  • Configured a date-overlap rule, confirmed overlapping ranges are flagged and non-overlapping ones aren't.
  • Bulk-uploaded an XLSX with a duplicate row against a conditional error-severity rule: whole file rejected, correct localized message shown in the UI.
  • Backend automated suite: 76 test suites / 865 tests passing.

Screenshots

Screencast_20260907_010130.webm

Checklist:

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

…ords

Add per-resource uniqueness rules (single/composite fields, conditional
scope, date-range overlap) enforced on record create/update and bulk
XLSX import, with error (blocking) and warning (save-anyway) severity.
Default violation messages are localized. Admin UI added to configure
rules from the resource page.

AB#134989
@AntoineRelief
AntoineRelief self-requested a review September 11, 2026 09:13

@AntoineRelief AntoineRelief left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See comments made on PR:
ReliefApplications/ems-frontend#2931

…match visibility

Add active flag, {fields}/{scope}/{matchCount} message tokens, and
permission-aware matching-record display to scoped uniqueness rules.
…ess-constraints-in-forms

* origin/next:
  chore(release): 2.18.0-rc.6 [skip ci]
  feat: It is now possible to upload custom _id in upload files (#1275)
  refactor: Now possible to limit the available languages per application (#1273)
  chore(release): 2.18.0-rc.5 [skip ci]
  feat: In Layout, add possibility to quickly add all fields to a grid, in the order they appear in a form (#1274)
  chore(release): 2.18.0-rc.4 [skip ci]
  feat: Roles can now automatically grant permissions on new fields (#1259)
  chore(release): 2.18.0-rc.3 [skip ci]
  fix: apply translation fallback to all filter operators and to sorting (#1272)
  chore(release): 2.18.0-rc.2 [skip ci]
  feat: Allow sorting query layouts by more than one field (#1267)

# Conflicts:
#	src/routes/upload/index.ts
#	src/schema/mutation/editResource.mutation.ts
#	src/utils/form/index.ts
@GhaziAlibi

Copy link
Copy Markdown
Contributor Author
2 1

@GhaziAlibi
GhaziAlibi requested review from a team and AntoineRelief September 14, 2026 10:48
@AntoineRelief
AntoineRelief merged commit 3d0c17d into next Oct 1, 2026
1 check passed
@AntoineRelief
AntoineRelief deleted the AB#134989-ABC-Uniqueness-constraints-in-forms branch October 1, 2026 10:09
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