-
Notifications
You must be signed in to change notification settings - Fork 36
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
Tree search is not scoped properly #5059
Comments
As of #3304, Specify tries to be smart about scoping and prevent Hiearchy Exceptions thrown by the backend (as seen in #3564 and #4989) when trying to fetch a collection of resources. If the collection fetch is supposed to scoped (by specifying specify7/specifyweb/frontend/js_src/lib/components/DataModel/collection.ts Lines 105 to 111 in 080b32c
This results in behavior like in this issue (and an identical issue: #4542 (review)), where we are indicating the request should be scoped, but the frontend is determining the tree table to be 'unscopable', so it omits the
This assumption that trees are 'unscopable' is fairly reasonable: their scope can not be easily determined dynamically, but specify7/specifyweb/specify/filter_by_col.py Lines 27 to 34 in 080b32c
The preferable solution here would be to handle scoping on the backend and always pass a As mentioned in: #5044 (review) |
I somehow think that inverting is better. If we know we can't scope, frontend shouldn't scope If we can't reliably know whether we can scope or not, then frontend shouldn't decide.The ideal implementation in that PR would have done this: check if we absolutely can't scope (or can scope), then only pass in relevant flag. Otherwise, don't act smart. Yes, that would have involved some hard coding, but worth it. Should just move to backend though. |
Can recreate in edge (7.9.6) |
@grantfitzsimmons, I cannot reproduce this on Edge |
Cannot reproduce |
Describe the bug
When searching in a tree, the results are not scoped.
To Reproduce
Steps to reproduce the behavior:
hujinnhc_2024_07_01
database on the Test PanelScreenshots
https://hujinnhc20240701-edge.test.specifysystems.org/specify/tree/geography/?conformation=~~84501~84503---
Encountering this issue on
edge
,v7.9.6
,v7.9.5
, andv7.9.4
. Seems to have broken in thev7.9.4
release.Expected behavior
Only nodes from the current tree should appear!
Works correctly in
v7.9.3
.System Information
Specify 7 System Information - 2024-07-01T16_54_20.967Z.txt
Reported By
The Hebrew University of Jerusalem
Additional context
This has been encountered internally and an issue may already exist.
The text was updated successfully, but these errors were encountered: