Skip to content

Paths to object well image fix (rebased onto metadata52)#4934

Merged
joshmoore merged 3 commits intoome:metadata52from
atarkowska:rebased/metadata52/paths_to_object_wellImage_fix
Nov 11, 2016
Merged

Paths to object well image fix (rebased onto metadata52)#4934
joshmoore merged 3 commits intoome:metadata52from
atarkowska:rebased/metadata52/paths_to_object_wellImage_fix

Conversation

@atarkowska
Copy link
Copy Markdown
Member

This is the same as gh-4933 but rebased onto metadata52.


What this PR does

This fixes a bug found during IDR testing today and reproduced on develop:
https://www.openmicroscopy.org/qa2/qa/feedback/17421/
Introduced in #4774

To reproduce / test:

  • Need to have more than 200 (1 page) of orphaned images (so that orphaned images are paginated)
  • Search for an Image that is in a Well
  • In search results, select image and expand the Tables panel to the right (NB: don't need to have any Tables data).
  • This makes a call to webclient/paths_to_object/?image=ID which previously failed if the image is in a Well (not orphaned) AND there are more than 1 page of orphaned images.
  • With this fix, should get no error when Tables panel is expanded.
  • Also, test that going to webclient/paths_to_object/?image=ID for the Image in Well returns json that includes the WellID

Check that orphaned pagination still works

  • Browse to orphaned images and pick an image that is on page 2 (or more).
  • Copy the link to it, paste into browser and check you are returned to the correct page of orphaned images and image is selected.
  • Also can check that webclient/paths_to_object/?image=ID for this image has correct pagination details returned.

The bug was because we try to find the index of orphaned image in list of ALL orphaned images (to know which page it is on) BEFORE checking whether the image is in a Well.
This was also very slow on IDR because it has > 10,000 orphaned images.

Now, we only try to load ALL orphaned images to find page AFTER we've checked to see if image is in a Well.

cc @joshmoore @aleksandra-tarkowska @manics

@atarkowska
Copy link
Copy Markdown
Member Author

--rebased-from #4933

@joshmoore
Copy link
Copy Markdown
Member

Merging based on #4933 (comment)

@joshmoore joshmoore merged commit 0da50d0 into ome:metadata52 Nov 11, 2016
@joshmoore joshmoore deleted the rebased/metadata52/paths_to_object_wellImage_fix branch November 11, 2016 17:10
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.

3 participants