Allow disabling Scope Entire Table PickLists preference - #8538
melton-jason wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughChangesPick-list scoping
Priority: ➖ Normal Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The changed Entire Table PickList path correctly honors the disabled preference, and no merge-blocking defect was established. 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
Full details: Automatic TestsExplanation Automatic tests are necessary for this behavior change, but the PR changes only Resolution Add Jest regression tests in
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
g1rly-c0d3r
left a comment
There was a problem hiding this comment.
Testing instructions
With the preference enabled
- On a DataEntry Form containing the PickList, ensure records created outside of the scope of the table do not appear and are not selectable
With the preference disabled
- On a DataEntry Form containing the PickList, ensure records created outside of the scope of the table do appear and are selectable
Looks good! I tested with both PrepType and COGType, and they both behaved as expected.
Fixes #7589
See related #4989.
Previously when the "Scope Entire Table PickLists" Collection Preference was disabled, PickLists of type "Entire Table" would still only be unscoped if they tables were one of Institution, Division, Discipline, or Collection.
The preference is located within CollectionPreferences and is shown below (highlighted by the red box):
From the home page of Specify, it is accessible by the following:
Screen.Recording.2026-09-15.at.9.02.06.AM.mov
This PR makes it such that the preference can be disabled for all tables if desired.
If you need a refresher on what "scoping" something means in Specify:
What does it mean for something to be scoped in Specify?
Given that all of the data of a Specify instance is housed in the same database, most data in Specify is really only useful when filtered to a specific context.
For example, when looking at more than one CollectionObjects it usually only makes sense to see CollectionObjects within one Collection (usually the CollectionObjects the user is logged into).
When you build/run a Query in the QueryBuilder, it looks at the Collection it was run within (the Collection you are logged into) and only shows you records belong to that Collection.
That is, the QueryBuilder should never show you CollectionObjects in other Collections, Loans in other Disciplines, etc.
The following diagram (taken from Table Scoping Hierarchy) shows what the most common tables are "scoped" to within Specify.
Put another way, "scoped to" can be referred to as "belongs to".
Most trees (all except Storage at the moment) are "scoped to" or "belong to" a Discipline. This means that when discussing or reviewing any particular Discipline-scoped tree (Taxon, Geography, Lithostrat, Chronostrat), it can be relevant to include which discipline the tree belongs to (is scoped to) to differentiate it from other trees in the same Specify instance.
When you are logged into a Collection and go to the Tree Viewer or Query for one of the aforementioned trees, you will only see the trees that exist for the Collection's Discipline.
In the context of Entire Table PickLists, scoping the PickLists (enabling the preference) means the results shown/given to you will be relevant to the Collection you are currently logged into.
For example. Entire Table PickLists searching for PrepTypes will only show you PrepType records from your currently logged-in Collection when they are scoped.
Entire Table PickLists searching on Loans or Gift will show you Loans/Gifts from all Collections within the Discipline of your currently logged in Collection.
If Entire Table PickLists are unscoped, then Specify will give you results from all Collections, regardless of the table's scoping or where the records are.
If you want more information, feel free to review the Full Table Scoping and Table Scoping Hierarchy sections of the Specify Institutional Scopings document on the Speciforum!
Checklist
self-explanatory (or properly documented)
Testing instructions
Preparation -> prepTypeWith the preference enabled
With the preference disabled
Summary by CodeRabbit