Skip to content

Move businessrules app under backend/businessrules#6778

Merged
pashiav merged 16 commits into
issue-6571from
issue-6777
Aug 4, 2025
Merged

Move businessrules app under backend/businessrules#6778
pashiav merged 16 commits into
issue-6571from
issue-6777

Conversation

@pashiav

@pashiav pashiav commented Jun 25, 2025

Copy link
Copy Markdown
Contributor

Fixes #6777

This PR reorganizes the project structure by moving the businessrules app into a new backend/businessrules/ directory under specifyweb/.

Summary of Changes:

  • Moved businessrules to specifyweb/backend/businessrules/
  • Updated all import paths to reflect the new location:
    • businessrules/migrations
    • businessrules/tests
    • businessrules/rules
    • specify
    • workbench
  • Updated SPECIFY_APPS in settings.py to include specifyweb.backend.businessrules

This is the 13th PR in a broader backend reorganization. No frontend behavior or functionality was changed.

Notes:

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests
  • Add a reverse migration if a migration is present in the PR

Testing instructions

Relevant Documentation: Uniqueness Rules & Business Rules

Please cross check the following functionalities with main:

  • General Business Rules testing (additional gen testing in addition to the ones below)

    • Create a new Accession
    • Add an Accession Agent, but do not fill in the fields (Agent/Role)
    • Click on the Save button
    • Verify that save is blocked and a Field is required. points to a required empty field
    • Ensure that save blockers work the same as main on other tables (e.g. Taxon, Collection Object)

    • Go to Schema Config -> Choose any table
    • Configure a new Uniqueness Rule (Note: Don't set scope to 'Created by agent' - it is not handled properly)
    • Attempt to create duplicate records that violate the uniqueness constraints
    • Verify that the rule is respected and behavior is identical to main

@pashiav pashiav added this to the 7.12.0 milestone Jun 25, 2025
@pashiav pashiav self-assigned this Jun 25, 2025
@github-project-automation github-project-automation Bot moved this to 📋Back Log in General Tester Board Jun 25, 2025
@pashiav pashiav linked an issue Jun 25, 2025 that may be closed by this pull request
@pashiav pashiav changed the title Move businessrules under backend/businessrules Move businessrules app under backend/businessrules Jun 25, 2025
@pashiav
pashiav marked this pull request as ready for review June 25, 2025 19:20
@pashiav
pashiav requested review from a team and CarolineDenis June 25, 2025 19:20
@pashiav pashiav added Migration Prs that contain migration and removed Migration Prs that contain migration labels Jun 25, 2025

@bhumikaguptaa bhumikaguptaa 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.

[X] General Business Rules testing
- [X] Verify that save is blocked and a Field is required. points to a required empty field
- [X] Ensure that save blockers work the same as main on other tables (e.g. Taxon, Collection Object)
- [X] Verify that the rule is respected and behavior is identical to main

Works as expected!

@pashiav
pashiav requested a review from a team July 2, 2025 18:18

@emenslin emenslin 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.

  • General Business Rules testing (additional gen testing in addition to the ones below)
    • Verify that save is blocked and a Field is required. points to a required empty field

    • Ensure that save blockers work the same as main on other tables (e.g. Taxon, Collection Object)

    • Verify that the rule is respected and behavior is identical to main


Issues:

  • If you add accession agents but don't fill out the fields you can't save but the save button also doesn't turn red. This happens in seemingly all other forms if you don't fill out the required field the field turns red but the save button stays orange.

Issue branch:

07-03_10.21.mp4

Main:

07-03_10.22.mp4
  • Similarly there is also no save blocker if you uncheck 'is current' under determination on the CO form so you can save without a current determination.

Issue branch:

07-03_10.28.mp4

Main:

07-03_10.29.mp4
  • There is an issue with uniqueness rules where sometimes you can save an invalid form (possibly related to #4800 but does not happen in main) also could be related to the save blocker issues I mentioned above.

Issue branch:

07-03_10.36.mp4

Crash report: Specify 7 Crash Report - 2025-07-03T15_36_57.593Z.txt

Main:

07-03_10.37.mp4

@github-project-automation github-project-automation Bot moved this from 📋Back Log to Dev Attention Needed in General Tester Board Jul 3, 2025
@pashiav

pashiav commented Jul 16, 2025

Copy link
Copy Markdown
Contributor Author

@emenslin thanks for your review! All issues should be fixed now - please try it out again!

@pashiav
pashiav requested a review from emenslin July 16, 2025 17:10

@emenslin emenslin 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.

  • General Business Rules testing (additional gen testing in addition to the ones below)
    • Verify that save is blocked and a Field is required. points to a required empty field
    • Ensure that save blockers work the same as main on other tables (e.g. Taxon, Collection Object)
    • Verify that the rule is respected and behavior is identical to main

Looks good, all behavior seems to be identical to main

Base automatically changed from issue-6769 to issue-6571 August 4, 2025 17:55
@pashiav
pashiav merged commit 818e56c into issue-6571 Aug 4, 2025
14 checks passed
@github-project-automation github-project-automation Bot moved this from Dev Attention Needed to ✅Done in General Tester Board Aug 4, 2025
@pashiav
pashiav deleted the issue-6777 branch August 4, 2025 17:56
@CarolineDenis CarolineDenis modified the milestones: 7.12.0, 7.11.2 Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

Reorganize businessrules app under backend/businessrules/

4 participants