Issue with downloading single files directly from a study within the AD portal

Description

When downloading a single file fromthis study it seems to download the wrong file. Try for example the Individual metadata file: https://www.synapse.org/#!Synapse:syn21785645. When downloading it from the portal it is the attached SOP

. This does not happen when downloading from Explore -> Data

Environment

None

Activity

Show:
Emma Mills
February 15, 2021, 11:59 PM

Thank you , the fix has been pushed to production.

Mette Peters
February 15, 2021, 11:47 PM

I tested the individual file. I got the right one

Emma Mills
February 15, 2021, 11:40 PM

, I have applied a fix on staging and verified the correct file can be downloaded directly from the study details page. Could you please also double check on staging? Thank you.

https://staging.adknowledgeportal.synapse.org/Explore/Studies/DetailsPage?Study=syn21784897

Jay Hodgson
February 12, 2021, 9:39 PM

This issue is readily reproducible by going to the next page of results in the Metadata table, and then trying to use the direct file download.

We currently have a FileEntityHandleQueryWrapper, which is being called a few times on page change. This is where the race condition exists. If it’s old results return last (which happens often in the case of loading the last page of results, since there are fewer rows), then the DirectDownload components are all configured based on the preview page of results. I don’t really understand what benefit the FileEntityHandleQueryWrapper provides us today. I think it was introduced with the hopes that we could have multiple components rely on the same "FileFetchResponse[]”, but today only the DirectDownload component uses it.

Recommend we simplify for today, and change the DirectDownload to ask for the "FileFetchResponse” (which I think is what initially implemented, before I asked for an optimization for the HasAccess and DirectDownload to use the same results!).

Jay Hodgson
February 9, 2021, 7:14 PM
Fixed

Assignee

Emma Mills

Reporter

Mette Peters

Validator

Mette Peters

Priority

Major

Labels

None

Development Area

Portals

Sprint

None

Release Version History

None

Story Points

None

Epic Link

None

Slack Channel

None