icgc-argo / argo-dictionary

Development of the ARGO Data Dictionary
https://docs.icgc-argo.org/dictionary
GNU Affero General Public License v3.0
2 stars 1 forks source link

🐛 Error message incorrect for fields dependent on missing required field #268

Closed hknahal closed 3 years ago

hknahal commented 3 years ago

Describe the bug

The clinical submission system throws an unexpected error for fields that are dependent on a required field that is missing in the file.

Steps To Reproduce

  1. Upload Donor file with the following:
    • leave "vital_status" field empty
    • leave "cause_of_death" field empty
    • submit a value for "survival_time"
  2. Click on "Validate submission"
  3. Link in Platform staging with error: https://platform.staging.icgc-argo.org/submission/program/DASH-CA/clinical-submission?tab=donor

script_error

The error message for the vital_status field is correct (vital_status is a required field). But the dependent fields (cause_of_death and survival_time) have the following error message: failed to run script validation, check script and input. This is happening because the script depends on the value of vital_status, but if it is missing, the script fails to run.

Expected behaviour

The error message for the cause_of_death and survival_time fields should be This field requires vital_status

rosibaj commented 3 years ago

Included in Dictionary 1.8; migration confirmed on prod release.