Skip to content

Conversation

@otchet-broad
Copy link
Contributor

@otchet-broad otchet-broad commented Dec 19, 2025

Addresses

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

  • Displays the filename for the file previously uploaded
  • Ensures the front end does not send the FileStorageObject to the backend because the backend will try to interpret it as a file (bug in current form in production as well)
  • Update nihCertificationFile to match backend name: nihInstitutionalCertificationFile
  • Makes NIH Institutional File a downloadable link when it is saved in consent.

Summary

  • Alternative Sharing Plan (text since we don't have a download API for this)
image
  • Link for NIH Institutional Certification Document
image

Have you read Terra's Contributing Guide 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

…tes; fix model name to match backend API name
@otchet-broad otchet-broad changed the title Adds showing file name; ensures proper updates are sent for file upda… [DT-2755] Adds showing file name + errata Dec 19, 2025
description="If an Institutional Certification for this consent group exists, please upload it here"
id="nihInstitutionalCertificationFile"
defaultValue={current.nihInstitutionalCertificationFile}
id="addedNIHInstitutionalCertificationFile"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed because there's a bit of a confusing state within consent. The object being sent to the backend should be a File and not a FileStorageObject.
In consent a Dataset calls the field nihInstitutionalCertificationFile and it contains FileStorageObject
When sending the consentGroup payload, this field should not be mutated. We should only ever set a file as the specific structure specified in the multipart form payload in DataSubmissionFormV2.buildMultiPartFormData

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ncalvanese1 - We should catch up on your script. :-)

@otchet-broad otchet-broad marked this pull request as ready for review December 19, 2025 21:57
@otchet-broad otchet-broad requested a review from a team as a code owner December 19, 2025 21:57
@otchet-broad otchet-broad requested review from eweitz, fboulnois, kevinmarete and rushtong and removed request for a team December 19, 2025 21:57
…lse; handle data cases from Nate's scripts that the backend allows.

consentGroup.mor = !isEmpty(dataset.dataUse.publicationMoratorium)
consentGroup.morDate = dataset.dataUse.publicationMoratorium
if (isEmpty(dataset.dataUse.publicationMoratorium)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can get an empty string from the backend.

consentGroup.col = dataset.dataUse.collaboratorRequired
consentGroup.irb = dataset.dataUse.ethicsApprovalRequired
consentGroup.gs = dataset.dataUse.geographicalRestrictions
if (isEmpty(dataset.dataUse.geographicalRestrictions)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are getting empty strings in cases for this value.

consentGroup.diseaseSpecificUse = dataset.dataUse.diseaseRestrictions
consentGroup.poa = dataset.dataUse.populationOriginsAncestry
consentGroup.otherPrimary = dataset.dataUse.other
if (isEmpty(dataset.dataUse.other)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are getting empty strings in cases for this value.

Copy link
Contributor

Choose a reason for hiding this comment

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

We likely have a bug on the back end that sends empty strings.

}
consentGroup.npu = dataset.dataUse.nonProfitUse
consentGroup.otherSecondary = dataset.dataUse.secondaryOther
if (consentGroup.otherSecondary && consentGroup.otherSecondary.length > 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can get an empty string from the backend.

}
consentGroup.npu = dataset.dataUse.nonProfitUse
consentGroup.otherSecondary = dataset.dataUse.secondaryOther
if (isEmpty(consentGroup.otherSecondary)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can get an empty string from the backend.

@sonarqubecloud
Copy link

Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

Looks good 👍🏽

consentGroup.diseaseSpecificUse = dataset.dataUse.diseaseRestrictions
consentGroup.poa = dataset.dataUse.populationOriginsAncestry
consentGroup.otherPrimary = dataset.dataUse.other
if (isEmpty(dataset.dataUse.other)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We likely have a bug on the back end that sends empty strings.

@otchet-broad otchet-broad merged commit 0093bdb into develop Jan 5, 2026
11 checks passed
@otchet-broad otchet-broad deleted the otchet-dt-2755-display-filenames-in-s4r-form branch January 5, 2026 14:28
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.

4 participants