Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor business rules #2965

Merged
merged 58 commits into from
May 19, 2023
Merged

Refactor business rules #2965

merged 58 commits into from
May 19, 2023

Conversation

melton-jason
Copy link
Contributor

@melton-jason melton-jason commented Feb 10, 2023

Addresses #2924

Priorites

  • Refactored all non-interaction business rules
  • Implement a uniqueness rule system that is respected by the front/back end
  • Refactor interaction business rules
  • Create type for Uniqueness Rules
  • Allow dismissing BussinessRule errors
  • Add code comments
  • Create/modify business rule tests
  • Fix typescript errors

Fixes #2260

Adds the following Uniqueness Rules:

Of the form:
Table.field -> uniqueIn

CollectingEvent.uniqueidentifier -> discipline
CollectionObject.uniqueidentifier -> collection
DisposalAgent.role/agent -> disposal
Extractor.agent -> dnasequence
Fundingagent.agentt -> collectingtrip
Locality.uniqueidentifier -> discipline
LocalityCitation.referencework -> locality
PcrPerson.agent -> dnasequence
Specifyuser.name -> (DATABASE)
Also, fix a bug where uniqueness rules containing more than one field
were not registering the `otherField`
Copy link
Contributor Author

@melton-jason melton-jason left a comment

Choose a reason for hiding this comment

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

@maxpatiiuk
If you have a moment, could you take a look at this error? I can not seem to resolve it.
The intended behavior makes sense to me conceptually, but there could easily be some Typescript syntax I am overlooking. Thank you in advance!

@maxpatiiuk
Copy link
Member

I really like the changes you are doing! Keep it going

@specifysoftware
Copy link

This pull request has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/workbench-data-set-validation-error-more-than-one-picklist-in-specify-7/1080/4

@maxpatiiuk maxpatiiuk mentioned this pull request Apr 28, 2023
melton-jason and others added 22 commits May 17, 2023 08:30
This is primarily to test the scope of the failing tests.
The calls will most likely ned to be added in
lib/tests/ajax/static if declaring the overrides in this way does not work
They became redundant because of fc00e2b
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.

Django error on duplicate CO.uniqueIdentifier
3 participants