Skip to content

FINERACT-2765: Tax Component and Tax Group names should be unique - #6286

Open
rymghosn wants to merge 1 commit into
apache:developfrom
foodeveloper:port/CBS-203-tax-name-uniqueness
Open

FINERACT-2765: Tax Component and Tax Group names should be unique#6286
rymghosn wants to merge 1 commit into
apache:developfrom
foodeveloper:port/CBS-203-tax-name-uniqueness

Conversation

@rymghosn

Copy link
Copy Markdown
Contributor

Currently nothing prevents creating a TaxComponent or TaxGroup with a
name that's already in use, or renaming one to collide with another. This
also allowed submitting a TaxGroup with the same tax component listed
more than once in its taxComponents array.
This PR adds:

  • On tax component create/update: reject the request if another tax
    component already has the given name (case-sensitive match against
    TaxComponentRepository.findByName, relying on DB collation for exact
    matching), returning tax.component.name.must.be.unique.
  • On tax group create/update: reject the request if another tax group
    already has the given name (case-insensitive, via
    TaxGroupRepository.existsByNameIgnoreCase /
    existsByNameIgnoreCaseAndIdNot), returning
    tax.group.name.must.be.unique.
  • On tax group create/update: reject a taxComponents payload that
    references the same taxComponentId more than once, returning
    validation.msg.tax.group.duplicate.component.

Update checks only trigger when the name (or, for groups, a component
list) is actually being changed, so updates that leave the name untouched
are unaffected.
PR (https://issues.apache.org/jira/browse/FINERACT-2765).

@rymghosn
rymghosn force-pushed the port/CBS-203-tax-name-uniqueness branch from 771a07a to 86b4814 Compare August 19, 2026 11:17
Reject creating or renaming a tax component/tax group to a name that
already exists, and reject a tax group submission that references the
same tax component more than once.
@rymghosn
rymghosn force-pushed the port/CBS-203-tax-name-uniqueness branch from 86b4814 to 1b5e89c Compare August 20, 2026 06:49
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.

1 participant