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
Search result tables 13255 #4774
Conversation
If Image, when tab is expanded we first query to get WellId then do the Well query for tables data.
@@ -685,7 +685,8 @@ def paths_to_object(conn, experimenter_id=None, project_id=None, | |||
select coalesce(sowner.id, plowner.id, aowner.id, wsowner.id), | |||
slink.parent.id, | |||
plate.id, | |||
acquisition.id | |||
acquisition.id, | |||
well.id | |||
from WellSample wellsample | |||
left outer join wellsample.details.owner wsowner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR, but why are wsowner
and aowner
the same: wellsample.details.owner
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the owner of the top element in the path. E.g. Screen OR Plate. Probably never need Acquisition or WellSample. Even if lower elements in the path are owned by a different owner, that doesn't matter. We just need to know the context for browsing the jsTree, starting at Experimenter -> Screen or Experimenter -> Plate.
Otherwise good to merge. |
Maybe add some robot tests cc @bramalingam |
could robot test be added in a separate PR, would be great if that is rebased onto metadata branch and we could test along side mapr |
--rebased-to #4788 |
Filed card to come back to this before 5.3.0: https://trello.com/c/QlAb4anu/158-search-result-tables-robot-tests Merging along with #4788, any refactoring or bug fixing should happen in paired PRs (develop/metadata52) |
What this PR does
Fixes https://trac.openmicroscopy.org/ome/ticket/13255. When an Image from SPW is found in a search and loaded in the right panel, we don't know that this is in a Well.
Therefore, the Tables tab was not shown so you couldn't query for tables data (needs Well Id).
Now, we always show the Tables tab, and if a user expands it then we do an AJAX call to check whether the image is in a Well (uses the paths_to_object query). If we get a Well Id then we do a second query to load the Tables data as normal.
Testing this PR
See ticket above.