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

fix the script to treat the value 0 not as falsy values. #441

Closed lindaxiang closed 1 month ago

lindaxiang commented 1 month ago

The issue (https://github.com/icgc-argo/argo-dictionary/issues/440) arises because the script treats the value 0 as falsy in the condition (!$field || $field === null || checkforEmpty($field)), so it incorrectly triggers the validation error.

Steps To Test

Context:

Steps to test the behaviour:

  1. Go to 'https://platform-ui.argo-qa.cumulus.genomeinformatics.org/' and login
  2. Click on 'MONSTAR-JP' and tab 'Submit Clinical Data'
  3. Click on 'UPLOAD FILES'
  4. Submit the following test file
  5. Check the column 'treatment_start_interval' now accept value of 0
  6. Click on 'VALIDATE SUBMISSION' and no errors are showing up.
  7. Go ahead to "SIGN OFF SUBMISSION"
justincorrigible commented 1 month ago

postmortem comment: this PR removed a parenthesis that wraps the script, which we've realised was mandatory, and had to re-add afterwards. Tabs indentation is okay though, which is great for accessibility.