Scope Uniqueness Rule Validation to the Rule's Target Discipline #7434
bhumikaguptaa
started this conversation in
Feature Requests
Replies: 1 comment
-
From ZsPapp on the Speciforum |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, when creating or modifying a uniqueness rule in the Schema Configuration, the validation for existing duplicates runs across all Disciplines in the database. This occurs even when the rule's scope is limited to a specific Discipline or Collection.
This global validation prevents the creation of scoped rules if unrelated data in other disciplines contains duplicates. Collection managers who want to enforce data integrity in their specific collections are blocked by legacy data in other collections that may be too resource-intensive to clean up.
Solution Described
The validation check for a uniqueness rule should respect the scope of the rule itself. When a rule is not global (i.e., its scope is set to Division, Discipline, or Collection), the check for existing duplicates should only run against the records that fall within that specific scope.
Proposed solutions can be:
Scope the Validation to Match the Rule
The most intuitive solution is to limit the validation query. If a uniqueness rule is being created within the "Ichthyology" Discipline, the system should only check for duplicates within the collections belonging to the "Ichthyology" Discipline. Duplicates in "Mammalogy" should be ignored during validation, as they are outside the rule's intended scope.
Allow Admins to Bypass Duplicate Validation
Provide an option for administrators to bypass the duplicate check when creating or modifying a uniqueness rule. A warning could be displayed, but the admin could choose to proceed. This would allow the rule to be saved and enforced on all new and modified records moving forward, while allowing pre-existing duplicates to remain until they can be addressed by collection managers.
Implementing either of these solutions would provide much-needed flexibility, allowing different collections within the same institution to adopt data integrity rules at their own pace without being hindered by the data quality of others.
Reported by
Natural History Museum of Denmark
Link to the discourse post: https://discourse.specifysoftware.org/t/uniqueness-rule-with-limited-scope-only-in-selected-collections/2782
Beta Was this translation helpful? Give feedback.
All reactions