Skip to content

Conversation

@otchet-broad
Copy link
Contributor

Addresses

https://broadworkbench.atlassian.net/browse/DT-2757

Summary

Updates to documents were only being saved for the first dataset on a study.


Have you read CONTRIBUTING.md lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

throws IOException {
List<FileStorageObject> updateDatasetFSOs = new ArrayList<>();

if (files.containsKey(String.format(NIH_INSTITUTIONAL_CERTIFICATION_NAME, 0))) {
Copy link
Contributor Author

@otchet-broad otchet-broad Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the core of the bug. When multiple datasets are updated, we can have multiple files submitted. Assuming the files key was always consentGroups[**0**].nihInstitutionalCertificationFile is incorrect. The update payload might be just a change for consentGroup[5], or a case where multiple consentGroup entries are updated at the same time.

Given this bug I've made https://broadworkbench.atlassian.net/browse/DT-2759

@otchet-broad otchet-broad marked this pull request as ready for review December 19, 2025 22:01
@otchet-broad otchet-broad requested a review from a team as a code owner December 19, 2025 22:01
@otchet-broad otchet-broad requested review from eweitz, fboulnois, kevinmarete and rushtong and removed request for a team December 19, 2025 22:01
@sonarqubecloud
Copy link

datasetUpdate.dacId,
datasetUpdate.props,
studyUpdate.files,
datasetUpdate.files,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing the studyUpdate files into the dataset updates (and inserts ~L271) was also problematic. The files would be uploaded to GCS but the FSOs wouldn't be recorded.

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.

2 participants